wallee
Version:
TypeScript/JavaScript client for wallee
44 lines (43 loc) • 1.91 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfTransactionGroup = instanceOfTransactionGroup;
exports.TransactionGroupFromJSON = TransactionGroupFromJSON;
exports.TransactionGroupFromJSONTyped = TransactionGroupFromJSONTyped;
exports.TransactionGroupToJSON = TransactionGroupToJSON;
exports.TransactionGroupToJSONTyped = TransactionGroupToJSONTyped;
const TransactionGroupState_1 = require("./TransactionGroupState");
/**
* Check if a given object implements the TransactionGroup interface.
*/
function instanceOfTransactionGroup(value) {
return true;
}
function TransactionGroupFromJSON(json) {
return TransactionGroupFromJSONTyped(json, false);
}
function TransactionGroupFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'beginDate': json['beginDate'] == null ? undefined : (new Date(json['beginDate'])),
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
'customerId': json['customerId'] == null ? undefined : json['customerId'],
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, TransactionGroupState_1.TransactionGroupStateFromJSON)(json['state']),
'version': json['version'] == null ? undefined : json['version'],
};
}
function TransactionGroupToJSON(json) {
return TransactionGroupToJSONTyped(json, false);
}
function TransactionGroupToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': (0, TransactionGroupState_1.TransactionGroupStateToJSON)(value['state']),
};
}