public class PaymentMethod extends ApiResource implements HasId, MetadataStore<PaymentMethod>
Modifier and Type | Class and Description |
---|---|
static class |
PaymentMethod.BillingDetails |
static class |
PaymentMethod.Card |
static class |
PaymentMethod.CardPresent
Owner's verified shipping address.
|
ApiResource.RequestMethod, ApiResource.RequestType
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.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`.
|
java.lang.String |
getId()
Unique identifier for the object.
|
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.
|
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 |
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 |
setId(java.lang.String id)
Unique identifier for the object.
|
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 |
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, multipartRequest, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCustomer()
public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
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 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 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 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 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.BillingDetails getBillingDetails()
public PaymentMethod.Card getCard()
public PaymentMethod.CardPresent getCardPresent()
public java.lang.Long getCreated()
public java.lang.Boolean getLivemode()
public java.lang.String getObject()
public java.lang.String getType()
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 setId(java.lang.String id)
public void setLivemode(java.lang.Boolean livemode)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setObject(java.lang.String object)
public void setType(java.lang.String type)
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>