UNPKG

shipstation-node

Version:
41 lines (40 loc) 1.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Customers = void 0; const BaseResource_1 = require("../../BaseResource"); class Customers extends BaseResource_1.BaseResource { constructor(shipstation) { super(shipstation, 'customers'); } /** * [Official Documentation](https://www.shipstation.com/docs/api/customers/get-customer/) * * To find a specific customerId, make an API Call to * [list customers](https://www.shipstation.com/docs/api/customers/list/) associated with your account. * * @param customerId The system-generated identifier for the Customer. * * @returns The details of the customer. */ async get(customerId) { return this.shipstation.request({ url: `${this.baseUrl}/${customerId}`, method: 'GET' }); } /** * [Official Documentation](https://www.shipstation.com/docs/api/customers/list/) * * Obtains a list of customers that match the specified criteria. * * @returns A list of tags for the account. */ async list(params) { return this.shipstation.request({ url: this.baseUrl, method: 'GET', params }); } } exports.Customers = Customers;