Class CalculationCreateParams.Builder

java.lang.Object
com.stripe.param.tax.CalculationCreateParams.Builder
Enclosing class:
CalculationCreateParams

public static class CalculationCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public CalculationCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setCurrency

      public CalculationCreateParams.Builder setCurrency(String currency)
      Required. Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setCustomer

      public CalculationCreateParams.Builder setCustomer(String customer)
      The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to customer_details.
    • setCustomerDetails

      public CalculationCreateParams.Builder setCustomerDetails(CalculationCreateParams.CustomerDetails customerDetails)
      Details about the customer, including address and tax IDs.
    • addExpand

      public CalculationCreateParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CalculationCreateParams.expand for the field documentation.
    • addAllExpand

      public CalculationCreateParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CalculationCreateParams.expand for the field documentation.
    • putExtraParam

      public CalculationCreateParams.Builder putExtraParam(String key, Object value)
      Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CalculationCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public CalculationCreateParams.Builder putAllExtraParam(Map<String,Object> map)
      Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See CalculationCreateParams.extraParams for the field documentation.
    • addLineItem

      Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CalculationCreateParams.lineItems for the field documentation.
    • addAllLineItem

      Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See CalculationCreateParams.lineItems for the field documentation.
    • setShippingCost

      Shipping cost details to be used for the calculation.
    • setTaxDate

      public CalculationCreateParams.Builder setTaxDate(Long taxDate)
      Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.