Skip to content

Commit 1b85e7d

Browse files
Release 1.8.37
1 parent ba6d5a7 commit 1b85e7d

13 files changed

+1267
-5
lines changed

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.36'
49+
version = '1.8.37'
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.36'
80+
version = '1.8.37'
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.36");
35+
put("User-Agent", "com.flagright.api:flagright-java/1.8.37");
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.36");
38+
put("X-Fern-SDK-Version", "1.8.37");
3939
}
4040
});
4141
this.headerSuppliers = headerSuppliers;

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public final class BatchBusinessUserWithRulesResult {
4242

4343
private final Optional<List<Person>> directors;
4444

45+
private final Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> associatedParties;
46+
4547
private final Optional<List<LegalEntity>> businessPartners;
4648

4749
private final Optional<TransactionLimits> transactionLimits;
@@ -97,6 +99,7 @@ private BatchBusinessUserWithRulesResult(
9799
Optional<List<CorporateEntityDetails>> corporateEntities,
98100
Optional<List<BatchBusinessUserWithRulesResultShareHoldersItem>> shareHolders,
99101
Optional<List<Person>> directors,
102+
Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> associatedParties,
100103
Optional<List<LegalEntity>> businessPartners,
101104
Optional<TransactionLimits> transactionLimits,
102105
Optional<RiskLevel> riskLevel,
@@ -129,6 +132,7 @@ private BatchBusinessUserWithRulesResult(
129132
this.corporateEntities = corporateEntities;
130133
this.shareHolders = shareHolders;
131134
this.directors = directors;
135+
this.associatedParties = associatedParties;
132136
this.businessPartners = businessPartners;
133137
this.transactionLimits = transactionLimits;
134138
this.riskLevel = riskLevel;
@@ -221,6 +225,14 @@ public Optional<List<Person>> getDirectors() {
221225
return directors;
222226
}
223227

228+
/**
229+
* @return Parties associated with the company. Can be another company or an individual
230+
*/
231+
@JsonProperty("associatedParties")
232+
public Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> getAssociatedParties() {
233+
return associatedParties;
234+
}
235+
224236
/**
225237
* @return Business partners of the company
226238
*/
@@ -369,6 +381,7 @@ private boolean equalTo(BatchBusinessUserWithRulesResult other) {
369381
&& corporateEntities.equals(other.corporateEntities)
370382
&& shareHolders.equals(other.shareHolders)
371383
&& directors.equals(other.directors)
384+
&& associatedParties.equals(other.associatedParties)
372385
&& businessPartners.equals(other.businessPartners)
373386
&& transactionLimits.equals(other.transactionLimits)
374387
&& riskLevel.equals(other.riskLevel)
@@ -405,6 +418,7 @@ public int hashCode() {
405418
this.corporateEntities,
406419
this.shareHolders,
407420
this.directors,
421+
this.associatedParties,
408422
this.businessPartners,
409423
this.transactionLimits,
410424
this.riskLevel,
@@ -482,6 +496,11 @@ public interface _FinalStage {
482496

483497
_FinalStage directors(List<Person> directors);
484498

499+
_FinalStage associatedParties(
500+
Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> associatedParties);
501+
502+
_FinalStage associatedParties(List<BatchBusinessUserWithRulesResultAssociatedPartiesItem> associatedParties);
503+
485504
_FinalStage businessPartners(Optional<List<LegalEntity>> businessPartners);
486505

487506
_FinalStage businessPartners(List<LegalEntity> businessPartners);
@@ -620,6 +639,9 @@ public static final class Builder implements UserIdStage, CreatedTimestampStage,
620639

621640
private Optional<List<LegalEntity>> businessPartners = Optional.empty();
622641

642+
private Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> associatedParties =
643+
Optional.empty();
644+
623645
private Optional<List<Person>> directors = Optional.empty();
624646

625647
private Optional<List<BatchBusinessUserWithRulesResultShareHoldersItem>> shareHolders = Optional.empty();
@@ -651,6 +673,7 @@ public Builder from(BatchBusinessUserWithRulesResult other) {
651673
corporateEntities(other.getCorporateEntities());
652674
shareHolders(other.getShareHolders());
653675
directors(other.getDirectors());
676+
associatedParties(other.getAssociatedParties());
654677
businessPartners(other.getBusinessPartners());
655678
transactionLimits(other.getTransactionLimits());
656679
riskLevel(other.getRiskLevel());
@@ -1007,6 +1030,25 @@ public _FinalStage businessPartners(Optional<List<LegalEntity>> businessPartners
10071030
return this;
10081031
}
10091032

1033+
/**
1034+
* <p>Parties associated with the company. Can be another company or an individual</p>
1035+
* @return Reference to {@code this} so that method calls can be chained together.
1036+
*/
1037+
@java.lang.Override
1038+
public _FinalStage associatedParties(
1039+
List<BatchBusinessUserWithRulesResultAssociatedPartiesItem> associatedParties) {
1040+
this.associatedParties = Optional.ofNullable(associatedParties);
1041+
return this;
1042+
}
1043+
1044+
@java.lang.Override
1045+
@JsonSetter(value = "associatedParties", nulls = Nulls.SKIP)
1046+
public _FinalStage associatedParties(
1047+
Optional<List<BatchBusinessUserWithRulesResultAssociatedPartiesItem>> associatedParties) {
1048+
this.associatedParties = associatedParties;
1049+
return this;
1050+
}
1051+
10101052
/**
10111053
* <p>Director(s) of the company. Must be at least one</p>
10121054
* @return Reference to {@code this} so that method calls can be chained together.
@@ -1127,6 +1169,7 @@ public BatchBusinessUserWithRulesResult build() {
11271169
corporateEntities,
11281170
shareHolders,
11291171
directors,
1172+
associatedParties,
11301173
businessPartners,
11311174
transactionLimits,
11321175
riskLevel,
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
package com.flagright.api.types;
5+
6+
import com.fasterxml.jackson.annotation.JsonValue;
7+
import com.fasterxml.jackson.core.JsonParseException;
8+
import com.fasterxml.jackson.core.JsonParser;
9+
import com.fasterxml.jackson.databind.DeserializationContext;
10+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11+
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
12+
import com.flagright.api.core.ObjectMappers;
13+
import java.io.IOException;
14+
import java.util.Objects;
15+
16+
@JsonDeserialize(using = BatchBusinessUserWithRulesResultAssociatedPartiesItem.Deserializer.class)
17+
public final class BatchBusinessUserWithRulesResultAssociatedPartiesItem {
18+
private final Object value;
19+
20+
private final int type;
21+
22+
private BatchBusinessUserWithRulesResultAssociatedPartiesItem(Object value, int type) {
23+
this.value = value;
24+
this.type = type;
25+
}
26+
27+
@JsonValue
28+
public Object get() {
29+
return this.value;
30+
}
31+
32+
public <T> T visit(Visitor<T> visitor) {
33+
if (this.type == 0) {
34+
return visitor.visit((PersonWithRole) this.value);
35+
} else if (this.type == 1) {
36+
return visitor.visit((LegalEntityWithRole) this.value);
37+
}
38+
throw new IllegalStateException("Failed to visit value. This should never happen.");
39+
}
40+
41+
@java.lang.Override
42+
public boolean equals(Object other) {
43+
if (this == other) return true;
44+
return other instanceof BatchBusinessUserWithRulesResultAssociatedPartiesItem
45+
&& equalTo((BatchBusinessUserWithRulesResultAssociatedPartiesItem) other);
46+
}
47+
48+
private boolean equalTo(BatchBusinessUserWithRulesResultAssociatedPartiesItem other) {
49+
return value.equals(other.value);
50+
}
51+
52+
@java.lang.Override
53+
public int hashCode() {
54+
return Objects.hash(this.value);
55+
}
56+
57+
@java.lang.Override
58+
public String toString() {
59+
return this.value.toString();
60+
}
61+
62+
public static BatchBusinessUserWithRulesResultAssociatedPartiesItem of(PersonWithRole value) {
63+
return new BatchBusinessUserWithRulesResultAssociatedPartiesItem(value, 0);
64+
}
65+
66+
public static BatchBusinessUserWithRulesResultAssociatedPartiesItem of(LegalEntityWithRole value) {
67+
return new BatchBusinessUserWithRulesResultAssociatedPartiesItem(value, 1);
68+
}
69+
70+
public interface Visitor<T> {
71+
T visit(PersonWithRole value);
72+
73+
T visit(LegalEntityWithRole value);
74+
}
75+
76+
static final class Deserializer extends StdDeserializer<BatchBusinessUserWithRulesResultAssociatedPartiesItem> {
77+
Deserializer() {
78+
super(BatchBusinessUserWithRulesResultAssociatedPartiesItem.class);
79+
}
80+
81+
@java.lang.Override
82+
public BatchBusinessUserWithRulesResultAssociatedPartiesItem deserialize(
83+
JsonParser p, DeserializationContext context) throws IOException {
84+
Object value = p.readValueAs(Object.class);
85+
try {
86+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, PersonWithRole.class));
87+
} catch (IllegalArgumentException e) {
88+
}
89+
try {
90+
return of(ObjectMappers.JSON_MAPPER.convertValue(value, LegalEntityWithRole.class));
91+
} catch (IllegalArgumentException e) {
92+
}
93+
throw new JsonParseException(p, "Failed to deserialize");
94+
}
95+
}
96+
}

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public final class Business {
4242

4343
private final Optional<List<Person>> directors;
4444

45+
private final Optional<List<BusinessAssociatedPartiesItem>> associatedParties;
46+
4547
private final Optional<List<LegalEntity>> businessPartners;
4648

4749
private final Optional<TransactionLimits> transactionLimits;
@@ -93,6 +95,7 @@ private Business(
9395
Optional<List<CorporateEntityDetails>> corporateEntities,
9496
Optional<List<BusinessShareHoldersItem>> shareHolders,
9597
Optional<List<Person>> directors,
98+
Optional<List<BusinessAssociatedPartiesItem>> associatedParties,
9699
Optional<List<LegalEntity>> businessPartners,
97100
Optional<TransactionLimits> transactionLimits,
98101
Optional<RiskLevel> riskLevel,
@@ -123,6 +126,7 @@ private Business(
123126
this.corporateEntities = corporateEntities;
124127
this.shareHolders = shareHolders;
125128
this.directors = directors;
129+
this.associatedParties = associatedParties;
126130
this.businessPartners = businessPartners;
127131
this.transactionLimits = transactionLimits;
128132
this.riskLevel = riskLevel;
@@ -213,6 +217,14 @@ public Optional<List<Person>> getDirectors() {
213217
return directors;
214218
}
215219

220+
/**
221+
* @return Parties associated with the company. Can be another company or an individual
222+
*/
223+
@JsonProperty("associatedParties")
224+
public Optional<List<BusinessAssociatedPartiesItem>> getAssociatedParties() {
225+
return associatedParties;
226+
}
227+
216228
/**
217229
* @return Business partners of the company
218230
*/
@@ -351,6 +363,7 @@ private boolean equalTo(Business other) {
351363
&& corporateEntities.equals(other.corporateEntities)
352364
&& shareHolders.equals(other.shareHolders)
353365
&& directors.equals(other.directors)
366+
&& associatedParties.equals(other.associatedParties)
354367
&& businessPartners.equals(other.businessPartners)
355368
&& transactionLimits.equals(other.transactionLimits)
356369
&& riskLevel.equals(other.riskLevel)
@@ -385,6 +398,7 @@ public int hashCode() {
385398
this.corporateEntities,
386399
this.shareHolders,
387400
this.directors,
401+
this.associatedParties,
388402
this.businessPartners,
389403
this.transactionLimits,
390404
this.riskLevel,
@@ -460,6 +474,10 @@ public interface _FinalStage {
460474

461475
_FinalStage directors(List<Person> directors);
462476

477+
_FinalStage associatedParties(Optional<List<BusinessAssociatedPartiesItem>> associatedParties);
478+
479+
_FinalStage associatedParties(List<BusinessAssociatedPartiesItem> associatedParties);
480+
463481
_FinalStage businessPartners(Optional<List<LegalEntity>> businessPartners);
464482

465483
_FinalStage businessPartners(List<LegalEntity> businessPartners);
@@ -583,6 +601,8 @@ public static final class Builder implements UserIdStage, CreatedTimestampStage,
583601

584602
private Optional<List<LegalEntity>> businessPartners = Optional.empty();
585603

604+
private Optional<List<BusinessAssociatedPartiesItem>> associatedParties = Optional.empty();
605+
586606
private Optional<List<Person>> directors = Optional.empty();
587607

588608
private Optional<List<BusinessShareHoldersItem>> shareHolders = Optional.empty();
@@ -614,6 +634,7 @@ public Builder from(Business other) {
614634
corporateEntities(other.getCorporateEntities());
615635
shareHolders(other.getShareHolders());
616636
directors(other.getDirectors());
637+
associatedParties(other.getAssociatedParties());
617638
businessPartners(other.getBusinessPartners());
618639
transactionLimits(other.getTransactionLimits());
619640
riskLevel(other.getRiskLevel());
@@ -940,6 +961,23 @@ public _FinalStage businessPartners(Optional<List<LegalEntity>> businessPartners
940961
return this;
941962
}
942963

964+
/**
965+
* <p>Parties associated with the company. Can be another company or an individual</p>
966+
* @return Reference to {@code this} so that method calls can be chained together.
967+
*/
968+
@java.lang.Override
969+
public _FinalStage associatedParties(List<BusinessAssociatedPartiesItem> associatedParties) {
970+
this.associatedParties = Optional.ofNullable(associatedParties);
971+
return this;
972+
}
973+
974+
@java.lang.Override
975+
@JsonSetter(value = "associatedParties", nulls = Nulls.SKIP)
976+
public _FinalStage associatedParties(Optional<List<BusinessAssociatedPartiesItem>> associatedParties) {
977+
this.associatedParties = associatedParties;
978+
return this;
979+
}
980+
943981
/**
944982
* <p>Director(s) of the company. Must be at least one</p>
945983
* @return Reference to {@code this} so that method calls can be chained together.
@@ -1060,6 +1098,7 @@ public Business build() {
10601098
corporateEntities,
10611099
shareHolders,
10621100
directors,
1101+
associatedParties,
10631102
businessPartners,
10641103
transactionLimits,
10651104
riskLevel,

0 commit comments

Comments
 (0)