public class Customer extends ApiResource implements MetadataStore<Customer>, HasId
| Modifier and Type | Class and Description |
|---|---|
static class |
Customer.NextRecurringCharge |
static class |
Customer.TaxInfo |
static class |
Customer.TaxInfoVerification |
ApiResource.RequestMethod, ApiResource.RequestTypeCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
Customer() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Customer |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Create a customer.
|
static Customer |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Create a customer.
|
Customer |
delete()
Delete a customer.
|
Customer |
delete(RequestOptions options)
Delete a customer.
|
void |
deleteDiscount()
Delete a customer discount.
|
void |
deleteDiscount(RequestOptions options)
Delete a customer discount.
|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAccountBalance() |
java.lang.String |
getBusinessVatId()
Deprecated.
Prefer using the
taxInfo attribute instead. |
CustomerCardCollection |
getCards()
Deprecated.
Prefer using the
sources attribute instead. |
java.lang.Long |
getCreated() |
java.lang.String |
getCurrency() |
java.lang.String |
getDefaultCard()
Deprecated.
Prefer using the
defaultSource attribute instead. |
java.lang.String |
getDefaultSource() |
ExternalAccount |
getDefaultSourceObject() |
java.lang.Boolean |
getDeleted() |
java.lang.Boolean |
getDelinquent() |
java.lang.String |
getDescription() |
Discount |
getDiscount() |
java.lang.String |
getEmail() |
java.lang.String |
getId() |
java.lang.String |
getInvoicePrefix() |
java.lang.Boolean |
getLivemode() |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata() |
Customer.NextRecurringCharge |
getNextRecurringCharge()
Deprecated.
Prefer using the
Invoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>) method instead. |
java.lang.String |
getObject() |
ShippingDetails |
getShipping() |
ExternalAccountCollection |
getSources() |
Subscription |
getSubscription()
Deprecated.
Prefer using the
subscriptions attribute instead. |
CustomerSubscriptionCollection |
getSubscriptions() |
Customer.TaxInfo |
getTaxInfo() |
Customer.TaxInfoVerification |
getTaxInfoVerification() |
java.lang.Long |
getTrialEnd()
Deprecated.
Prefer using the
subscriptions attribute instead. |
int |
hashCode() |
static CustomerCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
List all customers.
|
static CustomerCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
List all customers.
|
static Customer |
retrieve(java.lang.String id)
Retrieve a customer.
|
static Customer |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieve a customer.
|
static Customer |
retrieve(java.lang.String id,
RequestOptions options)
Retrieve a customer.
|
void |
setAccountBalance(java.lang.Long accountBalance) |
void |
setBusinessVatId(java.lang.String businessVatId)
Deprecated.
Prefer using the
taxInfo attribute instead. |
void |
setCards(CustomerCardCollection cards)
Deprecated.
Prefer using the
sources attribute instead. |
void |
setCreated(java.lang.Long created) |
void |
setCurrency(java.lang.String currency) |
void |
setDefaultCard(java.lang.String defaultCard)
Deprecated.
Prefer using the
defaultSource attribute instead. |
void |
setDefaultSource(java.lang.String defaultSourceId) |
void |
setDefaultSourceObject(ExternalAccount c) |
void |
setDeleted(java.lang.Boolean deleted) |
void |
setDelinquent(java.lang.Boolean delinquent) |
void |
setDescription(java.lang.String description) |
void |
setDiscount(Discount discount) |
void |
setEmail(java.lang.String email) |
void |
setId(java.lang.String id) |
void |
setInvoicePrefix(java.lang.String invoicePrefix) |
void |
setLivemode(java.lang.Boolean livemode) |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata) |
void |
setNextRecurringCharge(Customer.NextRecurringCharge nextRecurringCharge)
Deprecated.
Prefer using the
Invoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>) method instead. |
void |
setObject(java.lang.String object) |
void |
setShipping(ShippingDetails shipping) |
void |
setSources(ExternalAccountCollection sources) |
void |
setSubscription(Subscription subscription)
Deprecated.
Prefer using the
subscriptions attribute instead. |
void |
setSubscriptions(CustomerSubscriptionCollection subscriptions) |
void |
setTaxInfo(Customer.TaxInfo taxInfo) |
void |
setTaxInfoVerification(Customer.TaxInfoVerification taxInfoVerification) |
void |
setTrialEnd(java.lang.Long trialEnd)
Deprecated.
Prefer using the
subscriptions attribute instead. |
Customer |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Update a customer.
|
Customer |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Update a customer.
|
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncodeequals, getLastResponse, setLastResponse, toJson, toStringpublic java.lang.String getDefaultSource()
public void setDefaultSource(java.lang.String defaultSourceId)
public ExternalAccount getDefaultSourceObject()
public void setDefaultSourceObject(ExternalAccount c)
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static Customer create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic Customer delete() throws StripeException
StripeExceptionpublic Customer delete(RequestOptions options) throws StripeException
StripeExceptionpublic void deleteDiscount()
throws StripeException
StripeExceptionpublic void deleteDiscount(RequestOptions options) throws StripeException
StripeExceptionpublic static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Customer retrieve(java.lang.String id) throws StripeException
StripeExceptionpublic static Customer retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeExceptionpublic static Customer retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic Customer update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<Customer>StripeExceptionpublic Customer update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<Customer>StripeExceptionpublic java.lang.String getObject()
public java.lang.Long getAccountBalance()
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 java.lang.Boolean getLivemode()
public ShippingDetails getShipping()
public ExternalAccountCollection getSources()
public CustomerSubscriptionCollection getSubscriptions()
public Customer.TaxInfo getTaxInfo()
public Customer.TaxInfoVerification getTaxInfoVerification()
@Deprecated public java.lang.String getBusinessVatId()
taxInfo attribute instead.businessVatId attribute.businessVatId attribute@Deprecated public CustomerCardCollection getCards()
sources attribute instead.cards attribute.cards attribute@Deprecated public java.lang.String getDefaultCard()
defaultSource attribute instead.default_card attribute.default_card attribute@Deprecated public Customer.NextRecurringCharge getNextRecurringCharge()
Invoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>) method instead.next_recurring_charge attribute.next_recurring_charge attribute@Deprecated public Subscription getSubscription()
subscriptions attribute instead.subscription attribute.subscription attribute@Deprecated public java.lang.Long getTrialEnd()
subscriptions attribute instead.trial_end attribute.trial_end attributepublic void setId(java.lang.String id)
public void setObject(java.lang.String object)
public void setAccountBalance(java.lang.Long accountBalance)
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 setInvoicePrefix(java.lang.String invoicePrefix)
public void setLivemode(java.lang.Boolean livemode)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setShipping(ShippingDetails shipping)
public void setSources(ExternalAccountCollection sources)
public void setSubscriptions(CustomerSubscriptionCollection subscriptions)
public void setTaxInfo(Customer.TaxInfo taxInfo)
public void setTaxInfoVerification(Customer.TaxInfoVerification taxInfoVerification)
@Deprecated public void setBusinessVatId(java.lang.String businessVatId)
taxInfo attribute instead.businessVatId attribute.@Deprecated public void setCards(CustomerCardCollection cards)
sources attribute instead.cards attribute.@Deprecated public void setDefaultCard(java.lang.String defaultCard)
defaultSource attribute instead.default_card attribute.@Deprecated public void setNextRecurringCharge(Customer.NextRecurringCharge nextRecurringCharge)
Invoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>) method instead.next_recurring_charge attribute.@Deprecated public void setSubscription(Subscription subscription)
subscriptions attribute instead.subscription attribute.@Deprecated public void setTrialEnd(java.lang.Long trialEnd)
subscriptions attribute instead.trial_end attribute.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.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<Customer>