UNPKG

ynab

Version:

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

71 lines (70 loc) 2.77 kB
"use strict"; /* 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) */ Object.defineProperty(exports, "__esModule", { value: true }); exports.MonthSummaryToJSONTyped = exports.MonthSummaryToJSON = exports.MonthSummaryFromJSONTyped = exports.MonthSummaryFromJSON = exports.instanceOfMonthSummary = void 0; /** * Check if a given object implements the MonthSummary interface. */ function instanceOfMonthSummary(value) { if (!('month' in value) || value['month'] === undefined) return false; if (!('income' in value) || value['income'] === undefined) return false; if (!('budgeted' in value) || value['budgeted'] === undefined) return false; if (!('activity' in value) || value['activity'] === undefined) return false; if (!('to_be_budgeted' in value) || value['to_be_budgeted'] === undefined) return false; if (!('deleted' in value) || value['deleted'] === undefined) return false; return true; } exports.instanceOfMonthSummary = instanceOfMonthSummary; function MonthSummaryFromJSON(json) { return MonthSummaryFromJSONTyped(json, false); } exports.MonthSummaryFromJSON = MonthSummaryFromJSON; function MonthSummaryFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'month': json['month'], 'note': json['note'] == null ? undefined : json['note'], 'income': json['income'], 'budgeted': json['budgeted'], 'activity': json['activity'], 'to_be_budgeted': json['to_be_budgeted'], 'age_of_money': json['age_of_money'] == null ? undefined : json['age_of_money'], 'deleted': json['deleted'], }; } exports.MonthSummaryFromJSONTyped = MonthSummaryFromJSONTyped; function MonthSummaryToJSON(json) { return MonthSummaryToJSONTyped(json, false); } exports.MonthSummaryToJSON = MonthSummaryToJSON; function MonthSummaryToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'month': value['month'], 'note': value['note'], 'income': value['income'], 'budgeted': value['budgeted'], 'activity': value['activity'], 'to_be_budgeted': value['to_be_budgeted'], 'age_of_money': value['age_of_money'], 'deleted': value['deleted'], }; } exports.MonthSummaryToJSONTyped = MonthSummaryToJSONTyped;