diff --git a/src/components/access-type.js b/src/components/access-type.js index 10dfd1ed..9f259cba 100644 --- a/src/components/access-type.js +++ b/src/components/access-type.js @@ -86,6 +86,13 @@ class AccessTypeBase extends React.Component { return data; }; + cancelSubscription = async (subscriptionId = null) => { + if(!subscriptionId) { + return Promise.reject("Subscription id is not defined"); + } + return global.AccessType.cancelSubscription(subscriptionId); + } + getSubscription = async () => { const accessTypeKey = get(this.props, ["accessTypeKey"]); const isStaging = get(this.props, ["isStaging"]); @@ -446,6 +453,7 @@ class AccessTypeBase extends React.Component { accessIsLoading: this.props.accessIsLoading, getAssetPlans: this.props.getAssetPlans, validateCoupon: this.validateCoupon, + cancelSubscription: this.cancelSubscription }); } }