UNPKG

wallee

Version:
49 lines (48 loc) 2.88 kB
import { PaymentAppProcessorStateFromJSON, PaymentAppProcessorStateToJSON, } from './PaymentAppProcessorState'; import { PaymentProcessorConfigurationFromJSON, PaymentProcessorConfigurationToJSON, } from './PaymentProcessorConfiguration'; import { ChargeAttemptEnvironmentFromJSON, ChargeAttemptEnvironmentToJSON, } from './ChargeAttemptEnvironment'; /** * Check if a given object implements the PaymentAppProcessor interface. */ export function instanceOfPaymentAppProcessor(value) { return true; } export function PaymentAppProcessorFromJSON(json) { return PaymentAppProcessorFromJSONTyped(json, false); } export function PaymentAppProcessorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'documentationUrl': json['documentationUrl'] == null ? undefined : json['documentationUrl'], 'configuredEnvironment': json['configuredEnvironment'] == null ? undefined : 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 : 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 : PaymentAppProcessorStateFromJSON(json['state']), }; } export function PaymentAppProcessorToJSON(json) { return PaymentAppProcessorToJSONTyped(json, false); } export function PaymentAppProcessorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'configuredEnvironment': ChargeAttemptEnvironmentToJSON(value['configuredEnvironment']), 'processorConfiguration': PaymentProcessorConfigurationToJSON(value['processorConfiguration']), 'state': PaymentAppProcessorStateToJSON(value['state']), }; }