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.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.SetupIntentCreateParams.BuilderaddAllPaymentMethodType(java.util.List<java.lang.String> elements)Add all elements to `paymentMethodTypes` list.SetupIntentCreateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.SetupIntentCreateParams.BuilderaddPaymentMethodType(java.lang.String element)Add an element to `paymentMethodTypes` list.SetupIntentCreateParamsbuild()Finalize and obtain parameter instance from this builder.SetupIntentCreateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.SetupIntentCreateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.SetupIntentCreateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.SetupIntentCreateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.SetupIntentCreateParams.BuildersetConfirm(java.lang.Boolean confirm)Set totrueto attempt to confirm this SetupIntent immediately.SetupIntentCreateParams.BuildersetCustomer(java.lang.String customer)ID of the Customer this SetupIntent belongs to, if one exists.SetupIntentCreateParams.BuildersetDescription(java.lang.String description)An arbitrary string attached to the object.SetupIntentCreateParams.BuildersetMandateData(SetupIntentCreateParams.MandateData mandateData)This hash contains details about the Mandate to create.SetupIntentCreateParams.BuildersetOnBehalfOf(java.lang.String onBehalfOf)The Stripe account ID for which this SetupIntent is created.SetupIntentCreateParams.BuildersetPaymentMethod(java.lang.String paymentMethod)ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent.SetupIntentCreateParams.BuildersetPaymentMethodOptions(SetupIntentCreateParams.PaymentMethodOptions paymentMethodOptions)Payment-method-specific configuration for this SetupIntent.SetupIntentCreateParams.BuildersetReturnUrl(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.BuildersetSingleUse(SetupIntentCreateParams.SingleUse singleUse)If this hash is populated, this SetupIntent will generate a single_use Mandate on success.SetupIntentCreateParams.BuildersetUsage(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 totrueto 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.expandfor 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.expandfor 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.extraParamsfor 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.extraParamsfor 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.metadatafor 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.metadatafor 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.paymentMethodTypesfor 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.paymentMethodTypesfor 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.
-
-