Skip to content

Commit c03b6b0

Browse files
Release 1.8.18
1 parent 0df06c7 commit c03b6b0

3 files changed

Lines changed: 43 additions & 6 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ java {
4646

4747
group = 'com.flagright.api'
4848

49-
version = '1.8.17'
49+
version = '1.8.18'
5050

5151
jar {
5252
dependsOn(":generatePomFileForMavenPublication")
@@ -77,7 +77,7 @@ publishing {
7777
maven(MavenPublication) {
7878
groupId = 'com.flagright.api'
7979
artifactId = 'flagright-java'
80-
version = '1.8.17'
80+
version = '1.8.18'
8181
from components.java
8282
pom {
8383
name = 'flagright'

src/main/java/com/flagright/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ private ClientOptions(
3232
this.headers.putAll(headers);
3333
this.headers.putAll(new HashMap<String, String>() {
3434
{
35-
put("User-Agent", "com.flagright.api:flagright-java/1.8.17");
35+
put("User-Agent", "com.flagright.api:flagright-java/1.8.18");
3636
put("X-Fern-Language", "JAVA");
3737
put("X-Fern-SDK-Name", "com.flagright.fern:api-sdk");
38-
put("X-Fern-SDK-Version", "1.8.17");
38+
put("X-Fern-SDK-Version", "1.8.18");
3939
}
4040
});
4141
this.headerSuppliers = headerSuppliers;

src/main/java/com/flagright/api/types/TransactionStatusDetails.java

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
public final class TransactionStatusDetails {
2626
private final String transactionId;
2727

28+
private final Optional<String> type;
29+
2830
private final List<String> reasons;
2931

3032
private final RuleAction status;
@@ -35,11 +37,13 @@ public final class TransactionStatusDetails {
3537

3638
private TransactionStatusDetails(
3739
String transactionId,
40+
Optional<String> type,
3841
List<String> reasons,
3942
RuleAction status,
4043
Optional<String> comment,
4144
Map<String, Object> additionalProperties) {
4245
this.transactionId = transactionId;
46+
this.type = type;
4347
this.reasons = reasons;
4448
this.status = status;
4549
this.comment = comment;
@@ -51,6 +55,14 @@ public String getTransactionId() {
5155
return transactionId;
5256
}
5357

58+
/**
59+
* @return Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)
60+
*/
61+
@JsonProperty("type")
62+
public Optional<String> getType() {
63+
return type;
64+
}
65+
5466
@JsonProperty("reasons")
5567
public List<String> getReasons() {
5668
return reasons;
@@ -79,14 +91,15 @@ public Map<String, Object> getAdditionalProperties() {
7991

8092
private boolean equalTo(TransactionStatusDetails other) {
8193
return transactionId.equals(other.transactionId)
94+
&& type.equals(other.type)
8295
&& reasons.equals(other.reasons)
8396
&& status.equals(other.status)
8497
&& comment.equals(other.comment);
8598
}
8699

87100
@java.lang.Override
88101
public int hashCode() {
89-
return Objects.hash(this.transactionId, this.reasons, this.status, this.comment);
102+
return Objects.hash(this.transactionId, this.type, this.reasons, this.status, this.comment);
90103
}
91104

92105
@java.lang.Override
@@ -111,6 +124,10 @@ public interface StatusStage {
111124
public interface _FinalStage {
112125
TransactionStatusDetails build();
113126

127+
_FinalStage type(Optional<String> type);
128+
129+
_FinalStage type(String type);
130+
114131
_FinalStage reasons(List<String> reasons);
115132

116133
_FinalStage addReasons(String reasons);
@@ -132,6 +149,8 @@ public static final class Builder implements TransactionIdStage, StatusStage, _F
132149

133150
private List<String> reasons = new ArrayList<>();
134151

152+
private Optional<String> type = Optional.empty();
153+
135154
@JsonAnySetter
136155
private Map<String, Object> additionalProperties = new HashMap<>();
137156

@@ -140,6 +159,7 @@ private Builder() {}
140159
@java.lang.Override
141160
public Builder from(TransactionStatusDetails other) {
142161
transactionId(other.getTransactionId());
162+
type(other.getType());
143163
reasons(other.getReasons());
144164
status(other.getStatus());
145165
comment(other.getComment());
@@ -193,9 +213,26 @@ public _FinalStage reasons(List<String> reasons) {
193213
return this;
194214
}
195215

216+
/**
217+
* <p>Type of transaction (ex: DEPOSIT, WITHDRAWAL, TRANSFER, EXTERNAL_PAYMENT, REFUND, OTHER)</p>
218+
* @return Reference to {@code this} so that method calls can be chained together.
219+
*/
220+
@java.lang.Override
221+
public _FinalStage type(String type) {
222+
this.type = Optional.ofNullable(type);
223+
return this;
224+
}
225+
226+
@java.lang.Override
227+
@JsonSetter(value = "type", nulls = Nulls.SKIP)
228+
public _FinalStage type(Optional<String> type) {
229+
this.type = type;
230+
return this;
231+
}
232+
196233
@java.lang.Override
197234
public TransactionStatusDetails build() {
198-
return new TransactionStatusDetails(transactionId, reasons, status, comment, additionalProperties);
235+
return new TransactionStatusDetails(transactionId, type, reasons, status, comment, additionalProperties);
199236
}
200237
}
201238
}

0 commit comments

Comments
 (0)