public interface EntitlementApi extends KillbillApi
Entitlement.| Modifier and Type | Method and Description |
|---|---|
Entitlement |
addEntitlement(UUID bundleId,
PlanPhaseSpecifier spec,
List<PlanPhasePriceOverride> overrides,
org.joda.time.LocalDate entitlementEffectiveDate,
org.joda.time.LocalDate billingEffectiveDate,
boolean isMigrated,
Iterable<PluginProperty> properties,
CallContext context)
Adds an ADD_ON entitlement to previously created entitlement.
|
Entitlement |
createBaseEntitlement(UUID accountId,
PlanPhaseSpecifier spec,
String externalKey,
List<PlanPhasePriceOverride> overrides,
org.joda.time.LocalDate entitlementEffectiveDate,
org.joda.time.LocalDate billingEffectiveDate,
boolean isMigrated,
Iterable<PluginProperty> properties,
CallContext context)
Create a new entitlement for that account.
|
Entitlement |
createBaseEntitlementWithAddOns(UUID accountId,
String externalKey,
Iterable<EntitlementSpecifier> entitlementSpecifier,
org.joda.time.LocalDate entitlementEffectiveDate,
org.joda.time.LocalDate billingEffectiveDate,
boolean isMigrated,
Iterable<PluginProperty> properties,
CallContext context)
Create a new base entitlement and addOn entitlements 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,
Iterable<PluginProperty> properties,
CallContext context)
Will pause all entitlements associated with the base entitlement.
|
void |
resume(UUID bundleId,
org.joda.time.LocalDate effectiveDate,
Iterable<PluginProperty> properties,
CallContext context)
Will resume all entitlements associated with the base entitlement.
|
UUID |
transferEntitlements(UUID sourceAccountId,
UUID destAccountId,
String externalKey,
org.joda.time.LocalDate effectiveDate,
Iterable<PluginProperty> properties,
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,
Iterable<PluginProperty> properties,
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, List<PlanPhasePriceOverride> overrides, org.joda.time.LocalDate entitlementEffectiveDate, org.joda.time.LocalDate billingEffectiveDate, boolean isMigrated, Iterable<PluginProperty> properties, 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 systemoverrides - the price override for each phase and for a specific currencyentitlementEffectiveDate - the date at which the entitlement should start. if this is null this is assumed nowbillingEffectiveDate - the date at which the billing for the subscription should start. if this is null this is assumed nowisMigrated - whether this subscription comes from a different system (migrated into Kill Bill)properties - plugin specific propertiescontext - the contextEntitlementApiException - if the system fail to create the Entitlement.Entitlement createBaseEntitlementWithAddOns(UUID accountId, String externalKey, Iterable<EntitlementSpecifier> entitlementSpecifier, org.joda.time.LocalDate entitlementEffectiveDate, org.joda.time.LocalDate billingEffectiveDate, boolean isMigrated, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
accountId - the account idexternalKey - the bundle external keyentitlementEffectiveDate - the date at which the entitlement should start. if this is null this is assumed nowbillingEffectiveDate - the date at which the billing for the subscription should start. if this is null this is assumed nowentitlementSpecifier - a list of entitlement specifierisMigrated - whether this subscription comes from a different system (migrated into Kill Bill)properties - plugin specific propertiescontext - the contextEntitlementApiException - if the system fail to create the Entitlement.Entitlement addEntitlement(UUID bundleId, PlanPhaseSpecifier spec, List<PlanPhasePriceOverride> overrides, org.joda.time.LocalDate entitlementEffectiveDate, org.joda.time.LocalDate billingEffectiveDate, boolean isMigrated, Iterable<PluginProperty> properties, 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 entitlementoverrides - the price override for each phase and for a specific currencyentitlementEffectiveDate - the date at which the entitlement should start. if this is null this is assumed nowbillingEffectiveDate - the date at which the billing for the subscription should start. if this is null this is assumed nowisMigrated - whether this subscription comes from a different system (migrated into Kill Bill)properties - plugin specific propertiescontext - 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, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
bundleId - effectiveDate - properties - plugin specific propertiescontext - EntitlementApiException - if the system fail to find the base Entitlementvoid resume(UUID bundleId, org.joda.time.LocalDate effectiveDate, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
bundleId - effectiveDate - properties - plugin specific propertiescontext - 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, Iterable<PluginProperty> properties, 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 occurproperties - plugin specific propertiescontext - 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, Iterable<PluginProperty> properties, 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 policyproperties - plugin specific propertiescontext - the user contextEntitlementApiException - if the system could not transfer the entitlementsCopyright © 2010-2016. All Rights Reserved.