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.

82 lines 3.88 kB
"use strict"; /** * AdvancedBilling * * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ exports.__esModule = true; exports.InvoiceEventPayment = exports.invoiceEventPaymentSchema = void 0; var schema_1 = require("../../schema"); var paymentMethodApplePay_1 = require("../paymentMethodApplePay"); var paymentMethodBankAccount_1 = require("../paymentMethodBankAccount"); var paymentMethodCreditCard_1 = require("../paymentMethodCreditCard"); var paymentMethodExternal_1 = require("../paymentMethodExternal"); var paymentMethodPaypal_1 = require("../paymentMethodPaypal"); var discriminatorMap = { 'apple_pay': paymentMethodApplePay_1.paymentMethodApplePaySchema, 'bank_account': paymentMethodBankAccount_1.paymentMethodBankAccountSchema, 'credit_card': paymentMethodCreditCard_1.paymentMethodCreditCardSchema, 'external': paymentMethodExternal_1.paymentMethodExternalSchema, 'paypal_account': paymentMethodPaypal_1.paymentMethodPaypalSchema }; exports.invoiceEventPaymentSchema = (0, schema_1.anyOf)([ paymentMethodApplePay_1.paymentMethodApplePaySchema, paymentMethodBankAccount_1.paymentMethodBankAccountSchema, paymentMethodCreditCard_1.paymentMethodCreditCardSchema, paymentMethodExternal_1.paymentMethodExternalSchema, paymentMethodPaypal_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) { var validationResult = (0, schema_1.validateAndMap)(value, paymentMethodApplePay_1.paymentMethodApplePaySchema); return validationResult.errors === false; } InvoiceEventPayment.isPaymentMethodApplePay = isPaymentMethodApplePay; /** * Validation method to narrow down union type to PaymentMethodBankAccount type case. * * This is Payment Method Bank Account case. */ function isPaymentMethodBankAccount(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentMethodBankAccount_1.paymentMethodBankAccountSchema); return validationResult.errors === false; } InvoiceEventPayment.isPaymentMethodBankAccount = isPaymentMethodBankAccount; /** * Validation method to narrow down union type to PaymentMethodCreditCard type case. * * This is Payment Method Credit Card case. */ function isPaymentMethodCreditCard(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentMethodCreditCard_1.paymentMethodCreditCardSchema); return validationResult.errors === false; } InvoiceEventPayment.isPaymentMethodCreditCard = isPaymentMethodCreditCard; /** * Validation method to narrow down union type to PaymentMethodExternal type case. * * This is Payment Method External case. */ function isPaymentMethodExternal(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentMethodExternal_1.paymentMethodExternalSchema); return validationResult.errors === false; } InvoiceEventPayment.isPaymentMethodExternal = isPaymentMethodExternal; /** * Validation method to narrow down union type to PaymentMethodPaypal type case. * * This is Payment Method Paypal case. */ function isPaymentMethodPaypal(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentMethodPaypal_1.paymentMethodPaypalSchema); return validationResult.errors === false; } InvoiceEventPayment.isPaymentMethodPaypal = isPaymentMethodPaypal; })(InvoiceEventPayment = exports.InvoiceEventPayment || (exports.InvoiceEventPayment = {})); //# sourceMappingURL=invoiceEventPayment.js.map