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
47 lines (46 loc) • 1.48 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.UserToJSONTyped = exports.UserToJSON = exports.UserFromJSONTyped = exports.UserFromJSON = exports.instanceOfUser = void 0;
/**
* Check if a given object implements the User interface.
*/
function instanceOfUser(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
return true;
}
exports.instanceOfUser = instanceOfUser;
function UserFromJSON(json) {
return UserFromJSONTyped(json, false);
}
exports.UserFromJSON = UserFromJSON;
function UserFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
};
}
exports.UserFromJSONTyped = UserFromJSONTyped;
function UserToJSON(json) {
return UserToJSONTyped(json, false);
}
exports.UserToJSON = UserToJSON;
function UserToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
};
}
exports.UserToJSONTyped = UserToJSONTyped;