UNPKG

wallee

Version:
49 lines (48 loc) 2.79 kB
import { PaymentTerminalTypeFromJSON, PaymentTerminalTypeToJSON, } from './PaymentTerminalType'; import { PaymentTerminalLocationVersionFromJSON, PaymentTerminalLocationVersionToJSON, } from './PaymentTerminalLocationVersion'; import { PaymentTerminalConfigurationVersionFromJSON, PaymentTerminalConfigurationVersionToJSON, } from './PaymentTerminalConfigurationVersion'; import { PaymentTerminalStateFromJSON, PaymentTerminalStateToJSON, } from './PaymentTerminalState'; /** * Check if a given object implements the PaymentTerminal interface. */ export function instanceOfPaymentTerminal(value) { return true; } export function PaymentTerminalFromJSON(json) { return PaymentTerminalFromJSONTyped(json, false); } export function PaymentTerminalFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'identifier': json['identifier'] == null ? undefined : json['identifier'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'type': json['type'] == null ? undefined : PaymentTerminalTypeFromJSON(json['type']), 'deviceName': json['deviceName'] == null ? undefined : json['deviceName'], 'version': json['version'] == null ? undefined : json['version'], 'deviceSerialNumber': json['deviceSerialNumber'] == null ? undefined : json['deviceSerialNumber'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'configurationVersion': json['configurationVersion'] == null ? undefined : PaymentTerminalConfigurationVersionFromJSON(json['configurationVersion']), 'locationVersion': json['locationVersion'] == null ? undefined : PaymentTerminalLocationVersionFromJSON(json['locationVersion']), 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], 'name': json['name'] == null ? undefined : json['name'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : PaymentTerminalStateFromJSON(json['state']), }; } export function PaymentTerminalToJSON(json) { return PaymentTerminalToJSONTyped(json, false); } export function PaymentTerminalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'type': PaymentTerminalTypeToJSON(value['type']), 'configurationVersion': PaymentTerminalConfigurationVersionToJSON(value['configurationVersion']), 'locationVersion': PaymentTerminalLocationVersionToJSON(value['locationVersion']), 'state': PaymentTerminalStateToJSON(value['state']), }; }