public class DefaultSubscriptionInternalApi extends SubscriptionApiBase implements SubscriptionBaseInternalApi
| Modifier and Type | Field and Description |
|---|---|
static Comparator<SubscriptionBase> |
SUBSCRIPTIONS_COMPARATOR |
apiService, catalogService, clock, dao| Constructor and Description |
|---|
DefaultSubscriptionInternalApi(SubscriptionDao dao,
SubscriptionBaseApiService apiService,
org.killbill.notificationq.api.NotificationQueueService notificationQueueService,
org.killbill.clock.Clock clock,
CatalogService catalogService,
AddonUtils addonUtils,
InternalCallContextFactory internalCallContextFactory) |
createSubscriptionForApiUse, createSubscriptionForApiUse, createSubscriptionsForApiUsepublic static final Comparator<SubscriptionBase> SUBSCRIPTIONS_COMPARATOR
@Inject public DefaultSubscriptionInternalApi(SubscriptionDao dao, SubscriptionBaseApiService apiService, org.killbill.notificationq.api.NotificationQueueService notificationQueueService, org.killbill.clock.Clock clock, CatalogService catalogService, AddonUtils addonUtils, InternalCallContextFactory internalCallContextFactory)
public SubscriptionBase createSubscription(UUID bundleId, PlanPhaseSpecifier spec, List<PlanPhasePriceOverride> overrides, org.joda.time.DateTime requestedDateWithMs, boolean isMigrated, InternalCallContext context) throws SubscriptionBaseApiException
createSubscription in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic List<SubscriptionBaseWithAddOns> createBaseSubscriptionsWithAddOns(UUID accountId, Iterable<org.killbill.billing.entitlement.api.BaseEntitlementWithAddOnsSpecifier> baseEntitlementWithAddOnsSpecifier, InternalCallContext context) throws SubscriptionBaseApiException
createBaseSubscriptionsWithAddOns in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void cancelBaseSubscriptions(Iterable<SubscriptionBase> subscriptions, BillingActionPolicy policy, int accountBillCycleDayLocal, InternalCallContext context) throws SubscriptionBaseApiException
cancelBaseSubscriptions in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBaseBundle createBundleForAccount(UUID accountId, String bundleKey, InternalCallContext context) throws SubscriptionBaseApiException
createBundleForAccount in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic List<SubscriptionBaseBundle> getBundlesForAccountAndKey(UUID accountId, String bundleKey, InternalTenantContext context) throws SubscriptionBaseApiException
getBundlesForAccountAndKey in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic List<SubscriptionBaseBundle> getBundlesForAccount(UUID accountId, InternalTenantContext context)
getBundlesForAccount in interface SubscriptionBaseInternalApipublic List<SubscriptionBaseBundle> getBundlesForKey(String bundleKey, InternalTenantContext context)
getBundlesForKey in interface SubscriptionBaseInternalApipublic Pagination<SubscriptionBaseBundle> getBundles(Long offset, Long limit, InternalTenantContext context)
getBundles in interface SubscriptionBaseInternalApipublic Pagination<SubscriptionBaseBundle> searchBundles(String searchKey, Long offset, Long limit, InternalTenantContext context)
searchBundles in interface SubscriptionBaseInternalApipublic Iterable<UUID> getNonAOSubscriptionIdsForKey(String bundleKey, InternalTenantContext context)
getNonAOSubscriptionIdsForKey in interface SubscriptionBaseInternalApipublic static SubscriptionBaseBundle getActiveBundleForKeyNotException(Iterable<SubscriptionBaseBundle> existingBundles, SubscriptionDao dao, org.killbill.clock.Clock clock, InternalTenantContext context)
public List<SubscriptionBase> getSubscriptionsForBundle(UUID bundleId, @Nullable DryRunArguments dryRunArguments, InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionsForBundle in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic Map<UUID,List<SubscriptionBase>> getSubscriptionsForAccount(InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionsForAccount in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBase getBaseSubscription(UUID bundleId, InternalTenantContext context) throws SubscriptionBaseApiException
getBaseSubscription in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBase getSubscriptionFromId(UUID id, InternalTenantContext context) throws SubscriptionBaseApiException
getSubscriptionFromId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic SubscriptionBaseBundle getBundleFromId(UUID id, InternalTenantContext context) throws SubscriptionBaseApiException
getBundleFromId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic UUID getAccountIdFromSubscriptionId(UUID subscriptionId, InternalTenantContext context) throws SubscriptionBaseApiException
getAccountIdFromSubscriptionId in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void setChargedThroughDate(UUID subscriptionId, org.joda.time.DateTime chargedThruDate, InternalCallContext context) throws SubscriptionBaseApiException
setChargedThroughDate in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic List<EffectiveSubscriptionInternalEvent> getAllTransitions(SubscriptionBase subscription, InternalTenantContext context)
getAllTransitions in interface SubscriptionBaseInternalApipublic List<EffectiveSubscriptionInternalEvent> getBillingTransitions(SubscriptionBase subscription, InternalTenantContext context)
getBillingTransitions in interface SubscriptionBaseInternalApipublic org.joda.time.DateTime getDryRunChangePlanEffectiveDate(SubscriptionBase subscription, PlanSpecifier spec, org.joda.time.DateTime requestedDateWithMs, BillingActionPolicy requestedPolicy, List<PlanPhasePriceOverride> overrides, InternalCallContext context) throws SubscriptionBaseApiException, CatalogApiException
getDryRunChangePlanEffectiveDate in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionCatalogApiExceptionpublic List<org.killbill.billing.entitlement.api.EntitlementAOStatusDryRun> getDryRunChangePlanStatus(UUID subscriptionId, @Nullable String baseProductName, org.joda.time.DateTime requestedDate, InternalTenantContext context) throws SubscriptionBaseApiException
getDryRunChangePlanStatus in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic void updateExternalKey(UUID bundleId, String newExternalKey, InternalCallContext context)
updateExternalKey in interface SubscriptionBaseInternalApipublic Iterable<org.joda.time.DateTime> getFutureNotificationsForAccount(InternalCallContext internalCallContext)
getFutureNotificationsForAccount in interface SubscriptionBaseInternalApipublic Map<UUID,org.joda.time.DateTime> getNextFutureEventForSubscriptions(SubscriptionBaseTransitionType eventType, InternalCallContext internalCallContext)
getNextFutureEventForSubscriptions in interface SubscriptionBaseInternalApipublic void updateBCD(UUID subscriptionId, int bcd, @Nullable org.joda.time.LocalDate effectiveFromDate, InternalCallContext internalCallContext) throws SubscriptionBaseApiException
updateBCD in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionpublic int getDefaultBillCycleDayLocal(Map<UUID,Integer> bcdCache, SubscriptionBase subscription, SubscriptionBase baseSubscription, PlanPhaseSpecifier planPhaseSpecifier, int accountBillCycleDayLocal, org.joda.time.DateTime effectiveDate, InternalTenantContext context) throws SubscriptionBaseApiException
getDefaultBillCycleDayLocal in interface SubscriptionBaseInternalApiSubscriptionBaseApiExceptionCopyright © 2010-2017. All Rights Reserved.