@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.
33 lines • 1.46 kB
JavaScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { anyOf, validateAndMap } from '../../schema';
import { refundConsolidatedInvoiceSchema, } from '../refundConsolidatedInvoice';
import { refundInvoiceSchema } from '../refundInvoice';
export const refundInvoiceRequestRefundSchema = anyOf([refundInvoiceSchema, refundConsolidatedInvoiceSchema]);
export var RefundInvoiceRequestRefund;
(function (RefundInvoiceRequestRefund) {
/**
* Validation method to narrow down union type to RefundInvoice type case.
*
* This is Refund Invoice case.
*/
function isRefundInvoice(value) {
const validationResult = validateAndMap(value, refundInvoiceSchema);
return validationResult.errors === false;
}
RefundInvoiceRequestRefund.isRefundInvoice = isRefundInvoice;
/**
* Validation method to narrow down union type to RefundConsolidatedInvoice type case.
*
* This is Refund Consolidated Invoice case.
*/
function isRefundConsolidatedInvoice(value) {
const validationResult = validateAndMap(value, refundConsolidatedInvoiceSchema);
return validationResult.errors === false;
}
RefundInvoiceRequestRefund.isRefundConsolidatedInvoice = isRefundConsolidatedInvoice;
})(RefundInvoiceRequestRefund || (RefundInvoiceRequestRefund = {}));
//# sourceMappingURL=refundInvoiceRequestRefund.js.map