UNPKG

@commercelayer/sdk

Version:
49 lines (47 loc) 2.12 kB
import { ApiResource } from './chunk-XKERR6OR.js'; // src/resources/adyen_gateways.ts var AdyenGateways = class _AdyenGateways extends 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; export { adyen_gateways_default }; //# sourceMappingURL=chunk-PIYKFPYB.js.map //# sourceMappingURL=chunk-PIYKFPYB.js.map