@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
36 lines (34 loc) • 1.49 kB
JavaScript
import { ApiResource } from './chunk-XKERR6OR.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 versions(paymentGatewayId, params, options) {
const _paymentGatewayId = paymentGatewayId.id || paymentGatewayId;
return this.resources.fetch({ type: "versions" }, `payment_gateways/${_paymentGatewayId}/versions`, 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-7AHYBTEX.js.map
//# sourceMappingURL=chunk-7AHYBTEX.js.map