@plasma-platform/tm-service-memberships
v1.0.0
Published
Memberships Service API
Downloads
4
Readme
Documentation
Table of Contents
MembershipsService
Memberships Micro Service API
Parameters
messages
Object with class service messages
getListOfMembershipGroups
Groups - Get list of membership groups
Parameters
params
Object
Examples
Get list of membership groups
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
const response = await service.getListOfMembershipGroups(params);
})();
Returns Promise<Object> Promise object represents info
getListOfAllMembershipPlans
Memberships - Get list of all membership plans
Parameters
params
Object
Examples
Get membership plan info by ID
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
const response = await service.getListOfAllMembershipPlans(params);
})();
Returns Promise<Object> Promise object represents info
getMembershipPlanInfoById
Memberships - Get membership plan info by ID
Parameters
Examples
Get membership plan info by ID
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/');
const response = await service.getMembershipPlanInfoById(params);
})();
Returns Promise<Object> Promise object represents info
getListOfSubscriptions
Subscriptions - Get list of subscriptions
Parameters
params
Object
Examples
Get list of subscriptions
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
const response = await service.getListOfSubscriptions(params);
})();
Returns Promise<Object> Promise object represents info
getSubscription
Subscriptions - Get subscription
Parameters
Examples
Get list of subscriptions
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
const response = await service.getSubscription(params);
})();
Returns Promise<Object> Promise object represents info
reactivatePayments
Subscriptions - Reactivate payments. Reactivate recurrent payments for subscription, payment status will be changed to active
Parameters
Examples
Get list of subscriptions
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
const response = await service.reactivatePayments(params);
})();
Returns Promise<Object> Promise object represents info
suspendPayments
Subscriptions - Suspend payments. Suspend recurrent payments for subscription, payment status will be changed to inactive
Parameters
Examples
Get list of subscriptions
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
const response = await service.suspendPayments(params);
})();
Returns Promise<Object> Promise object represents info
getDownloadsByProductId
Subscription Downloads - Get downloads by product ID. Gets download by product ID from entire user downloads list.
Parameters
Examples
Get list of subscriptions
(async () => {
const service = new MembershipsService('//api.templatemonsterdev.com/memberships/v1/', token);
const response = await service.getDownloadsByProductId(params);
})();