public static class PaymentMethodCreateParams.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PaymentMethodCreateParams.Builder |
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.
|
PaymentMethodCreateParams.Builder |
addExpand(java.lang.String element)
Add an element to `expand` list.
|
PaymentMethodCreateParams |
build()
Finalize and obtain parameter instance from this builder.
|
PaymentMethodCreateParams.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
PaymentMethodCreateParams.Builder |
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.
|
PaymentMethodCreateParams.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
PaymentMethodCreateParams.Builder |
putMetadata(java.lang.String key,
java.lang.String value)
Add a key/value pair to `metadata` map.
|
PaymentMethodCreateParams.Builder |
setAlipay(PaymentMethodCreateParams.Alipay alipay)
If this is an
Alipay PaymentMethod, this hash contains details about the Alipay
payment method. |
PaymentMethodCreateParams.Builder |
setAuBecsDebit(PaymentMethodCreateParams.AuBecsDebit auBecsDebit)
If this is an
au_becs_debit PaymentMethod, this hash contains details about the bank
account. |
PaymentMethodCreateParams.Builder |
setBacsDebit(PaymentMethodCreateParams.BacsDebit bacsDebit)
If this is a
bacs_debit PaymentMethod, this hash contains details about the Bacs
Direct Debit bank account. |
PaymentMethodCreateParams.Builder |
setBancontact(PaymentMethodCreateParams.Bancontact bancontact)
If this is a
bancontact PaymentMethod, this hash contains details about the
Bancontact payment method. |
PaymentMethodCreateParams.Builder |
setBillingDetails(PaymentMethodCreateParams.BillingDetails billingDetails)
Billing information associated with the PaymentMethod that may be used or required by
particular types of payment methods.
|
PaymentMethodCreateParams.Builder |
setCard(PaymentMethodCreateParams.CardDetails card)
If this is a
card PaymentMethod, this hash contains the user's card details. |
PaymentMethodCreateParams.Builder |
setCard(PaymentMethodCreateParams.Token card)
If this is a
card PaymentMethod, this hash contains the user's card details. |
PaymentMethodCreateParams.Builder |
setCustomer(java.lang.String customer)
The
Customer to whom the original PaymentMethod is attached. |
PaymentMethodCreateParams.Builder |
setEps(PaymentMethodCreateParams.Eps eps)
If this is an
eps PaymentMethod, this hash contains details about the EPS payment
method. |
PaymentMethodCreateParams.Builder |
setFpx(PaymentMethodCreateParams.Fpx fpx)
If this is an
fpx PaymentMethod, this hash contains details about the FPX payment
method. |
PaymentMethodCreateParams.Builder |
setGiropay(PaymentMethodCreateParams.Giropay giropay)
If this is a
giropay PaymentMethod, this hash contains details about the Giropay
payment method. |
PaymentMethodCreateParams.Builder |
setIdeal(PaymentMethodCreateParams.Ideal ideal)
If this is an
ideal PaymentMethod, this hash contains details about the iDEAL payment
method. |
PaymentMethodCreateParams.Builder |
setInteracPresent(PaymentMethodCreateParams.InteracPresent interacPresent)
If this is an
interac_present PaymentMethod, this hash contains details about the
Interac Present payment method. |
PaymentMethodCreateParams.Builder |
setP24(PaymentMethodCreateParams.P24 p24)
If this is a
p24 PaymentMethod, this hash contains details about the P24 payment
method. |
PaymentMethodCreateParams.Builder |
setPaymentMethod(java.lang.String paymentMethod)
The PaymentMethod to share.
|
PaymentMethodCreateParams.Builder |
setSepaDebit(PaymentMethodCreateParams.SepaDebit sepaDebit)
If this is a
sepa_debit PaymentMethod, this hash contains details about the SEPA
debit bank account. |
PaymentMethodCreateParams.Builder |
setType(PaymentMethodCreateParams.Type type)
The type of the PaymentMethod.
|
public PaymentMethodCreateParams build()
public PaymentMethodCreateParams.Builder setAlipay(PaymentMethodCreateParams.Alipay alipay)
Alipay
PaymentMethod, this hash contains details about the Alipay
payment method.public PaymentMethodCreateParams.Builder setAuBecsDebit(PaymentMethodCreateParams.AuBecsDebit auBecsDebit)
au_becs_debit
PaymentMethod, this hash contains details about the bank
account.public PaymentMethodCreateParams.Builder setBacsDebit(PaymentMethodCreateParams.BacsDebit bacsDebit)
bacs_debit
PaymentMethod, this hash contains details about the Bacs
Direct Debit bank account.public PaymentMethodCreateParams.Builder setBancontact(PaymentMethodCreateParams.Bancontact bancontact)
bancontact
PaymentMethod, this hash contains details about the
Bancontact payment method.public PaymentMethodCreateParams.Builder setBillingDetails(PaymentMethodCreateParams.BillingDetails billingDetails)
public PaymentMethodCreateParams.Builder setCard(PaymentMethodCreateParams.CardDetails card)
card
PaymentMethod, this hash contains the user's card details. For
backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay,
Amex Express Checkout, or legacy Checkout) into the card hash with format card:
{token: "tok_visa"}
. When providing a card number, you must meet the requirements for PCI compliance. We
strongly recommend using Stripe.js instead of interacting with this API directly.public PaymentMethodCreateParams.Builder setCard(PaymentMethodCreateParams.Token card)
card
PaymentMethod, this hash contains the user's card details. For
backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay,
Amex Express Checkout, or legacy Checkout) into the card hash with format card:
{token: "tok_visa"}
. When providing a card number, you must meet the requirements for PCI compliance. We
strongly recommend using Stripe.js instead of interacting with this API directly.public PaymentMethodCreateParams.Builder setCustomer(java.lang.String customer)
Customer
to whom the original PaymentMethod is attached.public PaymentMethodCreateParams.Builder setEps(PaymentMethodCreateParams.Eps eps)
eps
PaymentMethod, this hash contains details about the EPS payment
method.public PaymentMethodCreateParams.Builder addExpand(java.lang.String element)
PaymentMethodCreateParams.expand
for the field documentation.public PaymentMethodCreateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
PaymentMethodCreateParams.expand
for the field documentation.public PaymentMethodCreateParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
PaymentMethodCreateParams.extraParams
for the field documentation.public PaymentMethodCreateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
PaymentMethodCreateParams.extraParams
for the field documentation.public PaymentMethodCreateParams.Builder setFpx(PaymentMethodCreateParams.Fpx fpx)
fpx
PaymentMethod, this hash contains details about the FPX payment
method.public PaymentMethodCreateParams.Builder setGiropay(PaymentMethodCreateParams.Giropay giropay)
giropay
PaymentMethod, this hash contains details about the Giropay
payment method.public PaymentMethodCreateParams.Builder setIdeal(PaymentMethodCreateParams.Ideal ideal)
ideal
PaymentMethod, this hash contains details about the iDEAL payment
method.public PaymentMethodCreateParams.Builder setInteracPresent(PaymentMethodCreateParams.InteracPresent interacPresent)
interac_present
PaymentMethod, this hash contains details about the
Interac Present payment method.public PaymentMethodCreateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
PaymentMethodCreateParams.metadata
for the field documentation.public PaymentMethodCreateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
PaymentMethodCreateParams.metadata
for the field documentation.public PaymentMethodCreateParams.Builder setP24(PaymentMethodCreateParams.P24 p24)
p24
PaymentMethod, this hash contains details about the P24 payment
method.public PaymentMethodCreateParams.Builder setPaymentMethod(java.lang.String paymentMethod)
public PaymentMethodCreateParams.Builder setSepaDebit(PaymentMethodCreateParams.SepaDebit sepaDebit)
sepa_debit
PaymentMethod, this hash contains details about the SEPA
debit bank account.public PaymentMethodCreateParams.Builder setType(PaymentMethodCreateParams.Type type)