wallee
Version:
TypeScript/JavaScript client for wallee
38 lines (37 loc) • 1.88 kB
JavaScript
import { CardholderAuthenticationFromJSON, CardholderAuthenticationToJSON, } from './CardholderAuthentication';
import { CardCryptogramFromJSON, CardCryptogramToJSON, } from './CardCryptogram';
import { RecurringIndicatorFromJSON, RecurringIndicatorToJSON, } from './RecurringIndicator';
/**
* Check if a given object implements the AuthenticatedCardData interface.
*/
export function instanceOfAuthenticatedCardData(value) {
return true;
}
export function AuthenticatedCardDataFromJSON(json) {
return AuthenticatedCardDataFromJSONTyped(json, false);
}
export function AuthenticatedCardDataFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'initialRecurringTransaction': json['initialRecurringTransaction'] == null ? undefined : json['initialRecurringTransaction'],
'recurringIndicator': json['recurringIndicator'] == null ? undefined : RecurringIndicatorFromJSON(json['recurringIndicator']),
'tokenRequestorId': json['tokenRequestorId'] == null ? undefined : json['tokenRequestorId'],
'cryptogram': json['cryptogram'] == null ? undefined : CardCryptogramFromJSON(json['cryptogram']),
'cardholderAuthentication': json['cardholderAuthentication'] == null ? undefined : CardholderAuthenticationFromJSON(json['cardholderAuthentication']),
};
}
export function AuthenticatedCardDataToJSON(json) {
return AuthenticatedCardDataToJSONTyped(json, false);
}
export function AuthenticatedCardDataToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'recurringIndicator': RecurringIndicatorToJSON(value['recurringIndicator']),
'cryptogram': CardCryptogramToJSON(value['cryptogram']),
'cardholderAuthentication': CardholderAuthenticationToJSON(value['cardholderAuthentication']),
};
}