UNPKG

wallee

Version:
56 lines (55 loc) 3.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentTerminal = instanceOfPaymentTerminal; exports.PaymentTerminalFromJSON = PaymentTerminalFromJSON; exports.PaymentTerminalFromJSONTyped = PaymentTerminalFromJSONTyped; exports.PaymentTerminalToJSON = PaymentTerminalToJSON; exports.PaymentTerminalToJSONTyped = PaymentTerminalToJSONTyped; const PaymentTerminalType_1 = require("./PaymentTerminalType"); const PaymentTerminalLocationVersion_1 = require("./PaymentTerminalLocationVersion"); const PaymentTerminalConfigurationVersion_1 = require("./PaymentTerminalConfigurationVersion"); const PaymentTerminalState_1 = require("./PaymentTerminalState"); /** * Check if a given object implements the PaymentTerminal interface. */ function instanceOfPaymentTerminal(value) { return true; } function PaymentTerminalFromJSON(json) { return PaymentTerminalFromJSONTyped(json, false); } 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 : (0, PaymentTerminalType_1.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 : (0, PaymentTerminalConfigurationVersion_1.PaymentTerminalConfigurationVersionFromJSON)(json['configurationVersion']), 'locationVersion': json['locationVersion'] == null ? undefined : (0, PaymentTerminalLocationVersion_1.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 : (0, PaymentTerminalState_1.PaymentTerminalStateFromJSON)(json['state']), }; } function PaymentTerminalToJSON(json) { return PaymentTerminalToJSONTyped(json, false); } function PaymentTerminalToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'type': (0, PaymentTerminalType_1.PaymentTerminalTypeToJSON)(value['type']), 'configurationVersion': (0, PaymentTerminalConfigurationVersion_1.PaymentTerminalConfigurationVersionToJSON)(value['configurationVersion']), 'locationVersion': (0, PaymentTerminalLocationVersion_1.PaymentTerminalLocationVersionToJSON)(value['locationVersion']), 'state': (0, PaymentTerminalState_1.PaymentTerminalStateToJSON)(value['state']), }; }