public class DefaultSubscriptionBaseApiService extends Object implements SubscriptionBaseApiService
| Constructor and Description |
|---|
DefaultSubscriptionBaseApiService(org.killbill.clock.Clock clock,
SubscriptionDao dao,
CatalogService catalogService,
PlanAligner planAligner,
AddonUtils addonUtils,
InternalCallContextFactory internalCallContextFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(DefaultSubscriptionBase subscription,
CallContext context) |
boolean |
cancelWithPolicy(DefaultSubscriptionBase subscription,
BillingActionPolicy policy,
int accountBillCycleDayLocal,
CallContext context) |
boolean |
cancelWithPolicyNoValidation(Iterable<DefaultSubscriptionBase> subscriptions,
BillingActionPolicy policy,
int accountBillCycleDayLocal,
InternalCallContext context) |
boolean |
cancelWithRequestedDate(DefaultSubscriptionBase subscription,
org.joda.time.DateTime requestedDateWithMs,
CallContext context) |
org.joda.time.DateTime |
changePlan(DefaultSubscriptionBase subscription,
PlanSpecifier spec,
List<PlanPhasePriceOverride> overrides,
CallContext context) |
org.joda.time.DateTime |
changePlanWithPolicy(DefaultSubscriptionBase subscription,
PlanSpecifier spec,
List<PlanPhasePriceOverride> overrides,
BillingActionPolicy policy,
CallContext context) |
org.joda.time.DateTime |
changePlanWithRequestedDate(DefaultSubscriptionBase subscription,
PlanSpecifier spec,
List<PlanPhasePriceOverride> overrides,
org.joda.time.DateTime requestedDateWithMs,
CallContext context) |
DefaultSubscriptionBase |
createPlan(SubscriptionBuilder builder,
Plan plan,
PhaseType initialPhase,
String realPriceList,
org.joda.time.DateTime effectiveDate,
org.joda.time.DateTime processedDate,
CallContext context) |
List<SubscriptionBaseWithAddOns> |
createPlansWithAddOns(UUID accountId,
Iterable<SubscriptionAndAddOnsSpecifier> subscriptionsAndAddOns,
CallContext context) |
org.joda.time.DateTime |
dryRunChangePlan(DefaultSubscriptionBase subscription,
PlanSpecifier spec,
org.joda.time.DateTime requestedDateWithMs,
BillingActionPolicy requestedPolicy,
TenantContext context) |
List<SubscriptionBaseEvent> |
getEventsOnCancelPlan(DefaultSubscriptionBase subscription,
org.joda.time.DateTime effectiveDate,
org.joda.time.DateTime processedDate,
boolean addCancellationAddOnForEventsIfRequired,
InternalTenantContext internalTenantContext) |
List<SubscriptionBaseEvent> |
getEventsOnChangePlan(DefaultSubscriptionBase subscription,
Plan newPlan,
String newPriceList,
org.joda.time.DateTime effectiveDate,
org.joda.time.DateTime processedDate,
boolean addCancellationAddOnForEventsIfRequired,
InternalTenantContext internalTenantContext) |
List<SubscriptionBaseEvent> |
getEventsOnCreation(UUID bundleId,
UUID subscriptionId,
org.joda.time.DateTime alignStartDate,
org.joda.time.DateTime bundleStartDate,
Plan plan,
PhaseType initialPhase,
String realPriceList,
org.joda.time.DateTime effectiveDate,
org.joda.time.DateTime processedDate,
InternalTenantContext internalTenantContext) |
PlanChangeResult |
getPlanChangeResult(DefaultSubscriptionBase subscription,
PlanSpecifier toPlanPhase,
org.joda.time.DateTime effectiveDate,
TenantContext context) |
int |
handleBasePlanEvent(DefaultSubscriptionBase subscription,
SubscriptionBaseEvent event,
CallContext context) |
boolean |
uncancel(DefaultSubscriptionBase subscription,
CallContext context) |
@Inject
public DefaultSubscriptionBaseApiService(org.killbill.clock.Clock clock,
SubscriptionDao dao,
CatalogService catalogService,
PlanAligner planAligner,
AddonUtils addonUtils,
InternalCallContextFactory internalCallContextFactory)
public DefaultSubscriptionBase createPlan(SubscriptionBuilder builder, Plan plan, PhaseType initialPhase, String realPriceList, org.joda.time.DateTime effectiveDate, org.joda.time.DateTime processedDate, CallContext context) throws SubscriptionBaseApiException
createPlan in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic List<SubscriptionBaseWithAddOns> createPlansWithAddOns(UUID accountId, Iterable<SubscriptionAndAddOnsSpecifier> subscriptionsAndAddOns, CallContext context) throws SubscriptionBaseApiException
createPlansWithAddOns in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic boolean cancel(DefaultSubscriptionBase subscription, CallContext context) throws SubscriptionBaseApiException
cancel in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic boolean cancelWithRequestedDate(DefaultSubscriptionBase subscription, org.joda.time.DateTime requestedDateWithMs, CallContext context) throws SubscriptionBaseApiException
cancelWithRequestedDate in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic boolean cancelWithPolicy(DefaultSubscriptionBase subscription, BillingActionPolicy policy, int accountBillCycleDayLocal, CallContext context) throws SubscriptionBaseApiException
cancelWithPolicy in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic boolean cancelWithPolicyNoValidation(Iterable<DefaultSubscriptionBase> subscriptions, BillingActionPolicy policy, int accountBillCycleDayLocal, InternalCallContext context) throws SubscriptionBaseApiException
cancelWithPolicyNoValidation in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic boolean uncancel(DefaultSubscriptionBase subscription, CallContext context) throws SubscriptionBaseApiException
uncancel in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic org.joda.time.DateTime dryRunChangePlan(DefaultSubscriptionBase subscription, PlanSpecifier spec, @Nullable org.joda.time.DateTime requestedDateWithMs, @Nullable BillingActionPolicy requestedPolicy, TenantContext context) throws SubscriptionBaseApiException
dryRunChangePlan in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic org.joda.time.DateTime changePlan(DefaultSubscriptionBase subscription, PlanSpecifier spec, List<PlanPhasePriceOverride> overrides, CallContext context) throws SubscriptionBaseApiException
changePlan in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic org.joda.time.DateTime changePlanWithRequestedDate(DefaultSubscriptionBase subscription, PlanSpecifier spec, List<PlanPhasePriceOverride> overrides, org.joda.time.DateTime requestedDateWithMs, CallContext context) throws SubscriptionBaseApiException
changePlanWithRequestedDate in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic org.joda.time.DateTime changePlanWithPolicy(DefaultSubscriptionBase subscription, PlanSpecifier spec, List<PlanPhasePriceOverride> overrides, BillingActionPolicy policy, CallContext context) throws SubscriptionBaseApiException
changePlanWithPolicy in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic PlanChangeResult getPlanChangeResult(DefaultSubscriptionBase subscription, PlanSpecifier toPlanPhase, org.joda.time.DateTime effectiveDate, TenantContext context) throws SubscriptionBaseApiException
getPlanChangeResult in interface SubscriptionBaseApiServiceSubscriptionBaseApiExceptionpublic List<SubscriptionBaseEvent> getEventsOnCreation(UUID bundleId, UUID subscriptionId, org.joda.time.DateTime alignStartDate, org.joda.time.DateTime bundleStartDate, Plan plan, PhaseType initialPhase, String realPriceList, org.joda.time.DateTime effectiveDate, org.joda.time.DateTime processedDate, InternalTenantContext internalTenantContext) throws CatalogApiException, SubscriptionBaseApiException
getEventsOnCreation in interface SubscriptionBaseApiServiceCatalogApiExceptionSubscriptionBaseApiExceptionpublic List<SubscriptionBaseEvent> getEventsOnChangePlan(DefaultSubscriptionBase subscription, Plan newPlan, String newPriceList, org.joda.time.DateTime effectiveDate, org.joda.time.DateTime processedDate, boolean addCancellationAddOnForEventsIfRequired, InternalTenantContext internalTenantContext) throws CatalogApiException, SubscriptionBaseApiException
getEventsOnChangePlan in interface SubscriptionBaseApiServiceCatalogApiExceptionSubscriptionBaseApiExceptionpublic List<SubscriptionBaseEvent> getEventsOnCancelPlan(DefaultSubscriptionBase subscription, org.joda.time.DateTime effectiveDate, org.joda.time.DateTime processedDate, boolean addCancellationAddOnForEventsIfRequired, InternalTenantContext internalTenantContext) throws CatalogApiException
getEventsOnCancelPlan in interface SubscriptionBaseApiServiceCatalogApiExceptionpublic int handleBasePlanEvent(DefaultSubscriptionBase subscription, SubscriptionBaseEvent event, CallContext context) throws CatalogApiException
handleBasePlanEvent in interface SubscriptionBaseApiServiceCatalogApiExceptionCopyright © 2010-2017. All Rights Reserved.