public class PaymentMethod extends ApiResource implements HasId, MetadataStore<PaymentMethod>
| Modifier and Type | Class and Description |
|---|---|
static class |
PaymentMethod.Alipay |
static class |
PaymentMethod.AuBecsDebit |
static class |
PaymentMethod.BacsDebit |
static class |
PaymentMethod.Bancontact |
static class |
PaymentMethod.BillingDetails |
static class |
PaymentMethod.Card |
static class |
PaymentMethod.CardPresent
Owner's verified shipping address.
|
static class |
PaymentMethod.Eps |
static class |
PaymentMethod.Fpx |
static class |
PaymentMethod.Giropay |
static class |
PaymentMethod.Ideal |
static class |
PaymentMethod.InteracPresent |
static class |
PaymentMethod.P24 |
static class |
PaymentMethod.SepaDebit |
ApiResource.RequestMethodCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
PaymentMethod() |
| Modifier and Type | Method and Description |
|---|---|
PaymentMethod |
attach(java.util.Map<java.lang.String,java.lang.Object> params)
Attaches a PaymentMethod object to a Customer.
|
PaymentMethod |
attach(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Attaches a PaymentMethod object to a Customer.
|
PaymentMethod |
attach(PaymentMethodAttachParams params)
Attaches a PaymentMethod object to a Customer.
|
PaymentMethod |
attach(PaymentMethodAttachParams params,
RequestOptions options)
Attaches a PaymentMethod object to a Customer.
|
protected boolean |
canEqual(java.lang.Object other) |
static PaymentMethod |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a PaymentMethod object.
|
static PaymentMethod |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a PaymentMethod object.
|
static PaymentMethod |
create(PaymentMethodCreateParams params)
Creates a PaymentMethod object.
|
static PaymentMethod |
create(PaymentMethodCreateParams params,
RequestOptions options)
Creates a PaymentMethod object.
|
PaymentMethod |
detach()
Detaches a PaymentMethod object from a Customer.
|
PaymentMethod |
detach(java.util.Map<java.lang.String,java.lang.Object> params)
Detaches a PaymentMethod object from a Customer.
|
PaymentMethod |
detach(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Detaches a PaymentMethod object from a Customer.
|
PaymentMethod |
detach(PaymentMethodDetachParams params)
Detaches a PaymentMethod object from a Customer.
|
PaymentMethod |
detach(PaymentMethodDetachParams params,
RequestOptions options)
Detaches a PaymentMethod object from a Customer.
|
PaymentMethod |
detach(RequestOptions options)
Detaches a PaymentMethod object from a Customer.
|
boolean |
equals(java.lang.Object o) |
PaymentMethod.Alipay |
getAlipay() |
PaymentMethod.AuBecsDebit |
getAuBecsDebit() |
PaymentMethod.BacsDebit |
getBacsDebit() |
PaymentMethod.Bancontact |
getBancontact() |
PaymentMethod.BillingDetails |
getBillingDetails() |
PaymentMethod.Card |
getCard() |
PaymentMethod.CardPresent |
getCardPresent() |
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
Customer |
getCustomerObject()
Get expanded
customer. |
PaymentMethod.Eps |
getEps() |
PaymentMethod.Fpx |
getFpx() |
PaymentMethod.Giropay |
getGiropay() |
java.lang.String |
getId()
Unique identifier for the object.
|
PaymentMethod.Ideal |
getIdeal() |
PaymentMethod.InteracPresent |
getInteracPresent() |
java.lang.Boolean |
getLivemode()
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach
to an object.
|
java.lang.String |
getObject()
String representing the object's type.
|
PaymentMethod.P24 |
getP24() |
PaymentMethod.SepaDebit |
getSepaDebit() |
java.lang.String |
getType()
The type of the PaymentMethod.
|
int |
hashCode() |
static PaymentMethodCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of PaymentMethods for a given Customer.
|
static PaymentMethodCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of PaymentMethods for a given Customer.
|
static PaymentMethodCollection |
list(PaymentMethodListParams params)
Returns a list of PaymentMethods for a given Customer.
|
static PaymentMethodCollection |
list(PaymentMethodListParams params,
RequestOptions options)
Returns a list of PaymentMethods for a given Customer.
|
static PaymentMethod |
retrieve(java.lang.String paymentMethod)
Retrieves a PaymentMethod object.
|
static PaymentMethod |
retrieve(java.lang.String paymentMethod,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves a PaymentMethod object.
|
static PaymentMethod |
retrieve(java.lang.String paymentMethod,
PaymentMethodRetrieveParams params,
RequestOptions options)
Retrieves a PaymentMethod object.
|
static PaymentMethod |
retrieve(java.lang.String paymentMethod,
RequestOptions options)
Retrieves a PaymentMethod object.
|
void |
setAlipay(PaymentMethod.Alipay alipay) |
void |
setAuBecsDebit(PaymentMethod.AuBecsDebit auBecsDebit) |
void |
setBacsDebit(PaymentMethod.BacsDebit bacsDebit) |
void |
setBancontact(PaymentMethod.Bancontact bancontact) |
void |
setBillingDetails(PaymentMethod.BillingDetails billingDetails) |
void |
setCard(PaymentMethod.Card card) |
void |
setCardPresent(PaymentMethod.CardPresent cardPresent) |
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerObject(Customer expandableObject) |
void |
setEps(PaymentMethod.Eps eps) |
void |
setFpx(PaymentMethod.Fpx fpx) |
void |
setGiropay(PaymentMethod.Giropay giropay) |
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setIdeal(PaymentMethod.Ideal ideal) |
void |
setInteracPresent(PaymentMethod.InteracPresent interacPresent) |
void |
setLivemode(java.lang.Boolean livemode)
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach
to an object.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setP24(PaymentMethod.P24 p24) |
void |
setSepaDebit(PaymentMethod.SepaDebit sepaDebit) |
void |
setType(java.lang.String type)
The type of the PaymentMethod.
|
PaymentMethod |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates a PaymentMethod object.
|
PaymentMethod |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates a PaymentMethod object.
|
PaymentMethod |
update(PaymentMethodUpdateParams params)
Updates a PaymentMethod object.
|
PaymentMethod |
update(PaymentMethodUpdateParams params,
RequestOptions options)
Updates a PaymentMethod object.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic java.lang.String getCustomer()
customer object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer.public void setCustomerObject(Customer expandableObject)
public static PaymentMethod create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static PaymentMethod create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethod create(PaymentMethodCreateParams params) throws StripeException
StripeExceptionpublic static PaymentMethod create(PaymentMethodCreateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethod retrieve(java.lang.String paymentMethod) throws StripeException
StripeExceptionpublic static PaymentMethod retrieve(java.lang.String paymentMethod, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethod retrieve(java.lang.String paymentMethod, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethod retrieve(java.lang.String paymentMethod, PaymentMethodRetrieveParams params, RequestOptions options) throws StripeException
StripeExceptionpublic PaymentMethod update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<PaymentMethod>StripeExceptionpublic PaymentMethod update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<PaymentMethod>StripeExceptionpublic PaymentMethod update(PaymentMethodUpdateParams params) throws StripeException
StripeExceptionpublic PaymentMethod update(PaymentMethodUpdateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethodCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static PaymentMethodCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static PaymentMethodCollection list(PaymentMethodListParams params) throws StripeException
StripeExceptionpublic static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic PaymentMethod attach(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage.
These approaches will perform any necessary steps to ensure that the PaymentMethod can be used
in a future payment. Using the /v1/payment_methods/:id/attach endpoint does not
ensure that future payments can be made with the attached PaymentMethod. See Optimizing cards for
future payments for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set
invoice_settings.default_payment_method, on the Customer to the
PaymentMethod’s ID.
StripeExceptionpublic PaymentMethod attach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage.
These approaches will perform any necessary steps to ensure that the PaymentMethod can be used
in a future payment. Using the /v1/payment_methods/:id/attach endpoint does not
ensure that future payments can be made with the attached PaymentMethod. See Optimizing cards for
future payments for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set
invoice_settings.default_payment_method, on the Customer to the
PaymentMethod’s ID.
StripeExceptionpublic PaymentMethod attach(PaymentMethodAttachParams params) throws StripeException
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage.
These approaches will perform any necessary steps to ensure that the PaymentMethod can be used
in a future payment. Using the /v1/payment_methods/:id/attach endpoint does not
ensure that future payments can be made with the attached PaymentMethod. See Optimizing cards for
future payments for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set
invoice_settings.default_payment_method, on the Customer to the
PaymentMethod’s ID.
StripeExceptionpublic PaymentMethod attach(PaymentMethodAttachParams params, RequestOptions options) throws StripeException
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage.
These approaches will perform any necessary steps to ensure that the PaymentMethod can be used
in a future payment. Using the /v1/payment_methods/:id/attach endpoint does not
ensure that future payments can be made with the attached PaymentMethod. See Optimizing cards for
future payments for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set
invoice_settings.default_payment_method, on the Customer to the
PaymentMethod’s ID.
StripeExceptionpublic PaymentMethod detach() throws StripeException
StripeExceptionpublic PaymentMethod detach(RequestOptions options) throws StripeException
StripeExceptionpublic PaymentMethod detach(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic PaymentMethod detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic PaymentMethod detach(PaymentMethodDetachParams params) throws StripeException
StripeExceptionpublic PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions options) throws StripeException
StripeExceptionpublic PaymentMethod.Alipay getAlipay()
public PaymentMethod.AuBecsDebit getAuBecsDebit()
public PaymentMethod.BacsDebit getBacsDebit()
public PaymentMethod.Bancontact getBancontact()
public PaymentMethod.BillingDetails getBillingDetails()
public PaymentMethod.Card getCard()
public PaymentMethod.CardPresent getCardPresent()
public java.lang.Long getCreated()
public PaymentMethod.Eps getEps()
public PaymentMethod.Fpx getFpx()
public PaymentMethod.Giropay getGiropay()
public PaymentMethod.Ideal getIdeal()
public PaymentMethod.InteracPresent getInteracPresent()
public java.lang.Boolean getLivemode()
true if the object exists in live mode or the value false if the
object exists in test mode.public java.lang.String getObject()
Equal to payment_method.
public PaymentMethod.P24 getP24()
public PaymentMethod.SepaDebit getSepaDebit()
public java.lang.String getType()
One of alipay, au_becs_debit, bacs_debit, bancontact, card, card_present, eps, fpx, giropay, ideal, p24, or sepa_debit.
public void setAlipay(PaymentMethod.Alipay alipay)
public void setAuBecsDebit(PaymentMethod.AuBecsDebit auBecsDebit)
public void setBacsDebit(PaymentMethod.BacsDebit bacsDebit)
public void setBancontact(PaymentMethod.Bancontact bancontact)
public void setBillingDetails(PaymentMethod.BillingDetails billingDetails)
public void setCard(PaymentMethod.Card card)
public void setCardPresent(PaymentMethod.CardPresent cardPresent)
public void setCreated(java.lang.Long created)
public void setEps(PaymentMethod.Eps eps)
public void setFpx(PaymentMethod.Fpx fpx)
public void setGiropay(PaymentMethod.Giropay giropay)
public void setId(java.lang.String id)
public void setIdeal(PaymentMethod.Ideal ideal)
public void setInteracPresent(PaymentMethod.InteracPresent interacPresent)
public void setLivemode(java.lang.Boolean livemode)
true if the object exists in live mode or the value false if the
object exists in test mode.public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setObject(java.lang.String object)
Equal to payment_method.
public void setP24(PaymentMethod.P24 p24)
public void setSepaDebit(PaymentMethod.SepaDebit sepaDebit)
public void setType(java.lang.String type)
One of alipay, au_becs_debit, bacs_debit, bancontact, card, card_present, eps, fpx, giropay, ideal, p24, or sepa_debit.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<PaymentMethod>