Skip to content

Commit 2218b0d

Browse files
committed
Merge tag '1.27.17.58' into develop
Release 1.27.17.58
2 parents 7feb0e1 + eddf205 commit 2218b0d

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

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

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class SchedulePayment extends BunqModel {
3636
*/
3737
public static final String FIELD_PAYMENT = "payment";
3838
public static final String FIELD_SCHEDULE = "schedule";
39+
public static final String FIELD_PURPOSE = "purpose";
3940

4041
/**
4142
* Object type.
@@ -64,6 +65,13 @@ public class SchedulePayment extends BunqModel {
6465
@SerializedName("status")
6566
private String status;
6667

68+
/**
69+
* The schedule purpose.
70+
*/
71+
@Expose
72+
@SerializedName("purpose")
73+
private String purpose;
74+
6775
/**
6876
* The payment details.
6977
*/
@@ -78,22 +86,35 @@ public class SchedulePayment extends BunqModel {
7886
@SerializedName("schedule_field_for_request")
7987
private Schedule scheduleFieldForRequest;
8088

89+
/**
90+
* The purpose of this scheduled payment.
91+
*/
92+
@Expose
93+
@SerializedName("purpose_field_for_request")
94+
private String purposeFieldForRequest;
95+
8196
public SchedulePayment() {
82-
this(null, null);
97+
this(null, null, null);
8398
}
8499

85100
public SchedulePayment(SchedulePaymentEntry payment) {
86-
this(payment, null);
101+
this(payment, null, null);
87102
}
88103

89104
public SchedulePayment(SchedulePaymentEntry payment, Schedule schedule) {
105+
this(payment, schedule, null);
106+
}
107+
108+
public SchedulePayment(SchedulePaymentEntry payment, Schedule schedule, String purpose) {
90109
this.paymentFieldForRequest = payment;
91110
this.scheduleFieldForRequest = schedule;
111+
this.purposeFieldForRequest = purpose;
92112
} /**
93113
* @param payment The payment details.
94114
* @param schedule The schedule details when creating or updating a scheduled payment.
115+
* @param purpose The purpose of this scheduled payment.
95116
*/
96-
public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedule schedule, Integer monetaryAccountId, Map<String, String> customHeaders) {
117+
public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedule schedule, Integer monetaryAccountId, String purpose, Map<String, String> customHeaders) {
97118
ApiClient apiClient = new ApiClient(getApiContext());
98119

99120
if (customHeaders == null) {
@@ -103,6 +124,7 @@ public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedul
103124
HashMap<String, Object> requestMap = new HashMap<>();
104125
requestMap.put(FIELD_PAYMENT, payment);
105126
requestMap.put(FIELD_SCHEDULE, schedule);
127+
requestMap.put(FIELD_PURPOSE, purpose);
106128

107129
byte[] requestBytes = determineAllRequestByte(requestMap);
108130
BunqResponseRaw responseRaw = apiClient.post(String.format(ENDPOINT_URL_CREATE, determineUserId(), determineMonetaryAccountId(monetaryAccountId)), requestBytes, customHeaders);
@@ -111,19 +133,23 @@ public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedul
111133
}
112134

113135
public static BunqResponse<Integer> create() {
114-
return create(null, null, null, null);
136+
return create(null, null, null, null, null);
115137
}
116138

117139
public static BunqResponse<Integer> create(SchedulePaymentEntry payment) {
118-
return create(payment, null, null, null);
140+
return create(payment, null, null, null, null);
119141
}
120142

121143
public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedule schedule) {
122-
return create(payment, schedule, null, null);
144+
return create(payment, schedule, null, null, null);
123145
}
124146

125147
public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedule schedule, Integer monetaryAccountId) {
126-
return create(payment, schedule, monetaryAccountId, null);
148+
return create(payment, schedule, monetaryAccountId, null, null);
149+
}
150+
151+
public static BunqResponse<Integer> create(SchedulePaymentEntry payment, Schedule schedule, Integer monetaryAccountId, String purpose) {
152+
return create(payment, schedule, monetaryAccountId, purpose, null);
127153
}
128154

129155
/**
@@ -259,6 +285,17 @@ public void setStatus(String status) {
259285
this.status = status;
260286
}
261287

288+
/**
289+
* The schedule purpose.
290+
*/
291+
public String getPurpose() {
292+
return this.purpose;
293+
}
294+
295+
public void setPurpose(String purpose) {
296+
this.purpose = purpose;
297+
}
298+
262299
/**
263300
*/
264301
public boolean isAllFieldNull() {
@@ -274,6 +311,10 @@ public boolean isAllFieldNull() {
274311
return false;
275312
}
276313

314+
if (this.purpose != null) {
315+
return false;
316+
}
317+
277318
return true;
278319
}
279320

0 commit comments

Comments
 (0)