UNPKG

@maxio-com/advanced-billing-sdk

Version:

Ultimate billing and pricing flexibility for B2B SaaS. Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.

199 lines 9.79 kB
"use strict"; /** * AdvancedBilling * * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ Object.defineProperty(exports, "__esModule", { value: true }); exports.InvoiceEvent = exports.invoiceEventSchema = void 0; var schema_js_1 = require("../../schema.js"); var applyCreditNoteEvent_js_1 = require("../applyCreditNoteEvent.js"); var applyDebitNoteEvent_js_1 = require("../applyDebitNoteEvent.js"); var applyPaymentEvent_js_1 = require("../applyPaymentEvent.js"); var backportInvoiceEvent_js_1 = require("../backportInvoiceEvent.js"); var changeChargebackStatusEvent_js_1 = require("../changeChargebackStatusEvent.js"); var changeInvoiceCollectionMethodEvent_js_1 = require("../changeInvoiceCollectionMethodEvent.js"); var changeInvoiceStatusEvent_js_1 = require("../changeInvoiceStatusEvent.js"); var createCreditNoteEvent_js_1 = require("../createCreditNoteEvent.js"); var createDebitNoteEvent_js_1 = require("../createDebitNoteEvent.js"); var failedPaymentEvent_js_1 = require("../failedPaymentEvent.js"); var issueInvoiceEvent_js_1 = require("../issueInvoiceEvent.js"); var refundInvoiceEvent_js_1 = require("../refundInvoiceEvent.js"); var removePaymentEvent_js_1 = require("../removePaymentEvent.js"); var voidInvoiceEvent_js_1 = require("../voidInvoiceEvent.js"); var voidRemainderEvent_js_1 = require("../voidRemainderEvent.js"); var discriminatorMap = { 'apply_credit_note': applyCreditNoteEvent_js_1.applyCreditNoteEventSchema, 'apply_debit_note': applyDebitNoteEvent_js_1.applyDebitNoteEventSchema, 'apply_payment': applyPaymentEvent_js_1.applyPaymentEventSchema, 'backport_invoice': backportInvoiceEvent_js_1.backportInvoiceEventSchema, 'change_chargeback_status': changeChargebackStatusEvent_js_1.changeChargebackStatusEventSchema, 'change_invoice_collection_method': changeInvoiceCollectionMethodEvent_js_1.changeInvoiceCollectionMethodEventSchema, 'change_invoice_status': changeInvoiceStatusEvent_js_1.changeInvoiceStatusEventSchema, 'create_credit_note': createCreditNoteEvent_js_1.createCreditNoteEventSchema, 'create_debit_note': createDebitNoteEvent_js_1.createDebitNoteEventSchema, 'failed_payment': failedPaymentEvent_js_1.failedPaymentEventSchema, 'issue_invoice': issueInvoiceEvent_js_1.issueInvoiceEventSchema, 'refund_invoice': refundInvoiceEvent_js_1.refundInvoiceEventSchema, 'remove_payment': removePaymentEvent_js_1.removePaymentEventSchema, 'void_invoice': voidInvoiceEvent_js_1.voidInvoiceEventSchema, 'void_remainder': voidRemainderEvent_js_1.voidRemainderEventSchema, }; exports.invoiceEventSchema = (0, schema_js_1.lazy)(function () { return (0, schema_js_1.anyOf)([ applyCreditNoteEvent_js_1.applyCreditNoteEventSchema, applyDebitNoteEvent_js_1.applyDebitNoteEventSchema, applyPaymentEvent_js_1.applyPaymentEventSchema, backportInvoiceEvent_js_1.backportInvoiceEventSchema, changeChargebackStatusEvent_js_1.changeChargebackStatusEventSchema, changeInvoiceCollectionMethodEvent_js_1.changeInvoiceCollectionMethodEventSchema, changeInvoiceStatusEvent_js_1.changeInvoiceStatusEventSchema, createCreditNoteEvent_js_1.createCreditNoteEventSchema, createDebitNoteEvent_js_1.createDebitNoteEventSchema, failedPaymentEvent_js_1.failedPaymentEventSchema, issueInvoiceEvent_js_1.issueInvoiceEventSchema, refundInvoiceEvent_js_1.refundInvoiceEventSchema, removePaymentEvent_js_1.removePaymentEventSchema, voidInvoiceEvent_js_1.voidInvoiceEventSchema, voidRemainderEvent_js_1.voidRemainderEventSchema, ], discriminatorMap, 'event_type'); }); var InvoiceEvent; (function (InvoiceEvent) { /** * Validation method to narrow down union type to ApplyCreditNoteEvent type case. * * This is Apply Credit Note Event case. */ function isApplyCreditNoteEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, applyCreditNoteEvent_js_1.applyCreditNoteEventSchema); } InvoiceEvent.isApplyCreditNoteEvent = isApplyCreditNoteEvent; /** * Validation method to narrow down union type to ApplyDebitNoteEvent type case. * * This is Apply Debit Note Event case. */ function isApplyDebitNoteEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, applyDebitNoteEvent_js_1.applyDebitNoteEventSchema); } InvoiceEvent.isApplyDebitNoteEvent = isApplyDebitNoteEvent; /** * Validation method to narrow down union type to ApplyPaymentEvent type case. * * This is Apply Payment Event case. */ function isApplyPaymentEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, applyPaymentEvent_js_1.applyPaymentEventSchema); } InvoiceEvent.isApplyPaymentEvent = isApplyPaymentEvent; /** * Validation method to narrow down union type to BackportInvoiceEvent type case. * * This is Backport Invoice Event case. */ function isBackportInvoiceEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, backportInvoiceEvent_js_1.backportInvoiceEventSchema); } InvoiceEvent.isBackportInvoiceEvent = isBackportInvoiceEvent; /** * Validation method to narrow down union type to ChangeChargebackStatusEvent type case. * * This is Change Chargeback Status Event case. */ function isChangeChargebackStatusEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, changeChargebackStatusEvent_js_1.changeChargebackStatusEventSchema); } InvoiceEvent.isChangeChargebackStatusEvent = isChangeChargebackStatusEvent; /** * Validation method to narrow down union type to ChangeInvoiceCollectionMethodEvent type case. * * This is Change Invoice Collection Method Event case. */ function isChangeInvoiceCollectionMethodEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, changeInvoiceCollectionMethodEvent_js_1.changeInvoiceCollectionMethodEventSchema); } InvoiceEvent.isChangeInvoiceCollectionMethodEvent = isChangeInvoiceCollectionMethodEvent; /** * Validation method to narrow down union type to ChangeInvoiceStatusEvent type case. * * This is Change Invoice Status Event case. */ function isChangeInvoiceStatusEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, changeInvoiceStatusEvent_js_1.changeInvoiceStatusEventSchema); } InvoiceEvent.isChangeInvoiceStatusEvent = isChangeInvoiceStatusEvent; /** * Validation method to narrow down union type to CreateCreditNoteEvent type case. * * This is Create Credit Note Event case. */ function isCreateCreditNoteEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, createCreditNoteEvent_js_1.createCreditNoteEventSchema); } InvoiceEvent.isCreateCreditNoteEvent = isCreateCreditNoteEvent; /** * Validation method to narrow down union type to CreateDebitNoteEvent type case. * * This is Create Debit Note Event case. */ function isCreateDebitNoteEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, createDebitNoteEvent_js_1.createDebitNoteEventSchema); } InvoiceEvent.isCreateDebitNoteEvent = isCreateDebitNoteEvent; /** * Validation method to narrow down union type to FailedPaymentEvent type case. * * This is Failed Payment Event case. */ function isFailedPaymentEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, failedPaymentEvent_js_1.failedPaymentEventSchema); } InvoiceEvent.isFailedPaymentEvent = isFailedPaymentEvent; /** * Validation method to narrow down union type to IssueInvoiceEvent type case. * * This is Issue Invoice Event case. */ function isIssueInvoiceEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, issueInvoiceEvent_js_1.issueInvoiceEventSchema); } InvoiceEvent.isIssueInvoiceEvent = isIssueInvoiceEvent; /** * Validation method to narrow down union type to RefundInvoiceEvent type case. * * This is Refund Invoice Event case. */ function isRefundInvoiceEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, refundInvoiceEvent_js_1.refundInvoiceEventSchema); } InvoiceEvent.isRefundInvoiceEvent = isRefundInvoiceEvent; /** * Validation method to narrow down union type to RemovePaymentEvent type case. * * This is Remove Payment Event case. */ function isRemovePaymentEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, removePaymentEvent_js_1.removePaymentEventSchema); } InvoiceEvent.isRemovePaymentEvent = isRemovePaymentEvent; /** * Validation method to narrow down union type to VoidInvoiceEvent type case. * * This is Void Invoice Event case. */ function isVoidInvoiceEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, voidInvoiceEvent_js_1.voidInvoiceEventSchema); } InvoiceEvent.isVoidInvoiceEvent = isVoidInvoiceEvent; /** * Validation method to narrow down union type to VoidRemainderEvent type case. * * This is Void Remainder Event case. */ function isVoidRemainderEvent(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, voidRemainderEvent_js_1.voidRemainderEventSchema); } InvoiceEvent.isVoidRemainderEvent = isVoidRemainderEvent; })(InvoiceEvent || (exports.InvoiceEvent = InvoiceEvent = {})); //# sourceMappingURL=invoiceEvent.js.map