UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

76 lines (75 loc) 2.54 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.StringConfigFieldTypeEnum = void 0; exports.instanceOfStringConfigField = instanceOfStringConfigField; exports.StringConfigFieldFromJSON = StringConfigFieldFromJSON; exports.StringConfigFieldFromJSONTyped = StringConfigFieldFromJSONTyped; exports.StringConfigFieldToJSON = StringConfigFieldToJSON; exports.StringConfigFieldToJSONTyped = StringConfigFieldToJSONTyped; /** * @export */ exports.StringConfigFieldTypeEnum = { String: 'string' }; /** * Check if a given object implements the StringConfigField interface. */ function instanceOfStringConfigField(value) { if (!('key' in value) || value['key'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('value' in value) || value['value'] === undefined) return false; return true; } function StringConfigFieldFromJSON(json) { return StringConfigFieldFromJSONTyped(json, false); } function StringConfigFieldFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'defaultValue': json['default_value'] == null ? undefined : json['default_value'], 'description': json['description'] == null ? undefined : json['description'], 'key': json['key'], 'maxLength': json['max_length'] == null ? undefined : json['max_length'], 'minLength': json['min_length'] == null ? undefined : json['min_length'], 'name': json['name'], 'type': json['type'] == null ? undefined : json['type'], 'value': json['value'], }; } function StringConfigFieldToJSON(json) { return StringConfigFieldToJSONTyped(json, false); } function StringConfigFieldToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'default_value': value['defaultValue'], 'description': value['description'], 'key': value['key'], 'max_length': value['maxLength'], 'min_length': value['minLength'], 'name': value['name'], 'type': value['type'], 'value': value['value'], }; }