Skip to content

Commit 08d4e8d

Browse files
chore: generate code
1 parent da11195 commit 08d4e8d

8 files changed

Lines changed: 138 additions & 137 deletions

src/main/java/com/sumup/sdk/models/CheckoutSuccessTransactionsItem.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ public record CheckoutSuccessTransactionsItem(
3232
/** Payment type used for the transaction. */
3333
com.sumup.sdk.models.PaymentType paymentType,
3434

35-
/** Current status of the transaction. */
36-
com.sumup.sdk.models.TransactionFullStatus status,
35+
/**
36+
* Current status of the transaction. - `PENDING`: The transaction has been created but its
37+
* final outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. -
38+
* `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. -
39+
* `FAILED`: The transaction attempt did not complete successfully. - `REFUNDED`: The
40+
* transaction was refunded in full or in part.
41+
*/
42+
com.sumup.sdk.models.TransactionStatus status,
3743

3844
/**
3945
* Date and time of the creation of the transaction. Response format expressed according to
@@ -70,7 +76,7 @@ public static final class Builder {
7076
private Long installmentsCount;
7177
private String merchantCode;
7278
private com.sumup.sdk.models.PaymentType paymentType;
73-
private com.sumup.sdk.models.TransactionFullStatus status;
79+
private com.sumup.sdk.models.TransactionStatus status;
7480
private java.time.OffsetDateTime timestamp;
7581
private Float tipAmount;
7682
private String transactionCode;
@@ -171,10 +177,14 @@ public Builder paymentType(com.sumup.sdk.models.PaymentType paymentType) {
171177
/**
172178
* Sets the value for {@code status}.
173179
*
174-
* @param status Current status of the transaction.
180+
* @param status Current status of the transaction. - `PENDING`: The transaction has been
181+
* created but its final outcome is not known yet. - `SUCCESSFUL`: The transaction completed
182+
* successfully. - `CANCELLED`: The transaction was cancelled or otherwise reversed before
183+
* completion. - `FAILED`: The transaction attempt did not complete successfully. -
184+
* `REFUNDED`: The transaction was refunded in full or in part.
175185
* @return This builder instance.
176186
*/
177-
public Builder status(com.sumup.sdk.models.TransactionFullStatus status) {
187+
public Builder status(com.sumup.sdk.models.TransactionStatus status) {
178188
this.status = status;
179189
return this;
180190
}

src/main/java/com/sumup/sdk/models/CheckoutTransactionsItem.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,14 @@ public record CheckoutTransactionsItem(
3232
/** Payment type used for the transaction. */
3333
com.sumup.sdk.models.PaymentType paymentType,
3434

35-
/** Current status of the transaction. */
36-
com.sumup.sdk.models.TransactionFullStatus status,
35+
/**
36+
* Current status of the transaction. - `PENDING`: The transaction has been created but its
37+
* final outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. -
38+
* `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. -
39+
* `FAILED`: The transaction attempt did not complete successfully. - `REFUNDED`: The
40+
* transaction was refunded in full or in part.
41+
*/
42+
com.sumup.sdk.models.TransactionStatus status,
3743

3844
/**
3945
* Date and time of the creation of the transaction. Response format expressed according to
@@ -70,7 +76,7 @@ public static final class Builder {
7076
private Long installmentsCount;
7177
private String merchantCode;
7278
private com.sumup.sdk.models.PaymentType paymentType;
73-
private com.sumup.sdk.models.TransactionFullStatus status;
79+
private com.sumup.sdk.models.TransactionStatus status;
7480
private java.time.OffsetDateTime timestamp;
7581
private Float tipAmount;
7682
private String transactionCode;
@@ -171,10 +177,14 @@ public Builder paymentType(com.sumup.sdk.models.PaymentType paymentType) {
171177
/**
172178
* Sets the value for {@code status}.
173179
*
174-
* @param status Current status of the transaction.
180+
* @param status Current status of the transaction. - `PENDING`: The transaction has been
181+
* created but its final outcome is not known yet. - `SUCCESSFUL`: The transaction completed
182+
* successfully. - `CANCELLED`: The transaction was cancelled or otherwise reversed before
183+
* completion. - `FAILED`: The transaction attempt did not complete successfully. -
184+
* `REFUNDED`: The transaction was refunded in full or in part.
175185
* @return This builder instance.
176186
*/
177-
public Builder status(com.sumup.sdk.models.TransactionFullStatus status) {
187+
public Builder status(com.sumup.sdk.models.TransactionStatus status) {
178188
this.status = status;
179189
return this;
180190
}

src/main/java/com/sumup/sdk/models/TransactionBase.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ public record TransactionBase(
2121
/** Payment type used for the transaction. */
2222
com.sumup.sdk.models.PaymentType paymentType,
2323

24-
/** Current status of the transaction. */
25-
com.sumup.sdk.models.TransactionBaseStatus status,
24+
/**
25+
* Current status of the transaction. - `PENDING`: The transaction has been created but its
26+
* final outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. -
27+
* `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. -
28+
* `FAILED`: The transaction attempt did not complete successfully. - `REFUNDED`: The
29+
* transaction was refunded in full or in part.
30+
*/
31+
com.sumup.sdk.models.TransactionStatus status,
2632

2733
/**
2834
* Date and time of the creation of the transaction. Response format expressed according to
@@ -50,7 +56,7 @@ public static final class Builder {
5056
private String id;
5157
private Long installmentsCount;
5258
private com.sumup.sdk.models.PaymentType paymentType;
53-
private com.sumup.sdk.models.TransactionBaseStatus status;
59+
private com.sumup.sdk.models.TransactionStatus status;
5460
private java.time.OffsetDateTime timestamp;
5561
private String transactionCode;
5662

@@ -115,10 +121,14 @@ public Builder paymentType(com.sumup.sdk.models.PaymentType paymentType) {
115121
/**
116122
* Sets the value for {@code status}.
117123
*
118-
* @param status Current status of the transaction.
124+
* @param status Current status of the transaction. - `PENDING`: The transaction has been
125+
* created but its final outcome is not known yet. - `SUCCESSFUL`: The transaction completed
126+
* successfully. - `CANCELLED`: The transaction was cancelled or otherwise reversed before
127+
* completion. - `FAILED`: The transaction attempt did not complete successfully. -
128+
* `REFUNDED`: The transaction was refunded in full or in part.
119129
* @return This builder instance.
120130
*/
121-
public Builder status(com.sumup.sdk.models.TransactionBaseStatus status) {
131+
public Builder status(com.sumup.sdk.models.TransactionStatus status) {
122132
this.status = status;
123133
return this;
124134
}

src/main/java/com/sumup/sdk/models/TransactionBaseStatus.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/main/java/com/sumup/sdk/models/TransactionFull.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,14 @@ public record TransactionFull(
130130
*/
131131
com.sumup.sdk.models.TransactionFullSimpleStatus simpleStatus,
132132

133-
/** Current status of the transaction. */
134-
com.sumup.sdk.models.TransactionFullStatus status,
133+
/**
134+
* Current status of the transaction. - `PENDING`: The transaction has been created but its
135+
* final outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. -
136+
* `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. -
137+
* `FAILED`: The transaction attempt did not complete successfully. - `REFUNDED`: The
138+
* transaction was refunded in full or in part.
139+
*/
140+
com.sumup.sdk.models.TransactionStatus status,
135141

136142
/** Indicates whether tax deduction is enabled for the transaction. */
137143
Boolean taxEnabled,
@@ -207,7 +213,7 @@ public static final class Builder {
207213
private java.util.List<com.sumup.sdk.models.Product> products;
208214
private com.sumup.sdk.models.TransactionFullSimplePaymentType simplePaymentType;
209215
private com.sumup.sdk.models.TransactionFullSimpleStatus simpleStatus;
210-
private com.sumup.sdk.models.TransactionFullStatus status;
216+
private com.sumup.sdk.models.TransactionStatus status;
211217
private Boolean taxEnabled;
212218
private java.time.OffsetDateTime timestamp;
213219
private Float tipAmount;
@@ -597,10 +603,14 @@ public Builder simpleStatus(com.sumup.sdk.models.TransactionFullSimpleStatus sim
597603
/**
598604
* Sets the value for {@code status}.
599605
*
600-
* @param status Current status of the transaction.
606+
* @param status Current status of the transaction. - `PENDING`: The transaction has been
607+
* created but its final outcome is not known yet. - `SUCCESSFUL`: The transaction completed
608+
* successfully. - `CANCELLED`: The transaction was cancelled or otherwise reversed before
609+
* completion. - `FAILED`: The transaction attempt did not complete successfully. -
610+
* `REFUNDED`: The transaction was refunded in full or in part.
601611
* @return This builder instance.
602612
*/
603-
public Builder status(com.sumup.sdk.models.TransactionFullStatus status) {
613+
public Builder status(com.sumup.sdk.models.TransactionStatus status) {
604614
this.status = status;
605615
return this;
606616
}

src/main/java/com/sumup/sdk/models/TransactionFullStatus.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/main/java/com/sumup/sdk/models/TransactionHistory.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,14 @@ public record TransactionHistory(
5151
/** Total refunded amount. */
5252
Double refundedAmount,
5353

54-
/** Current status of the transaction. */
55-
com.sumup.sdk.models.TransactionFullStatus status,
54+
/**
55+
* Current status of the transaction. - `PENDING`: The transaction has been created but its
56+
* final outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. -
57+
* `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. -
58+
* `FAILED`: The transaction attempt did not complete successfully. - `REFUNDED`: The
59+
* transaction was refunded in full or in part.
60+
*/
61+
com.sumup.sdk.models.TransactionStatus status,
5662

5763
/**
5864
* Date and time of the creation of the transaction. Response format expressed according to
@@ -98,7 +104,7 @@ public static final class Builder {
98104
private Long payoutsTotal;
99105
private String productSummary;
100106
private Double refundedAmount;
101-
private com.sumup.sdk.models.TransactionFullStatus status;
107+
private com.sumup.sdk.models.TransactionStatus status;
102108
private java.time.OffsetDateTime timestamp;
103109
private String transactionCode;
104110
private com.sumup.sdk.models.TransactionId transactionId;
@@ -269,10 +275,14 @@ public Builder refundedAmount(Double refundedAmount) {
269275
/**
270276
* Sets the value for {@code status}.
271277
*
272-
* @param status Current status of the transaction.
278+
* @param status Current status of the transaction. - `PENDING`: The transaction has been
279+
* created but its final outcome is not known yet. - `SUCCESSFUL`: The transaction completed
280+
* successfully. - `CANCELLED`: The transaction was cancelled or otherwise reversed before
281+
* completion. - `FAILED`: The transaction attempt did not complete successfully. -
282+
* `REFUNDED`: The transaction was refunded in full or in part.
273283
* @return This builder instance.
274284
*/
275-
public Builder status(com.sumup.sdk.models.TransactionFullStatus status) {
285+
public Builder status(com.sumup.sdk.models.TransactionStatus status) {
276286
this.status = status;
277287
return this;
278288
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Code generated by sumup-java/codegen. DO NOT EDIT.
2+
package com.sumup.sdk.models;
3+
4+
import com.fasterxml.jackson.annotation.JsonCreator;
5+
import com.fasterxml.jackson.annotation.JsonValue;
6+
import java.util.Objects;
7+
8+
/**
9+
* Current status of the transaction. - `PENDING`: The transaction has been created but its final
10+
* outcome is not known yet. - `SUCCESSFUL`: The transaction completed successfully. - `CANCELLED`:
11+
* The transaction was cancelled or otherwise reversed before completion. - `FAILED`: The
12+
* transaction attempt did not complete successfully. - `REFUNDED`: The transaction was refunded in
13+
* full or in part.
14+
*/
15+
public final class TransactionStatus {
16+
public static final TransactionStatus SUCCESSFUL = new TransactionStatus("SUCCESSFUL");
17+
public static final TransactionStatus CANCELLED = new TransactionStatus("CANCELLED");
18+
public static final TransactionStatus FAILED = new TransactionStatus("FAILED");
19+
public static final TransactionStatus PENDING = new TransactionStatus("PENDING");
20+
public static final TransactionStatus REFUNDED = new TransactionStatus("REFUNDED");
21+
22+
private final String value;
23+
24+
private TransactionStatus(String value) {
25+
this.value = Objects.requireNonNull(value, "value");
26+
}
27+
28+
/**
29+
* Creates a TransactionStatus for a value not yet known to this SDK version.
30+
*
31+
* @param value Wire value sent to or received from the API.
32+
* @return Open enum value wrapping {@code value}.
33+
*/
34+
public static TransactionStatus of(String value) {
35+
return new TransactionStatus(value);
36+
}
37+
38+
@JsonValue
39+
public String getValue() {
40+
return value;
41+
}
42+
43+
@Override
44+
public String toString() {
45+
return value;
46+
}
47+
48+
@JsonCreator
49+
public static TransactionStatus fromValue(String value) {
50+
return value == null ? null : new TransactionStatus(value);
51+
}
52+
53+
@Override
54+
public boolean equals(Object other) {
55+
return this == other
56+
|| (other instanceof TransactionStatus that && this.value.equals(that.value));
57+
}
58+
59+
@Override
60+
public int hashCode() {
61+
return value.hashCode();
62+
}
63+
}

0 commit comments

Comments
 (0)