@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.
74 lines • 3.12 kB
JavaScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { anyOf, isMappedValueValidForSchema, lazy, } from '../../schema.js';
import { paymentMethodApplePaySchema, } from '../paymentMethodApplePay.js';
import { paymentMethodBankAccountSchema, } from '../paymentMethodBankAccount.js';
import { paymentMethodCreditCardSchema, } from '../paymentMethodCreditCard.js';
import { paymentMethodExternalSchema, } from '../paymentMethodExternal.js';
import { paymentMethodPaypalSchema, } from '../paymentMethodPaypal.js';
const discriminatorMap = {
'apple_pay': paymentMethodApplePaySchema,
'bank_account': paymentMethodBankAccountSchema,
'credit_card': paymentMethodCreditCardSchema,
'external': paymentMethodExternalSchema,
'paypal_account': paymentMethodPaypalSchema,
};
export const invoiceEventPaymentSchema = lazy(() => anyOf([
paymentMethodApplePaySchema,
paymentMethodBankAccountSchema,
paymentMethodCreditCardSchema,
paymentMethodExternalSchema,
paymentMethodPaypalSchema,
], discriminatorMap, 'type'));
export 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 isMappedValueValidForSchema(value, 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 isMappedValueValidForSchema(value, 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 isMappedValueValidForSchema(value, 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 isMappedValueValidForSchema(value, 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 isMappedValueValidForSchema(value, paymentMethodPaypalSchema);
}
InvoiceEventPayment.isPaymentMethodPaypal = isPaymentMethodPaypal;
})(InvoiceEventPayment || (InvoiceEventPayment = {}));
//# sourceMappingURL=invoiceEventPayment.js.map