| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET,OPTIONS | /v1/StripeCustomer | ||
|---|---|---|---|
| PUT,OPTIONS | /v1/StripeCustomer | ||
| POST,OPTIONS | /v1/StripeCustomer |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class StripeCustomerRequest
{
public Customer Customer = null;
public Address Address = null;
public Customer getCustomer() { return Customer; }
public StripeCustomerRequest setCustomer(Customer value) { this.Customer = value; return this; }
public Address getAddress() { return Address; }
public StripeCustomerRequest setAddress(Address value) { this.Address = value; return this; }
}
public static class Customer
{
public Integer ID = null;
public String CustomerCode = null;
public String BusinessName = null;
public String FirstName = null;
public String LastName = null;
public String Email = null;
public UUID UID = null;
public Integer AgentId = null;
public Integer getId() { return ID; }
public Customer setId(Integer value) { this.ID = value; return this; }
public String getCustomerCode() { return CustomerCode; }
public Customer setCustomerCode(String value) { this.CustomerCode = value; return this; }
public String getBusinessName() { return BusinessName; }
public Customer setBusinessName(String value) { this.BusinessName = value; return this; }
public String getFirstName() { return FirstName; }
public Customer setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public Customer setLastName(String value) { this.LastName = value; return this; }
public String getEmail() { return Email; }
public Customer setEmail(String value) { this.Email = value; return this; }
public UUID getUid() { return UID; }
public Customer setUid(UUID value) { this.UID = value; return this; }
public Integer getAgentId() { return AgentId; }
public Customer setAgentId(Integer value) { this.AgentId = value; return this; }
}
public static class Address
{
public Integer ID = null;
public Short AddressTypeID = null;
public String AddressContact = null;
public String AttentionTo = null;
public String AddressLine1 = null;
public String AddressLine2 = null;
public String AddressLine3 = null;
public String AddressCity = null;
public String AddressState = null;
public String AddressZip = null;
public String AddressCountry = null;
public String PhoneNumber = null;
public String FaxNumber = null;
public UUID UID = null;
public String Name = null;
public Integer getId() { return ID; }
public Address setId(Integer value) { this.ID = value; return this; }
public Short getAddressTypeID() { return AddressTypeID; }
public Address setAddressTypeID(Short value) { this.AddressTypeID = value; return this; }
public String getAddressContact() { return AddressContact; }
public Address setAddressContact(String value) { this.AddressContact = value; return this; }
public String getAttentionTo() { return AttentionTo; }
public Address setAttentionTo(String value) { this.AttentionTo = value; return this; }
public String getAddressLine1() { return AddressLine1; }
public Address setAddressLine1(String value) { this.AddressLine1 = value; return this; }
public String getAddressLine2() { return AddressLine2; }
public Address setAddressLine2(String value) { this.AddressLine2 = value; return this; }
public String getAddressLine3() { return AddressLine3; }
public Address setAddressLine3(String value) { this.AddressLine3 = value; return this; }
public String getAddressCity() { return AddressCity; }
public Address setAddressCity(String value) { this.AddressCity = value; return this; }
public String getAddressState() { return AddressState; }
public Address setAddressState(String value) { this.AddressState = value; return this; }
public String getAddressZip() { return AddressZip; }
public Address setAddressZip(String value) { this.AddressZip = value; return this; }
public String getAddressCountry() { return AddressCountry; }
public Address setAddressCountry(String value) { this.AddressCountry = value; return this; }
public String getPhoneNumber() { return PhoneNumber; }
public Address setPhoneNumber(String value) { this.PhoneNumber = value; return this; }
public String getFaxNumber() { return FaxNumber; }
public Address setFaxNumber(String value) { this.FaxNumber = value; return this; }
public UUID getUid() { return UID; }
public Address setUid(UUID value) { this.UID = value; return this; }
public String getName() { return Name; }
public Address setName(String value) { this.Name = value; return this; }
}
public static class StripeCustomerResponse
{
public ResponseStatus ResponseStatus = null;
public StripeCustomer StripeCustomer = null;
public Boolean Success = null;
public String Message = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public StripeCustomerResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public StripeCustomer getStripeCustomer() { return StripeCustomer; }
public StripeCustomerResponse setStripeCustomer(StripeCustomer value) { this.StripeCustomer = value; return this; }
public Boolean isSuccess() { return Success; }
public StripeCustomerResponse setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public StripeCustomerResponse setMessage(String value) { this.Message = value; return this; }
}
public static class StripeCustomer
{
public Integer StripeCustomerId = null;
public Integer StripeMerchantId = null;
public Integer CustomerId = null;
public String StripeId = null;
public Integer AgentId = null;
public String StripeCustomerSessionClientSecret = null;
public Integer getStripeCustomerId() { return StripeCustomerId; }
public StripeCustomer setStripeCustomerId(Integer value) { this.StripeCustomerId = value; return this; }
public Integer getStripeMerchantId() { return StripeMerchantId; }
public StripeCustomer setStripeMerchantId(Integer value) { this.StripeMerchantId = value; return this; }
public Integer getCustomerId() { return CustomerId; }
public StripeCustomer setCustomerId(Integer value) { this.CustomerId = value; return this; }
public String getStripeId() { return StripeId; }
public StripeCustomer setStripeId(String value) { this.StripeId = value; return this; }
public Integer getAgentId() { return AgentId; }
public StripeCustomer setAgentId(Integer value) { this.AgentId = value; return this; }
public String getStripeCustomerSessionClientSecret() { return StripeCustomerSessionClientSecret; }
public StripeCustomer setStripeCustomerSessionClientSecret(String value) { this.StripeCustomerSessionClientSecret = value; return this; }
}
}
Java StripeCustomerRequest 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 /v1/StripeCustomer HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Customer:
{
ID: 0,
CustomerCode: String,
BusinessName: String,
FirstName: String,
LastName: String,
Email: String,
UID: 00000000000000000000000000000000,
AgentId: 0
},
Address:
{
ID: 0,
AddressTypeID: 0,
AddressContact: String,
AttentionTo: String,
AddressLine1: String,
AddressLine2: String,
AddressLine3: String,
AddressCity: String,
AddressState: String,
AddressZip: String,
AddressCountry: String,
PhoneNumber: String,
FaxNumber: String,
UID: 00000000000000000000000000000000,
Name: String
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
StripeCustomer:
{
StripeCustomerId: 0,
StripeMerchantId: 0,
CustomerId: 0,
StripeId: String,
AgentId: 0,
StripeCustomerSessionClientSecret: String
},
Success: False,
Message: String
}