80 lines
1.6 KiB
Java
80 lines
1.6 KiB
Java
package ch.pizzalemon.android.model;
|
|
|
|
import com.google.gson.annotations.Expose;
|
|
import com.google.gson.annotations.SerializedName;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
/**
|
|
* Created by cimenmus on 23.10.2017.
|
|
*/
|
|
|
|
public class CityModel {
|
|
|
|
@Expose @SerializedName("shipping_point_id") private String shippingPointId;
|
|
@Expose @SerializedName("store_id") private String storeId;
|
|
@Expose @SerializedName("postcode") private String postcode;
|
|
@Expose @SerializedName("minimum_price") private String minimumPrice;
|
|
|
|
private String city;
|
|
private String canton;
|
|
|
|
|
|
private void checkNull(){
|
|
|
|
if(shippingPointId == null){
|
|
shippingPointId = "";
|
|
}
|
|
|
|
if(storeId == null){
|
|
storeId = "";
|
|
}
|
|
|
|
if(postcode == null){
|
|
postcode = "";
|
|
}
|
|
|
|
if(minimumPrice == null){
|
|
minimumPrice = "";
|
|
}
|
|
|
|
if(city == null){
|
|
city = "";
|
|
}
|
|
|
|
if(canton == null){
|
|
canton = "";
|
|
}
|
|
}
|
|
|
|
public static void checkNull(ArrayList<CityModel> cityList){
|
|
for (CityModel cityModel : cityList){
|
|
cityModel.checkNull();
|
|
}
|
|
}
|
|
|
|
public String getShippingPointId() {
|
|
return shippingPointId;
|
|
}
|
|
|
|
public String getStoreId() {
|
|
return storeId;
|
|
}
|
|
|
|
public String getPostcode() {
|
|
return postcode;
|
|
}
|
|
|
|
public String getMinimumPrice() {
|
|
return minimumPrice;
|
|
}
|
|
|
|
public String getCity() {
|
|
return city;
|
|
}
|
|
|
|
public String getCanton() {
|
|
return canton;
|
|
}
|
|
}
|