UNPKG

@commercelayer/sdk

Version:
32 lines (30 loc) 1.24 kB
import { ApiResource } from './chunk-XDRKC6JM.js'; // src/resources/payment_gateways.ts var PaymentGateways = class _PaymentGateways extends ApiResource { static TYPE = "payment_gateways"; async payment_methods(paymentGatewayId, params, options) { const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId; return this.resources.fetch({ type: "payment_methods" }, `payment_gateways/${_paymentGatewayId}/payment_methods`, params, options); } async event_stores(paymentGatewayId, params, options) { const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId; return this.resources.fetch({ type: "event_stores" }, `payment_gateways/${_paymentGatewayId}/event_stores`, params, options); } isPaymentGateway(resource) { return resource.type && resource.type === _PaymentGateways.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _PaymentGateways.TYPE; } }; var instance = new PaymentGateways(); var payment_gateways_default = instance; export { payment_gateways_default }; //# sourceMappingURL=chunk-LGIROVQI.js.map //# sourceMappingURL=chunk-LGIROVQI.js.map