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.

231 lines 11.3 kB
"use strict"; /** * AdvancedBilling * * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ exports.__esModule = true; exports.EventEventSpecificData = exports.eventEventSpecificDataSchema = void 0; var schema_1 = require("../../schema"); var componentAllocationChange_1 = require("../componentAllocationChange"); var creditAccountBalanceChanged_1 = require("../creditAccountBalanceChanged"); var customFieldValueChange_1 = require("../customFieldValueChange"); var dunningStepReached_1 = require("../dunningStepReached"); var invoiceIssued_1 = require("../invoiceIssued"); var itemPricePointChanged_1 = require("../itemPricePointChanged"); var meteredUsage_1 = require("../meteredUsage"); var paymentCollectionMethodChanged_1 = require("../paymentCollectionMethodChanged"); var paymentRelatedEvents_1 = require("../paymentRelatedEvents"); var pendingCancellationChange_1 = require("../pendingCancellationChange"); var prepaidSubscriptionBalanceChanged_1 = require("../prepaidSubscriptionBalanceChanged"); var prepaidUsage_1 = require("../prepaidUsage"); var prepaymentAccountBalanceChanged_1 = require("../prepaymentAccountBalanceChanged"); var proformaInvoiceIssued_1 = require("../proformaInvoiceIssued"); var refundSuccess_1 = require("../refundSuccess"); var subscriptionGroupSignupEventData_1 = require("../subscriptionGroupSignupEventData"); var subscriptionProductChange_1 = require("../subscriptionProductChange"); var subscriptionStateChange_1 = require("../subscriptionStateChange"); exports.eventEventSpecificDataSchema = (0, schema_1.oneOf)([ subscriptionProductChange_1.subscriptionProductChangeSchema, subscriptionStateChange_1.subscriptionStateChangeSchema, paymentRelatedEvents_1.paymentRelatedEventsSchema, refundSuccess_1.refundSuccessSchema, componentAllocationChange_1.componentAllocationChangeSchema, meteredUsage_1.meteredUsageSchema, prepaidUsage_1.prepaidUsageSchema, dunningStepReached_1.dunningStepReachedSchema, invoiceIssued_1.invoiceIssuedSchema, pendingCancellationChange_1.pendingCancellationChangeSchema, prepaidSubscriptionBalanceChanged_1.prepaidSubscriptionBalanceChangedSchema, proformaInvoiceIssued_1.proformaInvoiceIssuedSchema, subscriptionGroupSignupEventData_1.subscriptionGroupSignupEventDataSchema, creditAccountBalanceChanged_1.creditAccountBalanceChangedSchema, prepaymentAccountBalanceChanged_1.prepaymentAccountBalanceChangedSchema, paymentCollectionMethodChanged_1.paymentCollectionMethodChangedSchema, itemPricePointChanged_1.itemPricePointChangedSchema, customFieldValueChange_1.customFieldValueChangeSchema, ]); var EventEventSpecificData; (function (EventEventSpecificData) { /** * Validation method to narrow down union type to SubscriptionProductChange type case. * * This is Subscription Product Change case. */ function isSubscriptionProductChange(value) { var validationResult = (0, schema_1.validateAndMap)(value, subscriptionProductChange_1.subscriptionProductChangeSchema); return validationResult.errors === false; } EventEventSpecificData.isSubscriptionProductChange = isSubscriptionProductChange; /** * Validation method to narrow down union type to SubscriptionStateChange type case. * * This is Subscription State Change case. */ function isSubscriptionStateChange(value) { var validationResult = (0, schema_1.validateAndMap)(value, subscriptionStateChange_1.subscriptionStateChangeSchema); return validationResult.errors === false; } EventEventSpecificData.isSubscriptionStateChange = isSubscriptionStateChange; /** * Validation method to narrow down union type to PaymentRelatedEvents type case. * * This is Payment Related Events case. */ function isPaymentRelatedEvents(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentRelatedEvents_1.paymentRelatedEventsSchema); return validationResult.errors === false; } EventEventSpecificData.isPaymentRelatedEvents = isPaymentRelatedEvents; /** * Validation method to narrow down union type to RefundSuccess type case. * * This is Refund Success case. */ function isRefundSuccess(value) { var validationResult = (0, schema_1.validateAndMap)(value, refundSuccess_1.refundSuccessSchema); return validationResult.errors === false; } EventEventSpecificData.isRefundSuccess = isRefundSuccess; /** * Validation method to narrow down union type to ComponentAllocationChange type case. * * This is Component Allocation Change case. */ function isComponentAllocationChange(value) { var validationResult = (0, schema_1.validateAndMap)(value, componentAllocationChange_1.componentAllocationChangeSchema); return validationResult.errors === false; } EventEventSpecificData.isComponentAllocationChange = isComponentAllocationChange; /** * Validation method to narrow down union type to MeteredUsage type case. * * This is Metered Usage case. */ function isMeteredUsage(value) { var validationResult = (0, schema_1.validateAndMap)(value, meteredUsage_1.meteredUsageSchema); return validationResult.errors === false; } EventEventSpecificData.isMeteredUsage = isMeteredUsage; /** * Validation method to narrow down union type to PrepaidUsage type case. * * This is Prepaid Usage case. */ function isPrepaidUsage(value) { var validationResult = (0, schema_1.validateAndMap)(value, prepaidUsage_1.prepaidUsageSchema); return validationResult.errors === false; } EventEventSpecificData.isPrepaidUsage = isPrepaidUsage; /** * Validation method to narrow down union type to DunningStepReached type case. * * This is Dunning Step Reached case. */ function isDunningStepReached(value) { var validationResult = (0, schema_1.validateAndMap)(value, dunningStepReached_1.dunningStepReachedSchema); return validationResult.errors === false; } EventEventSpecificData.isDunningStepReached = isDunningStepReached; /** * Validation method to narrow down union type to InvoiceIssued type case. * * This is Invoice Issued case. */ function isInvoiceIssued(value) { var validationResult = (0, schema_1.validateAndMap)(value, invoiceIssued_1.invoiceIssuedSchema); return validationResult.errors === false; } EventEventSpecificData.isInvoiceIssued = isInvoiceIssued; /** * Validation method to narrow down union type to PendingCancellationChange type case. * * This is Pending Cancellation Change case. */ function isPendingCancellationChange(value) { var validationResult = (0, schema_1.validateAndMap)(value, pendingCancellationChange_1.pendingCancellationChangeSchema); return validationResult.errors === false; } EventEventSpecificData.isPendingCancellationChange = isPendingCancellationChange; /** * Validation method to narrow down union type to PrepaidSubscriptionBalanceChanged type case. * * This is Prepaid Subscription Balance Changed case. */ function isPrepaidSubscriptionBalanceChanged(value) { var validationResult = (0, schema_1.validateAndMap)(value, prepaidSubscriptionBalanceChanged_1.prepaidSubscriptionBalanceChangedSchema); return validationResult.errors === false; } EventEventSpecificData.isPrepaidSubscriptionBalanceChanged = isPrepaidSubscriptionBalanceChanged; /** * Validation method to narrow down union type to ProformaInvoiceIssued type case. * * This is Proforma Invoice Issued case. */ function isProformaInvoiceIssued(value) { var validationResult = (0, schema_1.validateAndMap)(value, proformaInvoiceIssued_1.proformaInvoiceIssuedSchema); return validationResult.errors === false; } EventEventSpecificData.isProformaInvoiceIssued = isProformaInvoiceIssued; /** * Validation method to narrow down union type to SubscriptionGroupSignupEventData type case. * * This is Subscription Group Signup Event Data case. */ function isSubscriptionGroupSignupEventData(value) { var validationResult = (0, schema_1.validateAndMap)(value, subscriptionGroupSignupEventData_1.subscriptionGroupSignupEventDataSchema); return validationResult.errors === false; } EventEventSpecificData.isSubscriptionGroupSignupEventData = isSubscriptionGroupSignupEventData; /** * Validation method to narrow down union type to CreditAccountBalanceChanged type case. * * This is Credit Account Balance Changed case. */ function isCreditAccountBalanceChanged(value) { var validationResult = (0, schema_1.validateAndMap)(value, creditAccountBalanceChanged_1.creditAccountBalanceChangedSchema); return validationResult.errors === false; } EventEventSpecificData.isCreditAccountBalanceChanged = isCreditAccountBalanceChanged; /** * Validation method to narrow down union type to PrepaymentAccountBalanceChanged type case. * * This is Prepayment Account Balance Changed case. */ function isPrepaymentAccountBalanceChanged(value) { var validationResult = (0, schema_1.validateAndMap)(value, prepaymentAccountBalanceChanged_1.prepaymentAccountBalanceChangedSchema); return validationResult.errors === false; } EventEventSpecificData.isPrepaymentAccountBalanceChanged = isPrepaymentAccountBalanceChanged; /** * Validation method to narrow down union type to PaymentCollectionMethodChanged type case. * * This is Payment Collection Method Changed case. */ function isPaymentCollectionMethodChanged(value) { var validationResult = (0, schema_1.validateAndMap)(value, paymentCollectionMethodChanged_1.paymentCollectionMethodChangedSchema); return validationResult.errors === false; } EventEventSpecificData.isPaymentCollectionMethodChanged = isPaymentCollectionMethodChanged; /** * Validation method to narrow down union type to ItemPricePointChanged type case. * * This is Item Price Point Changed case. */ function isItemPricePointChanged(value) { var validationResult = (0, schema_1.validateAndMap)(value, itemPricePointChanged_1.itemPricePointChangedSchema); return validationResult.errors === false; } EventEventSpecificData.isItemPricePointChanged = isItemPricePointChanged; /** * Validation method to narrow down union type to CustomFieldValueChange type case. * * This is Custom Field Value Change case. */ function isCustomFieldValueChange(value) { var validationResult = (0, schema_1.validateAndMap)(value, customFieldValueChange_1.customFieldValueChangeSchema); return validationResult.errors === false; } EventEventSpecificData.isCustomFieldValueChange = isCustomFieldValueChange; })(EventEventSpecificData = exports.EventEventSpecificData || (exports.EventEventSpecificData = {})); //# sourceMappingURL=eventEventSpecificData.js.map