Package com.stripe.param
Class SetupIntentCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.SetupIntentCreateParams.Builder
-
- Enclosing class:
- SetupIntentCreateParams
public static class SetupIntentCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetupIntentCreateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.SetupIntentCreateParams.Builder
addAllPaymentMethodType(java.util.List<java.lang.String> elements)
Add all elements to `paymentMethodTypes` list.SetupIntentCreateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.SetupIntentCreateParams.Builder
addPaymentMethodType(java.lang.String element)
Add an element to `paymentMethodTypes` list.SetupIntentCreateParams
build()
Finalize and obtain parameter instance from this builder.SetupIntentCreateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SetupIntentCreateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.SetupIntentCreateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SetupIntentCreateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.SetupIntentCreateParams.Builder
setConfirm(java.lang.Boolean confirm)
Set totrue
to attempt to confirm this SetupIntent immediately.SetupIntentCreateParams.Builder
setCustomer(java.lang.String customer)
ID of the Customer this SetupIntent belongs to, if one exists.SetupIntentCreateParams.Builder
setDescription(java.lang.String description)
An arbitrary string attached to the object.SetupIntentCreateParams.Builder
setMandateData(SetupIntentCreateParams.MandateData mandateData)
This hash contains details about the Mandate to create.SetupIntentCreateParams.Builder
setOnBehalfOf(java.lang.String onBehalfOf)
The Stripe account ID for which this SetupIntent is created.SetupIntentCreateParams.Builder
setPaymentMethod(java.lang.String paymentMethod)
ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.SetupIntentCreateParams.Builder
setPaymentMethodOptions(SetupIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this SetupIntent.SetupIntentCreateParams.Builder
setReturnUrl(java.lang.String returnUrl)
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.SetupIntentCreateParams.Builder
setSingleUse(SetupIntentCreateParams.SingleUse singleUse)
If this hash is populated, this SetupIntent will generate a single_use Mandate on success.SetupIntentCreateParams.Builder
setUsage(SetupIntentCreateParams.Usage usage)
Indicates how the payment method is intended to be used in the future.
-
-
-
Method Detail
-
build
public SetupIntentCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setConfirm
public SetupIntentCreateParams.Builder setConfirm(java.lang.Boolean confirm)
Set totrue
to attempt to confirm this SetupIntent immediately. This parameter defaults tofalse
. If the payment method attached is a card, a return_url may be provided in case additional authentication is required.
-
setCustomer
public SetupIntentCreateParams.Builder setCustomer(java.lang.String customer)
ID of the Customer this SetupIntent belongs to, if one exists.If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
-
setDescription
public SetupIntentCreateParams.Builder setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users.
-
addExpand
public SetupIntentCreateParams.Builder addExpand(java.lang.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. SeeSetupIntentCreateParams.expand
for the field documentation.
-
addAllExpand
public SetupIntentCreateParams.Builder addAllExpand(java.util.List<java.lang.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. SeeSetupIntentCreateParams.expand
for the field documentation.
-
putExtraParam
public SetupIntentCreateParams.Builder putExtraParam(java.lang.String key, java.lang.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. SeeSetupIntentCreateParams.extraParams
for the field documentation.
-
putAllExtraParam
public SetupIntentCreateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.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. SeeSetupIntentCreateParams.extraParams
for the field documentation.
-
setMandateData
public SetupIntentCreateParams.Builder setMandateData(SetupIntentCreateParams.MandateData mandateData)
This hash contains details about the Mandate to create. This parameter can only be used withconfirm=true
.
-
putMetadata
public SetupIntentCreateParams.Builder putMetadata(java.lang.String key, java.lang.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. SeeSetupIntentCreateParams.metadata
for the field documentation.
-
putAllMetadata
public SetupIntentCreateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.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. SeeSetupIntentCreateParams.metadata
for the field documentation.
-
setOnBehalfOf
public SetupIntentCreateParams.Builder setOnBehalfOf(java.lang.String onBehalfOf)
The Stripe account ID for which this SetupIntent is created.
-
setPaymentMethod
public SetupIntentCreateParams.Builder setPaymentMethod(java.lang.String paymentMethod)
ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.
-
setPaymentMethodOptions
public SetupIntentCreateParams.Builder setPaymentMethodOptions(SetupIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
Payment-method-specific configuration for this SetupIntent.
-
addPaymentMethodType
public SetupIntentCreateParams.Builder addPaymentMethodType(java.lang.String element)
Add an element to `paymentMethodTypes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSetupIntentCreateParams.paymentMethodTypes
for the field documentation.
-
addAllPaymentMethodType
public SetupIntentCreateParams.Builder addAllPaymentMethodType(java.util.List<java.lang.String> elements)
Add all elements to `paymentMethodTypes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSetupIntentCreateParams.paymentMethodTypes
for the field documentation.
-
setReturnUrl
public SetupIntentCreateParams.Builder setReturnUrl(java.lang.String returnUrl)
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used withconfirm=true
.
-
setSingleUse
public SetupIntentCreateParams.Builder setSingleUse(SetupIntentCreateParams.SingleUse singleUse)
If this hash is populated, this SetupIntent will generate a single_use Mandate on success.
-
setUsage
public SetupIntentCreateParams.Builder setUsage(SetupIntentCreateParams.Usage usage)
Indicates how the payment method is intended to be used in the future. If not provided, this value defaults tooff_session
.
-
-