UNPKG

shipstation-node

Version:
37 lines (36 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Tracking = void 0; const BaseResource_1 = require("../../BaseResource"); /** * [Official Documentation](https://docs.shipstation.com/openapi/tracking) * * Use the tracking endpoint to stop receiving tracking updates (more dedicated tracking endpoint methods coming soon). */ class Tracking extends BaseResource_1.BaseResource { constructor(shipstation) { super(shipstation, 'downloads'); } /** * [Official Documentation](https://docs.shipstation.com/openapi/tracking/stop_tracking) * * Unsubscribe from tracking updates for a package. * * @param carrierCode A shipping carrier, such as fedex, dhl_express, stamps_com, etc. * @example "stamps_com" * * @param trackingNumber The tracking number associated with a shipment * @example "9405511899223197428490" */ async stop(carrierCode, trackingNumber) { await this.shipstation.request({ url: `${this.baseUrl}/stop`, method: 'POST', params: { carrier_code: carrierCode, tracking_number: trackingNumber } }); } } exports.Tracking = Tracking;