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

      public OrderCreateParams.Builder setCoupon(String coupon)
      A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons.
    • setCurrency

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

      public OrderCreateParams.Builder setCustomer(String customer)
      The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If email or shipping are also provided, they will override the values retrieved from the customer object.
    • setEmail

      public OrderCreateParams.Builder setEmail(String email)
      The email address of the customer placing 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.
    • addItem

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

      public OrderCreateParams.Builder addAllItem(List<OrderCreateParams.Item> elements)
      Add all elements to `items` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See OrderCreateParams.items 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.
    • setShipping

      Shipping address for the order. Required if any of the SKUs are for products that have shippable set to true.