wallee
Version:
TypeScript/JavaScript client for wallee
52 lines (51 loc) • 3.25 kB
JavaScript
import { ConditionFromJSON, } from './Condition';
import { SalesChannelFromJSON, } from './SalesChannel';
import { PaymentConnectorFromJSON, PaymentConnectorToJSON, } from './PaymentConnector';
import { PaymentProcessorConfigurationFromJSON, PaymentProcessorConfigurationToJSON, } from './PaymentProcessorConfiguration';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { PaymentMethodConfigurationFromJSON, PaymentMethodConfigurationToJSON, } from './PaymentMethodConfiguration';
/**
* Check if a given object implements the PaymentConnectorConfiguration interface.
*/
export function instanceOfPaymentConnectorConfiguration(value) {
return true;
}
export function PaymentConnectorConfigurationFromJSON(json) {
return PaymentConnectorConfigurationFromJSONTyped(json, false);
}
export function PaymentConnectorConfigurationFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'paymentMethodConfiguration': json['paymentMethodConfiguration'] == null ? undefined : 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(SalesChannelFromJSON))),
'version': json['version'] == null ? undefined : json['version'],
'processorConfiguration': json['processorConfiguration'] == null ? undefined : PaymentProcessorConfigurationFromJSON(json['processorConfiguration']),
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'connector': json['connector'] == null ? undefined : 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 : CreationEntityStateFromJSON(json['state']),
'applicableForTransactionProcessing': json['applicableForTransactionProcessing'] == null ? undefined : json['applicableForTransactionProcessing'],
'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(ConditionFromJSON)),
};
}
export function PaymentConnectorConfigurationToJSON(json) {
return PaymentConnectorConfigurationToJSONTyped(json, false);
}
export function PaymentConnectorConfigurationToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'paymentMethodConfiguration': PaymentMethodConfigurationToJSON(value['paymentMethodConfiguration']),
'processorConfiguration': PaymentProcessorConfigurationToJSON(value['processorConfiguration']),
'connector': PaymentConnectorToJSON(value['connector']),
'state': CreationEntityStateToJSON(value['state']),
};
}