@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
38 lines (35 loc) • 1.55 kB
JavaScript
var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs');
// src/resources/payment_gateways.ts
var PaymentGateways = class _PaymentGateways extends chunkU22VLCMN_cjs.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;
exports.payment_gateways_default = payment_gateways_default;
//# sourceMappingURL=chunk-WVCUPAHM.cjs.map
//# sourceMappingURL=chunk-WVCUPAHM.cjs.map
;