wallee
Version:
TypeScript/JavaScript client for wallee
39 lines (38 loc) • 1.63 kB
JavaScript
import { TransactionFromJSON, TransactionToJSON, } from './Transaction';
/**
* Check if a given object implements the TransactionComment interface.
*/
export function instanceOfTransactionComment(value) {
return true;
}
export function TransactionCommentFromJSON(json) {
return TransactionCommentFromJSONTyped(json, false);
}
export 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 : TransactionFromJSON(json['transaction']),
};
}
export function TransactionCommentToJSON(json) {
return TransactionCommentToJSONTyped(json, false);
}
export function TransactionCommentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'transaction': TransactionToJSON(value['transaction']),
};
}