com.chargebee.models
Class Subscription

java.lang.Object
  extended by com.chargebee.internal.Resource<Subscription>
      extended by com.chargebee.models.Subscription

public class Subscription
extends Resource<Subscription>


Nested Class Summary
static class Subscription.AddChargeAtTermEndRequest
           
static class Subscription.Addon
           
static class Subscription.CancelReason
           
static class Subscription.CancelRequest
           
static class Subscription.ChangeTermEndRequest
           
static class Subscription.ChargeAddonAtTermEndRequest
           
static class Subscription.Coupon
           
static class Subscription.CreateForCustomerRequest
           
static class Subscription.CreateRequest
           
static class Subscription.ReactivateRequest
           
static class Subscription.RemoveScheduledCancellationRequest
           
static class Subscription.ShippingAddress
           
static class Subscription.Status
           
static class Subscription.UpdateRequest
           
 
Field Summary
 
Fields inherited from class com.chargebee.internal.Resource
jsonObj
 
Constructor Summary
Subscription(org.json.JSONObject jsonObj)
           
Subscription(String jsonStr)
           
 
Method Summary
 Timestamp activatedAt()
           
static Subscription.AddChargeAtTermEndRequest addChargeAtTermEnd(String id)
           
 List<Subscription.Addon> addons()
           
 String affiliateToken()
           
static Subscription.CancelRequest cancel(String id)
           
 Timestamp cancelledAt()
           
 Subscription.CancelReason cancelReason()
           
static Subscription.ChangeTermEndRequest changeTermEnd(String id)
           
static Subscription.ChargeAddonAtTermEndRequest chargeAddonAtTermEnd(String id)
           
 String coupon()
          Deprecated. 
 List<Subscription.Coupon> coupons()
           
static Subscription.CreateRequest create()
           
 Timestamp createdAt()
           
 String createdFromIp()
           
static Subscription.CreateForCustomerRequest createForCustomer(String id)
           
 Timestamp currentTermEnd()
           
 Timestamp currentTermStart()
           
 Integer dueInvoicesCount()
           
 Timestamp dueSince()
           
 Boolean hasScheduledChanges()
           
 String id()
           
 String invoiceNotes()
           
static ListRequest list()
           
 String planId()
           
 Integer planQuantity()
           
 String poNumber()
           
static Subscription.ReactivateRequest reactivate(String id)
           
 Integer remainingBillingCycles()
           
static Subscription.RemoveScheduledCancellationRequest removeScheduledCancellation(String id)
           
static Request removeScheduledChanges(String id)
           
static Request retrieve(String id)
           
static Request retrieveWithScheduledChanges(String id)
           
 Subscription.ShippingAddress shippingAddress()
           
 Timestamp startDate()
           
 Timestamp startedAt()
           
 Subscription.Status status()
           
static ListRequest subscriptionsForCustomer(String id)
           
 Integer totalDues()
           
 Timestamp trialEnd()
           
 Timestamp trialStart()
           
static Subscription.UpdateRequest update(String id)
           
 
Methods inherited from class com.chargebee.internal.Resource
nullCheck, optBoolean, optDouble, optEnum, optInteger, optJSONObject, optList, optLong, optString, optSubResource, optTimestamp, reqBoolean, reqDouble, reqEnum, reqInteger, reqJSONObject, reqList, reqLong, reqString, reqSubResource, reqTimestamp, toJson, toString, uri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subscription

public Subscription(String jsonStr)

Subscription

public Subscription(org.json.JSONObject jsonObj)
Method Detail

id

public String id()

planId

public String planId()

planQuantity

public Integer planQuantity()

status

public Subscription.Status status()

startDate

public Timestamp startDate()

trialStart

public Timestamp trialStart()

trialEnd

public Timestamp trialEnd()

currentTermStart

public Timestamp currentTermStart()

currentTermEnd

public Timestamp currentTermEnd()

remainingBillingCycles

public Integer remainingBillingCycles()

poNumber

public String poNumber()

createdAt

public Timestamp createdAt()

startedAt

public Timestamp startedAt()

activatedAt

public Timestamp activatedAt()

cancelledAt

public Timestamp cancelledAt()

cancelReason

public Subscription.CancelReason cancelReason()

affiliateToken

public String affiliateToken()

createdFromIp

public String createdFromIp()

dueInvoicesCount

public Integer dueInvoicesCount()

dueSince

public Timestamp dueSince()

totalDues

public Integer totalDues()

addons

public List<Subscription.Addon> addons()

coupon

@Deprecated
public String coupon()
Deprecated. 


coupons

public List<Subscription.Coupon> coupons()

shippingAddress

public Subscription.ShippingAddress shippingAddress()

hasScheduledChanges

public Boolean hasScheduledChanges()

invoiceNotes

public String invoiceNotes()

create

public static Subscription.CreateRequest create()
                                         throws IOException
Throws:
IOException

createForCustomer

public static Subscription.CreateForCustomerRequest createForCustomer(String id)
                                                               throws IOException
Throws:
IOException

list

public static ListRequest list()
                        throws IOException
Throws:
IOException

subscriptionsForCustomer

public static ListRequest subscriptionsForCustomer(String id)
                                            throws IOException
Throws:
IOException

retrieve

public static Request retrieve(String id)
                        throws IOException
Throws:
IOException

retrieveWithScheduledChanges

public static Request retrieveWithScheduledChanges(String id)
                                            throws IOException
Throws:
IOException

removeScheduledChanges

public static Request removeScheduledChanges(String id)
                                      throws IOException
Throws:
IOException

removeScheduledCancellation

public static Subscription.RemoveScheduledCancellationRequest removeScheduledCancellation(String id)
                                                                                   throws IOException
Throws:
IOException

update

public static Subscription.UpdateRequest update(String id)
                                         throws IOException
Throws:
IOException

changeTermEnd

public static Subscription.ChangeTermEndRequest changeTermEnd(String id)
                                                       throws IOException
Throws:
IOException

cancel

public static Subscription.CancelRequest cancel(String id)
                                         throws IOException
Throws:
IOException

reactivate

public static Subscription.ReactivateRequest reactivate(String id)
                                                 throws IOException
Throws:
IOException

addChargeAtTermEnd

public static Subscription.AddChargeAtTermEndRequest addChargeAtTermEnd(String id)
                                                                 throws IOException
Throws:
IOException

chargeAddonAtTermEnd

public static Subscription.ChargeAddonAtTermEndRequest chargeAddonAtTermEnd(String id)
                                                                     throws IOException
Throws:
IOException


Copyright © 2015 ChargeBee. All Rights Reserved.