UNPKG

wallee

Version:
50 lines (49 loc) 2.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCardholderAuthenticationCreate = instanceOfCardholderAuthenticationCreate; exports.CardholderAuthenticationCreateFromJSON = CardholderAuthenticationCreateFromJSON; exports.CardholderAuthenticationCreateFromJSONTyped = CardholderAuthenticationCreateFromJSONTyped; exports.CardholderAuthenticationCreateToJSON = CardholderAuthenticationCreateToJSON; exports.CardholderAuthenticationCreateToJSONTyped = CardholderAuthenticationCreateToJSONTyped; const CardAuthenticationVersion_1 = require("./CardAuthenticationVersion"); const CardAuthenticationResponse_1 = require("./CardAuthenticationResponse"); /** * Check if a given object implements the CardholderAuthenticationCreate interface. */ function instanceOfCardholderAuthenticationCreate(value) { if (!('authenticationResponse' in value) || value['authenticationResponse'] === undefined) return false; if (!('version' in value) || value['version'] === undefined) return false; return true; } function CardholderAuthenticationCreateFromJSON(json) { return CardholderAuthenticationCreateFromJSONTyped(json, false); } function CardholderAuthenticationCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'authenticationIdentifier': json['authenticationIdentifier'] == null ? undefined : json['authenticationIdentifier'], 'authenticationResponse': (0, CardAuthenticationResponse_1.CardAuthenticationResponseFromJSON)(json['authenticationResponse']), 'electronicCommerceIndicator': json['electronicCommerceIndicator'] == null ? undefined : json['electronicCommerceIndicator'], 'authenticationValue': json['authenticationValue'] == null ? undefined : json['authenticationValue'], 'version': (0, CardAuthenticationVersion_1.CardAuthenticationVersionFromJSON)(json['version']), }; } function CardholderAuthenticationCreateToJSON(json) { return CardholderAuthenticationCreateToJSONTyped(json, false); } function CardholderAuthenticationCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'authenticationIdentifier': value['authenticationIdentifier'], 'authenticationResponse': (0, CardAuthenticationResponse_1.CardAuthenticationResponseToJSON)(value['authenticationResponse']), 'electronicCommerceIndicator': value['electronicCommerceIndicator'], 'authenticationValue': value['authenticationValue'], 'version': (0, CardAuthenticationVersion_1.CardAuthenticationVersionToJSON)(value['version']), }; }