2.8.1 • Published 2 years ago

@plasma-platform/service-orders v2.8.1

Weekly downloads
5
License
CC-BY-4.0
Repository
gitlab
Last release
2 years ago

version nextVersion downloads license dependency


Full documentation
install:
npm i @plasma-platform/service-orders -S

Short documentation

Table of Contents

OrdersService

messages

object with class service messages

Type: object

changeOrderPhoneNumber

Orders - Change the phone number of the order

Parameters

  • params object
    • params.orderId string ID of order (required).
    • params.phoneNumber string order phone number (required).

Examples

(async () => {
  const service = new Service(url, token);
  const request = await service.changeOrderPhoneNumber(orderId);
})();

Returns Promise<any>

checkOrders

Check orders

Parameters

  • params object params object
    • params.productType string Type of product. Allowed values: 'template', 'offer', 'membership'.
    • params.productIds string ID's of products
    • params.orderIds string ID's of orders
    • params.userId string Customer's ID
    • params.email string Customer's email
    • params.status number Order status
    • params.dateFrom string Date range start
    • params.dateTo string Date range end
    • params.paidOnly boolean Search only paid orders
    • params.strict boolean 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

  • params object params object
    • params.products object Array of products objects.
      • params.products.type string template, offer, membership, item.
      • params.products.id string ID's of products.
    • params.orderIds string ID's of orders
    • params.userId string Customer's ID
    • params.email string Customer's email
    • params.status number Order status
    • params.dateFrom string Date range start
    • params.dateTo string Date range end
    • params.paidOnly boolean Search only paid orders
    • params.strict boolean 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

  • params object params object
    • params.page number page number to view.
    • params.perPage number records per page.
    • params.productType string type of product. Allowed values: 'template', 'offer', 'membership'.
    • params.productIds string ID's of products.
    • params.orderIds string ID's of orders.
    • params.status number order status
    • params.email number Customer's email
    • params.dateFrom number Date range start
    • params.dateTo number Date range end
    • params.paidOnly number Search only paid orders
    • params.strict number 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

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

  • orderId string 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

  • params object params object
    • params.orderId string Order id (required).
    • params.productId number Product id (required).

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

  • params object params object
    • params.orderId string Order id (required).
    • params.productId number Product id (required).

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

  • params object params object
    • params.order_id string Order id (required).

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

  • params object params object
    • params.order_id string (required) Order ID for import
    • params.billingName string (required) Billing user name
    • params.billingCountryISO2 string (required) Country in ISO2
    • params.billingCity string (required) City
    • params.billingAddress string (required) Address
    • params.billingZip string (required) Zip
    • params.companyName string Company name
    • params.billingStateISO2 string State in ISO2
    • params.taxId string taxID

Examples

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

Returns Promise<any>

2.8.1

2 years ago

2.8.0

4 years ago

2.7.1

4 years ago

2.7.0

4 years ago

2.6.0

4 years ago

2.4.0-alpha.0

4 years ago

2.3.18

4 years ago

2.3.17

5 years ago

2.3.16

5 years ago

2.3.17-alpha.0

5 years ago

2.3.16-alpha.0

5 years ago

2.3.15

5 years ago

2.3.15-alpha.0

5 years ago

2.3.14-alpha.0

5 years ago

2.3.13

5 years ago

2.3.12

5 years ago

2.3.11

5 years ago

2.3.11-alpha.0

5 years ago

2.3.10-alpha.0

5 years ago

2.3.9

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.5.0-alpha.0

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.10

5 years ago

2.2.9

5 years ago

2.2.8

5 years ago

2.2.7

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.21

5 years ago

2.1.20

5 years ago

2.1.19

5 years ago

2.1.18

5 years ago

2.1.17

5 years ago

2.1.16

5 years ago

2.1.15

5 years ago

2.1.14

5 years ago

2.1.13

5 years ago

2.1.12

5 years ago