@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.
228 lines • 10.1 kB
JavaScript
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import { oneOf, validateAndMap } from '../../schema';
import { componentAllocationChangeSchema, } from '../componentAllocationChange';
import { creditAccountBalanceChangedSchema, } from '../creditAccountBalanceChanged';
import { customFieldValueChangeSchema, } from '../customFieldValueChange';
import { dunningStepReachedSchema, } from '../dunningStepReached';
import { invoiceIssuedSchema } from '../invoiceIssued';
import { itemPricePointChangedSchema, } from '../itemPricePointChanged';
import { meteredUsageSchema } from '../meteredUsage';
import { paymentCollectionMethodChangedSchema, } from '../paymentCollectionMethodChanged';
import { paymentRelatedEventsSchema, } from '../paymentRelatedEvents';
import { pendingCancellationChangeSchema, } from '../pendingCancellationChange';
import { prepaidSubscriptionBalanceChangedSchema, } from '../prepaidSubscriptionBalanceChanged';
import { prepaidUsageSchema } from '../prepaidUsage';
import { prepaymentAccountBalanceChangedSchema, } from '../prepaymentAccountBalanceChanged';
import { proformaInvoiceIssuedSchema, } from '../proformaInvoiceIssued';
import { refundSuccessSchema } from '../refundSuccess';
import { subscriptionGroupSignupEventDataSchema, } from '../subscriptionGroupSignupEventData';
import { subscriptionProductChangeSchema, } from '../subscriptionProductChange';
import { subscriptionStateChangeSchema, } from '../subscriptionStateChange';
export const eventEventSpecificDataSchema = oneOf([
subscriptionProductChangeSchema,
subscriptionStateChangeSchema,
paymentRelatedEventsSchema,
refundSuccessSchema,
componentAllocationChangeSchema,
meteredUsageSchema,
prepaidUsageSchema,
dunningStepReachedSchema,
invoiceIssuedSchema,
pendingCancellationChangeSchema,
prepaidSubscriptionBalanceChangedSchema,
proformaInvoiceIssuedSchema,
subscriptionGroupSignupEventDataSchema,
creditAccountBalanceChangedSchema,
prepaymentAccountBalanceChangedSchema,
paymentCollectionMethodChangedSchema,
itemPricePointChangedSchema,
customFieldValueChangeSchema,
]);
export var EventEventSpecificData;
(function (EventEventSpecificData) {
/**
* Validation method to narrow down union type to SubscriptionProductChange type case.
*
* This is Subscription Product Change case.
*/
function isSubscriptionProductChange(value) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, 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) {
const validationResult = validateAndMap(value, customFieldValueChangeSchema);
return validationResult.errors === false;
}
EventEventSpecificData.isCustomFieldValueChange = isCustomFieldValueChange;
})(EventEventSpecificData || (EventEventSpecificData = {}));
//# sourceMappingURL=eventEventSpecificData.js.map