Skip to content

Commit

Permalink
(Feat) Accesstype : Added feature to cancel the subscription plan (qu…
Browse files Browse the repository at this point in the history
  • Loading branch information
Deokumarjnu authored Jun 25, 2020
1 parent aca27e7 commit 7a7ddfc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/access-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down Expand Up @@ -446,6 +453,7 @@ class AccessTypeBase extends React.Component {
accessIsLoading: this.props.accessIsLoading,
getAssetPlans: this.props.getAssetPlans,
validateCoupon: this.validateCoupon,
cancelSubscription: this.cancelSubscription
});
}
}
Expand Down

0 comments on commit 7a7ddfc

Please sign in to comment.