User.fromJson constructor
Implementation
factory User.fromJson(Map<String, dynamic> json) {
return User(
userId: json['UserId'] as String,
accountId: json['AccountId'] as String?,
alexaForBusinessMetadata: json['AlexaForBusinessMetadata'] != null
? AlexaForBusinessMetadata.fromJson(
json['AlexaForBusinessMetadata'] as Map<String, dynamic>)
: null,
displayName: json['DisplayName'] as String?,
invitedOn: timeStampFromJson(json['InvitedOn']),
licenseType: (json['LicenseType'] as String?)?.toLicense(),
personalPIN: json['PersonalPIN'] as String?,
primaryEmail: json['PrimaryEmail'] as String?,
primaryProvisionedNumber: json['PrimaryProvisionedNumber'] as String?,
registeredOn: timeStampFromJson(json['RegisteredOn']),
userInvitationStatus:
(json['UserInvitationStatus'] as String?)?.toInviteStatus(),
userRegistrationStatus:
(json['UserRegistrationStatus'] as String?)?.toRegistrationStatus(),
userType: (json['UserType'] as String?)?.toUserType(),
);
}