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.

79 lines 3.82 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.InvoiceEventPayment = exports.invoiceEventPaymentSchema = void 0; var schema_js_1 = require("../../schema.js"); var paymentMethodApplePay_js_1 = require("../paymentMethodApplePay.js"); var paymentMethodBankAccount_js_1 = require("../paymentMethodBankAccount.js"); var paymentMethodCreditCard_js_1 = require("../paymentMethodCreditCard.js"); var paymentMethodExternal_js_1 = require("../paymentMethodExternal.js"); var paymentMethodPaypal_js_1 = require("../paymentMethodPaypal.js"); var discriminatorMap = { 'apple_pay': paymentMethodApplePay_js_1.paymentMethodApplePaySchema, 'bank_account': paymentMethodBankAccount_js_1.paymentMethodBankAccountSchema, 'credit_card': paymentMethodCreditCard_js_1.paymentMethodCreditCardSchema, 'external': paymentMethodExternal_js_1.paymentMethodExternalSchema, 'paypal_account': paymentMethodPaypal_js_1.paymentMethodPaypalSchema, }; exports.invoiceEventPaymentSchema = (0, schema_js_1.lazy)(function () { return (0, schema_js_1.anyOf)([ paymentMethodApplePay_js_1.paymentMethodApplePaySchema, paymentMethodBankAccount_js_1.paymentMethodBankAccountSchema, paymentMethodCreditCard_js_1.paymentMethodCreditCardSchema, paymentMethodExternal_js_1.paymentMethodExternalSchema, paymentMethodPaypal_js_1.paymentMethodPaypalSchema, ], discriminatorMap, 'type'); }); var InvoiceEventPayment; (function (InvoiceEventPayment) { /** * Validation method to narrow down union type to PaymentMethodApplePay type case. * * This is Payment Method Apple Pay case. */ function isPaymentMethodApplePay(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paymentMethodApplePay_js_1.paymentMethodApplePaySchema); } InvoiceEventPayment.isPaymentMethodApplePay = isPaymentMethodApplePay; /** * Validation method to narrow down union type to PaymentMethodBankAccount type case. * * This is Payment Method Bank Account case. */ function isPaymentMethodBankAccount(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paymentMethodBankAccount_js_1.paymentMethodBankAccountSchema); } InvoiceEventPayment.isPaymentMethodBankAccount = isPaymentMethodBankAccount; /** * Validation method to narrow down union type to PaymentMethodCreditCard type case. * * This is Payment Method Credit Card case. */ function isPaymentMethodCreditCard(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paymentMethodCreditCard_js_1.paymentMethodCreditCardSchema); } InvoiceEventPayment.isPaymentMethodCreditCard = isPaymentMethodCreditCard; /** * Validation method to narrow down union type to PaymentMethodExternal type case. * * This is Payment Method External case. */ function isPaymentMethodExternal(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paymentMethodExternal_js_1.paymentMethodExternalSchema); } InvoiceEventPayment.isPaymentMethodExternal = isPaymentMethodExternal; /** * Validation method to narrow down union type to PaymentMethodPaypal type case. * * This is Payment Method Paypal case. */ function isPaymentMethodPaypal(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paymentMethodPaypal_js_1.paymentMethodPaypalSchema); } InvoiceEventPayment.isPaymentMethodPaypal = isPaymentMethodPaypal; })(InvoiceEventPayment || (exports.InvoiceEventPayment = InvoiceEventPayment = {})); //# sourceMappingURL=invoiceEventPayment.js.map