| Required role: | super-admin |
| POST | /document-number-format |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateDocumentNumberFormatRequest
{
public String typeKey = null;
public String name = null;
public String formatTemplate = null;
public Integer padding = null;
public Integer resetPeriod = null;
public String labelKeys = null;
public Boolean isActive = null;
public String getTypeKey() { return typeKey; }
public CreateDocumentNumberFormatRequest setTypeKey(String value) { this.typeKey = value; return this; }
public String getName() { return name; }
public CreateDocumentNumberFormatRequest setName(String value) { this.name = value; return this; }
public String getFormatTemplate() { return formatTemplate; }
public CreateDocumentNumberFormatRequest setFormatTemplate(String value) { this.formatTemplate = value; return this; }
public Integer getPadding() { return padding; }
public CreateDocumentNumberFormatRequest setPadding(Integer value) { this.padding = value; return this; }
public Integer getResetPeriod() { return resetPeriod; }
public CreateDocumentNumberFormatRequest setResetPeriod(Integer value) { this.resetPeriod = value; return this; }
public String getLabelKeys() { return labelKeys; }
public CreateDocumentNumberFormatRequest setLabelKeys(String value) { this.labelKeys = value; return this; }
public Boolean getIsActive() { return isActive; }
public CreateDocumentNumberFormatRequest setIsActive(Boolean value) { this.isActive = value; return this; }
}
public static class DocumentNumberFormat
{
public Integer id = null;
@Required()
@StringLength(50)
public String typeKey = null;
@Required()
@StringLength(255)
public String name = null;
@Required()
@StringLength(255)
public String formatTemplate = null;
public Integer padding = null;
public Integer resetPeriod = null;
@StringLength(500)
public String labelKeys = null;
public Boolean isActive = null;
public Boolean isDeleted = null;
public Date deletedAt = null;
public Integer deletedBy = null;
public Date createdAt = null;
public Integer createdBy = null;
public Date updatedAt = null;
public Integer updatedBy = null;
public Integer getId() { return id; }
public DocumentNumberFormat setId(Integer value) { this.id = value; return this; }
public String getTypeKey() { return typeKey; }
public DocumentNumberFormat setTypeKey(String value) { this.typeKey = value; return this; }
public String getName() { return name; }
public DocumentNumberFormat setName(String value) { this.name = value; return this; }
public String getFormatTemplate() { return formatTemplate; }
public DocumentNumberFormat setFormatTemplate(String value) { this.formatTemplate = value; return this; }
public Integer getPadding() { return padding; }
public DocumentNumberFormat setPadding(Integer value) { this.padding = value; return this; }
public Integer getResetPeriod() { return resetPeriod; }
public DocumentNumberFormat setResetPeriod(Integer value) { this.resetPeriod = value; return this; }
public String getLabelKeys() { return labelKeys; }
public DocumentNumberFormat setLabelKeys(String value) { this.labelKeys = value; return this; }
public Boolean getIsActive() { return isActive; }
public DocumentNumberFormat setIsActive(Boolean value) { this.isActive = value; return this; }
public Boolean getIsDeleted() { return isDeleted; }
public DocumentNumberFormat setIsDeleted(Boolean value) { this.isDeleted = value; return this; }
public Date getDeletedAt() { return deletedAt; }
public DocumentNumberFormat setDeletedAt(Date value) { this.deletedAt = value; return this; }
public Integer getDeletedBy() { return deletedBy; }
public DocumentNumberFormat setDeletedBy(Integer value) { this.deletedBy = value; return this; }
public Date getCreatedAt() { return createdAt; }
public DocumentNumberFormat setCreatedAt(Date value) { this.createdAt = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public DocumentNumberFormat setCreatedBy(Integer value) { this.createdBy = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public DocumentNumberFormat setUpdatedAt(Date value) { this.updatedAt = value; return this; }
public Integer getUpdatedBy() { return updatedBy; }
public DocumentNumberFormat setUpdatedBy(Integer value) { this.updatedBy = value; return this; }
}
}
Java CreateDocumentNumberFormatRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /document-number-format HTTP/1.1
Host: etc-api.vsmlab.vn
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
typeKey: String,
name: String,
formatTemplate: String,
padding: 0,
resetPeriod: 0,
labelKeys: String,
isActive: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: 0,
typeKey: String,
name: String,
formatTemplate: String,
padding: 0,
resetPeriod: 0,
labelKeys: String,
isActive: False,
isDeleted: False,
deletedAt: "0001-01-01T00:00:00.0000000+07:06",
deletedBy: 0,
createdAt: "0001-01-01T00:00:00.0000000+07:06",
createdBy: 0,
updatedAt: "0001-01-01T00:00:00.0000000+07:06",
updatedBy: 0
}