public class PaymentMethod extends ApiResource implements HasId, MetadataStore<PaymentMethod>
Modifier and Type | Class and Description |
---|---|
static class |
PaymentMethod.AuBecsDebit |
static class |
PaymentMethod.BillingDetails |
static class |
PaymentMethod.Card |
static class |
PaymentMethod.CardPresent
Owner's verified shipping address.
|
static class |
PaymentMethod.Fpx |
static class |
PaymentMethod.Ideal |
static class |
PaymentMethod.SepaDebit |
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_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.AuBecsDebit |
getAuBecsDebit() |
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.Fpx |
getFpx() |
java.lang.String |
getId()
Unique identifier for the object.
|
PaymentMethod.Ideal |
getIdeal() |
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.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 |
setAuBecsDebit(PaymentMethod.AuBecsDebit auBecsDebit) |
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 |
setFpx(PaymentMethod.Fpx fpx) |
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setIdeal(PaymentMethod.Ideal ideal) |
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 |
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, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public 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
StripeException
public static PaymentMethod create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static PaymentMethod create(PaymentMethodCreateParams params) throws StripeException
StripeException
public static PaymentMethod create(PaymentMethodCreateParams params, RequestOptions options) throws StripeException
StripeException
public static PaymentMethod retrieve(java.lang.String paymentMethod) throws StripeException
StripeException
public static PaymentMethod retrieve(java.lang.String paymentMethod, RequestOptions options) throws StripeException
StripeException
public static PaymentMethod retrieve(java.lang.String paymentMethod, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static PaymentMethod retrieve(java.lang.String paymentMethod, PaymentMethodRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public PaymentMethod update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<PaymentMethod>
StripeException
public PaymentMethod update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<PaymentMethod>
StripeException
public PaymentMethod update(PaymentMethodUpdateParams params) throws StripeException
StripeException
public PaymentMethod update(PaymentMethodUpdateParams params, RequestOptions options) throws StripeException
StripeException
public static PaymentMethodCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static PaymentMethodCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static PaymentMethodCollection list(PaymentMethodListParams params) throws StripeException
StripeException
public static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options) throws StripeException
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public 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.
StripeException
public PaymentMethod detach() throws StripeException
StripeException
public PaymentMethod detach(RequestOptions options) throws StripeException
StripeException
public PaymentMethod detach(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public PaymentMethod detach(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public PaymentMethod detach(PaymentMethodDetachParams params) throws StripeException
StripeException
public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions options) throws StripeException
StripeException
public PaymentMethod.AuBecsDebit getAuBecsDebit()
public PaymentMethod.BillingDetails getBillingDetails()
public PaymentMethod.Card getCard()
public PaymentMethod.CardPresent getCardPresent()
public java.lang.Long getCreated()
public PaymentMethod.Fpx getFpx()
public PaymentMethod.Ideal getIdeal()
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.SepaDebit getSepaDebit()
public java.lang.String getType()
One of au_becs_debit
, card
, card_present
, fpx
, ideal
, or sepa_debit
.
public void setAuBecsDebit(PaymentMethod.AuBecsDebit auBecsDebit)
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 setFpx(PaymentMethod.Fpx fpx)
public void setId(java.lang.String id)
public void setIdeal(PaymentMethod.Ideal ideal)
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 setSepaDebit(PaymentMethod.SepaDebit sepaDebit)
public void setType(java.lang.String type)
One of au_becs_debit
, card
, card_present
, fpx
, ideal
, or sepa_debit
.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<PaymentMethod>