public static class SetupIntentCreateParams.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and 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 to
true 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.
|
public SetupIntentCreateParams build()
public SetupIntentCreateParams.Builder setConfirm(java.lang.Boolean confirm)
true
to attempt to confirm this SetupIntent immediately. This parameter
defaults to false
. If the payment method attached is a card, a return_url may be
provided in case additional authentication is required.public SetupIntentCreateParams.Builder setCustomer(java.lang.String customer)
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.
public SetupIntentCreateParams.Builder setDescription(java.lang.String description)
public SetupIntentCreateParams.Builder addExpand(java.lang.String element)
SetupIntentCreateParams.expand
for the field documentation.public SetupIntentCreateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
SetupIntentCreateParams.expand
for the field documentation.public SetupIntentCreateParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
SetupIntentCreateParams.extraParams
for the field documentation.public SetupIntentCreateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
SetupIntentCreateParams.extraParams
for the field documentation.public SetupIntentCreateParams.Builder setMandateData(SetupIntentCreateParams.MandateData mandateData)
confirm=true
.public SetupIntentCreateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
SetupIntentCreateParams.metadata
for the field documentation.public SetupIntentCreateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
SetupIntentCreateParams.metadata
for the field documentation.public SetupIntentCreateParams.Builder setOnBehalfOf(java.lang.String onBehalfOf)
public SetupIntentCreateParams.Builder setPaymentMethod(java.lang.String paymentMethod)
public SetupIntentCreateParams.Builder setPaymentMethodOptions(SetupIntentCreateParams.PaymentMethodOptions paymentMethodOptions)
public SetupIntentCreateParams.Builder addPaymentMethodType(java.lang.String element)
SetupIntentCreateParams.paymentMethodTypes
for the field documentation.public SetupIntentCreateParams.Builder addAllPaymentMethodType(java.util.List<java.lang.String> elements)
SetupIntentCreateParams.paymentMethodTypes
for the field documentation.public SetupIntentCreateParams.Builder setReturnUrl(java.lang.String returnUrl)
confirm=true
.public SetupIntentCreateParams.Builder setSingleUse(SetupIntentCreateParams.SingleUse singleUse)
public SetupIntentCreateParams.Builder setUsage(SetupIntentCreateParams.Usage usage)
off_session
.