UNPKG

wallee

Version:
51 lines (50 loc) 3.2 kB
import { PaymentAppProcessorFromJSON, PaymentAppProcessorToJSON, } from './PaymentAppProcessor'; import { PaymentConnectorConfigurationFromJSON, PaymentConnectorConfigurationToJSON, } from './PaymentConnectorConfiguration'; import { PaymentAppConnectorStateFromJSON, PaymentAppConnectorStateToJSON, } from './PaymentAppConnectorState'; import { PaymentAppCompletionConfigurationFromJSON, PaymentAppCompletionConfigurationToJSON, } from './PaymentAppCompletionConfiguration'; import { PaymentAppRefundConfigurationFromJSON, PaymentAppRefundConfigurationToJSON, } from './PaymentAppRefundConfiguration'; /** * Check if a given object implements the PaymentAppConnector interface. */ export function instanceOfPaymentAppConnector(value) { return true; } export function PaymentAppConnectorFromJSON(json) { return PaymentAppConnectorFromJSONTyped(json, false); } export function PaymentAppConnectorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'paymentPageEndpoint': json['paymentPageEndpoint'] == null ? undefined : json['paymentPageEndpoint'], 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'updatedOn': json['updatedOn'] == null ? undefined : (new Date(json['updatedOn'])), 'completionConfiguration': json['completionConfiguration'] == null ? undefined : PaymentAppCompletionConfigurationFromJSON(json['completionConfiguration']), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'processor': json['processor'] == null ? undefined : PaymentAppProcessorFromJSON(json['processor']), 'version': json['version'] == null ? undefined : json['version'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'connectorConfiguration': json['connectorConfiguration'] == null ? undefined : PaymentConnectorConfigurationFromJSON(json['connectorConfiguration']), 'authorizationTimeout': json['authorizationTimeout'] == null ? undefined : json['authorizationTimeout'], 'name': json['name'] == null ? undefined : json['name'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : PaymentAppConnectorStateFromJSON(json['state']), 'refundConfiguration': json['refundConfiguration'] == null ? undefined : PaymentAppRefundConfigurationFromJSON(json['refundConfiguration']), }; } export function PaymentAppConnectorToJSON(json) { return PaymentAppConnectorToJSONTyped(json, false); } export function PaymentAppConnectorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'completionConfiguration': PaymentAppCompletionConfigurationToJSON(value['completionConfiguration']), 'processor': PaymentAppProcessorToJSON(value['processor']), 'connectorConfiguration': PaymentConnectorConfigurationToJSON(value['connectorConfiguration']), 'state': PaymentAppConnectorStateToJSON(value['state']), 'refundConfiguration': PaymentAppRefundConfigurationToJSON(value['refundConfiguration']), }; }