| POST | /provider |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreateProviderRequest
{
public String name = null;
public String taxCode = null;
public String address = null;
public String email = null;
public String phone = null;
public String telephone = null;
public String phoneNumber = null;
public String mst = null;
public String bankAccount = null;
public String bankName = null;
public String additionalInfo = null;
public Integer providerType = null;
public String getName() { return name; }
public CreateProviderRequest setName(String value) { this.name = value; return this; }
public String getTaxCode() { return taxCode; }
public CreateProviderRequest setTaxCode(String value) { this.taxCode = value; return this; }
public String getAddress() { return address; }
public CreateProviderRequest setAddress(String value) { this.address = value; return this; }
public String getEmail() { return email; }
public CreateProviderRequest setEmail(String value) { this.email = value; return this; }
public String getPhone() { return phone; }
public CreateProviderRequest setPhone(String value) { this.phone = value; return this; }
public String getTelephone() { return telephone; }
public CreateProviderRequest setTelephone(String value) { this.telephone = value; return this; }
public String getPhoneNumber() { return phoneNumber; }
public CreateProviderRequest setPhoneNumber(String value) { this.phoneNumber = value; return this; }
public String getMst() { return mst; }
public CreateProviderRequest setMst(String value) { this.mst = value; return this; }
public String getBankAccount() { return bankAccount; }
public CreateProviderRequest setBankAccount(String value) { this.bankAccount = value; return this; }
public String getBankName() { return bankName; }
public CreateProviderRequest setBankName(String value) { this.bankName = value; return this; }
public String getAdditionalInfo() { return additionalInfo; }
public CreateProviderRequest setAdditionalInfo(String value) { this.additionalInfo = value; return this; }
public Integer getProviderType() { return providerType; }
public CreateProviderRequest setProviderType(Integer value) { this.providerType = value; return this; }
}
public static class Provider
{
public Integer id = null;
public String name = null;
public String taxCode = null;
public String address = null;
public String email = null;
public String phone = null;
public String bankAccount = null;
public String bankName = null;
public String additionalInfo = null;
public Integer providerType = null;
public Date createdAt = null;
public Integer createdBy = null;
public Integer getId() { return id; }
public Provider setId(Integer value) { this.id = value; return this; }
public String getName() { return name; }
public Provider setName(String value) { this.name = value; return this; }
public String getTaxCode() { return taxCode; }
public Provider setTaxCode(String value) { this.taxCode = value; return this; }
public String getAddress() { return address; }
public Provider setAddress(String value) { this.address = value; return this; }
public String getEmail() { return email; }
public Provider setEmail(String value) { this.email = value; return this; }
public String getPhone() { return phone; }
public Provider setPhone(String value) { this.phone = value; return this; }
public String getBankAccount() { return bankAccount; }
public Provider setBankAccount(String value) { this.bankAccount = value; return this; }
public String getBankName() { return bankName; }
public Provider setBankName(String value) { this.bankName = value; return this; }
public String getAdditionalInfo() { return additionalInfo; }
public Provider setAdditionalInfo(String value) { this.additionalInfo = value; return this; }
public Integer getProviderType() { return providerType; }
public Provider setProviderType(Integer value) { this.providerType = value; return this; }
public Date getCreatedAt() { return createdAt; }
public Provider setCreatedAt(Date value) { this.createdAt = value; return this; }
public Integer getCreatedBy() { return createdBy; }
public Provider setCreatedBy(Integer value) { this.createdBy = value; return this; }
}
}
Java CreateProviderRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /provider HTTP/1.1
Host: qlcn-api.vsmlab.vn
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateProviderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<AdditionalInfo>String</AdditionalInfo>
<Address>String</Address>
<BankAccount>String</BankAccount>
<BankName>String</BankName>
<Email>String</Email>
<MST>String</MST>
<Name>String</Name>
<Phone>String</Phone>
<PhoneNumber>String</PhoneNumber>
<ProviderType>0</ProviderType>
<TaxCode>String</TaxCode>
<Telephone>String</Telephone>
</CreateProviderRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <Provider xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models"> <AdditionalInfo>String</AdditionalInfo> <Address>String</Address> <BankAccount>String</BankAccount> <BankName>String</BankName> <CreatedAt>0001-01-01T00:00:00</CreatedAt> <CreatedBy>0</CreatedBy> <DeletedAt>0001-01-01T00:00:00</DeletedAt> <DeletedBy>0</DeletedBy> <Email>String</Email> <Id>0</Id> <IsDeleted>false</IsDeleted> <Name>String</Name> <Phone>String</Phone> <ProviderType>0</ProviderType> <TaxCode>String</TaxCode> </Provider>