| POST | /payments/creditcard |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CreditCardPaymentCollection
{
public ArrayList<CreditCardPayment> CreditCardPaymentList = null;
public ArrayList<CreditCardPayment> getCreditCardPaymentList() { return CreditCardPaymentList; }
public CreditCardPaymentCollection setCreditCardPaymentList(ArrayList<CreditCardPayment> value) { this.CreditCardPaymentList = value; return this; }
}
public static class CreditCardPayment extends CreditCardPayment
{
public SubscriptionParameters SubscriptionInfo = null;
public SubscriptionParameters getSubscriptionInfo() { return SubscriptionInfo; }
public CreditCardPayment setSubscriptionInfo(SubscriptionParameters value) { this.SubscriptionInfo = value; return this; }
}
public static class SubscriptionParameters
{
public Integer FormTemplateID = null;
public Integer SubscriptionInvoiceID = null;
public String ClientSubscriberId = null;
public Integer SignupTypeID = null;
public Integer FrequencyID = null;
public Boolean AutoRenew = null;
public Long CompanyID = null;
public Integer UserID = null;
public Long ChapMemPayID = null;
public Long MemberSubscriptionInvID = null;
public ArrayList<SubscriberFormField> Fields = null;
public Integer CreatedBy = null;
public Integer UpdatedBy = null;
public Integer AptifyUpdateType = null;
public Long RenewedMemberSubscriptionInvID = null;
public Integer ChapId = null;
public Integer getFormTemplateID() { return FormTemplateID; }
public SubscriptionParameters setFormTemplateID(Integer value) { this.FormTemplateID = value; return this; }
public Integer getSubscriptionInvoiceID() { return SubscriptionInvoiceID; }
public SubscriptionParameters setSubscriptionInvoiceID(Integer value) { this.SubscriptionInvoiceID = value; return this; }
public String getClientSubscriberId() { return ClientSubscriberId; }
public SubscriptionParameters setClientSubscriberId(String value) { this.ClientSubscriberId = value; return this; }
public Integer getSignupTypeID() { return SignupTypeID; }
public SubscriptionParameters setSignupTypeID(Integer value) { this.SignupTypeID = value; return this; }
public Integer getFrequencyID() { return FrequencyID; }
public SubscriptionParameters setFrequencyID(Integer value) { this.FrequencyID = value; return this; }
public Boolean isAutoRenew() { return AutoRenew; }
public SubscriptionParameters setAutoRenew(Boolean value) { this.AutoRenew = value; return this; }
public Long getCompanyID() { return CompanyID; }
public SubscriptionParameters setCompanyID(Long value) { this.CompanyID = value; return this; }
public Integer getUserID() { return UserID; }
public SubscriptionParameters setUserID(Integer value) { this.UserID = value; return this; }
public Long getChapMemPayID() { return ChapMemPayID; }
public SubscriptionParameters setChapMemPayID(Long value) { this.ChapMemPayID = value; return this; }
public Long getMemberSubscriptionInvID() { return MemberSubscriptionInvID; }
public SubscriptionParameters setMemberSubscriptionInvID(Long value) { this.MemberSubscriptionInvID = value; return this; }
public ArrayList<SubscriberFormField> getFields() { return Fields; }
public SubscriptionParameters setFields(ArrayList<SubscriberFormField> value) { this.Fields = value; return this; }
public Integer getCreatedBy() { return CreatedBy; }
public SubscriptionParameters setCreatedBy(Integer value) { this.CreatedBy = value; return this; }
public Integer getUpdatedBy() { return UpdatedBy; }
public SubscriptionParameters setUpdatedBy(Integer value) { this.UpdatedBy = value; return this; }
public Integer getAptifyUpdateType() { return AptifyUpdateType; }
public SubscriptionParameters setAptifyUpdateType(Integer value) { this.AptifyUpdateType = value; return this; }
public Long getRenewedMemberSubscriptionInvID() { return RenewedMemberSubscriptionInvID; }
public SubscriptionParameters setRenewedMemberSubscriptionInvID(Long value) { this.RenewedMemberSubscriptionInvID = value; return this; }
public Integer getChapId() { return ChapId; }
public SubscriptionParameters setChapId(Integer value) { this.ChapId = value; return this; }
}
public static class SubscriberFormField
{
public String Name = null;
public String Value = null;
public String getName() { return Name; }
public SubscriberFormField setName(String value) { this.Name = value; return this; }
public String getValue() { return Value; }
public SubscriberFormField setValue(String value) { this.Value = value; return this; }
}
public static class CreditCardPaymentReply
{
public String ClassName = null;
public String UniqueId = null;
public Date CreatedDateTime = null;
public Integer ClientId = null;
public String TransactionId = null;
public Integer ErrorCode = null;
public String ErrorMessage = null;
public String getClassName() { return ClassName; }
public CreditCardPaymentReply setClassName(String value) { this.ClassName = value; return this; }
public String getUniqueId() { return UniqueId; }
public CreditCardPaymentReply setUniqueId(String value) { this.UniqueId = value; return this; }
public Date getCreatedDateTime() { return CreatedDateTime; }
public CreditCardPaymentReply setCreatedDateTime(Date value) { this.CreatedDateTime = value; return this; }
public Integer getClientId() { return ClientId; }
public CreditCardPaymentReply setClientId(Integer value) { this.ClientId = value; return this; }
public String getTransactionId() { return TransactionId; }
public CreditCardPaymentReply setTransactionId(String value) { this.TransactionId = value; return this; }
public Integer getErrorCode() { return ErrorCode; }
public CreditCardPaymentReply setErrorCode(Integer value) { this.ErrorCode = value; return this; }
public String getErrorMessage() { return ErrorMessage; }
public CreditCardPaymentReply setErrorMessage(String value) { this.ErrorMessage = value; return this; }
}
}
Java CreditCardPaymentCollection 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 /payments/creditcard HTTP/1.1
Host: devapi.billhighway.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreditCardPaymentCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce">
<CreditCardPaymentList>
<CreditCardPayment>
<Address1>String</Address1>
<Address2>String</Address2>
<Amount>String</Amount>
<AutoPay>false</AutoPay>
<BhUserId>0</BhUserId>
<BillingCity>String</BillingCity>
<BillingState>String</BillingState>
<CardReferenceOrCardNumber>String</CardReferenceOrCardNumber>
<CardType>String</CardType>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<Country>String</Country>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<CurrencyType>String</CurrencyType>
<Cvv>String</Cvv>
<ExpMonth>0</ExpMonth>
<ExpYear>0</ExpYear>
<GroupId>String</GroupId>
<InvoiceList>
<SalesForceMemberPaymentInvoiceDetail>
<AmountPaid>String</AmountPaid>
<ClassName>String</ClassName>
<ClientId>0</ClientId>
<CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime>
<Invoice>0</Invoice>
<UniqueId>String</UniqueId>
</SalesForceMemberPaymentInvoiceDetail>
</InvoiceList>
<Location>String</Location>
<Memo>String</Memo>
<NameOnCard>String</NameOnCard>
<OpportunityId>String</OpportunityId>
<PostalCode>String</PostalCode>
<PreferredEmailAddress>String</PreferredEmailAddress>
<StoreCardInfo>false</StoreCardInfo>
<UniqueId>String</UniqueId>
<UserId>String</UserId>
</CreditCardPayment>
</CreditCardPaymentList>
</CreditCardPaymentCollection>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreditCardPaymentReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BH.CloudAPI.Common4.DTO.SalesForce"> <ClassName>String</ClassName> <ClientId>0</ClientId> <CreatedDateTime>0001-01-01T00:00:00</CreatedDateTime> <ErrorCode>0</ErrorCode> <ErrorMessage>String</ErrorMessage> <TransactionId>String</TransactionId> <UniqueId>String</UniqueId> </CreditCardPaymentReply>