| Required permission: | manage_equipment |
| POST | /equipment/{Id}/approve |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ApproveEquipmentRequest
{
public Integer id = null;
public Boolean approve = null;
public Integer getId() { return id; }
public ApproveEquipmentRequest setId(Integer value) { this.id = value; return this; }
public Boolean isApprove() { return approve; }
public ApproveEquipmentRequest setApprove(Boolean value) { this.approve = value; return this; }
}
public static class Equipment
{
public Integer id = null;
@Required()
@StringLength(500)
public String name = null;
@StringLength(1000)
public String imageUrl = null;
public String description = null;
@StringLength(50)
public String unit = null;
public Integer materialTypeId = null;
public Integer status = null;
public Boolean isDeleted = 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;
@Ignore()
public String materialTypeName = null;
@Ignore()
public String createdByName = null;
@Ignore()
public String approvedByName = null;
public Integer getId() { return id; }
public Equipment setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public Equipment setName(String value) { this.name = value; return this; }
public String getImageUrl() { return imageUrl; }
public Equipment setImageUrl(String value) { this.imageUrl = value; return this; }
public String getDescription() { return description; }
public Equipment setDescription(String value) { this.description = value; return this; }
public String getUnit() { return unit; }
public Equipment setUnit(String value) { this.unit = value; return this; }
public Integer getMaterialTypeId() { return materialTypeId; }
public Equipment setMaterialTypeId(Integer value) { this.materialTypeId = value; return this; }
public Integer getStatus() { return status; }
public Equipment setStatus(Integer value) { this.status = value; return this; }
public Boolean getIsDeleted() { return isDeleted; }
public Equipment setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
public Date getApprovedAt() { return approvedAt; }
public Equipment setApprovedAt(Date value) { this.approvedAt = value; return this; }
public Integer getApprovedBy() { return approvedBy; }
public Equipment setApprovedBy(Integer value) { this.approvedBy = value; return this; }
public Date getCreatedAt() { return createdAt; }
public Equipment setCreatedAt(Date value) { this.createdAt = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public Equipment setCreatedBy(Integer value) { this.createdBy = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public Equipment setUpdatedAt(Date value) { this.updatedAt = value; return this; }
public Integer getUpdatedBy() { return updatedBy; }
public Equipment setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
public String getMaterialTypeName() { return materialTypeName; }
public Equipment setMaterialTypeName(String value) { this.materialTypeName = value; return this; }
public String getCreatedByName() { return createdByName; }
public Equipment setCreatedByName(String value) { this.createdByName = value; return this; }
public String getApprovedByName() { return approvedByName; }
public Equipment setApprovedByName(String value) { this.approvedByName = value; return this; }
}
}
Java ApproveEquipmentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /equipment/{Id}/approve HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":0,"approve":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":0,"name":"String","imageUrl":"String","description":"String","unit":"String","materialTypeId":0,"status":0,"isDeleted":false,"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,"materialTypeName":"String","createdByName":"String","approvedByName":"String"}