Package com.stripe.param
Class OrderCreateParams.Builder
java.lang.Object
com.stripe.param.OrderCreateParams.Builder
- Enclosing class:
OrderCreateParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand
(List<String> elements) Add all elements to `expand` list.addAllItem
(List<OrderCreateParams.Item> elements) Add all elements to `items` list.Add an element to `expand` list.addItem
(OrderCreateParams.Item element) Add an element to `items` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.A coupon code that represents a discount to be applied to this order.setCurrency
(String currency) Three-letter ISO currency code, in lowercase.setCustomer
(String customer) The ID of an existing customer to use for this order.The email address of the customer placing the order.setShipping
(OrderCreateParams.Shipping shipping) Shipping address for the order.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setCoupon
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
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCustomer
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. Ifemail
orshipping
are also provided, they will override the values retrieved from the customer object. -
setEmail
The email address of the customer placing the order. -
addExpand
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. SeeOrderCreateParams.expand
for the field documentation. -
addAllExpand
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. SeeOrderCreateParams.expand
for the field documentation. -
putExtraParam
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. SeeOrderCreateParams.extraParams
for the field documentation. -
putAllExtraParam
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. SeeOrderCreateParams.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. SeeOrderCreateParams.items
for the field documentation. -
addAllItem
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. SeeOrderCreateParams.items
for the field documentation. -
putMetadata
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. SeeOrderCreateParams.metadata
for the field documentation. -
putAllMetadata
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. SeeOrderCreateParams.metadata
for the field documentation. -
setShipping
Shipping address for the order. Required if any of the SKUs are for products that haveshippable
set to true.
-