UNPKG

wallee

Version:
59 lines (58 loc) 3.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentConnectorConfiguration = instanceOfPaymentConnectorConfiguration; exports.PaymentConnectorConfigurationFromJSON = PaymentConnectorConfigurationFromJSON; exports.PaymentConnectorConfigurationFromJSONTyped = PaymentConnectorConfigurationFromJSONTyped; exports.PaymentConnectorConfigurationToJSON = PaymentConnectorConfigurationToJSON; exports.PaymentConnectorConfigurationToJSONTyped = PaymentConnectorConfigurationToJSONTyped; const Condition_1 = require("./Condition"); const SalesChannel_1 = require("./SalesChannel"); const PaymentConnector_1 = require("./PaymentConnector"); const PaymentProcessorConfiguration_1 = require("./PaymentProcessorConfiguration"); const CreationEntityState_1 = require("./CreationEntityState"); const PaymentMethodConfiguration_1 = require("./PaymentMethodConfiguration"); /** * Check if a given object implements the PaymentConnectorConfiguration interface. */ function instanceOfPaymentConnectorConfiguration(value) { return true; } function PaymentConnectorConfigurationFromJSON(json) { return PaymentConnectorConfigurationFromJSONTyped(json, false); } function PaymentConnectorConfigurationFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'paymentMethodConfiguration': json['paymentMethodConfiguration'] == null ? undefined : (0, PaymentMethodConfiguration_1.PaymentMethodConfigurationFromJSON)(json['paymentMethodConfiguration']), 'imagePath': json['imagePath'] == null ? undefined : json['imagePath'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'priority': json['priority'] == null ? undefined : json['priority'], 'enabledSalesChannels': json['enabledSalesChannels'] == null ? undefined : (new Set(json['enabledSalesChannels'].map(SalesChannel_1.SalesChannelFromJSON))), 'version': json['version'] == null ? undefined : json['version'], 'processorConfiguration': json['processorConfiguration'] == null ? undefined : (0, PaymentProcessorConfiguration_1.PaymentProcessorConfigurationFromJSON)(json['processorConfiguration']), 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'connector': json['connector'] == null ? undefined : (0, PaymentConnector_1.PaymentConnectorFromJSON)(json['connector']), 'name': json['name'] == null ? undefined : json['name'], 'enabledSpaceViews': json['enabledSpaceViews'] == null ? undefined : new Set(json['enabledSpaceViews']), 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), 'applicableForTransactionProcessing': json['applicableForTransactionProcessing'] == null ? undefined : json['applicableForTransactionProcessing'], 'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(Condition_1.ConditionFromJSON)), }; } function PaymentConnectorConfigurationToJSON(json) { return PaymentConnectorConfigurationToJSONTyped(json, false); } function PaymentConnectorConfigurationToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'paymentMethodConfiguration': (0, PaymentMethodConfiguration_1.PaymentMethodConfigurationToJSON)(value['paymentMethodConfiguration']), 'processorConfiguration': (0, PaymentProcessorConfiguration_1.PaymentProcessorConfigurationToJSON)(value['processorConfiguration']), 'connector': (0, PaymentConnector_1.PaymentConnectorToJSON)(value['connector']), 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), }; }