UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

57 lines (56 loc) 1.98 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.instanceOfCurrencyFilter = instanceOfCurrencyFilter; exports.CurrencyFilterFromJSON = CurrencyFilterFromJSON; exports.CurrencyFilterFromJSONTyped = CurrencyFilterFromJSONTyped; exports.CurrencyFilterToJSON = CurrencyFilterToJSON; exports.CurrencyFilterToJSONTyped = CurrencyFilterToJSONTyped; const CurrencyFilterType_1 = require("./CurrencyFilterType"); const CurrencyEnum_1 = require("./CurrencyEnum"); /** * Check if a given object implements the CurrencyFilter interface. */ function instanceOfCurrencyFilter(value) { if (!('currencies' in value) || value['currencies'] === undefined) return false; if (!('filterType' in value) || value['filterType'] === undefined) return false; return true; } function CurrencyFilterFromJSON(json) { return CurrencyFilterFromJSONTyped(json, false); } function CurrencyFilterFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'currencies': (json['currencies'].map(CurrencyEnum_1.CurrencyEnumFromJSON)), 'filterType': (0, CurrencyFilterType_1.CurrencyFilterTypeFromJSON)(json['filter_type']), }; } function CurrencyFilterToJSON(json) { return CurrencyFilterToJSONTyped(json, false); } function CurrencyFilterToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'currencies': (value['currencies'].map(CurrencyEnum_1.CurrencyEnumToJSON)), 'filter_type': (0, CurrencyFilterType_1.CurrencyFilterTypeToJSON)(value['filterType']), }; }