UNPKG

@commercelayer/sdk

Version:
51 lines (48 loc) 2.18 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/adyen_gateways.ts var AdyenGateways = class _AdyenGateways extends chunkU22VLCMN_cjs.ApiResource { static TYPE = "adyen_gateways"; async create(resource, params, options) { return this.resources.create({ ...resource, type: _AdyenGateways.TYPE }, params, options); } async update(resource, params, options) { return this.resources.update({ ...resource, type: _AdyenGateways.TYPE }, params, options); } async delete(id, options) { await this.resources.delete(typeof id === "string" ? { id, type: _AdyenGateways.TYPE } : id, options); } async payment_methods(adyenGatewayId, params, options) { const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId; return this.resources.fetch({ type: "payment_methods" }, `adyen_gateways/${_adyenGatewayId}/payment_methods`, params, options); } async versions(adyenGatewayId, params, options) { const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId; return this.resources.fetch({ type: "versions" }, `adyen_gateways/${_adyenGatewayId}/versions`, params, options); } async event_stores(adyenGatewayId, params, options) { const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId; return this.resources.fetch({ type: "event_stores" }, `adyen_gateways/${_adyenGatewayId}/event_stores`, params, options); } async adyen_payments(adyenGatewayId, params, options) { const _adyenGatewayId = adyenGatewayId.id || adyenGatewayId; return this.resources.fetch({ type: "adyen_payments" }, `adyen_gateways/${_adyenGatewayId}/adyen_payments`, params, options); } isAdyenGateway(resource) { return resource.type && resource.type === _AdyenGateways.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _AdyenGateways.TYPE; } }; var instance = new AdyenGateways(); var adyen_gateways_default = instance; exports.adyen_gateways_default = adyen_gateways_default; //# sourceMappingURL=chunk-FCGKL7AI.cjs.map //# sourceMappingURL=chunk-FCGKL7AI.cjs.map