Package model

Class 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.
    • Constructor Detail

      • AdditionalPurchaseData

        public AdditionalPurchaseData()
    • Method Detail

      • getCustomerReferenceNumber

        @Nullable
        public String getCustomerReferenceNumber()
        The customer reference for the purchase (max 17 characters).
        Returns:
        customerReferenceNumber
      • setCustomerReferenceNumber

        public void setCustomerReferenceNumber​(String customerReferenceNumber)
      • 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)
      • getDestinationCountryCode

        @Nullable
        public String getDestinationCountryCode()
        The ISO country code of the order destination.
        Returns:
        destinationCountryCode
      • setDestinationCountryCode

        public void setDestinationCountryCode​(String destinationCountryCode)
      • getDestinationPostalCode

        @Nullable
        public String getDestinationPostalCode()
        The postal code of the order destination (10 characters)
        Returns:
        destinationPostalCode
      • setDestinationPostalCode

        public void setDestinationPostalCode​(String destinationPostalCode)
      • getDiscountAmount

        @Nullable
        public Long getDiscountAmount()
        The amount in cents of the discount for the order.
        Returns:
        discountAmount
      • setDiscountAmount

        public void setDiscountAmount​(Long discountAmount)
      • getInvoiceReferenceNumber

        @Nullable
        public String getInvoiceReferenceNumber()
        The order's invoice number (max 15 characters)
        Returns:
        invoiceReferenceNumber
      • setInvoiceReferenceNumber

        public void setInvoiceReferenceNumber​(String invoiceReferenceNumber)
      • 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)
      • getShipFromPostalCode

        @Nullable
        public String getShipFromPostalCode()
        The postal code from where order is shipped (10 characters)
        Returns:
        shipFromPostalCode
      • setShipFromPostalCode

        public void setShipFromPostalCode​(String shipFromPostalCode)
      • getShippingAmount

        @Nullable
        public Long getShippingAmount()
        The shipping cost in cents for the order.
        Returns:
        shippingAmount
      • setShippingAmount

        public void setShippingAmount​(Long shippingAmount)
      • getTaxExempt

        @Nullable
        public Boolean getTaxExempt()
        For tax exempt purchases set to True.
        Returns:
        taxExempt
      • setTaxExempt

        public void setTaxExempt​(Boolean taxExempt)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode 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