UNPKG

wallee

Version:
41 lines (40 loc) 1.72 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfPaymentMethod = instanceOfPaymentMethod; exports.PaymentMethodFromJSON = PaymentMethodFromJSON; exports.PaymentMethodFromJSONTyped = PaymentMethodFromJSONTyped; exports.PaymentMethodToJSON = PaymentMethodToJSON; exports.PaymentMethodToJSONTyped = PaymentMethodToJSONTyped; const DataCollectionType_1 = require("./DataCollectionType"); /** * Check if a given object implements the PaymentMethod interface. */ function instanceOfPaymentMethod(value) { return true; } function PaymentMethodFromJSON(json) { return PaymentMethodFromJSONTyped(json, false); } function PaymentMethodFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'supportedCurrencies': json['supportedCurrencies'] == null ? undefined : new Set(json['supportedCurrencies']), 'dataCollectionTypes': json['dataCollectionTypes'] == null ? undefined : (new Set(json['dataCollectionTypes'].map(DataCollectionType_1.DataCollectionTypeFromJSON))), 'imagePath': json['imagePath'] == null ? undefined : json['imagePath'], 'name': json['name'] == null ? undefined : json['name'], 'description': json['description'] == null ? undefined : json['description'], 'merchantDescription': json['merchantDescription'] == null ? undefined : json['merchantDescription'], 'id': json['id'] == null ? undefined : json['id'], }; } function PaymentMethodToJSON(json) { return PaymentMethodToJSONTyped(json, false); } function PaymentMethodToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return {}; }