com.stripe.model
Class Subscription

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

public class Subscription
extends APIResource
implements MetadataStore<Subscription>


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
Subscription()
           
 
Method Summary
 Subscription cancel(Map<String,Object> params)
           
 Subscription cancel(Map<String,Object> params, String apiKey)
           
 void deleteDiscount()
           
 void deleteDiscount(String apiKey)
           
 Double getApplicationFeePercent()
           
 Boolean getCancelAtPeriodEnd()
           
 Long getCanceledAt()
           
 Long getCurrentPeriodEnd()
           
 Long getCurrentPeriodStart()
           
 String getCustomer()
           
 Discount getDiscount()
           
 Long getEndedAt()
           
 String getId()
           
 String getInstanceURL()
           
 Map<String,String> getMetadata()
           
 Plan getPlan()
           
 Integer getQuantity()
           
 Long getStart()
           
 String getStatus()
           
 Long getTrialEnd()
           
 Long getTrialStart()
           
 void setApplicationFeePercent(Double applicationFeePercent)
           
 void setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd)
           
 void setCanceledAt(Long canceledAt)
           
 void setCurrentPeriodEnd(Long currentPeriodEnd)
           
 void setCurrentPeriodStart(Long currentPeriodStart)
           
 void setCustomer(String customer)
           
 void setDiscount(Discount discount)
           
 void setEndedAt(Long endedAt)
           
 void setId(String id)
           
 void setMetadata(Map<String,String> metadata)
           
 void setPlan(Plan plan)
           
 void setQuantity(Integer quantity)
           
 void setStart(Long start)
           
 void setStatus(String status)
           
 void setTrialEnd(Long trialEnd)
           
 void setTrialStart(Long trialStart)
           
 Subscription update(Map<String,Object> params)
           
 Subscription update(Map<String,Object> params, String apiKey)
           
 
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

Subscription

public Subscription()
Method Detail

update

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

update

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

cancel

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

cancel

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

deleteDiscount

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

deleteDiscount

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

getInstanceURL

public String getInstanceURL()

getId

public String getId()

setId

public void setId(String id)

getCurrentPeriodEnd

public Long getCurrentPeriodEnd()

setCurrentPeriodEnd

public void setCurrentPeriodEnd(Long currentPeriodEnd)

getCurrentPeriodStart

public Long getCurrentPeriodStart()

setCurrentPeriodStart

public void setCurrentPeriodStart(Long currentPeriodStart)

getCancelAtPeriodEnd

public Boolean getCancelAtPeriodEnd()

setCancelAtPeriodEnd

public void setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd)

getCustomer

public String getCustomer()

setCustomer

public void setCustomer(String customer)

getStart

public Long getStart()

setStart

public void setStart(Long start)

getStatus

public String getStatus()

setStatus

public void setStatus(String status)

getTrialStart

public Long getTrialStart()

setTrialStart

public void setTrialStart(Long trialStart)

getTrialEnd

public Long getTrialEnd()

setTrialEnd

public void setTrialEnd(Long trialEnd)

getPlan

public Plan getPlan()

setPlan

public void setPlan(Plan plan)

getCanceledAt

public Long getCanceledAt()

setCanceledAt

public void setCanceledAt(Long canceledAt)

getEndedAt

public Long getEndedAt()

setEndedAt

public void setEndedAt(Long endedAt)

getQuantity

public Integer getQuantity()

setQuantity

public void setQuantity(Integer quantity)

getDiscount

public Discount getDiscount()

setDiscount

public void setDiscount(Discount discount)

getApplicationFeePercent

public Double getApplicationFeePercent()

setApplicationFeePercent

public void setApplicationFeePercent(Double applicationFeePercent)

getMetadata

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

setMetadata

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


Copyright © 2014 Stripe. All rights reserved.