UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

60 lines (59 loc) 1.95 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * OpenPay API * super charge your subscription management. * * The version of the OpenAPI document: 1.2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfValidationError = instanceOfValidationError; exports.ValidationErrorFromJSON = ValidationErrorFromJSON; exports.ValidationErrorFromJSONTyped = ValidationErrorFromJSONTyped; exports.ValidationErrorToJSON = ValidationErrorToJSON; exports.ValidationErrorToJSONTyped = ValidationErrorToJSONTyped; const ValidationErrorLocInner_1 = require("./ValidationErrorLocInner"); /** * Check if a given object implements the ValidationError interface. */ function instanceOfValidationError(value) { if (!('loc' in value) || value['loc'] === undefined) return false; if (!('msg' in value) || value['msg'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } function ValidationErrorFromJSON(json) { return ValidationErrorFromJSONTyped(json, false); } function ValidationErrorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'loc': (json['loc'].map(ValidationErrorLocInner_1.ValidationErrorLocInnerFromJSON)), 'msg': json['msg'], 'type': json['type'], }; } function ValidationErrorToJSON(json) { return ValidationErrorToJSONTyped(json, false); } function ValidationErrorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'loc': (value['loc'].map(ValidationErrorLocInner_1.ValidationErrorLocInnerToJSON)), 'msg': value['msg'], 'type': value['type'], }; }