Interface SubscriptionModule

All Superinterfaces:
BaseModule
All Known Implementing Classes:
PCMSubscriptionModule

public interface SubscriptionModule extends BaseModule
  • Method Details

    • getPackages

      PackageList getPackages(String key, String type, String expand, String accountId)
      Retrieves the list of packages available for purchase
      Parameters:
      key - Name of the package list
      type - Optional type of the package list (if not specified then the type will be "new" and "addon" is the other supported type).
      expand - Optional flag to indicate whether the charge/discount offer details need to be retrieved. Pass the value "offers" to retrieve the same.
      accountId - Unique identifier of account purchasing new package. This is optional query parameter which if passed returns packages from its native schema.
      Returns:
      PackageList containing the list of packages associated to the package list
    • getBundles

      BundleList getBundles(String id, String expand)
      Retrieves the list of bundles available for purchase
      Parameters:
      id - Service type for which the associated bundles need to retrieved. Ex: Pass "0.0.0.1+-service-email+62503" to retrieve the bundles of "email" type.
      expand - Optional flag to indicate whether the charge/discount offer details need to be retrieved. Pass the value "offers" to retrieve the offer details.
      Returns:
      BundleList containing the list of bundles associated to the service type
    • getCustomerAssets

      CustomerAssets getCustomerAssets(String accountId, String expand)
      Retrieves the services grouped by bill units.These services contains the charge and discount offers as well which are sorted on descending order of purchase date and ascending order of Purchase end date
      Parameters:
      accountId - Id of the account example:0.0.0.1+-account+123123
      expand - expand is an optional parameter which specify if charge and discount offers has to be added to service.Supported value is 'offers' to include charge and discount offers in service.No charge and discount offers are added in service by default
      Returns:
      CustomerAssets containing the services grouped by Bill units associated with the account
    • getServiceDetails

      CustomerAssets.BillUnitServices getServiceDetails(String serviceId)
      Gets charge offer and discount offer details for the service.
      Parameters:
      serviceId - id of service for example:0.0.0.1+-service-telco-gsm-sms+367516
      Returns:
      BillUnitServices containing service with charge offer and discount offer details
    • getCustomizedOffers

      CustomizedOffers getCustomizedOffers(String id)
      Retrieves customized offers for given service Id
      Parameters:
      id - Service ID
      Returns:
    • performPackageTransition

      void performPackageTransition(String id, PackageTransition packageTransition)
      performs package transition for given account
      Parameters:
      id - Account ID
      packageTransition - info(to package,from package,Transition Type)
    • performBundleTransition

      void performBundleTransition(String id, BundleTransition bundleTransition)
      performs bundle transition for given account
      Parameters:
      id - Account ID
      bundleTransition - info(to bundle,from bundle,Transition Type)
    • getTransitionTypes

      Configurations getTransitionTypes()
      Retrieves the list of transition types available
      Returns:
      transition types
    • getTransitionBundles

      BundleList getTransitionBundles(String id, int type)
      Retrieves the list of transition bundles available
      Parameters:
      id - purchased bundle id
      type -
      Returns:
      Bundle List Bundle list
    • getPurchasedBundles

      List<Bundle> getPurchasedBundles(String id)
      Retrieves the list of purchased Bundles available
      Parameters:
      id - account Id
      Returns:
      purchased Bundle list Bundle list
    • getTransitionPackages

      TransitionPaths getTransitionPackages(String id, int type)
      Retrieves the list of packages available for transition based on the from package id and the transition type provided.
      Parameters:
      id - package Id for ex:0.0.0.1 /plan 434221
      type - Type of transition
      Returns:
      PackageList of packages available for transition
    • getPurchasedPackages

      PackageList getPurchasedPackages(String id)
      Retrieves the list of purchased packages of an account which will be populated in the from package drop down of package transition page
      Parameters:
      id - accountId for ex:0.0.0.1 /account 324454
      Returns:
      PackageList of an account
    • updateOfferings

      void updateOfferings(String id, CustomizedBundleForPurchase order)
      This operation is performs updates to product/discount details such as purchase/cycle fee, purchase/cycle/usage start date and end date, purchase/cycle/usage discount amount or discount percent.
      Parameters:
      id - purchased id of product/discount which is being updated e.g 0.0.0.1 /purchased_product 464644 5 or 0.0.0.1 /purchased_discount 466546 3
      order - payload representing CustomizedBundleForPurchase schema
    • getPurchasedPackagesWithSubscriptionTerms

      CustomerPackages getPurchasedPackagesWithSubscriptionTerms(String accountId)
      Retrieves all the services purchased by a subscriber and group them into packages.
      Parameters:
      accountId -
      Returns:
      list of packages
    • getCancellationFeeForSubscriptions

      SubscriptionPreviewCancellationCharges getCancellationFeeForSubscriptions(SubscriptionPreviewCancellationCharges cancellationCharges)
      Retrieves the cancellation fee of subscriptions for given account.
      Parameters:
      cancellationCharges - holds accountId, scopeLevel etc.,
      Returns:
      cancellation fee of subscriptions
    • getBundleOffers

      BundleOffers getBundleOffers(String serviceId)
      Retrieves bundle offers containing charge offers and discount offers for the given service Id
      Parameters:
      serviceId - - service Id
      Returns:
      BundleOffers - bundle offers containing charge offers and discount offers
    • cancelSubscriberContract

      boolean cancelSubscriberContract(SubscriptionTerms subscriptionTerms)
      Cancels subscriber contract.
      Parameters:
      subscriptionTerms -
      Returns:
      cancellation result; true/false
    • getSubscriptionTermsForDeals

      List<SubscriptionTerms> getSubscriptionTermsForDeals(List<String> dealIds, String accountId)
      Retrieves subscription terms for given deal Ids
      Parameters:
      dealIds - list of deal IDs
      accountId - account id
      Returns:
      subscription terms
    • getUnpurchasedOptionalBundles

      List<Bundle> getUnpurchasedOptionalBundles(String packageId, List<String> alreadyPurchasedBundleIDs)
      Retrieves the list of unpurchased optional bundles of the selected package of an account.
      Parameters:
      packageId - package Id
      alreadyPurchasedBundleIDs - a list of optional bundleIDs which are already purchased from given package of an account.
      Returns:
      unpurchased bundles list
    • modifySubscriberContract

      boolean modifySubscriberContract(SubscriptionTerms subscriptionTerms)
      Renew subscriber contract.
      Parameters:
      subscriptionTerms -
      Returns:
      Renew result; true/false
    • getBundleOffersForServices

      Map<String,BundleOffers> getBundleOffersForServices(List<String> serviceIdList)
      Retrieves Map of ServiceID, bundle offers (containing charge offers and discount offers) for the given service Id List
      Parameters:
      serviceIdList - - List of service Ids
      Returns:
      Map<String, BundleOffers> - list of bundle offers containing charge offers and discount offers
    • getPurchasedDeals

      BundleList getPurchasedDeals(String serviceId)
      Retrieves list of purchased bundles for the given account Id or service Id
      Parameters:
      serviceId -
      Returns:
      BundleList - List of all purchased bundles and their details
    • addOrUpdateDynamicCharge

      void addOrUpdateDynamicCharge(List<OverriddenCharges> overridenCharges, String id)
      updates or adds dynamic charges for purchased products
      Parameters:
      overridenCharges - charging payload representing dynamic charging schema
      id - purchased product id whose charges has to be overridden
    • createDynamicCharge

      void createDynamicCharge(List<OverriddenCharges> overridenCharges, String id)
      creates dynamic charges for purchased products
      Parameters:
      overridenCharges - charging payload representing dynamic charging schema
      id - purchased product ID
    • deleteDynamicCharge

      void deleteDynamicCharge(List<OverriddenCharges> overridenCharges, String id)
      deletes dynamic charges for purchased products
      Parameters:
      overridenCharges - charging payload representing dynamic charging schema
      id - purchased offer id
    • getOfferDetails

      Offer getOfferDetails(String offerId)
      Gets charge/discount offer details based on the id passed
      Parameters:
      offerId - charge/discount offer poid
      Returns:
      details of charge or discount offer, Which includes events associated with offer, balance impact, price tag etc.
    • cancelBundle

      void cancelBundle(BundleCancel bundleCancel)
      Cancels ownership of a deal for a specified account or service.
      Parameters:
      bundleCancel - ;
    • getPurchasedContracts

      List<SubscriptionTerms> getPurchasedContracts(String id)
      Returns all the contracts purchased by an Account.
      Parameters:
      id - accountId
      Returns:
      A list of all purchased contracts by an account;
    • getContractServices

      List<Service> getContractServices(String id)
      Returns all the services associated with contract
      Parameters:
      id - contractId
      Returns:
      A list of all services associated with contract;
    • getTransitionPaths

      TransitionPaths getTransitionPaths(MultivaluedMap<String,String> queryParams)
      Retrieves possible subscription transition paths based on query parameters.

      The following keys are recognized in the queryParams map:

      • fromRef.id – ID of the starting object for the transition path search
      • toRef.id – ID of the target object to transition to
      • type – Transition type as a string (must be parseable to integer). Supported values include: 1 (Upgrade), 2 (Downgrade), 3 (Generation Change), etc.
      • transitionOn – Service type for which the transition is permitted

      Additional query parameters may be provided and will be safely ignored unless explicitly handled in future versions.

      Parameters:
      queryParams - MultivaluedMap of query parameters, containing both required and optional filters.
      Returns:
      TransitionPaths containing the list of possible transition paths matching the given criteria