Skip to content

Commit bcf823d

Browse files
Java generator updates for Merge API (#59)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Rohan Konnur <[email protected]>
1 parent 768959e commit bcf823d

File tree

388 files changed

+12449
-824
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+12449
-824
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ publishing {
4646
maven(MavenPublication) {
4747
groupId = 'dev.merge'
4848
artifactId = 'merge-java-client'
49-
version = '1.0.15'
49+
version = '1.0.16'
5050
from components.java
5151
pom {
5252
scm {

src/main/java/com/merge/api/MergeApiClient.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,46 +18,46 @@ public class MergeApiClient {
1818

1919
protected final Supplier<AtsClient> atsClient;
2020

21-
protected final Supplier<FilestorageClient> filestorageClient;
22-
2321
protected final Supplier<CrmClient> crmClient;
2422

25-
protected final Supplier<HrisClient> hrisClient;
23+
protected final Supplier<FilestorageClient> filestorageClient;
2624

2725
protected final Supplier<TicketingClient> ticketingClient;
2826

27+
protected final Supplier<HrisClient> hrisClient;
28+
2929
protected final Supplier<AccountingClient> accountingClient;
3030

3131
public MergeApiClient(ClientOptions clientOptions) {
3232
this.clientOptions = clientOptions;
3333
this.atsClient = Suppliers.memoize(() -> new AtsClient(clientOptions));
34-
this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions));
3534
this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions));
36-
this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions));
35+
this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions));
3736
this.ticketingClient = Suppliers.memoize(() -> new TicketingClient(clientOptions));
37+
this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions));
3838
this.accountingClient = Suppliers.memoize(() -> new AccountingClient(clientOptions));
3939
}
4040

4141
public AtsClient ats() {
4242
return this.atsClient.get();
4343
}
4444

45-
public FilestorageClient filestorage() {
46-
return this.filestorageClient.get();
47-
}
48-
4945
public CrmClient crm() {
5046
return this.crmClient.get();
5147
}
5248

53-
public HrisClient hris() {
54-
return this.hrisClient.get();
49+
public FilestorageClient filestorage() {
50+
return this.filestorageClient.get();
5551
}
5652

5753
public TicketingClient ticketing() {
5854
return this.ticketingClient.get();
5955
}
6056

57+
public HrisClient hris() {
58+
return this.hrisClient.get();
59+
}
60+
6161
public AccountingClient accounting() {
6262
return this.accountingClient.get();
6363
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private ClientOptions(
3030
{
3131
put("X-Fern-Language", "JAVA");
3232
put("X-Fern-SDK-Name", "com.merge.fern:api-sdk");
33-
put("X-Fern-SDK-Version", "1.0.15");
33+
put("X-Fern-SDK-Version", "1.0.16");
3434
}
3535
});
3636
this.headerSuppliers = headerSuppliers;

src/main/java/com/merge/api/resources/accounting/accountingperiods/AccountingPeriodsClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public PaginatedAccountingPeriodList list(AccountingPeriodsListRequest request,
6060
httpUrl.addQueryParameter(
6161
"include_remote_data", request.getIncludeRemoteData().get().toString());
6262
}
63+
if (request.getIncludeShellData().isPresent()) {
64+
httpUrl.addQueryParameter(
65+
"include_shell_data", request.getIncludeShellData().get().toString());
66+
}
6367
if (request.getPageSize().isPresent()) {
6468
httpUrl.addQueryParameter("page_size", request.getPageSize().get().toString());
6569
}

src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsListRequest.java

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public final class AccountingPeriodsListRequest {
2626

2727
private final Optional<Boolean> includeRemoteData;
2828

29+
private final Optional<Boolean> includeShellData;
30+
2931
private final Optional<Integer> pageSize;
3032

3133
private final Map<String, Object> additionalProperties;
@@ -34,11 +36,13 @@ private AccountingPeriodsListRequest(
3436
Optional<String> cursor,
3537
Optional<Boolean> includeDeletedData,
3638
Optional<Boolean> includeRemoteData,
39+
Optional<Boolean> includeShellData,
3740
Optional<Integer> pageSize,
3841
Map<String, Object> additionalProperties) {
3942
this.cursor = cursor;
4043
this.includeDeletedData = includeDeletedData;
4144
this.includeRemoteData = includeRemoteData;
45+
this.includeShellData = includeShellData;
4246
this.pageSize = pageSize;
4347
this.additionalProperties = additionalProperties;
4448
}
@@ -52,7 +56,7 @@ public Optional<String> getCursor() {
5256
}
5357

5458
/**
55-
* @return Whether to include data that was marked as deleted by third party webhooks.
59+
* @return Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. <a href="https://docs.merge.dev/integrations/hris/supported-features/">Learn more</a>.
5660
*/
5761
@JsonProperty("include_deleted_data")
5862
public Optional<Boolean> getIncludeDeletedData() {
@@ -67,6 +71,14 @@ public Optional<Boolean> getIncludeRemoteData() {
6771
return includeRemoteData;
6872
}
6973

74+
/**
75+
* @return Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
76+
*/
77+
@JsonProperty("include_shell_data")
78+
public Optional<Boolean> getIncludeShellData() {
79+
return includeShellData;
80+
}
81+
7082
/**
7183
* @return Number of results to return per page.
7284
*/
@@ -90,12 +102,14 @@ private boolean equalTo(AccountingPeriodsListRequest other) {
90102
return cursor.equals(other.cursor)
91103
&& includeDeletedData.equals(other.includeDeletedData)
92104
&& includeRemoteData.equals(other.includeRemoteData)
105+
&& includeShellData.equals(other.includeShellData)
93106
&& pageSize.equals(other.pageSize);
94107
}
95108

96109
@java.lang.Override
97110
public int hashCode() {
98-
return Objects.hash(this.cursor, this.includeDeletedData, this.includeRemoteData, this.pageSize);
111+
return Objects.hash(
112+
this.cursor, this.includeDeletedData, this.includeRemoteData, this.includeShellData, this.pageSize);
99113
}
100114

101115
@java.lang.Override
@@ -115,6 +129,8 @@ public static final class Builder {
115129

116130
private Optional<Boolean> includeRemoteData = Optional.empty();
117131

132+
private Optional<Boolean> includeShellData = Optional.empty();
133+
118134
private Optional<Integer> pageSize = Optional.empty();
119135

120136
@JsonAnySetter
@@ -126,6 +142,7 @@ public Builder from(AccountingPeriodsListRequest other) {
126142
cursor(other.getCursor());
127143
includeDeletedData(other.getIncludeDeletedData());
128144
includeRemoteData(other.getIncludeRemoteData());
145+
includeShellData(other.getIncludeShellData());
129146
pageSize(other.getPageSize());
130147
return this;
131148
}
@@ -163,6 +180,17 @@ public Builder includeRemoteData(Boolean includeRemoteData) {
163180
return this;
164181
}
165182

183+
@JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP)
184+
public Builder includeShellData(Optional<Boolean> includeShellData) {
185+
this.includeShellData = includeShellData;
186+
return this;
187+
}
188+
189+
public Builder includeShellData(Boolean includeShellData) {
190+
this.includeShellData = Optional.of(includeShellData);
191+
return this;
192+
}
193+
166194
@JsonSetter(value = "page_size", nulls = Nulls.SKIP)
167195
public Builder pageSize(Optional<Integer> pageSize) {
168196
this.pageSize = pageSize;
@@ -176,7 +204,7 @@ public Builder pageSize(Integer pageSize) {
176204

177205
public AccountingPeriodsListRequest build() {
178206
return new AccountingPeriodsListRequest(
179-
cursor, includeDeletedData, includeRemoteData, pageSize, additionalProperties);
207+
cursor, includeDeletedData, includeRemoteData, includeShellData, pageSize, additionalProperties);
180208
}
181209
}
182210
}

src/main/java/com/merge/api/resources/accounting/accounts/AccountsClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req
8181
httpUrl.addQueryParameter(
8282
"include_remote_data", request.getIncludeRemoteData().get().toString());
8383
}
84+
if (request.getIncludeShellData().isPresent()) {
85+
httpUrl.addQueryParameter(
86+
"include_shell_data", request.getIncludeShellData().get().toString());
87+
}
8488
if (request.getModifiedAfter().isPresent()) {
8589
httpUrl.addQueryParameter(
8690
"modified_after", request.getModifiedAfter().get().toString());

src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsListRequest.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public final class AccountsListRequest {
3737

3838
private final Optional<Boolean> includeRemoteData;
3939

40+
private final Optional<Boolean> includeShellData;
41+
4042
private final Optional<OffsetDateTime> modifiedAfter;
4143

4244
private final Optional<OffsetDateTime> modifiedBefore;
@@ -59,6 +61,7 @@ private AccountsListRequest(
5961
Optional<String> expand,
6062
Optional<Boolean> includeDeletedData,
6163
Optional<Boolean> includeRemoteData,
64+
Optional<Boolean> includeShellData,
6265
Optional<OffsetDateTime> modifiedAfter,
6366
Optional<OffsetDateTime> modifiedBefore,
6467
Optional<Integer> pageSize,
@@ -73,6 +76,7 @@ private AccountsListRequest(
7376
this.expand = expand;
7477
this.includeDeletedData = includeDeletedData;
7578
this.includeRemoteData = includeRemoteData;
79+
this.includeShellData = includeShellData;
7680
this.modifiedAfter = modifiedAfter;
7781
this.modifiedBefore = modifiedBefore;
7882
this.pageSize = pageSize;
@@ -123,7 +127,7 @@ public Optional<String> getExpand() {
123127
}
124128

125129
/**
126-
* @return Whether to include data that was marked as deleted by third party webhooks.
130+
* @return Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. <a href="https://docs.merge.dev/integrations/hris/supported-features/">Learn more</a>.
127131
*/
128132
@JsonProperty("include_deleted_data")
129133
public Optional<Boolean> getIncludeDeletedData() {
@@ -138,6 +142,14 @@ public Optional<Boolean> getIncludeRemoteData() {
138142
return includeRemoteData;
139143
}
140144

145+
/**
146+
* @return Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
147+
*/
148+
@JsonProperty("include_shell_data")
149+
public Optional<Boolean> getIncludeShellData() {
150+
return includeShellData;
151+
}
152+
141153
/**
142154
* @return If provided, only objects synced by Merge after this date time will be returned.
143155
*/
@@ -205,6 +217,7 @@ private boolean equalTo(AccountsListRequest other) {
205217
&& expand.equals(other.expand)
206218
&& includeDeletedData.equals(other.includeDeletedData)
207219
&& includeRemoteData.equals(other.includeRemoteData)
220+
&& includeShellData.equals(other.includeShellData)
208221
&& modifiedAfter.equals(other.modifiedAfter)
209222
&& modifiedBefore.equals(other.modifiedBefore)
210223
&& pageSize.equals(other.pageSize)
@@ -223,6 +236,7 @@ public int hashCode() {
223236
this.expand,
224237
this.includeDeletedData,
225238
this.includeRemoteData,
239+
this.includeShellData,
226240
this.modifiedAfter,
227241
this.modifiedBefore,
228242
this.pageSize,
@@ -256,6 +270,8 @@ public static final class Builder {
256270

257271
private Optional<Boolean> includeRemoteData = Optional.empty();
258272

273+
private Optional<Boolean> includeShellData = Optional.empty();
274+
259275
private Optional<OffsetDateTime> modifiedAfter = Optional.empty();
260276

261277
private Optional<OffsetDateTime> modifiedBefore = Optional.empty();
@@ -281,6 +297,7 @@ public Builder from(AccountsListRequest other) {
281297
expand(other.getExpand());
282298
includeDeletedData(other.getIncludeDeletedData());
283299
includeRemoteData(other.getIncludeRemoteData());
300+
includeShellData(other.getIncludeShellData());
284301
modifiedAfter(other.getModifiedAfter());
285302
modifiedBefore(other.getModifiedBefore());
286303
pageSize(other.getPageSize());
@@ -367,6 +384,17 @@ public Builder includeRemoteData(Boolean includeRemoteData) {
367384
return this;
368385
}
369386

387+
@JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP)
388+
public Builder includeShellData(Optional<Boolean> includeShellData) {
389+
this.includeShellData = includeShellData;
390+
return this;
391+
}
392+
393+
public Builder includeShellData(Boolean includeShellData) {
394+
this.includeShellData = Optional.of(includeShellData);
395+
return this;
396+
}
397+
370398
@JsonSetter(value = "modified_after", nulls = Nulls.SKIP)
371399
public Builder modifiedAfter(Optional<OffsetDateTime> modifiedAfter) {
372400
this.modifiedAfter = modifiedAfter;
@@ -442,6 +470,7 @@ public AccountsListRequest build() {
442470
expand,
443471
includeDeletedData,
444472
includeRemoteData,
473+
includeShellData,
445474
modifiedAfter,
446475
modifiedBefore,
447476
pageSize,

src/main/java/com/merge/api/resources/accounting/attachments/AttachmentsClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ public PaginatedAccountingAttachmentList list(AttachmentsListRequest request, Re
7878
httpUrl.addQueryParameter(
7979
"include_remote_data", request.getIncludeRemoteData().get().toString());
8080
}
81+
if (request.getIncludeShellData().isPresent()) {
82+
httpUrl.addQueryParameter(
83+
"include_shell_data", request.getIncludeShellData().get().toString());
84+
}
8185
if (request.getModifiedAfter().isPresent()) {
8286
httpUrl.addQueryParameter(
8387
"modified_after", request.getModifiedAfter().get().toString());

0 commit comments

Comments
 (0)