public interface SubscriptionApi extends KillbillApi
Subscription information.| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_EVENTS |
static int |
FUTURE_EVENTS |
static int |
FUTURE_OR_PRESENT_EVENTS |
static int |
PAST_EVENTS |
static int |
PAST_OR_PRESENT_EVENTS |
static int |
PRESENT_EVENTS |
| Modifier and Type | Method and Description |
|---|---|
void |
addBlockingState(BlockingState blockingState,
org.joda.time.LocalDate effectiveDate,
Iterable<PluginProperty> properties,
CallContext context)
Add a
BlockingState
The date is interpreted by the system to be in the timezone specified at the Account |
SubscriptionBundle |
getActiveSubscriptionBundleForExternalKey(String externalKey,
TenantContext context)
Retrieves all the
SubscriptionBundle for the given external key. |
Iterable<BlockingState> |
getBlockingStates(UUID accountId,
List<BlockingStateType> typeFilter,
List<String> svcsFilter,
OrderingType orderingType,
int timeFilter,
TenantContext context) |
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
|
static final int PAST_EVENTS
static final int PRESENT_EVENTS
static final int FUTURE_EVENTS
static final int PAST_OR_PRESENT_EVENTS
static final int FUTURE_OR_PRESENT_EVENTS
static final int ALL_EVENTS
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) throws EntitlementApiException
bundleId - ; bundle idnewExternalKey - : the new value for the externalKeycontext - : the call contextEntitlementApiExceptionList<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 tenantvoid addBlockingState(BlockingState blockingState, org.joda.time.LocalDate effectiveDate, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
BlockingState
The date is interpreted by the system to be in the timezone specified at the AccountblockingState - the blockingState to be addedeffectiveDate - the date in the account time zone at which the operation should be effective, if null this is interpreted to be immediateproperties - plugin specific propertiescontext - the contextEntitlementApiException - if the entitlement was not in ACTIVE stateIterable<BlockingState> getBlockingStates(UUID accountId, List<BlockingStateType> typeFilter, List<String> svcsFilter, OrderingType orderingType, int timeFilter, TenantContext context) throws EntitlementApiException
accountId - the account idtypeFilter - the list of BlockingStateType filters. All types are returned if null or empty.svcsFilter - the list of service filters. All services are returned if null or empty.orderingType - the ordering direction, that is ASCENDING or DESCENDINGtimeFilter - the filtering types constructed as a bitwise operationcontext - the user contextBlockingStateEntitlementApiException - if the account is invalid.Copyright © 2010-2016. All Rights Reserved.