UNPKG

wallee

Version:
52 lines (51 loc) 3.13 kB
import { CustomersPresenceFromJSON, } from './CustomersPresence'; import { PaymentPrimaryRiskTakerFromJSON, PaymentPrimaryRiskTakerToJSON, } from './PaymentPrimaryRiskTaker'; import { PaymentProcessorFromJSON, PaymentProcessorToJSON, } from './PaymentProcessor'; import { PaymentMethodFromJSON, PaymentMethodToJSON, } from './PaymentMethod'; import { DataCollectionTypeFromJSON, DataCollectionTypeToJSON, } from './DataCollectionType'; import { PaymentConnectorFeatureFromJSON, } from './PaymentConnectorFeature'; import { PaymentMethodBrandFromJSON, PaymentMethodBrandToJSON, } from './PaymentMethodBrand'; /** * Check if a given object implements the PaymentConnector interface. */ export function instanceOfPaymentConnector(value) { return true; } export function PaymentConnectorFromJSON(json) { return PaymentConnectorFromJSONTyped(json, false); } export function PaymentConnectorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'supportedFeatures': json['supportedFeatures'] == null ? undefined : (new Set(json['supportedFeatures'].map(PaymentConnectorFeatureFromJSON))), 'supportedCustomersPresences': json['supportedCustomersPresences'] == null ? undefined : (new Set(json['supportedCustomersPresences'].map(CustomersPresenceFromJSON))), 'dataCollectionType': json['dataCollectionType'] == null ? undefined : DataCollectionTypeFromJSON(json['dataCollectionType']), 'deprecated': json['deprecated'] == null ? undefined : json['deprecated'], 'primaryRiskTaker': json['primaryRiskTaker'] == null ? undefined : PaymentPrimaryRiskTakerFromJSON(json['primaryRiskTaker']), 'description': json['description'] == null ? undefined : json['description'], 'paymentMethodBrand': json['paymentMethodBrand'] == null ? undefined : PaymentMethodBrandFromJSON(json['paymentMethodBrand']), 'processor': json['processor'] == null ? undefined : 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 : PaymentMethodFromJSON(json['paymentMethod']), 'id': json['id'] == null ? undefined : json['id'], }; } export function PaymentConnectorToJSON(json) { return PaymentConnectorToJSONTyped(json, false); } export function PaymentConnectorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'dataCollectionType': DataCollectionTypeToJSON(value['dataCollectionType']), 'primaryRiskTaker': PaymentPrimaryRiskTakerToJSON(value['primaryRiskTaker']), 'paymentMethodBrand': PaymentMethodBrandToJSON(value['paymentMethodBrand']), 'processor': PaymentProcessorToJSON(value['processor']), 'paymentMethod': PaymentMethodToJSON(value['paymentMethod']), }; }