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.BillingPeriodUnit
           
static class Subscription.CancelReason
           
static class Subscription.CancelRequest
           
static class Subscription.ChangeTermEndRequest
           
static class Subscription.ChargeAddonAtTermEndRequest
           
static class Subscription.ChargeFutureRenewalsRequest
           
static class Subscription.Coupon
           
static class Subscription.CreateForCustomerRequest
           
static class Subscription.CreateRequest
           
static class Subscription.ImportForCustomerRequest
           
static class Subscription.ImportSubscriptionRequest
           
static class Subscription.OverrideBillingProfileRequest
           
static class Subscription.ReactivateRequest
           
static class Subscription.ReferralInfo
           
static class Subscription.RemoveCouponsRequest
           
static class Subscription.RemoveScheduledCancellationRequest
           
static class Subscription.ShippingAddress
           
static class Subscription.Status
           
static class Subscription.SubscriptionListRequest
           
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()
           
 AutoCollection autoCollection()
           
 String baseCurrencyCode()
           
 Integer billingPeriod()
           
 Subscription.BillingPeriodUnit billingPeriodUnit()
           
static Subscription.CancelRequest cancel(String id)
           
 Timestamp cancelledAt()
           
 Subscription.CancelReason cancelReason()
           
static Subscription.ChangeTermEndRequest changeTermEnd(String id)
           
static Subscription.ChargeAddonAtTermEndRequest chargeAddonAtTermEnd(String id)
           
static Subscription.ChargeFutureRenewalsRequest chargeFutureRenewals(String id)
           
 String coupon()
          Deprecated. 
 List<Subscription.Coupon> coupons()
           
static Subscription.CreateRequest create()
           
 Timestamp createdAt()
           
 String createdFromIp()
           
static Subscription.CreateForCustomerRequest createForCustomer(String id)
           
 String currencyCode()
           
 Timestamp currentTermEnd()
           
 Timestamp currentTermStart()
           
 String customerId()
           
static Request delete(String id)
           
 Boolean deleted()
           
 Integer dueInvoicesCount()
           
 Timestamp dueSince()
           
 BigDecimal exchangeRate()
           
 Boolean hasScheduledChanges()
           
 String id()
           
static Subscription.ImportForCustomerRequest importForCustomer(String id)
           
static Subscription.ImportSubscriptionRequest importSubscription()
           
 String invoiceNotes()
           
static Subscription.SubscriptionListRequest list()
           
 org.json.JSONObject metaData()
           
 Integer mrr()
           
 Timestamp nextBillingAt()
           
static Subscription.OverrideBillingProfileRequest overrideBillingProfile(String id)
           
 String paymentSourceId()
           
 Integer planFreeQuantity()
           
 String planId()
           
 Integer planQuantity()
           
 Integer planUnitPrice()
           
 String poNumber()
           
static Subscription.ReactivateRequest reactivate(String id)
           
 Subscription.ReferralInfo referralInfo()
           
 Integer remainingBillingCycles()
           
static Subscription.RemoveCouponsRequest removeCoupons(String id)
           
static Subscription.RemoveScheduledCancellationRequest removeScheduledCancellation(String id)
           
static Request removeScheduledChanges(String id)
           
 Long resourceVersion()
           
static Request retrieve(String id)
           
static Request retrieveWithScheduledChanges(String id)
           
 Integer setupFee()
           
 Subscription.ShippingAddress shippingAddress()
           
 Timestamp startDate()
           
 Timestamp startedAt()
           
 Subscription.Status status()
           
static ListRequest subscriptionsForCustomer(String id)
          Deprecated. 
 Integer totalDues()
           
 Timestamp trialEnd()
           
 Timestamp trialStart()
           
static Subscription.UpdateRequest update(String id)
           
 Timestamp updatedAt()
           
 
Methods inherited from class com.chargebee.internal.Resource
apiVersionCheck, nullCheck, optBigDecimal, optBoolean, optDouble, optEnum, optInteger, optJSONObject, optList, optLong, optString, optSubResource, optTimestamp, reqBigDecimal, 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()

customerId

public String customerId()

currencyCode

public String currencyCode()

planId

public String planId()

planQuantity

public Integer planQuantity()

planUnitPrice

public Integer planUnitPrice()

setupFee

public Integer setupFee()

billingPeriod

public Integer billingPeriod()

billingPeriodUnit

public Subscription.BillingPeriodUnit billingPeriodUnit()

planFreeQuantity

public Integer planFreeQuantity()

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()

nextBillingAt

public Timestamp nextBillingAt()

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()

resourceVersion

public Long resourceVersion()

updatedAt

public Timestamp updatedAt()

hasScheduledChanges

public Boolean hasScheduledChanges()

paymentSourceId

public String paymentSourceId()

autoCollection

public AutoCollection autoCollection()

dueInvoicesCount

public Integer dueInvoicesCount()

dueSince

public Timestamp dueSince()

totalDues

public Integer totalDues()

mrr

public Integer mrr()

exchangeRate

public BigDecimal exchangeRate()

baseCurrencyCode

public String baseCurrencyCode()

addons

public List<Subscription.Addon> addons()

coupon

@Deprecated
public String coupon()
Deprecated. 


coupons

public List<Subscription.Coupon> coupons()

shippingAddress

public Subscription.ShippingAddress shippingAddress()

referralInfo

public Subscription.ReferralInfo referralInfo()

invoiceNotes

public String invoiceNotes()

metaData

public org.json.JSONObject metaData()

deleted

public Boolean deleted()

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 Subscription.SubscriptionListRequest list()
                                                 throws IOException
Throws:
IOException

subscriptionsForCustomer

@Deprecated
public static ListRequest subscriptionsForCustomer(String id)
                                            throws IOException
Deprecated. 

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

removeCoupons

public static Subscription.RemoveCouponsRequest removeCoupons(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

chargeFutureRenewals

public static Subscription.ChargeFutureRenewalsRequest chargeFutureRenewals(String id)
                                                                     throws IOException
Throws:
IOException

importSubscription

public static Subscription.ImportSubscriptionRequest importSubscription()
                                                                 throws IOException
Throws:
IOException

importForCustomer

public static Subscription.ImportForCustomerRequest importForCustomer(String id)
                                                               throws IOException
Throws:
IOException

overrideBillingProfile

public static Subscription.OverrideBillingProfileRequest overrideBillingProfile(String id)
                                                                         throws IOException
Throws:
IOException

delete

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


Copyright © 2017 ChargeBee. All Rights Reserved.