chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
266 lines (265 loc) • 10.1 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Mandate = exports.KlarnaPayNow = exports.Venmo = exports.Paypal = exports.Upi = exports.AmazonPayment = exports.BillingAddress = exports.CustVoucherSource = exports.BankAccount = exports.Card = exports.PaymentSource = void 0;
const request_wrapper_1 = require("../request_wrapper");
const model_1 = require("./model");
const chargebee_1 = require("../chargebee");
class PaymentSource extends model_1.Model {
// OPERATIONS
//-----------
static create_using_temp_token(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_using_temp_token',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_using_temp_token',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"additional_information": 0,
}
}, chargebee_1.ChargeBee._env);
}
static create_using_permanent_token(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_using_permanent_token',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_using_permanent_token',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"additional_information": 0,
}
}, chargebee_1.ChargeBee._env);
}
static create_using_token(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_using_token',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_using_token',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static create_using_payment_intent(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_using_payment_intent',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_using_payment_intent',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"additional_info": 1,
"additional_information": 1,
}
}, chargebee_1.ChargeBee._env);
}
static create_voucher_payment_source(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_voucher_payment_source',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_voucher_payment_source',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"billing_address": 1,
}
}, chargebee_1.ChargeBee._env);
}
static create_card(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_card',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_card',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"additional_information": 1,
}
}, chargebee_1.ChargeBee._env);
}
static create_bank_account(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_bank_account',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/create_bank_account',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"billing_address": 1,
}
}, chargebee_1.ChargeBee._env);
}
static update_card(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'update_card',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/update_card',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {
"gateway_meta_data": 0,
"additional_information": 1,
}
}, chargebee_1.ChargeBee._env);
}
static update_bank_account(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'update_bank_account',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/update_bank_account',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static verify_bank_account(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'verify_bank_account',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/verify_bank_account',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static retrieve(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'retrieve',
'httpMethod': 'GET',
'urlPrefix': '/payment_sources',
'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': '/payment_sources',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static switch_gateway_account(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'switch_gateway_account',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/switch_gateway_account',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static export_payment_source(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'export_payment_source',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/export_payment_source',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static delete(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'delete',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/delete',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static delete_local(payment_source_id, params) {
return new request_wrapper_1.RequestWrapper([payment_source_id, params], {
'methodName': 'delete_local',
'httpMethod': 'POST',
'urlPrefix': '/payment_sources',
'urlSuffix': '/delete_local',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
} // ~PaymentSource
exports.PaymentSource = PaymentSource;
class Card extends model_1.Model {
} // ~Card
exports.Card = Card;
class BankAccount extends model_1.Model {
} // ~BankAccount
exports.BankAccount = BankAccount;
class CustVoucherSource extends model_1.Model {
} // ~CustVoucherSource
exports.CustVoucherSource = CustVoucherSource;
class BillingAddress extends model_1.Model {
} // ~BillingAddress
exports.BillingAddress = BillingAddress;
class AmazonPayment extends model_1.Model {
} // ~AmazonPayment
exports.AmazonPayment = AmazonPayment;
class Upi extends model_1.Model {
} // ~Upi
exports.Upi = Upi;
class Paypal extends model_1.Model {
} // ~Paypal
exports.Paypal = Paypal;
class Venmo extends model_1.Model {
} // ~Venmo
exports.Venmo = Venmo;
class KlarnaPayNow extends model_1.Model {
} // ~KlarnaPayNow
exports.KlarnaPayNow = KlarnaPayNow;
class Mandate extends model_1.Model {
} // ~Mandate
exports.Mandate = Mandate;
;