public class Customer extends ApiResource implements HasId, MetadataStore<Customer>
Modifier and Type | Class and Description |
---|---|
static class |
Customer.InvoiceSettings |
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Customer() |
Modifier and Type | Method and Description |
---|---|
CustomerBalanceTransactionCollection |
balanceTransactions()
Returns a list of transactions that updated the customer’s
balance . |
CustomerBalanceTransactionCollection |
balanceTransactions(CustomerBalanceTransactionsParams params)
Returns a list of transactions that updated the customer’s
balance . |
CustomerBalanceTransactionCollection |
balanceTransactions(CustomerBalanceTransactionsParams params,
RequestOptions options)
Returns a list of transactions that updated the customer’s
balance . |
CustomerBalanceTransactionCollection |
balanceTransactions(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of transactions that updated the customer’s
balance . |
CustomerBalanceTransactionCollection |
balanceTransactions(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of transactions that updated the customer’s
balance . |
protected boolean |
canEqual(java.lang.Object other) |
static Customer |
create(CustomerCreateParams params)
Creates a new customer object.
|
static Customer |
create(CustomerCreateParams params,
RequestOptions options)
Creates a new customer object.
|
static Customer |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new customer object.
|
static Customer |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a new customer object.
|
Customer |
delete()
Permanently deletes a customer.
|
Customer |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Permanently deletes a customer.
|
Customer |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Permanently deletes a customer.
|
Customer |
delete(RequestOptions options)
Permanently deletes a customer.
|
Discount |
deleteDiscount()
Removes the currently applied discount on a customer.
|
Discount |
deleteDiscount(java.util.Map<java.lang.String,java.lang.Object> params)
Removes the currently applied discount on a customer.
|
Discount |
deleteDiscount(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Removes the currently applied discount on a customer.
|
boolean |
equals(java.lang.Object o) |
Address |
getAddress()
The customer's address.
|
java.lang.Long |
getBalance()
Current balance, if any, being stored on the customer.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can
be charged in for recurring billing purposes.
|
java.lang.String |
getDefaultSource()
Get id of expandable `defaultSource` object.
|
PaymentSource |
getDefaultSourceObject()
Get expanded `defaultSource`.
|
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.Boolean |
getDelinquent()
When the customer's latest invoice is billed by charging automatically, delinquent is true if
the invoice's latest charge is failed.
|
java.lang.String |
getDescription()
An arbitrary string attached to the object.
|
Discount |
getDiscount()
Describes the current discount active on the customer, if there is one.
|
java.lang.String |
getEmail()
The customer's email address.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getInvoicePrefix()
The prefix for the customer used to generate unique invoice numbers.
|
Customer.InvoiceSettings |
getInvoiceSettings() |
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 |
getName()
The customer's full name or business name.
|
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getPhone()
The customer's phone number.
|
java.util.List<java.lang.String> |
getPreferredLocales()
The customer's preferred locales (languages), ordered by preference.
|
ShippingDetails |
getShipping()
Mailing and shipping address for the customer.
|
PaymentSourceCollection |
getSources()
The customer's payment sources, if any.
|
SubscriptionCollection |
getSubscriptions()
The customer's current subscriptions, if any.
|
java.lang.String |
getTaxExempt()
Describes the customer's tax exemption status.
|
TaxIdCollection |
getTaxIds()
The customer's tax IDs.
|
int |
hashCode() |
static CustomerCollection |
list(CustomerListParams params)
Returns a list of your customers.
|
static CustomerCollection |
list(CustomerListParams params,
RequestOptions options)
Returns a list of your customers.
|
static CustomerCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your customers.
|
static CustomerCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your customers.
|
static Customer |
retrieve(java.lang.String customer)
Retrieves the details of an existing customer.
|
static Customer |
retrieve(java.lang.String customer,
CustomerRetrieveParams params,
RequestOptions options)
Retrieves the details of an existing customer.
|
static Customer |
retrieve(java.lang.String customer,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of an existing customer.
|
static Customer |
retrieve(java.lang.String customer,
RequestOptions options)
Retrieves the details of an existing customer.
|
void |
setAddress(Address address)
The customer's address.
|
void |
setBalance(java.lang.Long balance)
Current balance, if any, being stored on the customer.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can
be charged in for recurring billing purposes.
|
void |
setDefaultSource(java.lang.String id) |
void |
setDefaultSourceObject(PaymentSource expandableObject) |
void |
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
|
void |
setDelinquent(java.lang.Boolean delinquent)
When the customer's latest invoice is billed by charging automatically, delinquent is true if
the invoice's latest charge is failed.
|
void |
setDescription(java.lang.String description)
An arbitrary string attached to the object.
|
void |
setDiscount(Discount discount)
Describes the current discount active on the customer, if there is one.
|
void |
setEmail(java.lang.String email)
The customer's email address.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setInvoicePrefix(java.lang.String invoicePrefix)
The prefix for the customer used to generate unique invoice numbers.
|
void |
setInvoiceSettings(Customer.InvoiceSettings invoiceSettings) |
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 |
setName(java.lang.String name)
The customer's full name or business name.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPhone(java.lang.String phone)
The customer's phone number.
|
void |
setPreferredLocales(java.util.List<java.lang.String> preferredLocales)
The customer's preferred locales (languages), ordered by preference.
|
void |
setShipping(ShippingDetails shipping)
Mailing and shipping address for the customer.
|
void |
setSources(PaymentSourceCollection sources)
The customer's payment sources, if any.
|
void |
setSubscriptions(SubscriptionCollection subscriptions)
The customer's current subscriptions, if any.
|
void |
setTaxExempt(java.lang.String taxExempt)
Describes the customer's tax exemption status.
|
void |
setTaxIds(TaxIdCollection taxIds)
The customer's tax IDs.
|
Customer |
update(CustomerUpdateParams params)
Updates the specified customer by setting the values of the parameters passed.
|
Customer |
update(CustomerUpdateParams params,
RequestOptions options)
Updates the specified customer by setting the values of the parameters passed.
|
Customer |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified customer by setting the values of the parameters passed.
|
Customer |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specified customer by setting the values of the parameters passed.
|
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 getDefaultSource()
public void setDefaultSource(java.lang.String id)
public PaymentSource getDefaultSourceObject()
public void setDefaultSourceObject(PaymentSource expandableObject)
public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static CustomerCollection list(CustomerListParams params) throws StripeException
StripeException
public static CustomerCollection list(CustomerListParams params, RequestOptions options) throws StripeException
StripeException
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Customer create(CustomerCreateParams params) throws StripeException
StripeException
public static Customer create(CustomerCreateParams params, RequestOptions options) throws StripeException
StripeException
public static Customer retrieve(java.lang.String customer) throws StripeException
StripeException
public static Customer retrieve(java.lang.String customer, RequestOptions options) throws StripeException
StripeException
public static Customer retrieve(java.lang.String customer, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Customer retrieve(java.lang.String customer, CustomerRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public Customer update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
past_due
state, then the latest
open invoice for the subscription with automatic collection enabled will be retried. This retry
will not count as an automatic retry, and will not affect the next regularly scheduled payment
for the invoice. Changing the default_source for a customer will not trigger
this behavior.
This request accepts mostly the same arguments as the customer creation call.
update
in interface MetadataStore<Customer>
StripeException
public Customer update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
past_due
state, then the latest
open invoice for the subscription with automatic collection enabled will be retried. This retry
will not count as an automatic retry, and will not affect the next regularly scheduled payment
for the invoice. Changing the default_source for a customer will not trigger
this behavior.
This request accepts mostly the same arguments as the customer creation call.
update
in interface MetadataStore<Customer>
StripeException
public Customer update(CustomerUpdateParams params) throws StripeException
past_due
state, then the latest
open invoice for the subscription with automatic collection enabled will be retried. This retry
will not count as an automatic retry, and will not affect the next regularly scheduled payment
for the invoice. Changing the default_source for a customer will not trigger
this behavior.
This request accepts mostly the same arguments as the customer creation call.
StripeException
public Customer update(CustomerUpdateParams params, RequestOptions options) throws StripeException
past_due
state, then the latest
open invoice for the subscription with automatic collection enabled will be retried. This retry
will not count as an automatic retry, and will not affect the next regularly scheduled payment
for the invoice. Changing the default_source for a customer will not trigger
this behavior.
This request accepts mostly the same arguments as the customer creation call.
StripeException
public Customer delete() throws StripeException
StripeException
public Customer delete(RequestOptions options) throws StripeException
StripeException
public Customer delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Customer delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public CustomerBalanceTransactionCollection balanceTransactions() throws StripeException
balance
.StripeException
public CustomerBalanceTransactionCollection balanceTransactions(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
balance
.StripeException
public CustomerBalanceTransactionCollection balanceTransactions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
balance
.StripeException
public CustomerBalanceTransactionCollection balanceTransactions(CustomerBalanceTransactionsParams params) throws StripeException
balance
.StripeException
public CustomerBalanceTransactionCollection balanceTransactions(CustomerBalanceTransactionsParams params, RequestOptions options) throws StripeException
balance
.StripeException
public Discount deleteDiscount() throws StripeException
StripeException
public Discount deleteDiscount(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Discount deleteDiscount(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Address getAddress()
public java.lang.Long getBalance()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getDeleted()
public java.lang.Boolean getDelinquent()
public java.lang.String getDescription()
public Discount getDiscount()
public java.lang.String getEmail()
public java.lang.String getInvoicePrefix()
public Customer.InvoiceSettings getInvoiceSettings()
public java.lang.Boolean getLivemode()
public java.lang.String getName()
public java.lang.String getObject()
Equal to `customer`.
public java.lang.String getPhone()
public java.util.List<java.lang.String> getPreferredLocales()
public ShippingDetails getShipping()
public PaymentSourceCollection getSources()
public SubscriptionCollection getSubscriptions()
public java.lang.String getTaxExempt()
public TaxIdCollection getTaxIds()
public void setAddress(Address address)
public void setBalance(java.lang.Long balance)
public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setDeleted(java.lang.Boolean deleted)
public void setDelinquent(java.lang.Boolean delinquent)
public void setDescription(java.lang.String description)
public void setDiscount(Discount discount)
public void setEmail(java.lang.String email)
public void setId(java.lang.String id)
public void setInvoicePrefix(java.lang.String invoicePrefix)
public void setInvoiceSettings(Customer.InvoiceSettings invoiceSettings)
public void setLivemode(java.lang.Boolean livemode)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setName(java.lang.String name)
public void setObject(java.lang.String object)
Equal to `customer`.
public void setPhone(java.lang.String phone)
public void setPreferredLocales(java.util.List<java.lang.String> preferredLocales)
public void setShipping(ShippingDetails shipping)
public void setSources(PaymentSourceCollection sources)
public void setSubscriptions(SubscriptionCollection subscriptions)
public void setTaxExempt(java.lang.String taxExempt)
public void setTaxIds(TaxIdCollection taxIds)
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<Customer>