diff --git a/src/main/java/de/bitsharesmunich/graphenej/Invoice.java b/src/main/java/de/bitsharesmunich/graphenej/Invoice.java index 7109fa3..cdd7364 100644 --- a/src/main/java/de/bitsharesmunich/graphenej/Invoice.java +++ b/src/main/java/de/bitsharesmunich/graphenej/Invoice.java @@ -2,26 +2,17 @@ package de.bitsharesmunich.graphenej; import com.google.gson.Gson; import com.google.gson.JsonElement; -import de.bitsharesmunich.graphenej.interfaces.JsonSerializable; + import org.bitcoinj.core.Base58; +import de.bitsharesmunich.graphenej.interfaces.JsonSerializable; + /** * Class used to handle invoice generation, compression and QR-Code data derivation, * as detailed in this link. * @author Nelson R. PĂ©rez */ public class Invoice implements JsonSerializable { - public static class LineItem { - private String label; - private int quantity; - private String price; - - public LineItem(String label, int quantity, String price){ - this.label = label; - this.quantity = quantity; - this.price = price; - } - } private String to; private String to_label; private String memo; @@ -40,6 +31,62 @@ public class Invoice implements JsonSerializable { this.callback = callback; } + public String getToLabel() { + return to_label; + } + + public void setToLabel(String to_label) { + this.to_label = to_label; + } + + public String getNote() { + return note; + } + + public void setNote(String note) { + this.note = note; + } + + public String getTo() { + return to; + } + + public void setTo(String to) { + this.to = to; + } + + public String getMemo() { + return memo; + } + + public void setMemo(String memo) { + this.memo = memo; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public LineItem[] getLineItems() { + return line_items; + } + + public void setLineItems(LineItem[] line_items) { + this.line_items = line_items; + } + + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + @Override public String toJsonString() { Gson gson = new Gson(); diff --git a/src/main/java/de/bitsharesmunich/graphenej/LineItem.java b/src/main/java/de/bitsharesmunich/graphenej/LineItem.java new file mode 100644 index 0000000..9b58fdb --- /dev/null +++ b/src/main/java/de/bitsharesmunich/graphenej/LineItem.java @@ -0,0 +1,40 @@ +package de.bitsharesmunich.graphenej; + +/** + * Created by nelson on 1/11/17. + */ +public class LineItem { + private String label; + private int quantity; + private double price; + + public LineItem(String label, int quantity, double price){ + this.label = label; + this.quantity = quantity; + this.price = price; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public double getPrice() { + return price; + } + + public void setPrice(double price) { + this.price = price; + } + + public String getLabel(){ + return label; + } + + public void setLabel(String label) { + this.label = label; + } +} \ No newline at end of file