wallee
Version:
TypeScript/JavaScript client for wallee
46 lines (45 loc) • 2.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfTransactionComment = instanceOfTransactionComment;
exports.TransactionCommentFromJSON = TransactionCommentFromJSON;
exports.TransactionCommentFromJSONTyped = TransactionCommentFromJSONTyped;
exports.TransactionCommentToJSON = TransactionCommentToJSON;
exports.TransactionCommentToJSONTyped = TransactionCommentToJSONTyped;
const Transaction_1 = require("./Transaction");
/**
* Check if a given object implements the TransactionComment interface.
*/
function instanceOfTransactionComment(value) {
return true;
}
function TransactionCommentFromJSON(json) {
return TransactionCommentFromJSONTyped(json, false);
}
function TransactionCommentFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'pinned': json['pinned'] == null ? undefined : json['pinned'],
'editedBy': json['editedBy'] == null ? undefined : json['editedBy'],
'createdBy': json['createdBy'] == null ? undefined : json['createdBy'],
'id': json['id'] == null ? undefined : json['id'],
'editedOn': json['editedOn'] == null ? undefined : (new Date(json['editedOn'])),
'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])),
'version': json['version'] == null ? undefined : json['version'],
'content': json['content'] == null ? undefined : json['content'],
'transaction': json['transaction'] == null ? undefined : (0, Transaction_1.TransactionFromJSON)(json['transaction']),
};
}
function TransactionCommentToJSON(json) {
return TransactionCommentToJSONTyped(json, false);
}
function TransactionCommentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'transaction': (0, Transaction_1.TransactionToJSON)(value['transaction']),
};
}