tvpl.api

<back to all web services

UpdateProcurementItemRequest

Requires Authentication
The following routes are available for this service:
PUT/procurement/item/{Id}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class UpdateProcurementItemRequest
    {
        public Integer id = null;
        public Integer equipmentId = null;
        public String productName = null;
        public String technicalSpec = null;
        public String unit = null;
        public Integer quantity = null;
        public String purpose = null;
        public String note = null;
        
        public Integer getId() { return id; }
        public UpdateProcurementItemRequest setId(Integer value) { this.id = value; return this; }
        public Integer getEquipmentId() { return equipmentId; }
        public UpdateProcurementItemRequest setEquipmentId(Integer value) { this.equipmentId = value; return this; }
        public String getProductName() { return productName; }
        public UpdateProcurementItemRequest setProductName(String value) { this.productName = value; return this; }
        public String getTechnicalSpec() { return technicalSpec; }
        public UpdateProcurementItemRequest setTechnicalSpec(String value) { this.technicalSpec = value; return this; }
        public String getUnit() { return unit; }
        public UpdateProcurementItemRequest setUnit(String value) { this.unit = value; return this; }
        public Integer getQuantity() { return quantity; }
        public UpdateProcurementItemRequest setQuantity(Integer value) { this.quantity = value; return this; }
        public String getPurpose() { return purpose; }
        public UpdateProcurementItemRequest setPurpose(String value) { this.purpose = value; return this; }
        public String getNote() { return note; }
        public UpdateProcurementItemRequest setNote(String value) { this.note = value; return this; }
    }

    public static class ProcurementItem
    {
        public Integer id = null;
        public Integer batchId = null;
        public Integer departmentId = null;
        public Integer equipmentId = null;
        @Required()
        @StringLength(500)
        public String productName = null;

        public String technicalSpec = null;
        @StringLength(50)
        public String unit = null;

        public Integer quantity = null;
        public String purpose = null;
        public String note = null;
        public Integer approvalStatus = null;
        public String approvalNote = null;
        public Date approvedAt = null;
        public Integer approvedBy = null;
        public Date createdAt = null;
        public Integer createdBy = null;
        public Date updatedAt = null;
        public Integer updatedBy = null;
        public Boolean isDeleted = null;
        public Date deletedAt = null;
        public Integer deletedBy = null;
        @Ignore()
        public String departmentName = null;

        @Ignore()
        public String createdByName = null;

        @Ignore()
        public String approvedByName = null;
        
        public Integer getId() { return id; }
        public ProcurementItem setId(Integer value) { this.id = value; return this; }
        public Integer getBatchId() { return batchId; }
        public ProcurementItem setBatchId(Integer value) { this.batchId = value; return this; }
        public Integer getDepartmentId() { return departmentId; }
        public ProcurementItem setDepartmentId(Integer value) { this.departmentId = value; return this; }
        public Integer getEquipmentId() { return equipmentId; }
        public ProcurementItem setEquipmentId(Integer value) { this.equipmentId = value; return this; }
        public String getProductName() { return productName; }
        public ProcurementItem setProductName(String value) { this.productName = value; return this; }
        public String getTechnicalSpec() { return technicalSpec; }
        public ProcurementItem setTechnicalSpec(String value) { this.technicalSpec = value; return this; }
        public String getUnit() { return unit; }
        public ProcurementItem setUnit(String value) { this.unit = value; return this; }
        public Integer getQuantity() { return quantity; }
        public ProcurementItem setQuantity(Integer value) { this.quantity = value; return this; }
        public String getPurpose() { return purpose; }
        public ProcurementItem setPurpose(String value) { this.purpose = value; return this; }
        public String getNote() { return note; }
        public ProcurementItem setNote(String value) { this.note = value; return this; }
        public Integer getApprovalStatus() { return approvalStatus; }
        public ProcurementItem setApprovalStatus(Integer value) { this.approvalStatus = value; return this; }
        public String getApprovalNote() { return approvalNote; }
        public ProcurementItem setApprovalNote(String value) { this.approvalNote = value; return this; }
        public Date getApprovedAt() { return approvedAt; }
        public ProcurementItem setApprovedAt(Date value) { this.approvedAt = value; return this; }
        public Integer getApprovedBy() { return approvedBy; }
        public ProcurementItem setApprovedBy(Integer value) { this.approvedBy = value; return this; }
        public Date getCreatedAt() { return createdAt; }
        public ProcurementItem setCreatedAt(Date value) { this.createdAt = value; return this; }
        public Integer getCreatedBy() { return createdBy; }
        public ProcurementItem setCreatedBy(Integer value) { this.createdBy = value; return this; }
        public Date getUpdatedAt() { return updatedAt; }
        public ProcurementItem setUpdatedAt(Date value) { this.updatedAt = value; return this; }
        public Integer getUpdatedBy() { return updatedBy; }
        public ProcurementItem setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
        public Boolean getIsDeleted() { return isDeleted; }
        public ProcurementItem setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
        public Date getDeletedAt() { return deletedAt; }
        public ProcurementItem setDeletedAt(Date value) { this.deletedAt = value; return this; }
        public Integer getDeletedBy() { return deletedBy; }
        public ProcurementItem setDeletedBy(Integer value) { this.deletedBy = value; return this; }
        public String getDepartmentName() { return departmentName; }
        public ProcurementItem setDepartmentName(String value) { this.departmentName = value; return this; }
        public String getCreatedByName() { return createdByName; }
        public ProcurementItem setCreatedByName(String value) { this.createdByName = value; return this; }
        public String getApprovedByName() { return approvedByName; }
        public ProcurementItem setApprovedByName(String value) { this.approvedByName = value; return this; }
    }

}

Java UpdateProcurementItemRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /procurement/item/{Id} HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	equipmentId: 0,
	productName: String,
	technicalSpec: String,
	unit: String,
	quantity: 0,
	purpose: String,
	note: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	batchId: 0,
	departmentId: 0,
	equipmentId: 0,
	productName: String,
	technicalSpec: String,
	unit: String,
	quantity: 0,
	purpose: String,
	note: String,
	approvalStatus: 0,
	approvalNote: String,
	approvedAt: "0001-01-01T00:00:00.0000000+07:06",
	approvedBy: 0,
	createdAt: "0001-01-01T00:00:00.0000000+07:06",
	createdBy: 0,
	updatedAt: "0001-01-01T00:00:00.0000000+07:06",
	updatedBy: 0,
	isDeleted: False,
	deletedAt: "0001-01-01T00:00:00.0000000+07:06",
	deletedBy: 0,
	departmentName: String,
	createdByName: String,
	approvedByName: String
}