UNPKG

chargebee-typescript

Version:

A library in typescript for integrating with Chargebee.

189 lines (188 loc) 6.97 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ResentOrder = exports.LinkedCreditNote = exports.LineItemDiscount = exports.LineItemTax = exports.BillingAddress = exports.ShippingAddress = exports.OrderLineItem = exports.Order = void 0; const request_wrapper_1 = require("../request_wrapper"); const model_1 = require("./model"); const chargebee_1 = require("../chargebee"); class Order extends model_1.Model { // OPERATIONS //----------- static create(params) { return new request_wrapper_1.RequestWrapper([params], { 'methodName': 'create', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': null, 'hasIdInUrl': false, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static update(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'update', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': null, 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static import_order(params) { return new request_wrapper_1.RequestWrapper([params], { 'methodName': 'import_order', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/import_order', 'hasIdInUrl': false, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static assign_order_number(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'assign_order_number', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/assign_order_number', 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static cancel(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'cancel', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/cancel', 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static create_refundable_credit_note(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'create_refundable_credit_note', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/create_refundable_credit_note', 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static reopen(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'reopen', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/reopen', 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static retrieve(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'retrieve', 'httpMethod': 'GET', 'urlPrefix': '/orders', 'urlSuffix': null, 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static delete(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'delete', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/delete', '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': '/orders', 'urlSuffix': null, 'hasIdInUrl': false, 'isListReq': true, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static orders_for_invoice(invoice_id, params) { return new request_wrapper_1.RequestWrapper([invoice_id, params], { 'methodName': 'orders_for_invoice', 'httpMethod': 'GET', 'urlPrefix': '/invoices', 'urlSuffix': '/orders', 'hasIdInUrl': true, 'isListReq': true, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } static resend(order_id, params) { return new request_wrapper_1.RequestWrapper([order_id, params], { 'methodName': 'resend', 'httpMethod': 'POST', 'urlPrefix': '/orders', 'urlSuffix': '/resend', 'hasIdInUrl': true, 'isListReq': false, 'subDomain': null, 'isOperationNeedsJsonInput': false, 'jsonKeys': {} }, chargebee_1.ChargeBee._env); } } // ~Order exports.Order = Order; class OrderLineItem extends model_1.Model { } // ~OrderLineItem exports.OrderLineItem = OrderLineItem; class ShippingAddress extends model_1.Model { } // ~ShippingAddress exports.ShippingAddress = ShippingAddress; class BillingAddress extends model_1.Model { } // ~BillingAddress exports.BillingAddress = BillingAddress; class LineItemTax extends model_1.Model { } // ~LineItemTax exports.LineItemTax = LineItemTax; class LineItemDiscount extends model_1.Model { } // ~LineItemDiscount exports.LineItemDiscount = LineItemDiscount; class LinkedCreditNote extends model_1.Model { } // ~LinkedCreditNote exports.LinkedCreditNote = LinkedCreditNote; class ResentOrder extends model_1.Model { } // ~ResentOrder exports.ResentOrder = ResentOrder;