chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
154 lines (153 loc) • 5.49 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CouponConstraint = exports.ItemConstraintCriteria = exports.ItemConstraint = exports.Coupon = void 0;
const request_wrapper_1 = require("../request_wrapper");
const model_1 = require("./model");
const chargebee_1 = require("../chargebee");
class Coupon extends model_1.Model {
// OPERATIONS
//-----------
static create(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"meta_data": 0,
}
}, chargebee_1.ChargeBee._env);
}
static create_for_items(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_for_items',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': '/create_for_items',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"meta_data": 0,
"item_price_ids": 1,
"item_family_ids": 1,
"currencies": 1,
"item_price_periods": 1,
}
}, chargebee_1.ChargeBee._env);
}
static update_for_items(coupon_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_id, params], {
'methodName': 'update_for_items',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': '/update_for_items',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"meta_data": 0,
"item_price_ids": 1,
"item_family_ids": 1,
"currencies": 1,
"item_price_periods": 1,
}
}, chargebee_1.ChargeBee._env);
}
static list(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'list',
'httpMethod': 'GET',
'urlPrefix': '/coupons',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static retrieve(coupon_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_id, params], {
'methodName': 'retrieve',
'httpMethod': 'GET',
'urlPrefix': '/coupons',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static update(coupon_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_id, params], {
'methodName': 'update',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"meta_data": 0,
}
}, chargebee_1.ChargeBee._env);
}
static delete(coupon_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_id, params], {
'methodName': 'delete',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': '/delete',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static copy(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'copy',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': '/copy',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static unarchive(coupon_id, params) {
return new request_wrapper_1.RequestWrapper([coupon_id, params], {
'methodName': 'unarchive',
'httpMethod': 'POST',
'urlPrefix': '/coupons',
'urlSuffix': '/unarchive',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
} // ~Coupon
exports.Coupon = Coupon;
class ItemConstraint extends model_1.Model {
} // ~ItemConstraint
exports.ItemConstraint = ItemConstraint;
class ItemConstraintCriteria extends model_1.Model {
} // ~ItemConstraintCriteria
exports.ItemConstraintCriteria = ItemConstraintCriteria;
class CouponConstraint extends model_1.Model {
} // ~CouponConstraint
exports.CouponConstraint = CouponConstraint;
;