Add profile to transaction. And fix test system compile.

parent e3b983f9
package co.melondev.cubedpay.data;
import java.util.Arrays;
import java.util.Currency;
public class Transaction {
......@@ -22,6 +21,7 @@ public class Transaction {
private PublicShop shop;
private ShopDiscount discount;
private String amount;
private UserProfile profile;
private String created;
private String completed;
......@@ -49,6 +49,10 @@ public class Transaction {
return amount;
}
public UserProfile getProfile() {
return profile;
}
public String getCreated() {
return created;
}
......@@ -66,6 +70,7 @@ public class Transaction {
", shop=" + shop +
", discount=" + discount +
", amount='" + amount + '\'' +
", profile='" + profile + '\'' +
", created='" + created + '\'' +
", completed='" + completed + '\'' +
'}';
......
......@@ -26,7 +26,7 @@ public class TestSystem {
api.startEvents(shopID);
api.getShopAPI().getPackages(shopID, 1, 10)
.thenCompose(packages -> api.getShopAPI().createTransaction(shopID, "user@user.com",
.thenCompose(packages -> api.getShopAPI().createTransaction(shopID, "user@user.com", "profile",
new Item(packages.getData().get(0).getId(), 1)))
.thenAccept(transaction -> System.out.println("Payment Url: https://app.cubedpay.com/checkout/" + transaction.getId()))
.exceptionally(throwable -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment