public interface SubscriptionApi extends KillbillApi
Subscription information.| Modifier and Type | Method and Description |
|---|---|
SubscriptionBundle |
getActiveSubscriptionBundleForExternalKey(String externalKey,
TenantContext context)
Retrieves all the
SubscriptionBundle for the given external key. |
SubscriptionBundle |
getSubscriptionBundle(UUID bundleId,
TenantContext context)
Retrieves all the
Subscription attached to the base entitlement. |
Pagination<SubscriptionBundle> |
getSubscriptionBundles(Long offset,
Long limit,
TenantContext context) |
List<SubscriptionBundle> |
getSubscriptionBundlesForAccountId(UUID accountId,
TenantContext context)
Retrieves all the
SubscriptionBundle for a given account. |
List<SubscriptionBundle> |
getSubscriptionBundlesForAccountIdAndExternalKey(UUID accountId,
String externalKey,
TenantContext context)
Retrieves all the
SubscriptionBundle for a given account and matching an external key. |
List<SubscriptionBundle> |
getSubscriptionBundlesForExternalKey(String externalKey,
TenantContext context)
Returns an ordered list of all
SubscriptionBundle for a given external key. |
Subscription |
getSubscriptionForEntitlementId(UUID entitlementId,
TenantContext context)
Retrieves a
Subscription For the entitlementId |
Pagination<SubscriptionBundle> |
searchSubscriptionBundles(String searchKey,
Long offset,
Long limit,
TenantContext context)
Find all
SubscriptionBundle having their id, account id or external key matching the search key |
void |
updateExternalKey(UUID bundleId,
String newExternalKey,
CallContext context)
Update the externalKey for a given bundle
|
Subscription getSubscriptionForEntitlementId(UUID entitlementId, TenantContext context) throws SubscriptionApiException
Subscription For the entitlementIdentitlementId - the id of the entitlement associated with the subscriptioncontext - the contextSubscriptionApiException - if it odes not existSubscriptionBundle getSubscriptionBundle(UUID bundleId, TenantContext context) throws SubscriptionApiException
Subscription attached to the base entitlement.bundleId - the id of the bundlecontext - the contextSubscriptionApiException - if the baseEntitlementId does not exist.void updateExternalKey(UUID bundleId, String newExternalKey, CallContext context)
bundleId - ; bundle idnewExternalKey - : the new value for the externalKeycontext - : the call contextList<SubscriptionBundle> getSubscriptionBundlesForAccountIdAndExternalKey(UUID accountId, String externalKey, TenantContext context) throws SubscriptionApiException
SubscriptionBundle for a given account and matching an external key.accountId - the account idexternalKey - the external keycontext - the contextSubscriptionBundleSubscriptionApiException - if there is n o such object matching the account and external keySubscriptionBundle getActiveSubscriptionBundleForExternalKey(String externalKey, TenantContext context) throws SubscriptionApiException
SubscriptionBundle for the given external key.
It is possible to have multiple SubscriptionBundle for a given external key in the system but only one
will be active -- i.e. will contain Subscription in the active state.externalKey - the external keycontext - the contextSubscriptionBundleSubscriptionApiException - if there is no such objectList<SubscriptionBundle> getSubscriptionBundlesForExternalKey(String externalKey, TenantContext context) throws SubscriptionApiException
SubscriptionBundle for a given external key.SubscriptionApiExceptionList<SubscriptionBundle> getSubscriptionBundlesForAccountId(UUID accountId, TenantContext context) throws SubscriptionApiException
SubscriptionBundle for a given account.accountId - the account idcontext - the contextSubscriptionBundleSubscriptionApiException - if the account does not existPagination<SubscriptionBundle> getSubscriptionBundles(Long offset, Long limit, TenantContext context)
context - the user contextoffset - the offset of the first resultlimit - the maximum number of results to retrieveSubscriptionBundle for that tenantPagination<SubscriptionBundle> searchSubscriptionBundles(String searchKey, Long offset, Long limit, TenantContext context)
SubscriptionBundle having their id, account id or external key matching the search keysearchKey - the search keyoffset - the offset of the first resultlimit - the maximum number of results to retrievecontext - the user contextSubscriptionBundle matching this search key for that tenantCopyright © 2010-2015. All Rights Reserved.