-
Notifications
You must be signed in to change notification settings - Fork 0
/
KalturaEntitlementService.min.js
5 lines (4 loc) · 2.15 KB
/
KalturaEntitlementService.min.js
1
2
3
4
5
var KalturaEntitlementService={applyCoupon:function(purchaseId,couponCode){var kparams=new Object();kparams.purchaseId=purchaseId;kparams.couponCode=couponCode;return new KalturaRequestBuilder("entitlement","applyCoupon",kparams);},cancel:function(assetId,productType){var kparams=new Object();kparams.assetId=assetId;kparams.productType=productType;return new KalturaRequestBuilder("entitlement","cancel",kparams);},cancelRenewal:function(subscriptionId){var kparams=new Object();kparams.subscriptionId=subscriptionId;return new KalturaRequestBuilder("entitlement","cancelRenewal",kparams);},cancelScheduledSubscription:function(scheduledSubscriptionId){var kparams=new Object();kparams.scheduledSubscriptionId=scheduledSubscriptionId;return new KalturaRequestBuilder("entitlement","cancelScheduledSubscription",kparams);},externalReconcile:function(){var kparams=new Object();return new KalturaRequestBuilder("entitlement","externalReconcile",kparams);},forceCancel:function(assetId,productType){var kparams=new Object();kparams.assetId=assetId;kparams.productType=productType;return new KalturaRequestBuilder("entitlement","forceCancel",kparams);},getNextRenewal:function(id){var kparams=new Object();kparams.id=id;return new KalturaRequestBuilder("entitlement","getNextRenewal",kparams);},grant:function(productId,productType,history,contentId){if(!contentId)
contentId=0;var kparams=new Object();kparams.productId=productId;kparams.productType=productType;kparams.history=history;kparams.contentId=contentId;return new KalturaRequestBuilder("entitlement","grant",kparams);},listAction:function(filter,pager){if(!pager)
pager=null;var kparams=new Object();kparams.filter=filter;if(pager!=null)
kparams.pager=pager;return new KalturaRequestBuilder("entitlement","list",kparams);},swap:function(currentProductId,newProductId,history){var kparams=new Object();kparams.currentProductId=currentProductId;kparams.newProductId=newProductId;kparams.history=history;return new KalturaRequestBuilder("entitlement","swap",kparams);},update:function(id,entitlement){var kparams=new Object();kparams.id=id;kparams.entitlement=entitlement;return new KalturaRequestBuilder("entitlement","update",kparams);}}