UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

60 lines (59 loc) 1.89 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.instanceOfTaxIdType = instanceOfTaxIdType; exports.TaxIdTypeFromJSON = TaxIdTypeFromJSON; exports.TaxIdTypeFromJSONTyped = TaxIdTypeFromJSONTyped; exports.TaxIdTypeToJSON = TaxIdTypeToJSON; exports.TaxIdTypeToJSONTyped = TaxIdTypeToJSONTyped; const TaxIdTypeEnum_1 = require("./TaxIdTypeEnum"); /** * Check if a given object implements the TaxIdType interface. */ function instanceOfTaxIdType(value) { if (!('description' in value) || value['description'] === undefined) return false; if (!('example' in value) || value['example'] === undefined) return false; if (!('taxIdType' in value) || value['taxIdType'] === undefined) return false; return true; } function TaxIdTypeFromJSON(json) { return TaxIdTypeFromJSONTyped(json, false); } function TaxIdTypeFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'description': json['description'], 'example': json['example'], 'taxIdType': (0, TaxIdTypeEnum_1.TaxIdTypeEnumFromJSON)(json['tax_id_type']), }; } function TaxIdTypeToJSON(json) { return TaxIdTypeToJSONTyped(json, false); } function TaxIdTypeToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'description': value['description'], 'example': value['example'], 'tax_id_type': (0, TaxIdTypeEnum_1.TaxIdTypeEnumToJSON)(value['taxIdType']), }; }