| POST | /integrations/api/{integrationType}/core/charge |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class CoreChargeRq implements IChargeRequest
{
@ApiMember(ParameterType="path")
public String integrationType = null;
public Integer NationalId = null;
public Integer ChapterId = null;
public Long StoredAccountId = null;
public Integer ContextIntegrationPartnerId = null;
public Integer CallerIntegrationPartnerId = null;
public Integer UserId = null;
public Integer AuthenticationId = null;
public String ChargeType = null;
public String Token = null;
@ApiMember(Format="decimal", ParameterType="model")
public BigDecimal Amount = null;
public String Description = null;
public HashMap<Long,BigDecimal> Invoices = null;
public Integer CreatedById = null;
public ArrayList<ReferenceIdTypedAssociationItem> ReferenceIds = null;
public Long TransactionId = null;
public String getIntegrationType() { return integrationType; }
public CoreChargeRq setIntegrationType(String value) { this.integrationType = value; return this; }
public Integer getNationalId() { return NationalId; }
public CoreChargeRq setNationalId(Integer value) { this.NationalId = value; return this; }
public Integer getChapterId() { return ChapterId; }
public CoreChargeRq setChapterId(Integer value) { this.ChapterId = value; return this; }
public Long getStoredAccountId() { return StoredAccountId; }
public CoreChargeRq setStoredAccountId(Long value) { this.StoredAccountId = value; return this; }
public Integer getContextIntegrationPartnerId() { return ContextIntegrationPartnerId; }
public CoreChargeRq setContextIntegrationPartnerId(Integer value) { this.ContextIntegrationPartnerId = value; return this; }
public Integer getCallerIntegrationPartnerId() { return CallerIntegrationPartnerId; }
public CoreChargeRq setCallerIntegrationPartnerId(Integer value) { this.CallerIntegrationPartnerId = value; return this; }
public Integer getUserId() { return UserId; }
public CoreChargeRq setUserId(Integer value) { this.UserId = value; return this; }
public Integer getAuthenticationId() { return AuthenticationId; }
public CoreChargeRq setAuthenticationId(Integer value) { this.AuthenticationId = value; return this; }
public String getChargeType() { return ChargeType; }
public CoreChargeRq setChargeType(String value) { this.ChargeType = value; return this; }
public String getToken() { return Token; }
public CoreChargeRq setToken(String value) { this.Token = value; return this; }
public BigDecimal getAmount() { return Amount; }
public CoreChargeRq setAmount(BigDecimal value) { this.Amount = value; return this; }
public String getDescription() { return Description; }
public CoreChargeRq setDescription(String value) { this.Description = value; return this; }
public HashMap<Long,BigDecimal> getInvoices() { return Invoices; }
public CoreChargeRq setInvoices(HashMap<Long,BigDecimal> value) { this.Invoices = value; return this; }
public Integer getCreatedById() { return CreatedById; }
public CoreChargeRq setCreatedById(Integer value) { this.CreatedById = value; return this; }
public ArrayList<ReferenceIdTypedAssociationItem> getReferenceIds() { return ReferenceIds; }
public CoreChargeRq setReferenceIds(ArrayList<ReferenceIdTypedAssociationItem> value) { this.ReferenceIds = value; return this; }
public Long getTransactionId() { return TransactionId; }
public CoreChargeRq setTransactionId(Long value) { this.TransactionId = value; return this; }
}
public static class ReferenceIdTypedAssociationItem
{
public String Value = null;
public String Type = null;
public String getValue() { return Value; }
public ReferenceIdTypedAssociationItem setValue(String value) { this.Value = value; return this; }
public String getType() { return Type; }
public ReferenceIdTypedAssociationItem setType(String value) { this.Type = value; return this; }
}
public static class CoreChargeRs
{
public String TransactionId = null;
public Long StoredAccountId = null;
public Integer NationalId = null;
public Integer ChapterId = null;
public String ChargeType = null;
public String IntegrationType = null;
public Integer ContextIntegrationPartnerId = null;
public Integer CallerIntegrationPartnerId = null;
public CoreChargeGatewaySaleResponse GatewayResponse = null;
public CoreChargeDetails ChargeDetails = null;
public String getTransactionId() { return TransactionId; }
public CoreChargeRs setTransactionId(String value) { this.TransactionId = value; return this; }
public Long getStoredAccountId() { return StoredAccountId; }
public CoreChargeRs setStoredAccountId(Long value) { this.StoredAccountId = value; return this; }
public Integer getNationalId() { return NationalId; }
public CoreChargeRs setNationalId(Integer value) { this.NationalId = value; return this; }
public Integer getChapterId() { return ChapterId; }
public CoreChargeRs setChapterId(Integer value) { this.ChapterId = value; return this; }
public String getChargeType() { return ChargeType; }
public CoreChargeRs setChargeType(String value) { this.ChargeType = value; return this; }
public String getIntegrationType() { return IntegrationType; }
public CoreChargeRs setIntegrationType(String value) { this.IntegrationType = value; return this; }
public Integer getContextIntegrationPartnerId() { return ContextIntegrationPartnerId; }
public CoreChargeRs setContextIntegrationPartnerId(Integer value) { this.ContextIntegrationPartnerId = value; return this; }
public Integer getCallerIntegrationPartnerId() { return CallerIntegrationPartnerId; }
public CoreChargeRs setCallerIntegrationPartnerId(Integer value) { this.CallerIntegrationPartnerId = value; return this; }
public CoreChargeGatewaySaleResponse getGatewayResponse() { return GatewayResponse; }
public CoreChargeRs setGatewayResponse(CoreChargeGatewaySaleResponse value) { this.GatewayResponse = value; return this; }
public CoreChargeDetails getChargeDetails() { return ChargeDetails; }
public CoreChargeRs setChargeDetails(CoreChargeDetails value) { this.ChargeDetails = value; return this; }
}
public static class CoreChargeGatewaySaleResponse
{
public String FailureType = null;
public Boolean IsDuplicate = null;
public Boolean IsSuccessful = null;
public String ErrorCode = null;
public String Message = null;
public Integer GatewayId = null;
public String ConfirmationNumber = null;
public String NetworkTransactionId = null;
public String getFailureType() { return FailureType; }
public CoreChargeGatewaySaleResponse setFailureType(String value) { this.FailureType = value; return this; }
public Boolean getIsDuplicate() { return IsDuplicate; }
public CoreChargeGatewaySaleResponse setIsDuplicate(Boolean value) { this.IsDuplicate = value; return this; }
public Boolean getIsSuccessful() { return IsSuccessful; }
public CoreChargeGatewaySaleResponse setIsSuccessful(Boolean value) { this.IsSuccessful = value; return this; }
public String getErrorCode() { return ErrorCode; }
public CoreChargeGatewaySaleResponse setErrorCode(String value) { this.ErrorCode = value; return this; }
public String getMessage() { return Message; }
public CoreChargeGatewaySaleResponse setMessage(String value) { this.Message = value; return this; }
public Integer getGatewayId() { return GatewayId; }
public CoreChargeGatewaySaleResponse setGatewayId(Integer value) { this.GatewayId = value; return this; }
public String getConfirmationNumber() { return ConfirmationNumber; }
public CoreChargeGatewaySaleResponse setConfirmationNumber(String value) { this.ConfirmationNumber = value; return this; }
public String getNetworkTransactionId() { return NetworkTransactionId; }
public CoreChargeGatewaySaleResponse setNetworkTransactionId(String value) { this.NetworkTransactionId = value; return this; }
}
public static class CoreChargeDetails
{
public String PaymentType = null;
public Integer Amount = null;
public String IntegrationType = null;
public String Currency = null;
public CoreCreditCardChargeDetails CardDetails = null;
public String getPaymentType() { return PaymentType; }
public CoreChargeDetails setPaymentType(String value) { this.PaymentType = value; return this; }
public Integer getAmount() { return Amount; }
public CoreChargeDetails setAmount(Integer value) { this.Amount = value; return this; }
public String getIntegrationType() { return IntegrationType; }
public CoreChargeDetails setIntegrationType(String value) { this.IntegrationType = value; return this; }
public String getCurrency() { return Currency; }
public CoreChargeDetails setCurrency(String value) { this.Currency = value; return this; }
public CoreCreditCardChargeDetails getCardDetails() { return CardDetails; }
public CoreChargeDetails setCardDetails(CoreCreditCardChargeDetails value) { this.CardDetails = value; return this; }
}
public static class CoreCreditCardChargeDetails
{
public String CardType = null;
public Integer ExpMonth = null;
public Integer ExpYear = null;
public String Last4 = null;
public CreditCardBillingAddressItem Address = null;
public CreditCardChargeVerificationResult VerificationResult = null;
public String getCardType() { return CardType; }
public CoreCreditCardChargeDetails setCardType(String value) { this.CardType = value; return this; }
public Integer getExpMonth() { return ExpMonth; }
public CoreCreditCardChargeDetails setExpMonth(Integer value) { this.ExpMonth = value; return this; }
public Integer getExpYear() { return ExpYear; }
public CoreCreditCardChargeDetails setExpYear(Integer value) { this.ExpYear = value; return this; }
public String getLast4() { return Last4; }
public CoreCreditCardChargeDetails setLast4(String value) { this.Last4 = value; return this; }
public CreditCardBillingAddressItem getAddress() { return Address; }
public CoreCreditCardChargeDetails setAddress(CreditCardBillingAddressItem value) { this.Address = value; return this; }
public CreditCardChargeVerificationResult getVerificationResult() { return VerificationResult; }
public CoreCreditCardChargeDetails setVerificationResult(CreditCardChargeVerificationResult value) { this.VerificationResult = value; return this; }
}
public static class CreditCardBillingAddressItem
{
public String Address1 = null;
public String Address2 = null;
public String City = null;
public String PostalCode = null;
public String Region = null;
public String Country = null;
public ArrayList<AttributeItem> Attributes = null;
public String getAddress1() { return Address1; }
public CreditCardBillingAddressItem setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public CreditCardBillingAddressItem setAddress2(String value) { this.Address2 = value; return this; }
public String getCity() { return City; }
public CreditCardBillingAddressItem setCity(String value) { this.City = value; return this; }
public String getPostalCode() { return PostalCode; }
public CreditCardBillingAddressItem setPostalCode(String value) { this.PostalCode = value; return this; }
public String getRegion() { return Region; }
public CreditCardBillingAddressItem setRegion(String value) { this.Region = value; return this; }
public String getCountry() { return Country; }
public CreditCardBillingAddressItem setCountry(String value) { this.Country = value; return this; }
public ArrayList<AttributeItem> getAttributes() { return Attributes; }
public CreditCardBillingAddressItem setAttributes(ArrayList<AttributeItem> value) { this.Attributes = value; return this; }
}
public static class AttributeItem
{
public String Name = null;
public String Value = null;
public String getName() { return Name; }
public AttributeItem setName(String value) { this.Name = value; return this; }
public String getValue() { return Value; }
public AttributeItem setValue(String value) { this.Value = value; return this; }
}
public static class CreditCardChargeVerificationResult
{
public Boolean NetworkVerificationAttempted = null;
public String CvvVerificationResult = null;
public String AddressVerificationResult = null;
public String PostalCodeVerificationResult = null;
public Boolean isNetworkVerificationAttempted() { return NetworkVerificationAttempted; }
public CreditCardChargeVerificationResult setNetworkVerificationAttempted(Boolean value) { this.NetworkVerificationAttempted = value; return this; }
public String getCvvVerificationResult() { return CvvVerificationResult; }
public CreditCardChargeVerificationResult setCvvVerificationResult(String value) { this.CvvVerificationResult = value; return this; }
public String getAddressVerificationResult() { return AddressVerificationResult; }
public CreditCardChargeVerificationResult setAddressVerificationResult(String value) { this.AddressVerificationResult = value; return this; }
public String getPostalCodeVerificationResult() { return PostalCodeVerificationResult; }
public CreditCardChargeVerificationResult setPostalCodeVerificationResult(String value) { this.PostalCodeVerificationResult = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /integrations/api/{integrationType}/core/charge HTTP/1.1
Host: devapi.billhighway.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"integrationType":"String","NationalId":0,"ChapterId":0,"StoredAccountId":0,"ContextIntegrationPartnerId":0,"CallerIntegrationPartnerId":0,"UserId":0,"AuthenticationId":0,"ChargeType":"String","Token":"String","Amount":0,"Description":"String","Invoices":{"0":0},"CreatedById":0,"ReferenceIds":[{"Value":"String","Type":"String"}],"TransactionId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"TransactionId":"String","StoredAccountId":0,"NationalId":0,"ChapterId":0,"ChargeType":"String","IntegrationType":"String","ContextIntegrationPartnerId":0,"CallerIntegrationPartnerId":0,"GatewayResponse":{"FailureType":"String","IsDuplicate":false,"IsSuccessful":false,"ErrorCode":"String","Message":"String","GatewayId":0,"ConfirmationNumber":"String","NetworkTransactionId":"String"},"ChargeDetails":{"PaymentType":"String","Amount":0,"IntegrationType":"String","Currency":"String","CardDetails":{"CardType":"String","ExpMonth":0,"ExpYear":0,"Last4":"String","Address":{"Address1":"String","Address2":"String","City":"String","PostalCode":"String","Region":"String","Country":"String","Attributes":[{"Name":"String","Value":"String"}]},"VerificationResult":{"NetworkVerificationAttempted":false,"CvvVerificationResult":"String","AddressVerificationResult":"String","PostalCodeVerificationResult":"String"}}}}