chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
64 lines (63 loc) • 2.25 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CouponCode = void 0;
const request_wrapper_1 = require("../request_wrapper");
const model_1 = require("./model");
const chargebee_1 = require("../chargebee");
class CouponCode extends model_1.Model {
// OPERATIONS
//-----------
static create(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create',
'httpMethod': 'POST',
'urlPrefix': '/coupon_codes',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static retrieve(coupon_code_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_code_id, params], {
'methodName': 'retrieve',
'httpMethod': 'GET',
'urlPrefix': '/coupon_codes',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static list(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'list',
'httpMethod': 'GET',
'urlPrefix': '/coupon_codes',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static archive(coupon_code_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_code_id, params], {
'methodName': 'archive',
'httpMethod': 'POST',
'urlPrefix': '/coupon_codes',
'urlSuffix': '/archive',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
} // ~CouponCode
exports.CouponCode = CouponCode;
;