UNPKG

wallee

Version:
45 lines (44 loc) 2.52 kB
import { PaymentTerminalAddressFromJSON, PaymentTerminalAddressToJSON, } from './PaymentTerminalAddress'; import { PaymentTerminalLocationVersionStateFromJSON, PaymentTerminalLocationVersionStateToJSON, } from './PaymentTerminalLocationVersionState'; import { PaymentTerminalLocationFromJSON, PaymentTerminalLocationToJSON, } from './PaymentTerminalLocation'; /** * Check if a given object implements the PaymentTerminalLocationVersion interface. */ export function instanceOfPaymentTerminalLocationVersion(value) { return true; } export function PaymentTerminalLocationVersionFromJSON(json) { return PaymentTerminalLocationVersionFromJSONTyped(json, false); } export function PaymentTerminalLocationVersionFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'address': json['address'] == null ? undefined : PaymentTerminalAddressFromJSON(json['address']), 'createdBy': json['createdBy'] == null ? undefined : json['createdBy'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'contactAddress': json['contactAddress'] == null ? undefined : PaymentTerminalAddressFromJSON(json['contactAddress']), 'location': json['location'] == null ? undefined : PaymentTerminalLocationFromJSON(json['location']), 'versionAppliedImmediately': json['versionAppliedImmediately'] == null ? undefined : json['versionAppliedImmediately'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : PaymentTerminalLocationVersionStateFromJSON(json['state']), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], }; } export function PaymentTerminalLocationVersionToJSON(json) { return PaymentTerminalLocationVersionToJSONTyped(json, false); } export function PaymentTerminalLocationVersionToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'address': PaymentTerminalAddressToJSON(value['address']), 'contactAddress': PaymentTerminalAddressToJSON(value['contactAddress']), 'location': PaymentTerminalLocationToJSON(value['location']), 'state': PaymentTerminalLocationVersionStateToJSON(value['state']), }; }