-
- All Implemented Interfaces:
-
android.os.Parcelable,java.io.Serializable,java.lang.Cloneable
public class MenigaUser implements Serializable, Parcelable, Cloneable
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<MenigaUser>CREATORpublic MenigaWebExceptionexprotected DateTimecreatedprotected Stringcultureprotected Stringemailprotected DateTimelastLoginDateprotected StringfirstNameprotected StringlastNameprotected longpersonIdprotected StringrealmUserIdentityprotected DateTimetermsAndConditionsAcceptDateprotected IntegertermsAndConditionsIdprotected longuserIdprotected MenigaUserProfileprofile
-
Method Summary
Modifier and Type Method Description static voidsetOperator(MenigaUserOperations operator)Sets the api operator for doing api calls intdescribeContents()voidwriteToParcel(Parcel dest, int flags)static Result<List<MenigaUser>>fetch()Fetches the current user as well as all connected users static Result<MenigaUser>create(String email, String password, String culture)static Result<Void>forgotPassword(String email)static Result<List<MenigaUserMetaData>>fetchMetaData()Returns an array of the currently logged in user's meta data static Result<List<MenigaUserMetaData>>fetchMetaData(List<String> filter)Returns an array of the currently logged in user's meta data that match the keys provided static Result<MenigaUserMetaData>saveMetaData(String key, String value)static Result<Void>resetPassword(String resetPasswordToken, String email, String newPassword)static Result<Void>updateEmail(String newEmail, String password)Updates the email address of the user. static Result<Void>changePassword(String currentPassword, String newPassword)Changes the password of the user. static Result<Void>delete()Delete the given person and remove transactions and accounts(belonging to the person, not the household), realm user information, alerts etc. DateTimegetCreated()StringgetCulture()StringgetEmail()DateTimegetLastLoginDate()StringgetFirstName()StringgetLastName()longgetPersonId()StringgetRealmUserIdentity()DateTimegetTermsAndConditionsAcceptDate()IntegergetTermsAndConditionsId()longgetUserId()MenigaUserProfilegetProfile()static Result<Void>setCulture(String culture)-
-
Method Detail
-
setOperator
static void setOperator(MenigaUserOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator- An object that implements the MenigaUserOperations interface for carrying out api operations on this class.
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
fetch
static Result<List<MenigaUser>> fetch()
Fetches the current user as well as all connected users
-
forgotPassword
static Result<Void> forgotPassword(String email)
-
fetchMetaData
static Result<List<MenigaUserMetaData>> fetchMetaData()
Returns an array of the currently logged in user's meta data
-
fetchMetaData
static Result<List<MenigaUserMetaData>> fetchMetaData(List<String> filter)
Returns an array of the currently logged in user's meta data that match the keys provided
- Parameters:
filter- Keys of meta data to filter by
-
saveMetaData
static Result<MenigaUserMetaData> saveMetaData(String key, String value)
-
resetPassword
static Result<Void> resetPassword(String resetPasswordToken, String email, String newPassword)
-
updateEmail
@NotNull() static Result<Void> updateEmail(String newEmail, String password)
Updates the email address of the user.
- Parameters:
newEmail- user's new emailpassword- user's password
-
changePassword
@NotNull() static Result<Void> changePassword(String currentPassword, String newPassword)
Changes the password of the user.
- Parameters:
currentPassword- user's old passwordnewPassword- the new password
-
delete
@NotNull() static Result<Void> delete()
Delete the given person and remove transactions and accounts(belonging to the person, not the household), realm user information, alerts etc.
-
getCreated
DateTime getCreated()
-
getCulture
String getCulture()
-
getLastLoginDate
DateTime getLastLoginDate()
-
getFirstName
String getFirstName()
-
getLastName
String getLastName()
-
getPersonId
long getPersonId()
-
getRealmUserIdentity
String getRealmUserIdentity()
-
getTermsAndConditionsAcceptDate
DateTime getTermsAndConditionsAcceptDate()
-
getTermsAndConditionsId
Integer getTermsAndConditionsId()
-
getUserId
long getUserId()
-
getProfile
MenigaUserProfile getProfile()
-
setCulture
static Result<Void> setCulture(String culture)
-
-
-
-