Package org.wso2.carbon.billing.core

Examples of org.wso2.carbon.billing.core.DataAccessManager.changeSubscription()


        return dataAccessManager.getItemIdWithName(name, parentId);
    }

    public boolean changeSubscription (int customerId, String subscriptionPlan) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.changeSubscription(customerId, subscriptionPlan);           
    }

    public Subscription[] getInactiveSubscriptionsOfCustomer(int customerId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        List<Subscription> subscriptions = dataAccessManager.getInactiveSubscriptionsOfCustomer(customerId);
View Full Code Here


        try{
            BillingDataAccessService billingDataAccessService = new BillingDataAccessService();
            Subscription currentSubscription = billingDataAccessService.getActiveSubscriptionOfCustomer(infoBean.getTenantId());
            if(currentSubscription != null && currentSubscription.getSubscriptionPlan() != null){
                if(!currentSubscription.getSubscriptionPlan().equals(usagePlan)){
                    boolean updated = billingDataAccessService.changeSubscription(infoBean.getTenantId(), usagePlan);
                    if(updated){
                        log.debug("Usage plan was changed successfully from " + currentSubscription.getSubscriptionPlan() +
                                " to " + usagePlan);
                    }else{
                        log.debug("Usage plan was not changed");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.