Class OrderCreateParams.Builder

java.lang.Object
com.stripe.param.OrderCreateParams.Builder
Enclosing class:
OrderCreateParams

public static class OrderCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public OrderCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setAutomaticTax

      public OrderCreateParams.Builder setAutomaticTax(OrderCreateParams.AutomaticTax automaticTax)
      Settings for automatic tax calculation for this order.
    • setBillingDetails

      public OrderCreateParams.Builder setBillingDetails(OrderCreateParams.BillingDetails billingDetails)
      Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
    • setBillingDetails

      public OrderCreateParams.Builder setBillingDetails(EmptyParam billingDetails)
      Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided.
    • addCredit

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

      public OrderCreateParams.Builder addAllCredit(List<OrderCreateParams.Credit> elements)
      Add all elements to `credits` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See OrderCreateParams.credits for the field documentation.
    • setCredits

      public OrderCreateParams.Builder setCredits(EmptyParam credits)
      The credits to apply to the order, only gift_card currently supported.
    • setCredits

      The credits to apply to the order, only gift_card currently supported.
    • setCurrency

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

      public OrderCreateParams.Builder setCustomer(String customer)
      The customer associated with this order.
    • setDescription

      public OrderCreateParams.Builder setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • addDiscount

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

      public OrderCreateParams.Builder addAllDiscount(List<OrderCreateParams.Discount> elements)
      Add all elements to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See OrderCreateParams.discounts for the field documentation.
    • setDiscounts

      public OrderCreateParams.Builder setDiscounts(EmptyParam discounts)
      The coupons, promotion codes, and/or discounts to apply to the order.
    • setDiscounts

      public OrderCreateParams.Builder setDiscounts(List<OrderCreateParams.Discount> discounts)
      The coupons, promotion codes, and/or discounts to apply to the order.
    • addExpand

      public OrderCreateParams.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 OrderCreateParams.expand for the field documentation.
    • addAllExpand

      public OrderCreateParams.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 OrderCreateParams.expand for the field documentation.
    • putExtraParam

      public OrderCreateParams.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 OrderCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public OrderCreateParams.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 OrderCreateParams.extraParams for the field documentation.
    • setIpAddress

      public OrderCreateParams.Builder setIpAddress(String ipAddress)
      The IP address of the purchaser for this order.
    • 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 OrderCreateParams.lineItems for the field documentation.
    • addAllLineItem

      public OrderCreateParams.Builder addAllLineItem(List<OrderCreateParams.LineItem> elements)
      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 OrderCreateParams.lineItems for the field documentation.
    • putMetadata

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

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

      Payment information associated with the order, including payment settings.
    • setShippingCost

      public OrderCreateParams.Builder setShippingCost(OrderCreateParams.ShippingCost shippingCost)
      Settings for the customer cost of shipping for this order.
    • setShippingCost

      public OrderCreateParams.Builder setShippingCost(EmptyParam shippingCost)
      Settings for the customer cost of shipping for this order.
    • setShippingDetails

      public OrderCreateParams.Builder setShippingDetails(OrderCreateParams.ShippingDetails shippingDetails)
      Shipping details for the order.
    • setShippingDetails

      public OrderCreateParams.Builder setShippingDetails(EmptyParam shippingDetails)
      Shipping details for the order.
    • setTaxDetails

      public OrderCreateParams.Builder setTaxDetails(OrderCreateParams.TaxDetails taxDetails)
      Additional tax details about the purchaser to be used for this order.