public class Customer extends APIResource implements MetadataStore<Customer>, HasId
APIResource.RequestMethod, APIResource.RequestTypeCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
Customer() |
| Modifier and Type | Method and Description |
|---|---|
static CustomerCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use the
list(Map) method instead.
This method will be removed in the next major version. |
static CustomerCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
static CustomerCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription()
Deprecated.
Use the
Subscription.cancel(Map) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use the
Subscription.cancel(Map) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use the
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription(RequestOptions options)
Deprecated.
Use the
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
cancelSubscription(java.lang.String apiKey)
Deprecated.
Use the
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
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.
|
static Customer |
create(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
create(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
BankAccount |
createBankAccount(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version. |
BankAccount |
createBankAccount(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
BankAccount |
createBankAccount(java.lang.String token)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version. |
BankAccount |
createBankAccount(java.lang.String token,
RequestOptions options)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
Card |
createCard(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version. |
Card |
createCard(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
Card |
createCard(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
Card |
createCard(java.lang.String token)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version. |
Card |
createCard(java.lang.String token,
RequestOptions options)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
Card |
createCard(java.lang.String token,
java.lang.String apiKey)
Deprecated.
Use
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version. |
Subscription |
createSubscription(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use the
Subscription.create(Map) method instead.
This method will be removed in the next major version. |
Subscription |
createSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use the
Subscription.create(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
createSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
Subscription.create(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
DeletedCustomer |
delete()
Delete a customer.
|
DeletedCustomer |
delete(RequestOptions options)
Delete a customer.
|
DeletedCustomer |
delete(java.lang.String apiKey)
Deprecated.
Use the
delete(RequestOptions) method instead.
This method will be removed in the next major version. |
void |
deleteDiscount()
Delete a customer discount.
|
void |
deleteDiscount(RequestOptions options)
Delete a customer discount.
|
void |
deleteDiscount(java.lang.String apiKey)
Deprecated.
Use the
deleteDiscount(RequestOptions) method instead.
This method will be removed in the next major version. |
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getAccountBalance() |
java.lang.String |
getBusinessVatId() |
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.Boolean |
getLivemode() |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata() |
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() |
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.
|
static Customer |
retrieve(java.lang.String id,
java.lang.String apiKey)
Deprecated.
Use the
retrieve(String, RequestOptions) method instead.
This method will be removed in the next major version. |
void |
setAccountBalance(java.lang.Long accountBalance) |
void |
setBusinessVatId(java.lang.String businessVatId) |
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 |
setLivemode(java.lang.Boolean livemode) |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata) |
void |
setNextRecurringCharge(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 |
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.
|
Customer |
update(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
update(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params)
Deprecated.
Use the
Subscription.update(Map) method instead.
This method will be removed in the next major version. |
Subscription |
updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deprecated.
Use the
Subscription.update(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
Subscription |
updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey)
Deprecated.
Use the
Subscription.update(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
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)
@Deprecated public static CustomerCollection all(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map) method instead.
This method will be removed in the next major version.@Deprecated public static CustomerCollection all(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public static CustomerCollection all(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription() throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription(java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription cancelSubscription(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.cancel(Map, RequestOptions) method instead.
This method will be removed in the next major version.public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
create(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public BankAccount createBankAccount(java.lang.String token) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version.@Deprecated public BankAccount createBankAccount(java.lang.String token, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public BankAccount createBankAccount(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version.@Deprecated public BankAccount createBankAccount(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.lang.String token) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.lang.String token, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.lang.String token, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public Card createCard(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
getSources() and
ExternalAccountCollection.create(Map, RequestOptions) instead.
This method will be removed in the next major version.@Deprecated public Subscription createSubscription(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.create(Map) method instead.
This method will be removed in the next major version.@Deprecated public Subscription createSubscription(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.create(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription createSubscription(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.create(Map, RequestOptions) method instead.
This method will be removed in the next major version.public DeletedCustomer delete() throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public DeletedCustomer delete(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public DeletedCustomer delete(java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
delete(RequestOptions) method instead.
This method will be removed in the next major version.public void deleteDiscount()
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
public void deleteDiscount(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated
public void deleteDiscount(java.lang.String apiKey)
throws AuthenticationException,
InvalidRequestException,
APIConnectionException,
CardException,
APIException
deleteDiscount(RequestOptions) method instead.
This method will be removed in the next major version.public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Customer retrieve(java.lang.String id) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Customer retrieve(java.lang.String id, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Customer retrieve(java.lang.String id, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
retrieve(String, RequestOptions) method instead.
This method will be removed in the next major version.public static Customer retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public Customer update(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update in interface MetadataStore<Customer>AuthenticationExceptionInvalidRequestExceptionAPIConnectionExceptionCardExceptionAPIExceptionpublic Customer update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update in interface MetadataStore<Customer>AuthenticationExceptionInvalidRequestExceptionAPIConnectionExceptionCardExceptionAPIException@Deprecated public Customer update(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.update(Map) method instead.
This method will be removed in the next major version.@Deprecated public Subscription updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.update(Map, RequestOptions) method instead.
This method will be removed in the next major version.@Deprecated public Subscription updateSubscription(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
Subscription.update(Map, RequestOptions) method instead.
This method will be removed in the next major version.public java.lang.String getObject()
public java.lang.Long getAccountBalance()
public java.lang.String getBusinessVatId()
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.Boolean getLivemode()
public ShippingDetails getShipping()
public ExternalAccountCollection getSources()
public CustomerSubscriptionCollection getSubscriptions()
@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 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 setBusinessVatId(java.lang.String businessVatId)
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 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)
@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(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>