UNPKG

wallee

Version:
37 lines (36 loc) 1.52 kB
import { TransactionGroupStateFromJSON, TransactionGroupStateToJSON, } from './TransactionGroupState'; /** * Check if a given object implements the TransactionGroup interface. */ export function instanceOfTransactionGroup(value) { return true; } export function TransactionGroupFromJSON(json) { return TransactionGroupFromJSONTyped(json, false); } export 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 : TransactionGroupStateFromJSON(json['state']), 'version': json['version'] == null ? undefined : json['version'], }; } export function TransactionGroupToJSON(json) { return TransactionGroupToJSONTyped(json, false); } export function TransactionGroupToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': TransactionGroupStateToJSON(value['state']), }; }