chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
170 lines (169 loc) • 6.59 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayErrorDetail = exports.LinkedPayment = exports.LinkedRefund = exports.LinkedCreditNote = exports.LinkedInvoice = exports.Transaction = void 0;
const request_wrapper_1 = require("../request_wrapper");
const model_1 = require("./model");
const chargebee_1 = require("../chargebee");
class Transaction extends model_1.Model {
// OPERATIONS
//-----------
static create_authorization(params) {
return new request_wrapper_1.RequestWrapper([params], {
'methodName': 'create_authorization',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/create_authorization',
'hasIdInUrl': false,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static void_transaction(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'void_transaction',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/void',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static record_refund(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'record_refund',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/record_refund',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static reconcile(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'reconcile',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/reconcile',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static refund(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'refund',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/refund',
'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': '/transactions',
'urlSuffix': null,
'hasIdInUrl': false,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static transactions_for_customer(customer_id, params) {
return new request_wrapper_1.RequestWrapper([customer_id, params], {
'methodName': 'transactions_for_customer',
'httpMethod': 'GET',
'urlPrefix': '/customers',
'urlSuffix': '/transactions',
'hasIdInUrl': true,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static transactions_for_subscription(subscription_id, params) {
return new request_wrapper_1.RequestWrapper([subscription_id, params], {
'methodName': 'transactions_for_subscription',
'httpMethod': 'GET',
'urlPrefix': '/subscriptions',
'urlSuffix': '/transactions',
'hasIdInUrl': true,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static payments_for_invoice(invoice_id, params) {
return new request_wrapper_1.RequestWrapper([invoice_id, params], {
'methodName': 'payments_for_invoice',
'httpMethod': 'GET',
'urlPrefix': '/invoices',
'urlSuffix': '/payments',
'hasIdInUrl': true,
'isListReq': true,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static retrieve(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'retrieve',
'httpMethod': 'GET',
'urlPrefix': '/transactions',
'urlSuffix': null,
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
static delete_offline_transaction(transaction_id, params) {
return new request_wrapper_1.RequestWrapper([transaction_id, params], {
'methodName': 'delete_offline_transaction',
'httpMethod': 'POST',
'urlPrefix': '/transactions',
'urlSuffix': '/delete_offline_transaction',
'hasIdInUrl': true,
'isListReq': false,
'subDomain': null,
'isOperationNeedsJsonInput': false,
'jsonKeys': {}
}, chargebee_1.ChargeBee._env);
}
} // ~Transaction
exports.Transaction = Transaction;
class LinkedInvoice extends model_1.Model {
} // ~LinkedInvoice
exports.LinkedInvoice = LinkedInvoice;
class LinkedCreditNote extends model_1.Model {
} // ~LinkedCreditNote
exports.LinkedCreditNote = LinkedCreditNote;
class LinkedRefund extends model_1.Model {
} // ~LinkedRefund
exports.LinkedRefund = LinkedRefund;
class LinkedPayment extends model_1.Model {
} // ~LinkedPayment
exports.LinkedPayment = LinkedPayment;
class GatewayErrorDetail extends model_1.Model {
} // ~GatewayErrorDetail
exports.GatewayErrorDetail = GatewayErrorDetail;
;