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.

67 lines 3.2 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.PaymentProfile = exports.paymentProfileSchema = void 0; var schema_js_1 = require("../../schema.js"); var applePayPaymentProfile_js_1 = require("../applePayPaymentProfile.js"); var bankAccountPaymentProfile_js_1 = require("../bankAccountPaymentProfile.js"); var creditCardPaymentProfile_js_1 = require("../creditCardPaymentProfile.js"); var paypalPaymentProfile_js_1 = require("../paypalPaymentProfile.js"); var discriminatorMap = { 'apple_pay': applePayPaymentProfile_js_1.applePayPaymentProfileSchema, 'bank_account': bankAccountPaymentProfile_js_1.bankAccountPaymentProfileSchema, 'credit_card': creditCardPaymentProfile_js_1.creditCardPaymentProfileSchema, 'paypal_account': paypalPaymentProfile_js_1.paypalPaymentProfileSchema, }; exports.paymentProfileSchema = (0, schema_js_1.lazy)(function () { return (0, schema_js_1.anyOf)([ applePayPaymentProfile_js_1.applePayPaymentProfileSchema, bankAccountPaymentProfile_js_1.bankAccountPaymentProfileSchema, creditCardPaymentProfile_js_1.creditCardPaymentProfileSchema, paypalPaymentProfile_js_1.paypalPaymentProfileSchema, ], discriminatorMap, 'payment_type'); }); var PaymentProfile; (function (PaymentProfile) { /** * Validation method to narrow down union type to ApplePayPaymentProfile type case. * * This is ApplePay Payment Profile case. */ function isApplePayPaymentProfile(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, applePayPaymentProfile_js_1.applePayPaymentProfileSchema); } PaymentProfile.isApplePayPaymentProfile = isApplePayPaymentProfile; /** * Validation method to narrow down union type to BankAccountPaymentProfile type case. * * This is Bank Account Payment Profile case. */ function isBankAccountPaymentProfile(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, bankAccountPaymentProfile_js_1.bankAccountPaymentProfileSchema); } PaymentProfile.isBankAccountPaymentProfile = isBankAccountPaymentProfile; /** * Validation method to narrow down union type to CreditCardPaymentProfile type case. * * This is Credit Card Payment Profile case. */ function isCreditCardPaymentProfile(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, creditCardPaymentProfile_js_1.creditCardPaymentProfileSchema); } PaymentProfile.isCreditCardPaymentProfile = isCreditCardPaymentProfile; /** * Validation method to narrow down union type to PaypalPaymentProfile type case. * * This is Paypal Payment Profile case. */ function isPaypalPaymentProfile(value) { return (0, schema_js_1.isMappedValueValidForSchema)(value, paypalPaymentProfile_js_1.paypalPaymentProfileSchema); } PaymentProfile.isPaypalPaymentProfile = isPaypalPaymentProfile; })(PaymentProfile || (exports.PaymentProfile = PaymentProfile = {})); //# sourceMappingURL=paymentProfile.js.map