1.1.1 • Published 6 years ago

tm-service-orders v1.1.1

Weekly downloads
1
License
CC-BY-4.0
Repository
gitlab
Last release
6 years ago

Documentation

OrdersService

messages

object with class service messages

checkDownloadLinkStatus

Download link status (check)

Parameters

  • orderId {string} - Order id (required).
  • productId {number} - Product id (required).

Examples

(async () => {
  const service = new Service('http://service-orders.dev/api/v1/', token);
  const request = await service.checkDownloadLinkStatus('NDrMh3S3XvSt0LfbHoWh', 222);
})();

Returns Promise<any>

restoreDownloadLinkStatus

Download link status (restore)

Parameters

  • orderId {string} - Order id (required).
  • productId {number} - Product id (required).

Examples

(async () => {
  const service = new Service('http://service-orders.dev/api/v1/', token);
  const request = await service.restoreDownloadLinkStatus('NDrMh3S3XvSt0LfbHoWh', 222);
})();

Returns Promise<any>

getListOfUserOrders

Get list of users orders

Parameters

  • props object
  • page number page number to view.
  • perPage number records per page.
  • productType string type of product. Allowed values: 'template', 'offer', 'membership', 'weblium', 'subscription'.
  • productIds string ID's of products.
  • orderIds string ID's of orders.
  • status number order status

Examples

(async () => {
  const service = new Service('http://service-orders.dev/api/v2/', token);
  const request = await service.getListOfUserOrders({ page: 1, ids: 'NDrMh3S3XvSt0LfbHoWh' });
})();

Returns Promise<any>

getOrderById

Get order by ID

Parameters

Examples

(async () => {
  const service = new Service('http://service-orders.dev/api/v2/', token);
  const request = await service.getOrderById('NDrMh3S3XvSt0LfbHoWh');
})();

Returns Promise<any>

getOrderInfo

Get order info

Parameters

  • args object Arguments for payments
    • args.page number Page number to view
    • args.perPage number Records per page
    • args.productType string Type of product
    • args.productIds string ID's of products
    • args.ids string ID's of orders
    • args.userId string Customer's ID
    • args.email string Customer's email
    • args.status number Order status
    • args.dateFrom string Date range start
    • args.dateTo string Date range end

Examples

(async () => {
  const service = new Service('http://service-orders.dev/api/v2/', token);
  const request = await service.getOrderById('NDrMh3S3XvSt0LfbHoWh');
})();

Returns Promise<any>