UNPKG

feathers-shippo

Version:

A Feathers JS adapter for the Shippo API

21 lines (20 loc) 907 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ShippoServiceGroups = void 0; const service_1 = require("../service"); class ShippoServiceGroups extends service_1.ShippoService { constructor(options, app) { options = Object.assign(Object.assign({ limiters: (0, service_1.shippoLimiters)(options.token) }, options), { path: 'service-groups', methods: ['find', 'create', 'update', 'patch', 'remove'] }); super(options, app); } _update(id, data, params) { return this.schedule('update', () => { data = Object.assign(Object.assign({}, data), { object_id: id }); return this.shippo .put('service-groups', data, (0, service_1.axiosOpts)(params)) .then(this.handleResult) .catch(this.handleError); }); } } exports.ShippoServiceGroups = ShippoServiceGroups;