public class DefaultSubscriptionInternalApi extends DefaultSubscriptionBaseCreateApi implements SubscriptionBaseInternalApi
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<SubscriptionBase> |
SUBSCRIPTIONS_COMPARATOR |
apiService, clock, dao| Constructor and Description |
|---|
DefaultSubscriptionInternalApi(SubscriptionDao dao,
SubscriptionBaseApiService apiService,
org.killbill.clock.Clock clock,
CatalogInternalApi catalogInternalApi,
AddonUtils addonUtils,
CacheControllerDispatcher cacheControllerDispatcher,
InternalCallContextFactory internalCallContextFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelBaseSubscriptions(java.lang.Iterable<SubscriptionBase> subscriptions,
BillingActionPolicy policy,
int accountBillCycleDayLocal,
InternalCallContext context) |
java.util.List<SubscriptionBaseWithAddOns> |
createBaseSubscriptionsWithAddOns(java.lang.Iterable<SubscriptionBaseWithAddOnsSpecifier> subscriptionWithAddOnsSpecifiers,
boolean renameCancelledBundleIfExist,
InternalCallContext context) |
SubscriptionBaseBundle |
createBundleForAccount(java.util.UUID accountId,
java.lang.String bundleKey,
boolean renameCancelledBundleIfExist,
InternalCallContext context) |
java.util.UUID |
getAccountIdFromBundleId(java.util.UUID bundleId,
InternalTenantContext context) |
java.util.UUID |
getAccountIdFromSubscriptionId(java.util.UUID subscriptionId,
InternalTenantContext context) |
SubscriptionBaseBundle |
getActiveBundleForKey(java.lang.String bundleKey,
Catalog catalog,
InternalTenantContext context) |
java.util.List<EffectiveSubscriptionInternalEvent> |
getAllTransitions(SubscriptionBase subscription,
InternalTenantContext context) |
SubscriptionBase |
getBaseSubscription(java.util.UUID bundleId,
InternalTenantContext context) |
java.util.List<EffectiveSubscriptionInternalEvent> |
getBillingTransitions(SubscriptionBase subscription,
InternalTenantContext context) |
SubscriptionBaseBundle |
getBundleFromId(java.util.UUID id,
InternalTenantContext context) |
java.util.UUID |
getBundleIdFromSubscriptionId(java.util.UUID subscriptionId,
InternalTenantContext context) |
Pagination<SubscriptionBaseBundle> |
getBundles(java.lang.Long offset,
java.lang.Long limit,
InternalTenantContext context) |
java.util.List<SubscriptionBaseBundle> |
getBundlesForAccount(java.util.UUID accountId,
InternalTenantContext context) |
java.util.List<SubscriptionBaseBundle> |
getBundlesForAccountAndKey(java.util.UUID accountId,
java.lang.String bundleKey,
InternalTenantContext context) |
java.util.List<SubscriptionBaseBundle> |
getBundlesForKey(java.lang.String bundleKey,
InternalTenantContext context) |
int |
getDefaultBillCycleDayLocal(java.util.Map<java.util.UUID,java.lang.Integer> bcdCache,
SubscriptionBase subscription,
SubscriptionBase baseSubscription,
PlanPhaseSpecifier planPhaseSpecifier,
int accountBillCycleDayLocal,
Catalog catalog,
InternalTenantContext context) |
org.joda.time.DateTime |
getDryRunChangePlanEffectiveDate(SubscriptionBase subscription,
EntitlementSpecifier spec,
org.joda.time.DateTime requestedDateWithMs,
BillingActionPolicy requestedPolicy,
InternalCallContext context) |
java.util.List<EntitlementAOStatusDryRun> |
getDryRunChangePlanStatus(java.util.UUID subscriptionId,
java.lang.String baseProductName,
org.joda.time.DateTime requestedDate,
InternalTenantContext context) |
java.lang.Iterable<java.util.UUID> |
getNonAOSubscriptionIdsForKey(java.lang.String bundleKey,
InternalTenantContext context) |
SubscriptionBase |
getSubscriptionFromId(java.util.UUID id,
InternalTenantContext context) |
java.util.Map<java.util.UUID,java.util.List<SubscriptionBase>> |
getSubscriptionsForAccount(Catalog catalog,
InternalTenantContext context) |
java.util.List<SubscriptionBase> |
getSubscriptionsForBundle(java.util.UUID bundleId,
DryRunArguments dryRunArguments,
InternalTenantContext context) |
Pagination<SubscriptionBaseBundle> |
searchBundles(java.lang.String searchKey,
java.lang.Long offset,
java.lang.Long limit,
InternalTenantContext context) |
void |
setChargedThroughDate(java.util.UUID subscriptionId,
org.joda.time.DateTime chargedThruDate,
InternalCallContext context) |
void |
updateBCD(java.util.UUID subscriptionId,
int bcd,
org.joda.time.LocalDate effectiveFromDate,
InternalCallContext internalCallContext) |
void |
updateExternalKey(java.util.UUID bundleId,
java.lang.String newExternalKey,
InternalCallContext context) |
createBundleForAccount, createSubscriptionForApiUse, createSubscriptionForApiUse, createSubscriptionsForApiUse, getBaseSubscription, getBundleStartDateWithSanity, getSubscriptionsForBundlepublic static final java.util.Comparator<SubscriptionBase> SUBSCRIPTIONS_COMPARATOR
@Inject public DefaultSubscriptionInternalApi(SubscriptionDao dao, SubscriptionBaseApiService apiService, org.killbill.clock.Clock clock, CatalogInternalApi catalogInternalApi, AddonUtils addonUtils, CacheControllerDispatcher cacheControllerDispatcher, InternalCallContextFactory internalCallContextFactory)
public java.util.List<SubscriptionBaseWithAddOns> createBaseSubscriptionsWithAddOns(java.lang.Iterable<SubscriptionBaseWithAddOnsSpecifier> subscriptionWithAddOnsSpecifiers, boolean renameCancelledBundleIfExist, InternalCallContext context) throws SubscriptionBaseApiException
createBaseSubscriptionsWithAddOns in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void cancelBaseSubscriptions(java.lang.Iterable<SubscriptionBase> subscriptions, BillingActionPolicy policy, int accountBillCycleDayLocal, InternalCallContext context) throws SubscriptionBaseApiException
cancelBaseSubscriptions in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBaseBundle createBundleForAccount(java.util.UUID accountId, java.lang.String bundleKey, boolean renameCancelledBundleIfExist, InternalCallContext context) throws SubscriptionBaseApiException
createBundleForAccount in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.List<SubscriptionBaseBundle> getBundlesForAccountAndKey(java.util.UUID accountId, java.lang.String bundleKey, InternalTenantContext context) throws SubscriptionBaseApiException
getBundlesForAccountAndKey in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.List<SubscriptionBaseBundle> getBundlesForAccount(java.util.UUID accountId, InternalTenantContext context)
getBundlesForAccount in interface SubscriptionBaseInternalApipublic java.util.List<SubscriptionBaseBundle> getBundlesForKey(java.lang.String bundleKey, InternalTenantContext context)
getBundlesForKey in interface SubscriptionBaseInternalApipublic Pagination<SubscriptionBaseBundle> getBundles(java.lang.Long offset, java.lang.Long limit, InternalTenantContext context)
getBundles in interface SubscriptionBaseInternalApipublic Pagination<SubscriptionBaseBundle> searchBundles(java.lang.String searchKey, java.lang.Long offset, java.lang.Long limit, InternalTenantContext context)
searchBundles in interface SubscriptionBaseInternalApipublic java.lang.Iterable<java.util.UUID> getNonAOSubscriptionIdsForKey(java.lang.String bundleKey,
InternalTenantContext context)
getNonAOSubscriptionIdsForKey in interface SubscriptionBaseInternalApipublic SubscriptionBaseBundle getActiveBundleForKey(java.lang.String bundleKey, Catalog catalog, InternalTenantContext context)
getActiveBundleForKey in interface SubscriptionBaseInternalApigetActiveBundleForKey in class SubscriptionApiBasepublic java.util.List<SubscriptionBase> getSubscriptionsForBundle(java.util.UUID bundleId, @Nullable DryRunArguments dryRunArguments, InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionsForBundle in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.Map<java.util.UUID,java.util.List<SubscriptionBase>> getSubscriptionsForAccount(Catalog catalog, InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionsForAccount in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBase getBaseSubscription(java.util.UUID bundleId, InternalTenantContext context) throws SubscriptionBaseApiException
getBaseSubscription in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBase getSubscriptionFromId(java.util.UUID id, InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionFromId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBaseBundle getBundleFromId(java.util.UUID id, InternalTenantContext context) throws SubscriptionBaseApiException
getBundleFromId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void setChargedThroughDate(java.util.UUID subscriptionId,
org.joda.time.DateTime chargedThruDate,
InternalCallContext context)
throws SubscriptionBaseApiException
setChargedThroughDate in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.List<EffectiveSubscriptionInternalEvent> getAllTransitions(SubscriptionBase subscription, InternalTenantContext context)
getAllTransitions in interface SubscriptionBaseInternalApipublic java.util.List<EffectiveSubscriptionInternalEvent> getBillingTransitions(SubscriptionBase subscription, InternalTenantContext context)
getBillingTransitions in interface SubscriptionBaseInternalApipublic org.joda.time.DateTime getDryRunChangePlanEffectiveDate(SubscriptionBase subscription, EntitlementSpecifier spec, org.joda.time.DateTime requestedDateWithMs, BillingActionPolicy requestedPolicy, InternalCallContext context) throws SubscriptionBaseApiException, CatalogApiException
getDryRunChangePlanEffectiveDate in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionCatalogApiExceptionpublic java.util.List<EntitlementAOStatusDryRun> getDryRunChangePlanStatus(java.util.UUID subscriptionId, @Nullable java.lang.String baseProductName, org.joda.time.DateTime requestedDate, InternalTenantContext context) throws SubscriptionBaseApiException
getDryRunChangePlanStatus in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void updateExternalKey(java.util.UUID bundleId,
java.lang.String newExternalKey,
InternalCallContext context)
updateExternalKey in interface SubscriptionBaseInternalApipublic void updateBCD(java.util.UUID subscriptionId,
int bcd,
@Nullable
org.joda.time.LocalDate effectiveFromDate,
InternalCallContext internalCallContext)
throws SubscriptionBaseApiException
updateBCD in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic int getDefaultBillCycleDayLocal(java.util.Map<java.util.UUID,java.lang.Integer> bcdCache,
SubscriptionBase subscription,
SubscriptionBase baseSubscription,
PlanPhaseSpecifier planPhaseSpecifier,
int accountBillCycleDayLocal,
Catalog catalog,
InternalTenantContext context)
throws SubscriptionBaseApiException
getDefaultBillCycleDayLocal in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.UUID getAccountIdFromBundleId(java.util.UUID bundleId,
InternalTenantContext context)
throws SubscriptionBaseApiException
getAccountIdFromBundleId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.UUID getBundleIdFromSubscriptionId(java.util.UUID subscriptionId,
InternalTenantContext context)
throws SubscriptionBaseApiException
getBundleIdFromSubscriptionId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic java.util.UUID getAccountIdFromSubscriptionId(java.util.UUID subscriptionId,
InternalTenantContext context)
throws SubscriptionBaseApiException
getAccountIdFromSubscriptionId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionCopyright © 2010-2018. All Rights Reserved.