UNPKG

wallee

Version:
59 lines (58 loc) 3.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentConnector = instanceOfPaymentConnector; exports.PaymentConnectorFromJSON = PaymentConnectorFromJSON; exports.PaymentConnectorFromJSONTyped = PaymentConnectorFromJSONTyped; exports.PaymentConnectorToJSON = PaymentConnectorToJSON; exports.PaymentConnectorToJSONTyped = PaymentConnectorToJSONTyped; const CustomersPresence_1 = require("./CustomersPresence"); const PaymentPrimaryRiskTaker_1 = require("./PaymentPrimaryRiskTaker"); const PaymentProcessor_1 = require("./PaymentProcessor"); const PaymentMethod_1 = require("./PaymentMethod"); const DataCollectionType_1 = require("./DataCollectionType"); const PaymentConnectorFeature_1 = require("./PaymentConnectorFeature"); const PaymentMethodBrand_1 = require("./PaymentMethodBrand"); /** * Check if a given object implements the PaymentConnector interface. */ function instanceOfPaymentConnector(value) { return true; } function PaymentConnectorFromJSON(json) { return PaymentConnectorFromJSONTyped(json, false); } function PaymentConnectorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'supportedFeatures': json['supportedFeatures'] == null ? undefined : (new Set(json['supportedFeatures'].map(PaymentConnectorFeature_1.PaymentConnectorFeatureFromJSON))), 'supportedCustomersPresences': json['supportedCustomersPresences'] == null ? undefined : (new Set(json['supportedCustomersPresences'].map(CustomersPresence_1.CustomersPresenceFromJSON))), 'dataCollectionType': json['dataCollectionType'] == null ? undefined : (0, DataCollectionType_1.DataCollectionTypeFromJSON)(json['dataCollectionType']), 'deprecated': json['deprecated'] == null ? undefined : json['deprecated'], 'primaryRiskTaker': json['primaryRiskTaker'] == null ? undefined : (0, PaymentPrimaryRiskTaker_1.PaymentPrimaryRiskTakerFromJSON)(json['primaryRiskTaker']), 'description': json['description'] == null ? undefined : json['description'], 'paymentMethodBrand': json['paymentMethodBrand'] == null ? undefined : (0, PaymentMethodBrand_1.PaymentMethodBrandFromJSON)(json['paymentMethodBrand']), 'processor': json['processor'] == null ? undefined : (0, PaymentProcessor_1.PaymentProcessorFromJSON)(json['processor']), 'deprecationReason': json['deprecationReason'] == null ? undefined : json['deprecationReason'], 'supportedCurrencies': json['supportedCurrencies'] == null ? undefined : new Set(json['supportedCurrencies']), 'name': json['name'] == null ? undefined : json['name'], 'paymentMethod': json['paymentMethod'] == null ? undefined : (0, PaymentMethod_1.PaymentMethodFromJSON)(json['paymentMethod']), 'id': json['id'] == null ? undefined : json['id'], }; } function PaymentConnectorToJSON(json) { return PaymentConnectorToJSONTyped(json, false); } function PaymentConnectorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'dataCollectionType': (0, DataCollectionType_1.DataCollectionTypeToJSON)(value['dataCollectionType']), 'primaryRiskTaker': (0, PaymentPrimaryRiskTaker_1.PaymentPrimaryRiskTakerToJSON)(value['primaryRiskTaker']), 'paymentMethodBrand': (0, PaymentMethodBrand_1.PaymentMethodBrandToJSON)(value['paymentMethodBrand']), 'processor': (0, PaymentProcessor_1.PaymentProcessorToJSON)(value['processor']), 'paymentMethod': (0, PaymentMethod_1.PaymentMethodToJSON)(value['paymentMethod']), }; }