UNPKG

wallee

Version:
43 lines (42 loc) 2.13 kB
import { CardAuthenticationVersionFromJSON, CardAuthenticationVersionToJSON, } from './CardAuthenticationVersion'; import { CardAuthenticationResponseFromJSON, CardAuthenticationResponseToJSON, } from './CardAuthenticationResponse'; /** * Check if a given object implements the CardholderAuthenticationCreate interface. */ export function instanceOfCardholderAuthenticationCreate(value) { if (!('authenticationResponse' in value) || value['authenticationResponse'] === undefined) return false; if (!('version' in value) || value['version'] === undefined) return false; return true; } export function CardholderAuthenticationCreateFromJSON(json) { return CardholderAuthenticationCreateFromJSONTyped(json, false); } export function CardholderAuthenticationCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'authenticationIdentifier': json['authenticationIdentifier'] == null ? undefined : json['authenticationIdentifier'], 'authenticationResponse': CardAuthenticationResponseFromJSON(json['authenticationResponse']), 'electronicCommerceIndicator': json['electronicCommerceIndicator'] == null ? undefined : json['electronicCommerceIndicator'], 'authenticationValue': json['authenticationValue'] == null ? undefined : json['authenticationValue'], 'version': CardAuthenticationVersionFromJSON(json['version']), }; } export function CardholderAuthenticationCreateToJSON(json) { return CardholderAuthenticationCreateToJSONTyped(json, false); } export function CardholderAuthenticationCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'authenticationIdentifier': value['authenticationIdentifier'], 'authenticationResponse': CardAuthenticationResponseToJSON(value['authenticationResponse']), 'electronicCommerceIndicator': value['electronicCommerceIndicator'], 'authenticationValue': value['authenticationValue'], 'version': CardAuthenticationVersionToJSON(value['version']), }; }