sezam-group-manager-client
v0.0.2
Published
This is a prototype of group manager client
Downloads
1
Readme
Sezam Group Manager Client
Using npm:
$ npm install sezam-group-manager-client
Guide
Dependencies
Importing
CommonJS usage
const SezamGroupManagerClient = require('sezam-group-manager-client');
ES6 usage
import SezamGroupManagerClient from 'sezam-group-manager-client';
Module init
const token = 'get token there https://idontknowsezamdomain.zyx'
const commerceGroupManager = new SezamGroupManagerClient(token);
You should register your products to provide products ID in our system.
createOrder(customerId: number | string, productId: number | string): Promise
commerceGroupManager.createOrder(customerId, productId)
.then(order => {
// do something there
})
.catch(error => {
// handle error
});
cancelOrder(orderId: number | string): Promise
commerceGroupManager.cancelOrder(orderId)
.then(orderStatus => {
// do something there
})
.catch(error => {
// handle error
});
getOrderInfo(orderId: number | string): Promise
commerceGroupManager.getOrderInfo(customerId, productId)
.then(orderInfo => {
// do something with order
})
.catch(error => {
// handle error
});