-
- 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>
CREATOR
public MenigaWebException
ex
protected DateTime
created
protected String
culture
protected String
email
protected DateTime
lastLoginDate
protected String
firstName
protected String
lastName
protected long
personId
protected String
realmUserIdentity
protected DateTime
termsAndConditionsAcceptDate
protected Integer
termsAndConditionsId
protected long
userId
protected MenigaUserProfile
profile
-
Method Summary
Modifier and Type Method Description static void
setOperator(MenigaUserOperations operator)
Sets the api operator for doing api calls int
describeContents()
void
writeToParcel(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. DateTime
getCreated()
String
getCulture()
String
getEmail()
DateTime
getLastLoginDate()
String
getFirstName()
String
getLastName()
long
getPersonId()
String
getRealmUserIdentity()
DateTime
getTermsAndConditionsAcceptDate()
Integer
getTermsAndConditionsId()
long
getUserId()
MenigaUserProfile
getProfile()
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)
-
-
-
-