Closed albertonaperijr closed 5 years ago
E.g.
{ currency: "USD", totalAmount: 10.00, items: [{ name: "test1", currency: "USD", price: 5.00 }, { name: "test2", currency: "USD", price: 5.00 }] }
I've tried the code below but items are not being generated properly.
InputObject item1 = new InputObject.Builder<>() .put("name", "test1") .put("currency", "USD") .put("price", 5.00) .build(); InputObject item2 = new InputObject.Builder<>() .put("name", "test2") .put("currency", "USD") .put("price", 5.00) .build(); List<InputObject> items = new ArrayList<>(); items.add(item1); items.add(item2); InputObject input = new InputObject.Builder<>() .put("currency", "USD") .put("totalAmount", 10.00) .put("items", items) .build();
Actual Output:
mutation { createPayment (input:{currency:"USD",totalAmount:10.00,items:[io.aexp.nodes.graphql.InputObject@74a0c8e4,io.aexp.nodes.graphql.InputObject@82a0c0a5]}) { paymentId } }
Expected Output:
mutation { createPayment (input:{currency:"USD",totalAmount:10.00,items:[{name:"test1",currency:"USD",price:5.00},{name:"test2",currency:"USD",price:5.00}]}) { paymentId } }
Thanks.
duplicate of #45
E.g.
I've tried the code below but items are not being generated properly.
Actual Output:
Expected Output:
Thanks.