@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.
34 lines • 1.5 kB
JavaScript
;
/**
* AdvancedBilling
*
* This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
exports.__esModule = true;
exports.CustomerErrorResponseErrors = exports.customerErrorResponseErrorsSchema = void 0;
var schema_1 = require("../../schema");
var customerError_1 = require("../customerError");
exports.customerErrorResponseErrorsSchema = (0, schema_1.oneOf)([customerError_1.customerErrorSchema, (0, schema_1.array)((0, schema_1.string)())]);
var CustomerErrorResponseErrors;
(function (CustomerErrorResponseErrors) {
/**
* Validation method to narrow down union type to CustomerError type case.
*
* This is Customer Error case.
*/
function isCustomerError(value) {
var validationResult = (0, schema_1.validateAndMap)(value, customerError_1.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(function (item) { return typeof item === 'string'; }));
}
CustomerErrorResponseErrors.isArrayOfString = isArrayOfString;
})(CustomerErrorResponseErrors = exports.CustomerErrorResponseErrors || (exports.CustomerErrorResponseErrors = {}));
//# sourceMappingURL=customerErrorResponseErrors.js.map