br.com.moip.resource.Order Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk Show documentation
Show all versions of java-sdk Show documentation
Java SDK for Moip v2 APIs
package br.com.moip.resource;
import java.util.ArrayList;
import java.util.List;
public class Order {
private String id;
private Amount amount;
private String ownId;
private final List- items;
private Customer customer;
private final List
receivers = new ArrayList<>();
public String getId() {
return id;
}
public Amount getAmount() {
return amount;
}
public String getOwnId() {
return ownId;
}
public List- getItems() {
return items;
}
public Customer getCustomer() {
return customer;
}
public List
getReceivers() {
return receivers;
}
public Order(){
items = new ArrayList- ();
}
protected Order(final Order order){
this.id = order.getId();
this.amount = order.getAmount();
this.ownId = order.getOwnId();
this.customer = order.getCustomer();
this.items = order.getItems();
}
@Override
public String toString() {
return new StringBuilder("Order{")
.append("id='").append(id).append('\'')
.append(", amount=").append(amount)
.append(", ownId='").append(ownId).append('\'')
.append(", items=").append(items)
.append(", customer=").append(customer)
.append(", receivers=").append(receivers)
.append('}').toString();
}
public static final class Item {
private String product;
private Integer quantity;
private String detail;
private Integer price;
public String getProduct() {
return product;
}
public Integer getQuantity() {
return quantity;
}
public String getDetail() {
return detail;
}
public Integer getPrice() {
return price;
}
@Override
public String toString() {
return new StringBuilder("Item{")
.append("product='").append(product).append('\'')
.append(", quantity=").append(quantity)
.append(", detail='").append(detail).append('\'')
.append(", price=").append(price)
.append('}').toString();
}
}
}