public interface Entitlement extends Entity
EntitlementApi
It contains all the catalog information and current state that answers the entitlement question.
The users of that API will control all the entitlement behavior when making changes such as the effectiveDate, catalog info,...
By default the system will use system wide policies to control the billing aspect, but specific APIs also allow to override those.
EntitlementApi
Modifier and Type | Interface and Description |
---|---|
static class |
Entitlement.EntitlementActionPolicy
Used to control the effective date that should be used on Plan change or on cancellation.
|
static class |
Entitlement.EntitlementSourceType
Possible
Entitlement source types. |
static class |
Entitlement.EntitlementState
Possible states of an
Entitlement |
Modifier and Type | Method and Description |
---|---|
Entitlement |
cancelEntitlementWithDate(org.joda.time.LocalDate effectiveDate,
boolean overrideBillingEffectiveDate,
Iterable<PluginProperty> properties,
CallContext context)
Cancels the
Entitlement at the specified date. |
Entitlement |
cancelEntitlementWithDateOverrideBillingPolicy(org.joda.time.LocalDate effectiveDate,
BillingActionPolicy billingPolicy,
Iterable<PluginProperty> properties,
CallContext context)
Cancels the
Entitlement at the specified date
After this operation, the existing object becomes stale. |
Entitlement |
cancelEntitlementWithPolicy(Entitlement.EntitlementActionPolicy policy,
Iterable<PluginProperty> properties,
CallContext context)
Cancel the
Entitlement with a policy. |
Entitlement |
cancelEntitlementWithPolicyOverrideBillingPolicy(Entitlement.EntitlementActionPolicy policy,
BillingActionPolicy billingPolicy,
Iterable<PluginProperty> properties,
CallContext context)
Cancels the
Entitlement at the specified date and overrides the default billing policy. |
Entitlement |
changePlan(String productName,
BillingPeriod billingPeriod,
String priceList,
List<PlanPhasePriceOverride> overrides,
Iterable<PluginProperty> properties,
CallContext context)
Change
Entitlement plan using default policy. |
Entitlement |
changePlanOverrideBillingPolicy(String productName,
BillingPeriod billingPeriod,
String priceList,
List<PlanPhasePriceOverride> overrides,
org.joda.time.LocalDate effectiveDate,
BillingActionPolicy billingPolicy,
Iterable<PluginProperty> properties,
CallContext context)
Change
Entitlement plan at the specified date and overrides the billing policy. |
Entitlement |
changePlanWithDate(String productName,
BillingPeriod billingPeriod,
String priceList,
List<PlanPhasePriceOverride> overrides,
org.joda.time.LocalDate effectiveDate,
Iterable<PluginProperty> properties,
CallContext context)
Change
Entitlement plan at the specified date. |
UUID |
getAccountId() |
UUID |
getBaseEntitlementId() |
Integer |
getBillCycleDayLocal()
The billCycleDay should be interpreted in the account timezone.
|
UUID |
getBundleId() |
org.joda.time.LocalDate |
getEffectiveEndDate() |
org.joda.time.LocalDate |
getEffectiveStartDate() |
String |
getExternalKey() |
PlanPhase |
getLastActivePhase() |
Plan |
getLastActivePlan() |
PriceList |
getLastActivePriceList() |
Product |
getLastActiveProduct() |
ProductCategory |
getLastActiveProductCategory() |
Entitlement.EntitlementSourceType |
getSourceType() |
Entitlement.EntitlementState |
getState() |
void |
uncancelEntitlement(Iterable<PluginProperty> properties,
CallContext context)
Removes a pending future cancellation on an entitlement.
|
void |
updateBCD(int bcd,
org.joda.time.LocalDate effectiveFromDate,
CallContext context) |
getCreatedDate, getId, getUpdatedDate
UUID getBaseEntitlementId()
UUID getBundleId()
UUID getAccountId()
String getExternalKey()
Entitlement.EntitlementState getState()
Entitlement.EntitlementSourceType getSourceType()
org.joda.time.LocalDate getEffectiveStartDate()
org.joda.time.LocalDate getEffectiveEndDate()
Product getLastActiveProduct()
Product
prior to cancellationPlan getLastActivePlan()
Plan
prior to cancellationPlanPhase getLastActivePhase()
Phase
prior to cancellationPriceList getLastActivePriceList()
ProductCategory getLastActiveProductCategory()
Integer getBillCycleDayLocal()
Entitlement cancelEntitlementWithDate(org.joda.time.LocalDate effectiveDate, boolean overrideBillingEffectiveDate, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
at the specified date.
After this operation, the existing object becomes stale.
The date is interpreted by the system to be in the timezone specified at the Account
effectiveDate
- the date at which the entitlement should be cancelledoverrideBillingEffectiveDate
- use effectiveDate for billing cancellation date as wellproperties
- plugin specific propertiescontext
- the contextEntitlement
after the cancellation was performedEntitlementApiException
- if cancellation failedEntitlement cancelEntitlementWithPolicy(Entitlement.EntitlementActionPolicy policy, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
with a policy.
After this operation, the existing object becomes stale.policy
- the policy that is used by the system to calculate the cancellation dateproperties
- plugin specific propertiescontext
- the contextEntitlement
after the cancellation was performedEntitlementApiException
- if cancellation failedEntitlement cancelEntitlementWithDateOverrideBillingPolicy(org.joda.time.LocalDate effectiveDate, BillingActionPolicy billingPolicy, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
at the specified date
After this operation, the existing object becomes stale.
The date is interpreted by the system to be in the timezone specified at the Account
effectiveDate
- the date at which the entitlement should be cancelledbillingPolicy
- the billingPolicyproperties
- plugin specific propertiescontext
- the contextEntitlement
after the cancellation was performedEntitlementApiException
- if cancellation failedEntitlement cancelEntitlementWithPolicyOverrideBillingPolicy(Entitlement.EntitlementActionPolicy policy, BillingActionPolicy billingPolicy, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
at the specified date and overrides the default billing policy.
After this operation, the existing object becomes stale.policy
- the policy that is used by the system to calculate the cancellation datebillingPolicy
- the override billing policyproperties
- plugin specific propertiescontext
- the contextEntitlement
after the cancellation was performedEntitlementApiException
- if cancellation failedvoid uncancelEntitlement(Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
properties
- plugin specific propertiescontext
- the contextEntitlementApiException
Entitlement changePlan(String productName, BillingPeriod billingPeriod, String priceList, List<PlanPhasePriceOverride> overrides, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
plan using default policy.
After this operation, the existing object becomes stale.
The date is interpreted by the system to be in the timezone specified at the Account
productName
- the new product namebillingPeriod
- the new billing periodpriceList
- the new priceListoverrides
- the price override for each phase and for a specific currencyproperties
- plugin specific propertiescontext
- the contextEntitlement
after the change was performedEntitlementApiException
- if change failedEntitlement changePlanWithDate(String productName, BillingPeriod billingPeriod, String priceList, List<PlanPhasePriceOverride> overrides, org.joda.time.LocalDate effectiveDate, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
plan at the specified date.
After this operation, the existing object becomes stale.
The date is interpreted by the system to be in the timezone specified at the Account
productName
- the new product namebillingPeriod
- the new billing periodpriceList
- the new priceListoverrides
- the price override for each phase and for a specific currencyeffectiveDate
- the date at which the entitlement should be changedproperties
- plugin specific propertiescontext
- the contextEntitlement
after the change was performedEntitlementApiException
- if change failedEntitlement changePlanOverrideBillingPolicy(String productName, BillingPeriod billingPeriod, String priceList, List<PlanPhasePriceOverride> overrides, org.joda.time.LocalDate effectiveDate, BillingActionPolicy billingPolicy, Iterable<PluginProperty> properties, CallContext context) throws EntitlementApiException
Entitlement
plan at the specified date and overrides the billing policy.
After this operation, the existing object becomes stale.
The date is interpreted by the system to be in the timezone specified at the Account
productName
- the new product namebillingPeriod
- the new billing periodpriceList
- the new priceListoverrides
- the price override for each phase and for a specific currencyeffectiveDate
- the date at which the entitlement should be changedbillingPolicy
- the override billing policyproperties
- plugin specific propertiescontext
- the contextEntitlement
after the change was performedEntitlementApiException
- if change failedvoid updateBCD(int bcd, org.joda.time.LocalDate effectiveFromDate, CallContext context) throws EntitlementApiException
bcd
- the new BCD for that subscriptioneffectiveFromDate
- date after which that BCD change becomes activecontext
- the contextEntitlementApiException
Copyright © 2010-2016. All Rights Reserved.