Created
January 2, 2019 06:40
-
-
Save vishalhalani/59ea402df65dd7e0f62371270a8e0b42 to your computer and use it in GitHub Desktop.
base detail model pojo which contain common things which is have to sent in each request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseDetailModel implements Parcelable { | |
@SerializedName("api_token") | |
@Expose | |
private String api_token; | |
@SerializedName("udid") | |
@Expose | |
private String udid; | |
@SerializedName("device_type") | |
@Expose | |
private String device_type; | |
public BaseDetailModel(String api_token, String udid, String device_type) { | |
this.api_token = api_token; | |
this.udid = udid; | |
this.device_type = device_type; | |
} | |
public static final Creator<BaseDetailModel> CREATOR = new Creator<BaseDetailModel>() { | |
@Override | |
public BaseDetailModel createFromParcel(Parcel in) { | |
return new BaseDetailModel(in); | |
} | |
@Override | |
public BaseDetailModel[] newArray(int size) { | |
return new BaseDetailModel[size]; | |
} | |
}; | |
@Override | |
public int describeContents() { | |
return 0; | |
} | |
protected BaseDetailModel(Parcel in) { | |
this.api_token = in.readString(); | |
this.udid = in.readString(); | |
this.device_type = in.readString(); | |
} | |
@Override | |
public void writeToParcel(Parcel dest, int flags) { | |
dest.writeString(this.api_token); | |
dest.writeString(this.udid); | |
dest.writeString(this.device_type); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment