UNPKG

wallee

Version:
34 lines (33 loc) 1.37 kB
import { DataCollectionTypeFromJSON, } from './DataCollectionType'; /** * Check if a given object implements the PaymentMethod interface. */ export function instanceOfPaymentMethod(value) { return true; } export function PaymentMethodFromJSON(json) { return PaymentMethodFromJSONTyped(json, false); } export 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(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'], }; } export function PaymentMethodToJSON(json) { return PaymentMethodToJSONTyped(json, false); } export function PaymentMethodToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return {}; }