wallee
Version:
TypeScript/JavaScript client for wallee
60 lines (59 loc) • 3.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfAuthenticatedCardDataCreate = instanceOfAuthenticatedCardDataCreate;
exports.AuthenticatedCardDataCreateFromJSON = AuthenticatedCardDataCreateFromJSON;
exports.AuthenticatedCardDataCreateFromJSONTyped = AuthenticatedCardDataCreateFromJSONTyped;
exports.AuthenticatedCardDataCreateToJSON = AuthenticatedCardDataCreateToJSON;
exports.AuthenticatedCardDataCreateToJSONTyped = AuthenticatedCardDataCreateToJSONTyped;
const CardCryptogramCreate_1 = require("./CardCryptogramCreate");
const PanType_1 = require("./PanType");
const CardholderAuthenticationCreate_1 = require("./CardholderAuthenticationCreate");
const RecurringIndicator_1 = require("./RecurringIndicator");
/**
* Check if a given object implements the AuthenticatedCardDataCreate interface.
*/
function instanceOfAuthenticatedCardDataCreate(value) {
if (!('primaryAccountNumber' in value) || value['primaryAccountNumber'] === undefined)
return false;
return true;
}
function AuthenticatedCardDataCreateFromJSON(json) {
return AuthenticatedCardDataCreateFromJSONTyped(json, false);
}
function AuthenticatedCardDataCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'expiryDate': json['expiryDate'] == null ? undefined : json['expiryDate'],
'panType': json['panType'] == null ? undefined : (0, PanType_1.PanTypeFromJSON)(json['panType']),
'cardHolderName': json['cardHolderName'] == null ? undefined : json['cardHolderName'],
'cardVerificationCode': json['cardVerificationCode'] == null ? undefined : json['cardVerificationCode'],
'primaryAccountNumber': json['primaryAccountNumber'],
'recurringIndicator': json['recurringIndicator'] == null ? undefined : (0, RecurringIndicator_1.RecurringIndicatorFromJSON)(json['recurringIndicator']),
'schemeTransactionReference': json['schemeTransactionReference'] == null ? undefined : json['schemeTransactionReference'],
'cardholderAuthentication': json['cardholderAuthentication'] == null ? undefined : (0, CardholderAuthenticationCreate_1.CardholderAuthenticationCreateFromJSON)(json['cardholderAuthentication']),
'tokenRequestorId': json['tokenRequestorId'] == null ? undefined : json['tokenRequestorId'],
'cryptogram': json['cryptogram'] == null ? undefined : (0, CardCryptogramCreate_1.CardCryptogramCreateFromJSON)(json['cryptogram']),
};
}
function AuthenticatedCardDataCreateToJSON(json) {
return AuthenticatedCardDataCreateToJSONTyped(json, false);
}
function AuthenticatedCardDataCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'expiryDate': value['expiryDate'],
'panType': (0, PanType_1.PanTypeToJSON)(value['panType']),
'cardHolderName': value['cardHolderName'],
'cardVerificationCode': value['cardVerificationCode'],
'primaryAccountNumber': value['primaryAccountNumber'],
'recurringIndicator': (0, RecurringIndicator_1.RecurringIndicatorToJSON)(value['recurringIndicator']),
'schemeTransactionReference': value['schemeTransactionReference'],
'cardholderAuthentication': (0, CardholderAuthenticationCreate_1.CardholderAuthenticationCreateToJSON)(value['cardholderAuthentication']),
'tokenRequestorId': value['tokenRequestorId'],
'cryptogram': (0, CardCryptogramCreate_1.CardCryptogramCreateToJSON)(value['cryptogram']),
};
}