Package com.stripe.model
Class Customer
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.Customer
-
- All Implemented Interfaces:
HasId
,MetadataStore<Customer>
public class Customer extends ApiResource implements MetadataStore<Customer>, HasId
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Customer.InvoiceSettings
static class
Customer.NextRecurringCharge
static class
Customer.TaxInfo
static class
Customer.TaxInfoVerification
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod, ApiResource.RequestType
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description Customer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 thetaxInfo
attribute instead.CustomerCardCollection
getCards()
Deprecated.Prefer using thesources
attribute instead.java.lang.Long
getCreated()
java.lang.String
getCurrency()
java.lang.String
getDefaultCard()
Deprecated.Prefer using thedefaultSource
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()
Customer.InvoiceSettings
getInvoiceSettings()
java.lang.Boolean
getLivemode()
java.util.Map<java.lang.String,java.lang.String>
getMetadata()
Customer.NextRecurringCharge
getNextRecurringCharge()
Deprecated.Prefer using theInvoice.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 thesubscriptions
attribute instead.CustomerSubscriptionCollection
getSubscriptions()
Customer.TaxInfo
getTaxInfo()
Customer.TaxInfoVerification
getTaxInfoVerification()
java.lang.Long
getTrialEnd()
Deprecated.Prefer using thesubscriptions
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, RequestOptions options)
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.void
setAccountBalance(java.lang.Long accountBalance)
void
setBusinessVatId(java.lang.String businessVatId)
Deprecated.Prefer using thetaxInfo
attribute instead.void
setCards(CustomerCardCollection cards)
Deprecated.Prefer using thesources
attribute instead.void
setCreated(java.lang.Long created)
void
setCurrency(java.lang.String currency)
void
setDefaultCard(java.lang.String defaultCard)
Deprecated.Prefer using thedefaultSource
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
setInvoiceSettings(Customer.InvoiceSettings invoiceSettings)
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 theInvoice.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 thesubscriptions
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 thesubscriptions
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.-
Methods inherited from class com.stripe.net.ApiResource
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getDefaultSource
public java.lang.String getDefaultSource()
-
setDefaultSource
public void setDefaultSource(java.lang.String defaultSourceId)
-
getDefaultSourceObject
public ExternalAccount getDefaultSourceObject()
-
setDefaultSourceObject
public void setDefaultSourceObject(ExternalAccount c)
-
create
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Create a customer.- Throws:
StripeException
-
create
public static Customer create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Create a customer.- Throws:
StripeException
-
delete
public Customer delete() throws StripeException
Delete a customer.- Throws:
StripeException
-
delete
public Customer delete(RequestOptions options) throws StripeException
Delete a customer.- Throws:
StripeException
-
deleteDiscount
public void deleteDiscount() throws StripeException
Delete a customer discount.- Throws:
StripeException
-
deleteDiscount
public void deleteDiscount(RequestOptions options) throws StripeException
Delete a customer discount.- Throws:
StripeException
-
list
public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
List all customers.- Throws:
StripeException
-
list
public static CustomerCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
List all customers.- Throws:
StripeException
-
retrieve
public static Customer retrieve(java.lang.String id) throws StripeException
Retrieve a customer.- Throws:
StripeException
-
retrieve
public static Customer retrieve(java.lang.String id, RequestOptions options) throws StripeException
Retrieve a customer.- Throws:
StripeException
-
retrieve
public static Customer retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieve a customer.- Throws:
StripeException
-
update
public Customer update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Update a customer.- Specified by:
update
in interfaceMetadataStore<Customer>
- Throws:
StripeException
-
update
public Customer update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Update a customer.- Specified by:
update
in interfaceMetadataStore<Customer>
- Throws:
StripeException
-
getObject
public java.lang.String getObject()
-
getAccountBalance
public java.lang.Long getAccountBalance()
-
getCreated
public java.lang.Long getCreated()
-
getCurrency
public java.lang.String getCurrency()
-
getDeleted
public java.lang.Boolean getDeleted()
-
getDelinquent
public java.lang.Boolean getDelinquent()
-
getDescription
public java.lang.String getDescription()
-
getDiscount
public Discount getDiscount()
-
getEmail
public java.lang.String getEmail()
-
getInvoicePrefix
public java.lang.String getInvoicePrefix()
-
getInvoiceSettings
public Customer.InvoiceSettings getInvoiceSettings()
-
getLivemode
public java.lang.Boolean getLivemode()
-
getShipping
public ShippingDetails getShipping()
-
getSources
public ExternalAccountCollection getSources()
-
getSubscriptions
public CustomerSubscriptionCollection getSubscriptions()
-
getTaxInfo
public Customer.TaxInfo getTaxInfo()
-
getTaxInfoVerification
public Customer.TaxInfoVerification getTaxInfoVerification()
-
getBusinessVatId
@Deprecated public java.lang.String getBusinessVatId()
Deprecated.Prefer using thetaxInfo
attribute instead.ThebusinessVatId
attribute.- Returns:
- the
businessVatId
attribute - See Also:
- API version 2018-08-23
-
getCards
@Deprecated public CustomerCardCollection getCards()
Deprecated.Prefer using thesources
attribute instead.Thecards
attribute.- Returns:
- the
cards
attribute - See Also:
- API version 2015-02-18
-
getDefaultCard
@Deprecated public java.lang.String getDefaultCard()
Deprecated.Prefer using thedefaultSource
attribute instead.Thedefault_card
attribute.- Returns:
- the
default_card
attribute - See Also:
- API version 2015-02-18
-
getNextRecurringCharge
@Deprecated public Customer.NextRecurringCharge getNextRecurringCharge()
Deprecated.Prefer using theInvoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>)
method instead.Thenext_recurring_charge
attribute.- Returns:
- the
next_recurring_charge
attribute - See Also:
- API version 2012-03-25
-
getSubscription
@Deprecated public Subscription getSubscription()
Deprecated.Prefer using thesubscriptions
attribute instead.Thesubscription
attribute.- Returns:
- the
subscription
attribute - See Also:
- API version 2014-01-31
-
getTrialEnd
@Deprecated public java.lang.Long getTrialEnd()
Deprecated.Prefer using thesubscriptions
attribute instead.Thetrial_end
attribute.- Returns:
- the
trial_end
attribute - See Also:
- API version 2014-01-31
-
setId
public void setId(java.lang.String id)
-
setObject
public void setObject(java.lang.String object)
-
setAccountBalance
public void setAccountBalance(java.lang.Long accountBalance)
-
setCreated
public void setCreated(java.lang.Long created)
-
setCurrency
public void setCurrency(java.lang.String currency)
-
setDeleted
public void setDeleted(java.lang.Boolean deleted)
-
setDelinquent
public void setDelinquent(java.lang.Boolean delinquent)
-
setDescription
public void setDescription(java.lang.String description)
-
setDiscount
public void setDiscount(Discount discount)
-
setEmail
public void setEmail(java.lang.String email)
-
setInvoicePrefix
public void setInvoicePrefix(java.lang.String invoicePrefix)
-
setInvoiceSettings
public void setInvoiceSettings(Customer.InvoiceSettings invoiceSettings)
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
-
setShipping
public void setShipping(ShippingDetails shipping)
-
setSources
public void setSources(ExternalAccountCollection sources)
-
setSubscriptions
public void setSubscriptions(CustomerSubscriptionCollection subscriptions)
-
setTaxInfo
public void setTaxInfo(Customer.TaxInfo taxInfo)
-
setTaxInfoVerification
public void setTaxInfoVerification(Customer.TaxInfoVerification taxInfoVerification)
-
setBusinessVatId
@Deprecated public void setBusinessVatId(java.lang.String businessVatId)
Deprecated.Prefer using thetaxInfo
attribute instead.ThebusinessVatId
attribute.- See Also:
- API version 2018-08-23
-
setCards
@Deprecated public void setCards(CustomerCardCollection cards)
Deprecated.Prefer using thesources
attribute instead.Thecards
attribute.- See Also:
- API version 2015-02-18
-
setDefaultCard
@Deprecated public void setDefaultCard(java.lang.String defaultCard)
Deprecated.Prefer using thedefaultSource
attribute instead.Thedefault_card
attribute.- See Also:
- API version 2015-02-18
-
setNextRecurringCharge
@Deprecated public void setNextRecurringCharge(Customer.NextRecurringCharge nextRecurringCharge)
Deprecated.Prefer using theInvoice.upcoming(java.util.Map<java.lang.String, java.lang.Object>)
method instead.Thenext_recurring_charge
attribute.- See Also:
- API version 2012-03-25
-
setSubscription
@Deprecated public void setSubscription(Subscription subscription)
Deprecated.Prefer using thesubscriptions
attribute instead.Thesubscription
attribute.- See Also:
- API version 2014-01-31
-
setTrialEnd
@Deprecated public void setTrialEnd(java.lang.Long trialEnd)
Deprecated.Prefer using thesubscriptions
attribute instead.Thetrial_end
attribute.- See Also:
- API version 2014-01-31
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
- Specified by:
getMetadata
in interfaceMetadataStore<Customer>
-
-