Skip to content

Commit d5b34f7

Browse files
authored
Merge pull request #32 from bunq/feature/fix_draftPayment_object_#29
Feature/fix draft payment object #29
2 parents c662833 + fb88fa9 commit d5b34f7

File tree

2 files changed

+57
-5
lines changed

2 files changed

+57
-5
lines changed

src/main/java/com/bunq/sdk/model/generated/endpoint/DraftPayment.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.bunq.sdk.http.BunqResponseRaw;
77
import com.bunq.sdk.model.core.BunqModel;
88
import com.bunq.sdk.model.core.MonetaryAccountReference;
9+
import com.bunq.sdk.model.generated.object.DraftPaymentAnchorObject;
910
import com.bunq.sdk.model.generated.object.DraftPaymentEntry;
1011
import com.bunq.sdk.model.generated.object.DraftPaymentResponse;
1112
import com.bunq.sdk.model.generated.object.LabelUser;
@@ -46,7 +47,7 @@ public class DraftPayment extends BunqModel {
4647
private static final String OBJECT_TYPE = "DraftPayment";
4748

4849
/**
49-
* The id of the DraftPayment.
50+
* The id of the created DrafPayment.
5051
*/
5152
@Expose
5253
@SerializedName("id")
@@ -100,7 +101,7 @@ public class DraftPayment extends BunqModel {
100101
*/
101102
@Expose
102103
@SerializedName("object")
103-
private BunqModel object;
104+
private DraftPaymentAnchorObject object;
104105

105106
public static BunqResponse<Integer> create(ApiContext apiContext, Map<String, Object> requestMap, Integer userId, Integer monetaryAccountId) {
106107
return create(apiContext, requestMap, userId, monetaryAccountId, new HashMap<>());
@@ -165,7 +166,7 @@ public static BunqResponse<DraftPayment> get(ApiContext apiContext, Integer user
165166
}
166167

167168
/**
168-
* The id of the DraftPayment.
169+
* The id of the created DrafPayment.
169170
*/
170171
public Integer getId() {
171172
return this.id;
@@ -245,11 +246,11 @@ public void setEntries(List<DraftPaymentEntry> entries) {
245246
* The Payment or PaymentBatch. This will only be present after the DraftPayment has been
246247
* accepted.
247248
*/
248-
public BunqModel getObject() {
249+
public DraftPaymentAnchorObject getObject() {
249250
return this.object;
250251
}
251252

252-
public void setObject(BunqModel object) {
253+
public void setObject(DraftPaymentAnchorObject object) {
253254
this.object = object;
254255
}
255256

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package com.bunq.sdk.model.generated.object;
2+
3+
import com.bunq.sdk.model.core.BunqModel;
4+
import com.bunq.sdk.model.core.MonetaryAccountReference;
5+
import com.bunq.sdk.model.generated.endpoint.Payment;
6+
import com.bunq.sdk.model.generated.endpoint.PaymentBatch;
7+
import com.google.gson.annotations.Expose;
8+
import com.google.gson.annotations.SerializedName;
9+
import java.math.BigDecimal;
10+
import java.util.ArrayList;
11+
import java.util.HashMap;
12+
import java.util.List;
13+
import java.util.Map;
14+
15+
/**
16+
*/
17+
public class DraftPaymentAnchorObject extends BunqModel {
18+
19+
/**
20+
*/
21+
@Expose
22+
@SerializedName("Payment")
23+
private Payment payment;
24+
25+
/**
26+
*/
27+
@Expose
28+
@SerializedName("PaymentBatch")
29+
private PaymentBatch paymentBatch;
30+
31+
/**
32+
*/
33+
public Payment getPayment() {
34+
return this.payment;
35+
}
36+
37+
public void setPayment(Payment payment) {
38+
this.payment = payment;
39+
}
40+
41+
/**
42+
*/
43+
public PaymentBatch getPaymentBatch() {
44+
return this.paymentBatch;
45+
}
46+
47+
public void setPaymentBatch(PaymentBatch paymentBatch) {
48+
this.paymentBatch = paymentBatch;
49+
}
50+
51+
}

0 commit comments

Comments
 (0)