Created
April 14, 2017 14:00
-
-
Save AlaaZarifa/d520080a364282865e3522e56e5b1344 to your computer and use it in GitHub Desktop.
Order Class
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
// **Order class** | |
public class Order { | |
public static final int FINISHED = 1; | |
public static final int NEW = 2; | |
@SerializedName("status") | |
@Expose | |
private String status; | |
public int getID() { | |
return ID; | |
} | |
public void setID(int ID) { | |
this.ID = ID; | |
} | |
@SerializedName("id") | |
@Expose | |
private int ID; | |
@SerializedName("total") | |
@Expose | |
private float price; | |
public float getSub_price() { | |
return sub_price; | |
} | |
public void setSub_price(float sub_price) { | |
this.sub_price = sub_price; | |
} | |
@SerializedName("subtotal") | |
@Expose | |
private float sub_price; | |
@SerializedName("created_at") | |
@Expose | |
private Date time; | |
@SerializedName("line_items") | |
@Expose | |
public List<ItemsNum> lineItems = new ArrayList<ItemsNum>(); | |
@SerializedName("shipping_address") | |
@Expose | |
public Address cusAdress; | |
@SerializedName("customer") | |
@Expose | |
public Customer customer; | |
@SerializedName("sub_orders") | |
@Expose | |
private List<Sub_Orders> subOrders = null; | |
public Order(Customer customer, String status, float price, String cusPicURL, String firstName, String lastName, Date time, List<ItemsNum> lineItems, List<Sub_Orders> subOrders , Address cusAdress) { | |
this.status = status; | |
this.price = price; | |
this.customer = customer; | |
this.time = time; | |
this.lineItems = lineItems; | |
this.subOrders = subOrders; | |
this.cusAdress = cusAdress; | |
} | |
public Date getTime() { | |
return time; | |
} | |
public void setTime(Date time) { | |
this.time = time; | |
} | |
public List<ItemsNum> getLineItems() { | |
return lineItems; | |
} | |
public void setLineItems(List<ItemsNum> lineItems) { | |
this.lineItems = lineItems; | |
} | |
public List<Sub_Orders> getSubOrders() { | |
return subOrders; | |
} | |
public void setSubOrders(List<Sub_Orders> subOrders) { | |
this.subOrders = subOrders; | |
} | |
public String getStatus() { | |
return status; | |
} | |
public void setStatus(String status) { | |
this.status = status; | |
} | |
public float getPrice() { | |
return price; | |
} | |
public void setPrice(float price) { | |
this.price = price; | |
} | |
public Address getCusAdress() { | |
return cusAdress; | |
} | |
public void setCusAdress(Address cusAdress) { | |
this.cusAdress = cusAdress; | |
} | |
public class ItemsNum { | |
@SerializedName("id") | |
@Expose | |
public Integer id; | |
} | |
public class OrdersNum { | |
@SerializedName("id") | |
@Expose | |
public Integer id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment