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,
java.lang.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(java.lang.String externalKey,
TenantContext context)
Retrieves all the
SubscriptionBundle for the given external key. |
java.lang.Iterable<BlockingState> |
getBlockingStates(java.util.UUID accountId,
java.util.List<BlockingStateType> typeFilter,
java.util.List<java.lang.String> svcsFilter,
OrderingType orderingType,
int timeFilter,
TenantContext context) |
SubscriptionBundle |
getSubscriptionBundle(java.util.UUID bundleId,
TenantContext context)
Retrieves all the
Subscription attached to the base entitlement. |
Pagination<SubscriptionBundle> |
getSubscriptionBundles(java.lang.Long offset,
java.lang.Long limit,
TenantContext context) |
java.util.List<SubscriptionBundle> |
getSubscriptionBundlesForAccountId(java.util.UUID accountId,
TenantContext context)
Retrieves all the
SubscriptionBundle for a given account. |
java.util.List<SubscriptionBundle> |
getSubscriptionBundlesForAccountIdAndExternalKey(java.util.UUID accountId,
java.lang.String externalKey,
TenantContext context)
Retrieves all the
SubscriptionBundle for a given account and matching an external key. |
java.util.List<SubscriptionBundle> |
getSubscriptionBundlesForExternalKey(java.lang.String externalKey,
TenantContext context)
Returns an ordered list of all
SubscriptionBundle for a given external key. |
Subscription |
getSubscriptionForEntitlementId(java.util.UUID entitlementId,
TenantContext context)
Retrieves a
Subscription For the entitlementId |
Pagination<SubscriptionBundle> |
searchSubscriptionBundles(java.lang.String searchKey,
java.lang.Long offset,
java.lang.Long limit,
TenantContext context)
Find all
SubscriptionBundle having their id, account id or external key matching the search key |
void |
updateExternalKey(java.util.UUID bundleId,
java.lang.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(java.util.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(java.util.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(java.util.UUID bundleId,
java.lang.String newExternalKey,
CallContext context)
throws EntitlementApiException
bundleId - ; bundle idnewExternalKey - : the new value for the externalKeycontext - : the call contextEntitlementApiExceptionjava.util.List<SubscriptionBundle> getSubscriptionBundlesForAccountIdAndExternalKey(java.util.UUID accountId, java.lang.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(java.lang.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 objectjava.util.List<SubscriptionBundle> getSubscriptionBundlesForExternalKey(java.lang.String externalKey, TenantContext context) throws SubscriptionApiException
SubscriptionBundle for a given external key.SubscriptionApiExceptionjava.util.List<SubscriptionBundle> getSubscriptionBundlesForAccountId(java.util.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(java.lang.Long offset, java.lang.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(java.lang.String searchKey, java.lang.Long offset, java.lang.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, java.lang.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 statejava.lang.Iterable<BlockingState> getBlockingStates(java.util.UUID accountId, java.util.List<BlockingStateType> typeFilter, java.util.List<java.lang.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-2018. All Rights Reserved.