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.

31 lines 1.27 kB
/** * AdvancedBilling * * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, oneOf, string, validateAndMap } from '../../schema'; import { customerErrorSchema } from '../customerError'; export const customerErrorResponseErrorsSchema = oneOf([customerErrorSchema, array(string())]); export var CustomerErrorResponseErrors; (function (CustomerErrorResponseErrors) { /** * Validation method to narrow down union type to CustomerError type case. * * This is Customer Error case. */ function isCustomerError(value) { const validationResult = validateAndMap(value, customerErrorSchema); return validationResult.errors === false; } CustomerErrorResponseErrors.isCustomerError = isCustomerError; /** * Validation method to narrow down union type to string[] type case. * * This is Array of String case. */ function isArrayOfString(value) { return (Array.isArray(value) && value.every((item) => typeof item === 'string')); } CustomerErrorResponseErrors.isArrayOfString = isArrayOfString; })(CustomerErrorResponseErrors || (CustomerErrorResponseErrors = {})); //# sourceMappingURL=customerErrorResponseErrors.js.map