UNPKG

@commercelayer/sdk

Version:
49 lines (47 loc) 2.15 kB
import { ApiResource } from './chunk-XKERR6OR.js'; // src/resources/axerve_gateways.ts var AxerveGateways = class _AxerveGateways extends ApiResource { static TYPE = "axerve_gateways"; async create(resource, params, options) { return this.resources.create({ ...resource, type: _AxerveGateways.TYPE }, params, options); } async update(resource, params, options) { return this.resources.update({ ...resource, type: _AxerveGateways.TYPE }, params, options); } async delete(id, options) { await this.resources.delete(typeof id === "string" ? { id, type: _AxerveGateways.TYPE } : id, options); } async payment_methods(axerveGatewayId, params, options) { const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId; return this.resources.fetch({ type: "payment_methods" }, `axerve_gateways/${_axerveGatewayId}/payment_methods`, params, options); } async versions(axerveGatewayId, params, options) { const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId; return this.resources.fetch({ type: "versions" }, `axerve_gateways/${_axerveGatewayId}/versions`, params, options); } async event_stores(axerveGatewayId, params, options) { const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId; return this.resources.fetch({ type: "event_stores" }, `axerve_gateways/${_axerveGatewayId}/event_stores`, params, options); } async axerve_payments(axerveGatewayId, params, options) { const _axerveGatewayId = axerveGatewayId.id || axerveGatewayId; return this.resources.fetch({ type: "axerve_payments" }, `axerve_gateways/${_axerveGatewayId}/axerve_payments`, params, options); } isAxerveGateway(resource) { return resource.type && resource.type === _AxerveGateways.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _AxerveGateways.TYPE; } }; var instance = new AxerveGateways(); var axerve_gateways_default = instance; export { axerve_gateways_default }; //# sourceMappingURL=chunk-4ATZM33H.js.map //# sourceMappingURL=chunk-4ATZM33H.js.map