UNPKG

wallee

Version:
58 lines (57 loc) 3.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentAppConnector = instanceOfPaymentAppConnector; exports.PaymentAppConnectorFromJSON = PaymentAppConnectorFromJSON; exports.PaymentAppConnectorFromJSONTyped = PaymentAppConnectorFromJSONTyped; exports.PaymentAppConnectorToJSON = PaymentAppConnectorToJSON; exports.PaymentAppConnectorToJSONTyped = PaymentAppConnectorToJSONTyped; const PaymentAppProcessor_1 = require("./PaymentAppProcessor"); const PaymentConnectorConfiguration_1 = require("./PaymentConnectorConfiguration"); const PaymentAppConnectorState_1 = require("./PaymentAppConnectorState"); const PaymentAppCompletionConfiguration_1 = require("./PaymentAppCompletionConfiguration"); const PaymentAppRefundConfiguration_1 = require("./PaymentAppRefundConfiguration"); /** * Check if a given object implements the PaymentAppConnector interface. */ function instanceOfPaymentAppConnector(value) { return true; } function PaymentAppConnectorFromJSON(json) { return PaymentAppConnectorFromJSONTyped(json, false); } 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 : (0, PaymentAppCompletionConfiguration_1.PaymentAppCompletionConfigurationFromJSON)(json['completionConfiguration']), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'processor': json['processor'] == null ? undefined : (0, PaymentAppProcessor_1.PaymentAppProcessorFromJSON)(json['processor']), 'version': json['version'] == null ? undefined : json['version'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'connectorConfiguration': json['connectorConfiguration'] == null ? undefined : (0, PaymentConnectorConfiguration_1.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 : (0, PaymentAppConnectorState_1.PaymentAppConnectorStateFromJSON)(json['state']), 'refundConfiguration': json['refundConfiguration'] == null ? undefined : (0, PaymentAppRefundConfiguration_1.PaymentAppRefundConfigurationFromJSON)(json['refundConfiguration']), }; } function PaymentAppConnectorToJSON(json) { return PaymentAppConnectorToJSONTyped(json, false); } function PaymentAppConnectorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'completionConfiguration': (0, PaymentAppCompletionConfiguration_1.PaymentAppCompletionConfigurationToJSON)(value['completionConfiguration']), 'processor': (0, PaymentAppProcessor_1.PaymentAppProcessorToJSON)(value['processor']), 'connectorConfiguration': (0, PaymentConnectorConfiguration_1.PaymentConnectorConfigurationToJSON)(value['connectorConfiguration']), 'state': (0, PaymentAppConnectorState_1.PaymentAppConnectorStateToJSON)(value['state']), 'refundConfiguration': (0, PaymentAppRefundConfiguration_1.PaymentAppRefundConfigurationToJSON)(value['refundConfiguration']), }; }