User Type
Dealing With UserType
In order to deal with the User and the functionality related to User, we use the interface UserType
import com.google.gson.annotations.SerializedName
data class User(
var id: String? = null,
var name: String? = null,
@SerializedName("phone_number") var phoneNumber: String? = null,
var email: String? = null,
@SerializedName("date_of_birth") var dateOfBirth: String? = null,
var gender: Gender? = null,
@SerializedName("insurance_id") var insuranceId: String? = null,
@SerializedName("policy_number") var policyNumber: String? = null,
@SerializedName("nationality_number") var nationalityNumber: String? = null,
var height: Int? = null,
var weight: Int? = null,
@SerializedName("blood_type") var bloodType: BloodType? = null,
var smoker: String? = null,
var alcoholic: String? = null,
@SerializedName("marital_status") var maritalStatus: MaritalStatus? = null,
@SerializedName("relation_type") var relationType: RelationType? = null,
@SerializedName("created_at") var createdAt: String? = null,
@SerializedName("updated_at") var updatedAt: String? = null
)
User Functionalities
The following are the functions related to user management:
| API | Params |
|---|---|
| createUser | user: User, callback: ApiCallback<User> |
| updateUser | user: User, userId: String?, callback: ApiCallback<User> |
| getUser | userId: String, callback: ApiCallback<User> |
| getUsers | callback: ApiCallback<List<User>> |
| deleteUser | userId: String, callback: ApiCallback<Boolean> |