@nuskin/order-sdk
v1.1.8
Published
The description that will amaze and astound your audience when they read it
Downloads
600
Keywords
Readme
@nuskin/order-sdk
This should be a short paragraph describing what this module is for.
Installing
Usng npm:
npm add @nuskin/order-sdk
Usng yarn:
yarn add @nuskin/order-sdk
Example usage
import {OrderClient} from '@nuskin/order-sdk';
import {order} from '@nuskin/order-model';
const Order = order.Order;
const client = new OrderClient({
locale: 'en_US',
env: 'test',
clientId: 'clientIdforyourapp',
clientSecret: 'yourappsecret',
eid: 'userseid',
guestCheckout: false,
isSignup: false
});
const ord = new Order({orderObj...})
const updatedOrder = await client.orderSimulate(ord);
const createdOrder = await client.orderCreate(ord);
const updatedOrderStatus = await client.pollOrderStatus(ord.externalId);