@plasma-platform/service-orders v2.8.1
Full documentation
install:npm i @plasma-platform/service-orders -S
Short documentation
Table of Contents
- OrdersService
OrdersService
messages
object with class service messages
Type: object
changeOrderPhoneNumber
Orders - Change the phone number of the order
Parameters
paramsobject
Examples
(async () => {
const service = new Service(url, token);
const request = await service.changeOrderPhoneNumber(orderId);
})();Returns Promise<any>
checkOrders
Check orders
Parameters
paramsobject params objectparams.productTypestring Type of product. Allowed values: 'template', 'offer', 'membership'.params.productIdsstring ID's of productsparams.orderIdsstring ID's of ordersparams.userIdstring Customer's IDparams.emailstring Customer's emailparams.statusnumber Order statusparams.dateFromstring Date range startparams.dateTostring Date range endparams.paidOnlyboolean Search only paid ordersparams.strictboolean Strict search mode
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/');
const request = await service.checkOrders(params);
})();Returns Promise<any>
checkRepurchase
Check repurchase
Parameters
paramsobject params objectparams.productsobject Array of products objects.params.orderIdsstring ID's of ordersparams.userIdstring Customer's IDparams.emailstring Customer's emailparams.statusnumber Order statusparams.dateFromstring Date range startparams.dateTostring Date range endparams.paidOnlyboolean Search only paid ordersparams.strictboolean Strict search mode
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/');
const request = await service.checkRepurchase(params);
})();Returns Promise<any>
getListOfUserOrders
Get list of users orders
Parameters
paramsobject params objectparams.pagenumber page number to view.params.perPagenumber records per page.params.productTypestring type of product. Allowed values: 'template', 'offer', 'membership'.params.productIdsstring ID's of products.params.orderIdsstring ID's of orders.params.statusnumber order statusparams.emailnumber Customer's emailparams.dateFromnumber Date range startparams.dateTonumber Date range endparams.paidOnlynumber Search only paid ordersparams.strictnumber Strict search mode
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getListOfUserOrders(params);
})();Returns Promise<any>
getOrderById
Get order by ID
Parameters
orderIdstring ID of order.
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getOrderById(orderId);
})();Returns Promise<any>
getOrderByIdPublic
Orders - Get order public data
Parameters
orderIdstring ID of order (required).
Examples
(async () => {
const service = new Service(url);
const request = await service.getOrderByIdPublic(orderId);
})();Returns Promise<any>
checkDownloadLinkStatusByToken
Check download link status by access token
Parameters
paramsobject params object
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.checkDownloadLinkStatusByToken(params);
})();Returns Promise<any>
restoreDownloadLinkStatusByToken
Restore download link status by access token
Parameters
paramsobject params object
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v1/', token);
const request = await service.restoreDownloadLinkStatusByToken(params);
})();Returns Promise<any>
getInvoiceData
Get invoice data
Parameters
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.getInvoiceData(params);
})();Returns Promise<any>
createInvoice
Invoices - Create Invoice
Parameters
paramsobject params objectparams.order_idstring (required) Order ID for importparams.billingNamestring (required) Billing user nameparams.billingCountryISO2string (required) Country in ISO2params.billingCitystring (required) Cityparams.billingAddressstring (required) Addressparams.billingZipstring (required) Zipparams.companyNamestring Company nameparams.billingStateISO2string State in ISO2params.taxIdstring taxID
Examples
(async () => {
const service = new Service('http://service-orders.dev/api/v2/', token);
const request = await service.createInvoice(params);
})();Returns Promise<any>
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago