Package model
Class AdditionalPurchaseData
- java.lang.Object
-
- model.AdditionalPurchaseData
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPurchaseData extends Object
Additional information about the purchase. Used for Level 2 and Level 3 Processing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdditionalPurchaseData.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CUSTOMER_REFERENCE_NUMBERstatic StringSERIALIZED_NAME_CUSTOMS_DUTY_AMOUNTstatic StringSERIALIZED_NAME_DESTINATION_COUNTRY_CODEstatic StringSERIALIZED_NAME_DESTINATION_POSTAL_CODEstatic StringSERIALIZED_NAME_DISCOUNT_AMOUNTstatic StringSERIALIZED_NAME_INVOICE_REFERENCE_NUMBERstatic StringSERIALIZED_NAME_ITEM_DATAstatic StringSERIALIZED_NAME_ORDER_DATEstatic StringSERIALIZED_NAME_SALES_TAXstatic StringSERIALIZED_NAME_SHIP_FROM_POSTAL_CODEstatic StringSERIALIZED_NAME_SHIPPING_AMOUNTstatic StringSERIALIZED_NAME_TAX_EXEMPT
-
Constructor Summary
Constructors Constructor Description AdditionalPurchaseData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AdditionalPurchaseDataaddItemDataItem(AdditionalPurchaseDataItemDataInner itemDataItem)AdditionalPurchaseDatacustomerReferenceNumber(String customerReferenceNumber)AdditionalPurchaseDatacustomsDutyAmount(Long customsDutyAmount)AdditionalPurchaseDatadestinationCountryCode(String destinationCountryCode)AdditionalPurchaseDatadestinationPostalCode(String destinationPostalCode)AdditionalPurchaseDatadiscountAmount(Long discountAmount)booleanequals(Object o)static AdditionalPurchaseDatafromJson(String jsonString)Create an instance of AdditionalPurchaseData given an JSON stringStringgetCustomerReferenceNumber()The customer reference for the purchase (max 17 characters).LonggetCustomsDutyAmount()The duty in cents on the total purchase amount for the orderStringgetDestinationCountryCode()The ISO country code of the order destination.StringgetDestinationPostalCode()The postal code of the order destination (10 characters)LonggetDiscountAmount()The amount in cents of the discount for the order.StringgetInvoiceReferenceNumber()The order's invoice number (max 15 characters)List<AdditionalPurchaseDataItemDataInner>getItemData()Additional information about the transaction.AdditionalPurchaseDataOrderDategetOrderDate()Get orderDateLonggetSalesTax()Total aggregate tax amount in cents for the entire purchase.StringgetShipFromPostalCode()The postal code from where order is shipped (10 characters)LonggetShippingAmount()The shipping cost in cents for the order.BooleangetTaxExempt()For tax exempt purchases set to True.inthashCode()AdditionalPurchaseDatainvoiceReferenceNumber(String invoiceReferenceNumber)AdditionalPurchaseDataitemData(List<AdditionalPurchaseDataItemDataInner> itemData)AdditionalPurchaseDataorderDate(AdditionalPurchaseDataOrderDate orderDate)AdditionalPurchaseDatasalesTax(Long salesTax)voidsetCustomerReferenceNumber(String customerReferenceNumber)voidsetCustomsDutyAmount(Long customsDutyAmount)voidsetDestinationCountryCode(String destinationCountryCode)voidsetDestinationPostalCode(String destinationPostalCode)voidsetDiscountAmount(Long discountAmount)voidsetInvoiceReferenceNumber(String invoiceReferenceNumber)voidsetItemData(List<AdditionalPurchaseDataItemDataInner> itemData)voidsetOrderDate(AdditionalPurchaseDataOrderDate orderDate)voidsetSalesTax(Long salesTax)voidsetShipFromPostalCode(String shipFromPostalCode)voidsetShippingAmount(Long shippingAmount)voidsetTaxExempt(Boolean taxExempt)AdditionalPurchaseDatashipFromPostalCode(String shipFromPostalCode)AdditionalPurchaseDatashippingAmount(Long shippingAmount)AdditionalPurchaseDatataxExempt(Boolean taxExempt)StringtoJson()Convert an instance of AdditionalPurchaseData to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_CUSTOMER_REFERENCE_NUMBER
public static final String SERIALIZED_NAME_CUSTOMER_REFERENCE_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CUSTOMS_DUTY_AMOUNT
public static final String SERIALIZED_NAME_CUSTOMS_DUTY_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESTINATION_COUNTRY_CODE
public static final String SERIALIZED_NAME_DESTINATION_COUNTRY_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESTINATION_POSTAL_CODE
public static final String SERIALIZED_NAME_DESTINATION_POSTAL_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DISCOUNT_AMOUNT
public static final String SERIALIZED_NAME_DISCOUNT_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_INVOICE_REFERENCE_NUMBER
public static final String SERIALIZED_NAME_INVOICE_REFERENCE_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ITEM_DATA
public static final String SERIALIZED_NAME_ITEM_DATA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ORDER_DATE
public static final String SERIALIZED_NAME_ORDER_DATE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SALES_TAX
public static final String SERIALIZED_NAME_SALES_TAX
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SHIP_FROM_POSTAL_CODE
public static final String SERIALIZED_NAME_SHIP_FROM_POSTAL_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SHIPPING_AMOUNT
public static final String SERIALIZED_NAME_SHIPPING_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAX_EXEMPT
public static final String SERIALIZED_NAME_TAX_EXEMPT
- See Also:
- Constant Field Values
-
-
Method Detail
-
customerReferenceNumber
public AdditionalPurchaseData customerReferenceNumber(String customerReferenceNumber)
-
getCustomerReferenceNumber
@Nullable public String getCustomerReferenceNumber()
The customer reference for the purchase (max 17 characters).- Returns:
- customerReferenceNumber
-
setCustomerReferenceNumber
public void setCustomerReferenceNumber(String customerReferenceNumber)
-
customsDutyAmount
public AdditionalPurchaseData customsDutyAmount(Long customsDutyAmount)
-
getCustomsDutyAmount
@Nullable public Long getCustomsDutyAmount()
The duty in cents on the total purchase amount for the order- Returns:
- customsDutyAmount
-
setCustomsDutyAmount
public void setCustomsDutyAmount(Long customsDutyAmount)
-
destinationCountryCode
public AdditionalPurchaseData destinationCountryCode(String destinationCountryCode)
-
getDestinationCountryCode
@Nullable public String getDestinationCountryCode()
The ISO country code of the order destination.- Returns:
- destinationCountryCode
-
setDestinationCountryCode
public void setDestinationCountryCode(String destinationCountryCode)
-
destinationPostalCode
public AdditionalPurchaseData destinationPostalCode(String destinationPostalCode)
-
getDestinationPostalCode
@Nullable public String getDestinationPostalCode()
The postal code of the order destination (10 characters)- Returns:
- destinationPostalCode
-
setDestinationPostalCode
public void setDestinationPostalCode(String destinationPostalCode)
-
discountAmount
public AdditionalPurchaseData discountAmount(Long discountAmount)
-
getDiscountAmount
@Nullable public Long getDiscountAmount()
The amount in cents of the discount for the order.- Returns:
- discountAmount
-
setDiscountAmount
public void setDiscountAmount(Long discountAmount)
-
invoiceReferenceNumber
public AdditionalPurchaseData invoiceReferenceNumber(String invoiceReferenceNumber)
-
getInvoiceReferenceNumber
@Nullable public String getInvoiceReferenceNumber()
The order's invoice number (max 15 characters)- Returns:
- invoiceReferenceNumber
-
setInvoiceReferenceNumber
public void setInvoiceReferenceNumber(String invoiceReferenceNumber)
-
itemData
public AdditionalPurchaseData itemData(List<AdditionalPurchaseDataItemDataInner> itemData)
-
addItemDataItem
public AdditionalPurchaseData addItemDataItem(AdditionalPurchaseDataItemDataInner itemDataItem)
-
getItemData
@Nullable public List<AdditionalPurchaseDataItemDataInner> getItemData()
Additional information about the transaction. Used for Level 2 and Level 3 Processing.- Returns:
- itemData
-
setItemData
public void setItemData(List<AdditionalPurchaseDataItemDataInner> itemData)
-
orderDate
public AdditionalPurchaseData orderDate(AdditionalPurchaseDataOrderDate orderDate)
-
getOrderDate
@Nullable public AdditionalPurchaseDataOrderDate getOrderDate()
Get orderDate- Returns:
- orderDate
-
setOrderDate
public void setOrderDate(AdditionalPurchaseDataOrderDate orderDate)
-
salesTax
public AdditionalPurchaseData salesTax(Long salesTax)
-
getSalesTax
@Nullable public Long getSalesTax()
Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts. For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**.- Returns:
- salesTax
-
setSalesTax
public void setSalesTax(Long salesTax)
-
shipFromPostalCode
public AdditionalPurchaseData shipFromPostalCode(String shipFromPostalCode)
-
getShipFromPostalCode
@Nullable public String getShipFromPostalCode()
The postal code from where order is shipped (10 characters)- Returns:
- shipFromPostalCode
-
setShipFromPostalCode
public void setShipFromPostalCode(String shipFromPostalCode)
-
shippingAmount
public AdditionalPurchaseData shippingAmount(Long shippingAmount)
-
getShippingAmount
@Nullable public Long getShippingAmount()
The shipping cost in cents for the order.- Returns:
- shippingAmount
-
setShippingAmount
public void setShippingAmount(Long shippingAmount)
-
taxExempt
public AdditionalPurchaseData taxExempt(Boolean taxExempt)
-
getTaxExempt
@Nullable public Boolean getTaxExempt()
For tax exempt purchases set to True.- Returns:
- taxExempt
-
setTaxExempt
public void setTaxExempt(Boolean taxExempt)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to AdditionalPurchaseData
-
fromJson
public static AdditionalPurchaseData fromJson(String jsonString) throws IOException
Create an instance of AdditionalPurchaseData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of AdditionalPurchaseData
- Throws:
IOException- if the JSON string is invalid with respect to AdditionalPurchaseData
-
toJson
public String toJson()
Convert an instance of AdditionalPurchaseData to an JSON string- Returns:
- JSON string
-
-