city and zones
This commit is contained in:
79
app/src/main/java/ch/pizzalink/android/model/ZoneModel.java
Normal file
79
app/src/main/java/ch/pizzalink/android/model/ZoneModel.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package ch.pizzalink.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 ZoneModel {
|
||||
|
||||
@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<ZoneModel> cityList){
|
||||
for (ZoneModel zoneModel : cityList){
|
||||
zoneModel.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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user