UNPKG

wallee

Version:
56 lines (55 loc) 3.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentAppProcessor = instanceOfPaymentAppProcessor; exports.PaymentAppProcessorFromJSON = PaymentAppProcessorFromJSON; exports.PaymentAppProcessorFromJSONTyped = PaymentAppProcessorFromJSONTyped; exports.PaymentAppProcessorToJSON = PaymentAppProcessorToJSON; exports.PaymentAppProcessorToJSONTyped = PaymentAppProcessorToJSONTyped; const PaymentAppProcessorState_1 = require("./PaymentAppProcessorState"); const PaymentProcessorConfiguration_1 = require("./PaymentProcessorConfiguration"); const ChargeAttemptEnvironment_1 = require("./ChargeAttemptEnvironment"); /** * Check if a given object implements the PaymentAppProcessor interface. */ function instanceOfPaymentAppProcessor(value) { return true; } function PaymentAppProcessorFromJSON(json) { return PaymentAppProcessorFromJSONTyped(json, false); } function PaymentAppProcessorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'documentationUrl': json['documentationUrl'] == null ? undefined : json['documentationUrl'], 'configuredEnvironment': json['configuredEnvironment'] == null ? undefined : (0, ChargeAttemptEnvironment_1.ChargeAttemptEnvironmentFromJSON)(json['configuredEnvironment']), 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'svgIcon': json['svgIcon'] == null ? undefined : json['svgIcon'], 'updatedOn': json['updatedOn'] == null ? undefined : (new Date(json['updatedOn'])), 'usableInProduction': json['usableInProduction'] == null ? undefined : json['usableInProduction'], 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), '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'], 'usableInProductionSince': json['usableInProductionSince'] == null ? undefined : (new Date(json['usableInProductionSince'])), 'name': json['name'] == null ? undefined : json['name'], 'id': json['id'] == null ? undefined : json['id'], 'installationId': json['installationId'] == null ? undefined : json['installationId'], 'productionModeUrl': json['productionModeUrl'] == null ? undefined : json['productionModeUrl'], 'state': json['state'] == null ? undefined : (0, PaymentAppProcessorState_1.PaymentAppProcessorStateFromJSON)(json['state']), }; } function PaymentAppProcessorToJSON(json) { return PaymentAppProcessorToJSONTyped(json, false); } function PaymentAppProcessorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'configuredEnvironment': (0, ChargeAttemptEnvironment_1.ChargeAttemptEnvironmentToJSON)(value['configuredEnvironment']), 'processorConfiguration': (0, PaymentProcessorConfiguration_1.PaymentProcessorConfigurationToJSON)(value['processorConfiguration']), 'state': (0, PaymentAppProcessorState_1.PaymentAppProcessorStateToJSON)(value['state']), }; }