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.
    • setShipFromDetails

      public CalculationCreateParams.Builder setShipFromDetails(CalculationCreateParams.ShipFromDetails shipFromDetails)
      Details about the address from which the goods are being shipped.
    • setShippingCost

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

      public CalculationCreateParams.Builder setTaxDate(Long taxDate)
      The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.