| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<CustomerPaymentsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Customer>
<AgentId>0</AgentId>
<BusinessName>String</BusinessName>
<CustomerCode>String</CustomerCode>
<Email>String</Email>
<FirstName>String</FirstName>
<ID>0</ID>
<LastName>String</LastName>
<UID>00000000-0000-0000-0000-000000000000</UID>
</Customer>
<OrderID>00000000-0000-0000-0000-000000000000</OrderID>
<PaymentInfo>
<AgentId>0</AgentId>
<CCV>String</CCV>
<CardNumber>String</CardNumber>
<ExpDate>String</ExpDate>
<PaymentType>String</PaymentType>
<StripeToken>String</StripeToken>
</PaymentInfo>
</CustomerPaymentsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CustomerPaymentsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AgentNumber>String</AgentNumber>
<ClientSecret>String</ClientSecret>
<CustomerPayment>
<Amount>String</Amount>
<Approved>false</Approved>
<AuthCode>String</AuthCode>
<CardNumber>String</CardNumber>
<CustomerID>0</CustomerID>
<FullResponse>String</FullResponse>
<ID>0</ID>
<Message>String</Message>
<OrderHeaderID>0</OrderHeaderID>
<PaymentStatus>0</PaymentStatus>
<PaymentType>0</PaymentType>
<ResponseCode>0</ResponseCode>
<TransactionDate>0001-01-01T00:00:00</TransactionDate>
<TransactionId>String</TransactionId>
</CustomerPayment>
<Message>String</Message>
<PaymentIntentSuccess>false</PaymentIntentSuccess>
<PaymentSuccess>false</PaymentSuccess>
<PublicOrderID>String</PublicOrderID>
<ReceiptUrl>String</ReceiptUrl>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<SubscriptionSuccess>false</SubscriptionSuccess>
</CustomerPaymentsResponse>