com.stripe.model
Class Customer

java.lang.Object
  extended by com.stripe.model.StripeObject
      extended by com.stripe.net.APIResource
          extended by com.stripe.model.Customer
All Implemented Interfaces:
MetadataStore<Customer>

public class Customer
extends APIResource
implements MetadataStore<Customer>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.stripe.net.APIResource
APIResource.RequestMethod
 
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
Customer()
           
 
Method Summary
static CustomerCollection all(Map<String,Object> params)
           
static CustomerCollection all(Map<String,Object> params, String apiKey)
           
 Subscription cancelSubscription()
          1/2014: Legacy (from before multiple subscriptions per customer)
 Subscription cancelSubscription(Map<String,Object> params)
          1/2014: Legacy (from before multiple subscriptions per customer)
 Subscription cancelSubscription(Map<String,Object> params, String apiKey)
          1/2014: Legacy (from before multiple subscriptions per customer)
 Subscription cancelSubscription(String apiKey)
          1/2014: Legacy (from before multiple subscriptions per customer)
static Customer create(Map<String,Object> params)
           
static Customer create(Map<String,Object> params, String apiKey)
           
 Card createCard(Map<String,Object> params)
           
 Card createCard(Map<String,Object> params, String apiKey)
           
 Card createCard(String token)
           
 Card createCard(String token, String apiKey)
           
 Subscription createSubscription(Map<String,Object> params)
           
 Subscription createSubscription(Map<String,Object> params, String apiKey)
           
 DeletedCustomer delete()
           
 DeletedCustomer delete(String apiKey)
           
 void deleteDiscount()
           
 void deleteDiscount(String apiKey)
           
 Integer getAccountBalance()
           
 CustomerCardCollection getCards()
           
 Long getCreated()
           
 String getDefaultCard()
           
 Boolean getDeleted()
           
 Boolean getDelinquent()
           
 String getDescription()
           
 Discount getDiscount()
           
 String getEmail()
           
 String getId()
           
 Boolean getLivemode()
           
 Map<String,String> getMetadata()
           
 NextRecurringCharge getNextRecurringCharge()
           
 Subscription getSubscription()
          1/2014: Legacy (from before multiple subscriptions per customer)
 CustomerSubscriptionCollection getSubscriptions()
           
 Long getTrialEnd()
           
static Customer retrieve(String id)
           
static Customer retrieve(String id, String apiKey)
           
 void setAccountBalance(Integer accountBalance)
           
 void setCreated(Long created)
           
 void setDefaultCard(String defaultCard)
           
 void setDelinquent(Boolean delinquent)
           
 void setDescription(String description)
           
 void setDiscount(Discount discount)
           
 void setEmail(String email)
           
 void setId(String id)
           
 void setLivemode(Boolean livemode)
           
 void setMetadata(Map<String,String> metadata)
           
 void setNextRecurringCharge(NextRecurringCharge nextRecurringCharge)
           
 void setSubscription(Subscription subscription)
          1/2014: Legacy (from before multiple subscriptions per customer)
 void setTrialEnd(Long trialEnd)
           
 Customer update(Map<String,Object> params)
           
 Customer update(Map<String,Object> params, String apiKey)
           
 Subscription updateSubscription(Map<String,Object> params)
          1/2014: Legacy (from before multiple subscriptions per customer)
 Subscription updateSubscription(Map<String,Object> params, String apiKey)
          1/2014: Legacy (from before multiple subscriptions per customer)
 
Methods inherited from class com.stripe.net.APIResource
_request, classURL, instanceURL, request, singleClassURL
 
Methods inherited from class com.stripe.model.StripeObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Customer

public Customer()
Method Detail

getCreated

public Long getCreated()

setCreated

public void setCreated(Long created)

getId

public String getId()

setId

public void setId(String id)

getLivemode

public Boolean getLivemode()

setLivemode

public void setLivemode(Boolean livemode)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getDefaultCard

public String getDefaultCard()

setDefaultCard

public void setDefaultCard(String defaultCard)

getCards

public CustomerCardCollection getCards()

getEmail

public String getEmail()

setEmail

public void setEmail(String email)

getTrialEnd

public Long getTrialEnd()

setTrialEnd

public void setTrialEnd(Long trialEnd)

getDiscount

public Discount getDiscount()

setDiscount

public void setDiscount(Discount discount)

getNextRecurringCharge

public NextRecurringCharge getNextRecurringCharge()

setNextRecurringCharge

public void setNextRecurringCharge(NextRecurringCharge nextRecurringCharge)

getSubscription

public Subscription getSubscription()
1/2014: Legacy (from before multiple subscriptions per customer)


setSubscription

public void setSubscription(Subscription subscription)
1/2014: Legacy (from before multiple subscriptions per customer)


getSubscriptions

public CustomerSubscriptionCollection getSubscriptions()

getDeleted

public Boolean getDeleted()

getDelinquent

public Boolean getDelinquent()

setDelinquent

public void setDelinquent(Boolean delinquent)

getAccountBalance

public Integer getAccountBalance()

setAccountBalance

public void setAccountBalance(Integer accountBalance)

getMetadata

public Map<String,String> getMetadata()
Specified by:
getMetadata in interface MetadataStore<Customer>

setMetadata

public void setMetadata(Map<String,String> metadata)
Specified by:
setMetadata in interface MetadataStore<Customer>

create

public static Customer create(Map<String,Object> params)
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

retrieve

public static Customer retrieve(String id)
                         throws AuthenticationException,
                                InvalidRequestException,
                                APIConnectionException,
                                CardException,
                                APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

all

public static CustomerCollection all(Map<String,Object> params)
                              throws AuthenticationException,
                                     InvalidRequestException,
                                     APIConnectionException,
                                     CardException,
                                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

update

public Customer update(Map<String,Object> params)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Specified by:
update in interface MetadataStore<Customer>
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

delete

public DeletedCustomer delete()
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createCard

public Card createCard(String token)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createCard

public Card createCard(Map<String,Object> params)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createSubscription

public Subscription createSubscription(Map<String,Object> params)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

updateSubscription

public Subscription updateSubscription(Map<String,Object> params)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

cancelSubscription

public Subscription cancelSubscription()
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

cancelSubscription

public Subscription cancelSubscription(Map<String,Object> params)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

deleteDiscount

public void deleteDiscount()
                    throws AuthenticationException,
                           InvalidRequestException,
                           APIConnectionException,
                           CardException,
                           APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

create

public static Customer create(Map<String,Object> params,
                              String apiKey)
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

retrieve

public static Customer retrieve(String id,
                                String apiKey)
                         throws AuthenticationException,
                                InvalidRequestException,
                                APIConnectionException,
                                CardException,
                                APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

all

public static CustomerCollection all(Map<String,Object> params,
                                     String apiKey)
                              throws AuthenticationException,
                                     InvalidRequestException,
                                     APIConnectionException,
                                     CardException,
                                     APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

update

public Customer update(Map<String,Object> params,
                       String apiKey)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Specified by:
update in interface MetadataStore<Customer>
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

delete

public DeletedCustomer delete(String apiKey)
                       throws AuthenticationException,
                              InvalidRequestException,
                              APIConnectionException,
                              CardException,
                              APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createCard

public Card createCard(String token,
                       String apiKey)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createCard

public Card createCard(Map<String,Object> params,
                       String apiKey)
                throws AuthenticationException,
                       InvalidRequestException,
                       APIConnectionException,
                       CardException,
                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

createSubscription

public Subscription createSubscription(Map<String,Object> params,
                                       String apiKey)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

updateSubscription

public Subscription updateSubscription(Map<String,Object> params,
                                       String apiKey)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

cancelSubscription

public Subscription cancelSubscription(String apiKey)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

cancelSubscription

public Subscription cancelSubscription(Map<String,Object> params,
                                       String apiKey)
                                throws AuthenticationException,
                                       InvalidRequestException,
                                       APIConnectionException,
                                       CardException,
                                       APIException
1/2014: Legacy (from before multiple subscriptions per customer)

Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException

deleteDiscount

public void deleteDiscount(String apiKey)
                    throws AuthenticationException,
                           InvalidRequestException,
                           APIConnectionException,
                           CardException,
                           APIException
Throws:
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException


Copyright © 2014 Stripe. All rights reserved.