UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

27 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContactsPersonsAPI = void 0; const crud_1 = require("../../../../utils/crud"); const guards_1 = require("../../../../utils/guards"); const addresses_1 = require("./addresses"); const payment_methods_1 = require("./payment-methods"); class ContactsPersonsAPI extends crud_1.CRUD { _personId; constructor(httpClient, baseUrl, _personId) { super(httpClient, { basePath: baseUrl, id: _personId, }); this._personId = _personId; } addresses(id) { (0, guards_1.requireField)('personId', this._personId); return new addresses_1.ContactsPersonsAddressesAPI(this._httpClient, `${this._config.basePath}/${this._personId}/addresses`, id); } paymentMethods(id) { (0, guards_1.requireField)('personId', this._personId); return new payment_methods_1.ContactsPersonsPaymentMethodsAPI(this._httpClient, `${this._config.basePath}/${this._personId}/payment-methods`, id); } } exports.ContactsPersonsAPI = ContactsPersonsAPI; //# sourceMappingURL=persons.js.map