| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET | /v1/CustomerPayments/{OrderID} | ||
|---|---|---|---|
| POST,PUT,OPTIONS | /v1/CustomerPayments |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CustomerPaymentsRequest
{
public Customer Customer = null;
public UUID OrderID = null;
public PaymentInfo PaymentInfo = null;
public Customer getCustomer() { return Customer; }
public CustomerPaymentsRequest setCustomer(Customer value) { this.Customer = value; return this; }
public UUID getOrderID() { return OrderID; }
public CustomerPaymentsRequest setOrderID(UUID value) { this.OrderID = value; return this; }
public PaymentInfo getPaymentInfo() { return PaymentInfo; }
public CustomerPaymentsRequest setPaymentInfo(PaymentInfo value) { this.PaymentInfo = 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 PaymentInfo
{
public String PaymentType = null;
public String CardNumber = null;
public String ExpDate = null;
public String CCV = null;
public String StripeToken = null;
public Integer AgentId = null;
public String getPaymentType() { return PaymentType; }
public PaymentInfo setPaymentType(String value) { this.PaymentType = value; return this; }
public String getCardNumber() { return CardNumber; }
public PaymentInfo setCardNumber(String value) { this.CardNumber = value; return this; }
public String getExpDate() { return ExpDate; }
public PaymentInfo setExpDate(String value) { this.ExpDate = value; return this; }
public String getCcv() { return CCV; }
public PaymentInfo setCcv(String value) { this.CCV = value; return this; }
public String getStripeToken() { return StripeToken; }
public PaymentInfo setStripeToken(String value) { this.StripeToken = value; return this; }
public Integer getAgentId() { return AgentId; }
public PaymentInfo setAgentId(Integer value) { this.AgentId = value; return this; }
}
public static class CustomerPaymentsResponse
{
public ResponseStatus ResponseStatus = null;
public Boolean PaymentIntentSuccess = null;
public Boolean PaymentSuccess = null;
public Boolean SubscriptionSuccess = null;
public String Message = null;
public String ReceiptUrl = null;
public String AgentNumber = null;
public String ClientSecret = null;
public CustomerPayment CustomerPayment = null;
public String PublicOrderID = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public CustomerPaymentsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public Boolean isPaymentIntentSuccess() { return PaymentIntentSuccess; }
public CustomerPaymentsResponse setPaymentIntentSuccess(Boolean value) { this.PaymentIntentSuccess = value; return this; }
public Boolean isPaymentSuccess() { return PaymentSuccess; }
public CustomerPaymentsResponse setPaymentSuccess(Boolean value) { this.PaymentSuccess = value; return this; }
public Boolean isSubscriptionSuccess() { return SubscriptionSuccess; }
public CustomerPaymentsResponse setSubscriptionSuccess(Boolean value) { this.SubscriptionSuccess = value; return this; }
public String getMessage() { return Message; }
public CustomerPaymentsResponse setMessage(String value) { this.Message = value; return this; }
public String getReceiptUrl() { return ReceiptUrl; }
public CustomerPaymentsResponse setReceiptUrl(String value) { this.ReceiptUrl = value; return this; }
public String getAgentNumber() { return AgentNumber; }
public CustomerPaymentsResponse setAgentNumber(String value) { this.AgentNumber = value; return this; }
public String getClientSecret() { return ClientSecret; }
public CustomerPaymentsResponse setClientSecret(String value) { this.ClientSecret = value; return this; }
public CustomerPayment getCustomerPayment() { return CustomerPayment; }
public CustomerPaymentsResponse setCustomerPayment(CustomerPayment value) { this.CustomerPayment = value; return this; }
public String getPublicOrderID() { return PublicOrderID; }
public CustomerPaymentsResponse setPublicOrderID(String value) { this.PublicOrderID = value; return this; }
}
public static class CustomerPayment
{
public Integer ID = null;
public Integer CustomerID = null;
public Integer OrderHeaderID = null;
public String Amount = null;
public Boolean Approved = null;
public String AuthCode = null;
public String CardNumber = null;
public String Message = null;
public Integer ResponseCode = null;
public String TransactionId = null;
public Date TransactionDate = null;
public String FullResponse = null;
public Integer PaymentStatus = null;
public Integer PaymentType = null;
public Integer getId() { return ID; }
public CustomerPayment setId(Integer value) { this.ID = value; return this; }
public Integer getCustomerID() { return CustomerID; }
public CustomerPayment setCustomerID(Integer value) { this.CustomerID = value; return this; }
public Integer getOrderHeaderID() { return OrderHeaderID; }
public CustomerPayment setOrderHeaderID(Integer value) { this.OrderHeaderID = value; return this; }
public String getAmount() { return Amount; }
public CustomerPayment setAmount(String value) { this.Amount = value; return this; }
public Boolean isApproved() { return Approved; }
public CustomerPayment setApproved(Boolean value) { this.Approved = value; return this; }
public String getAuthCode() { return AuthCode; }
public CustomerPayment setAuthCode(String value) { this.AuthCode = value; return this; }
public String getCardNumber() { return CardNumber; }
public CustomerPayment setCardNumber(String value) { this.CardNumber = value; return this; }
public String getMessage() { return Message; }
public CustomerPayment setMessage(String value) { this.Message = value; return this; }
public Integer getResponseCode() { return ResponseCode; }
public CustomerPayment setResponseCode(Integer value) { this.ResponseCode = value; return this; }
public String getTransactionId() { return TransactionId; }
public CustomerPayment setTransactionId(String value) { this.TransactionId = value; return this; }
public Date getTransactionDate() { return TransactionDate; }
public CustomerPayment setTransactionDate(Date value) { this.TransactionDate = value; return this; }
public String getFullResponse() { return FullResponse; }
public CustomerPayment setFullResponse(String value) { this.FullResponse = value; return this; }
public Integer getPaymentStatus() { return PaymentStatus; }
public CustomerPayment setPaymentStatus(Integer value) { this.PaymentStatus = value; return this; }
public Integer getPaymentType() { return PaymentType; }
public CustomerPayment setPaymentType(Integer value) { this.PaymentType = value; return this; }
}
}
Java CustomerPaymentsRequest 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/CustomerPayments 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
},
OrderID: 00000000000000000000000000000000,
PaymentInfo:
{
PaymentType: String,
CardNumber: String,
ExpDate: String,
CCV: String,
StripeToken: String,
AgentId: 0
}
}
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
}
},
PaymentIntentSuccess: False,
PaymentSuccess: False,
SubscriptionSuccess: False,
Message: String,
ReceiptUrl: String,
AgentNumber: String,
ClientSecret: String,
CustomerPayment:
{
ID: 0,
CustomerID: 0,
OrderHeaderID: 0,
Amount: String,
Approved: False,
AuthCode: String,
CardNumber: String,
Message: String,
ResponseCode: 0,
TransactionId: String,
TransactionDate: 0001-01-01,
FullResponse: String,
PaymentStatus: 0,
PaymentType: 0
},
PublicOrderID: String
}