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
52 lines (51 loc) • 2.31 kB
JavaScript
;
/* 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.BudgetDetailResponseDataToJSONTyped = exports.BudgetDetailResponseDataToJSON = exports.BudgetDetailResponseDataFromJSONTyped = exports.BudgetDetailResponseDataFromJSON = exports.instanceOfBudgetDetailResponseData = void 0;
const BudgetDetail_1 = require("./BudgetDetail");
/**
* Check if a given object implements the BudgetDetailResponseData interface.
*/
function instanceOfBudgetDetailResponseData(value) {
if (!('budget' in value) || value['budget'] === undefined)
return false;
if (!('server_knowledge' in value) || value['server_knowledge'] === undefined)
return false;
return true;
}
exports.instanceOfBudgetDetailResponseData = instanceOfBudgetDetailResponseData;
function BudgetDetailResponseDataFromJSON(json) {
return BudgetDetailResponseDataFromJSONTyped(json, false);
}
exports.BudgetDetailResponseDataFromJSON = BudgetDetailResponseDataFromJSON;
function BudgetDetailResponseDataFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'budget': (0, BudgetDetail_1.BudgetDetailFromJSON)(json['budget']),
'server_knowledge': json['server_knowledge'],
};
}
exports.BudgetDetailResponseDataFromJSONTyped = BudgetDetailResponseDataFromJSONTyped;
function BudgetDetailResponseDataToJSON(json) {
return BudgetDetailResponseDataToJSONTyped(json, false);
}
exports.BudgetDetailResponseDataToJSON = BudgetDetailResponseDataToJSON;
function BudgetDetailResponseDataToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'budget': (0, BudgetDetail_1.BudgetDetailToJSON)(value['budget']),
'server_knowledge': value['server_knowledge'],
};
}
exports.BudgetDetailResponseDataToJSONTyped = BudgetDetailResponseDataToJSONTyped;