public interface EntitlementApi extends KillbillApi
Entitlement.| Modifier and Type | Method and Description |
|---|---|
Entitlement |
addEntitlement(UUID bundleId,
PlanPhaseSpecifier spec,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Adds an ADD_ON entitlement to previously created entitlement.
|
Entitlement |
createBaseEntitlement(UUID accountId,
PlanPhaseSpecifier spec,
String externalKey,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Create a new entitlement for that account.
|
List<Entitlement> |
getAllEntitlementsForAccountId(UUID accountId,
TenantContext context)
Retrieves all the
Entitlement for a given account. |
List<Entitlement> |
getAllEntitlementsForAccountIdAndExternalKey(UUID accountId,
String externalKey,
TenantContext context)
Retrieves all the
Entitlement for a given account and matching an external key. |
List<Entitlement> |
getAllEntitlementsForBundle(UUID bundleId,
TenantContext context)
Retrieves all the
Entitlement attached to the base entitlement. |
List<EntitlementAOStatusDryRun> |
getDryRunStatusForChange(UUID bundleId,
String targetProductName,
org.joda.time.LocalDate effectiveDate,
TenantContext context)
Simulate a change of product for the BP on that bundle and return the effect it would have on the existing ADD_ON-- if any.
|
Entitlement |
getEntitlementForId(UUID id,
TenantContext context)
Retrieves an
Entitlement using its id. |
void |
pause(UUID bundleId,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Will pause all entitlements associated with the base entitlement.
|
void |
resume(UUID bundleId,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Will resume all entitlements associated with the base entitlement.
|
UUID |
transferEntitlements(UUID sourceAccountId,
UUID destAccountId,
String externalKey,
org.joda.time.LocalDate effectiveDate,
CallContext context)
Transfer all the
Entitlement For the source account and matching the external key to the destination account. |
UUID |
transferEntitlementsOverrideBillingPolicy(UUID sourceAccountId,
UUID destAccountId,
String externalKey,
org.joda.time.LocalDate effectiveDate,
BillingActionPolicy billingPolicy,
CallContext context)
Transfer all the
Entitlement for the source account and matching the external key to the destination account. |
Entitlement createBaseEntitlement(UUID accountId, PlanPhaseSpecifier spec, String externalKey, org.joda.time.LocalDate effectiveDate, CallContext context) throws EntitlementApiException
PlanPhaseSpecifier should refer to a ProductCategory.BASE of
ProductCategory.STANDALONE.accountId - the account idspec - the product specification for that new entitlementexternalKey - the external key for that entitlement-- which must be unique in the systemeffectiveDate - the date at which the entitlement should startcontext - the contextEntitlementApiException - if the system fail to create the Entitlement.Entitlement addEntitlement(UUID bundleId, PlanPhaseSpecifier spec, org.joda.time.LocalDate effectiveDate, CallContext context) throws EntitlementApiException
PlanPhaseSpecifier should refer to a ProductCategory.ADD_ON.
The new entitlement will be bundled using the externalKey that was specified when creating the
base entitlement.bundleId - the id of the bundlespec - the product specification for that new entitlementeffectiveDate - the date at which the entitlement should startcontext - the contextEntitlementApiException - if the system fail to create the EntitlementList<EntitlementAOStatusDryRun> getDryRunStatusForChange(UUID bundleId, String targetProductName, org.joda.time.LocalDate effectiveDate, TenantContext context) throws EntitlementApiException
bundleId - the id of the bundletargetProductName - the target product name for the BPeffectiveDate - the date at which the change would occurcontext - the contextEntitlementEntitlementApiException - if this operation is not carried on a base plan.void pause(UUID bundleId, org.joda.time.LocalDate effectiveDate, CallContext context) throws EntitlementApiException
bundleId - effectiveDate - context - EntitlementApiException - if the system fail to find the base Entitlementvoid resume(UUID bundleId, org.joda.time.LocalDate effectiveDate, CallContext context) throws EntitlementApiException
bundleId - effectiveDate - context - EntitlementApiException - if the system fail to find the base EntitlementEntitlement getEntitlementForId(UUID id, TenantContext context) throws EntitlementApiException
Entitlement using its id.id - the id of the entitlementcontext - the contextEntitlementApiException - if the entitlement does not existList<Entitlement> getAllEntitlementsForBundle(UUID bundleId, TenantContext context) throws EntitlementApiException
Entitlement attached to the base entitlement.bundleId - the id of the bundlecontext - the contextEntitlementApiException - if the entitlement does not existList<Entitlement> getAllEntitlementsForAccountIdAndExternalKey(UUID accountId, String externalKey, TenantContext context) throws EntitlementApiException
Entitlement for a given account and matching an external key.accountId - the account idexternalKey - the external keycontext - the contextEntitlementApiException - if the account does not existList<Entitlement> getAllEntitlementsForAccountId(UUID accountId, TenantContext context) throws EntitlementApiException
Entitlement for a given account.accountId - the account idcontext - the contextEntitlementApiException - if the account does not existUUID transferEntitlements(UUID sourceAccountId, UUID destAccountId, String externalKey, org.joda.time.LocalDate effectiveDate, CallContext context) throws EntitlementApiException
Entitlement For the source account and matching the external key to the destination account.
The date is interpreted by the system to be in the timezone specified at the destination Account.
The Entitlement on the source account will be cancelled at effective date and the Entitlement
on the destination account will be created at the effectiveDate.sourceAccountId - the unique id for the account on which the bundle will be transferred FordestAccountId - the unique id for the account on which the bundle will be transferred toexternalKey - the externalKey for the bundleeffectiveDate - the date at which this transfer should occurcontext - the user contextEntitlementApiException - if the system could not transfer the entitlementsUUID transferEntitlementsOverrideBillingPolicy(UUID sourceAccountId, UUID destAccountId, String externalKey, org.joda.time.LocalDate effectiveDate, BillingActionPolicy billingPolicy, CallContext context) throws EntitlementApiException
Entitlement for the source account and matching the external key to the destination account.
The date is interpreted by the system to be in the timezone specified at the destination Account.
The Entitlement on the source account will be cancelled at effective date and the Entitlement
on the destination account will be created at the effectiveDate. The billingPolicy will be used to override
the default billing behavior for the cancellation of the subscriptions on the source account.sourceAccountId - the unique id for the account on which the bundle will be transferred FordestAccountId - the unique id for the account on which the bundle will be transferred toexternalKey - the externalKey for the bundleeffectiveDate - the date at which this transfer should occurbillingPolicy - the override billing policycontext - the user contextEntitlementApiException - if the system could not transfer the entitlementsCopyright © 2010-2014. All Rights Reserved.