UNPKG

wallee

Version:
49 lines (48 loc) 2.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfToken = instanceOfToken; exports.TokenFromJSON = TokenFromJSON; exports.TokenFromJSONTyped = TokenFromJSONTyped; exports.TokenToJSON = TokenToJSON; exports.TokenToJSONTyped = TokenToJSONTyped; const CreationEntityState_1 = require("./CreationEntityState"); /** * Check if a given object implements the Token interface. */ function instanceOfToken(value) { return true; } function TokenFromJSON(json) { return TokenFromJSONTyped(json, false); } function TokenFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'enabledForOneClickPayment': json['enabledForOneClickPayment'] == null ? undefined : json['enabledForOneClickPayment'], 'customerEmailAddress': json['customerEmailAddress'] == null ? undefined : json['customerEmailAddress'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'timeZone': json['timeZone'] == null ? undefined : json['timeZone'], 'language': json['language'] == null ? undefined : json['language'], 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'tokenReference': json['tokenReference'] == null ? undefined : json['tokenReference'], 'customerId': json['customerId'] == null ? undefined : json['customerId'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']), }; } function TokenToJSON(json) { return TokenToJSONTyped(json, false); } function TokenToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']), }; }