UNPKG

ynab

Version:

Official JavaScript client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.85.0

46 lines (45 loc) 1.74 kB
/* tslint:disable */ /* eslint-disable */ /** * YNAB API Endpoints * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com * * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ import { CurrencyFormatFromJSON, CurrencyFormatToJSON, } from './CurrencyFormat'; import { DateFormatFromJSON, DateFormatToJSON, } from './DateFormat'; /** * Check if a given object implements the PlanSettings interface. */ export function instanceOfPlanSettings(value) { if (!('date_format' in value) || value['date_format'] === undefined) return false; if (!('currency_format' in value) || value['currency_format'] === undefined) return false; return true; } export function PlanSettingsFromJSON(json) { return PlanSettingsFromJSONTyped(json, false); } export function PlanSettingsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'date_format': DateFormatFromJSON(json['date_format']), 'currency_format': CurrencyFormatFromJSON(json['currency_format']), }; } export function PlanSettingsToJSON(json) { return PlanSettingsToJSONTyped(json, false); } export function PlanSettingsToJSONTyped(value, ignoreDiscriminator) { if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; } if (value == null) { return value; } return { 'date_format': DateFormatToJSON(value['date_format']), 'currency_format': CurrencyFormatToJSON(value['currency_format']), }; }