В моем проекте у меня есть две модели. Я хочу отправить информацию о моем клиенте на сервер и получить ответ от сервера.В Android Studio я хочу отправить модель на сервер с модификацией. Когда я отправляю свой запрос, модификация возвращает мне нулевой ответ.Может ли кто-нибудь помочь мне, пожалуйста?
Это моя модель customer_role:
public class customers_role {
@SerializedName("customers_models")
private customers_model customers_models;
@SerializedName("mobile")
private String mobile;
@SerializedName("phone")
private String phone;
@SerializedName("first_job")
private String first_job;
@SerializedName("second_job")
private String second_job;
@SerializedName("first_address")
private String first_address;
@SerializedName("second_address")
private String second_address;
@SerializedName("postal_code")
private String postal_code;
@SerializedName("nik_name")
private String nik_name;
@SerializedName("description")
private String description;
@SerializedName("created_at")
private String created_at;
@SerializedName("updated_at")
private String updated_at;
@SerializedName("status")
private boolean status;
public customers_role() {
}
}
, а вот Customers_model:
public class customers_model {
@SerializedName("id")
private Integer id;
@SerializedName("name")
private String name;
@SerializedName("family")
private String family;
@SerializedName("code")
private String code;
@SerializedName("father")
private String father;
@SerializedName("birthday")
private String birthday;
@SerializedName("created_at")
private String created_at;
@SerializedName("updated_at")
private String updated_at;
@SerializedName("status")
private boolean status;
public customers_model() {
}
public customers_model(String name, String family, String code, String father, String birthday) {
this.name = name;
this.family = family;
this.code = code;
this.father = father;
this.birthday = birthday;
}
}
и мой интерфейс:
@Headers("Accept: application/json")
@POST("customers")
Call<customers_role> send_info(@Header("Authorization") String token, @Body customers_role info);
Спасибо
`