Package model

Class AdditionalPurchaseData

java.lang.Object
model.AdditionalPurchaseData

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2022-06-24T13:03:18.088665-07:00[America/Los_Angeles]") public class AdditionalPurchaseData extends Object
The additional information about the purchase. Used for Level 2 and Level 3 Processing.
  • Field Details

  • Constructor Details

    • AdditionalPurchaseData

      public AdditionalPurchaseData()
  • Method Details

    • customerReferenceNumber

      public AdditionalPurchaseData customerReferenceNumber(String customerReferenceNumber)
    • getCustomerReferenceNumber

      @Nonnull 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

    • addItemDataItem

      public AdditionalPurchaseData addItemDataItem(AdditionalPurchaseDataItemDataInner itemDataItem)
    • getItemData

      Get itemData
      Returns:
      itemData
    • setItemData

      public void setItemData(List<AdditionalPurchaseDataItemDataInner> itemData)
    • orderDate

    • 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)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates 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