wallee
Version:
TypeScript/JavaScript client for wallee
39 lines (38 loc) • 1.58 kB
JavaScript
import { CustomerFromJSON, CustomerToJSON, } from './Customer';
/**
* Check if a given object implements the CustomerComment interface.
*/
export function instanceOfCustomerComment(value) {
return true;
}
export function CustomerCommentFromJSON(json) {
return CustomerCommentFromJSONTyped(json, false);
}
export function CustomerCommentFromJSONTyped(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'],
'customer': json['customer'] == null ? undefined : CustomerFromJSON(json['customer']),
};
}
export function CustomerCommentToJSON(json) {
return CustomerCommentToJSONTyped(json, false);
}
export function CustomerCommentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'customer': CustomerToJSON(value['customer']),
};
}