UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

59 lines (58 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.instanceOfFilterOption = instanceOfFilterOption; exports.FilterOptionFromJSON = FilterOptionFromJSON; exports.FilterOptionFromJSONTyped = FilterOptionFromJSONTyped; exports.FilterOptionToJSON = FilterOptionToJSON; exports.FilterOptionToJSONTyped = FilterOptionToJSONTyped; const EnumOptions_1 = require("./EnumOptions"); const FilterTypeEnum_1 = require("./FilterTypeEnum"); /** * Check if a given object implements the FilterOption interface. */ function instanceOfFilterOption(value) { if (!('name' in value) || value['name'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } function FilterOptionFromJSON(json) { return FilterOptionFromJSONTyped(json, false); } function FilterOptionFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'metadata': json['metadata'] == null ? undefined : (0, EnumOptions_1.EnumOptionsFromJSON)(json['metadata']), 'name': json['name'], 'type': (0, FilterTypeEnum_1.FilterTypeEnumFromJSON)(json['type']), }; } function FilterOptionToJSON(json) { return FilterOptionToJSONTyped(json, false); } function FilterOptionToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'metadata': (0, EnumOptions_1.EnumOptionsToJSON)(value['metadata']), 'name': value['name'], 'type': (0, FilterTypeEnum_1.FilterTypeEnumToJSON)(value['type']), }; }