Skip to content

Commit 425d2b2

Browse files
(feat): java 8 compatiblity
1 parent 6cc427c commit 425d2b2

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
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.10'
49+
version = '1.0.11'
5050
from components.java
5151
pom {
5252
scm {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
public class MergeApiClient {
1717
protected final ClientOptions clientOptions;
1818

19-
protected final Supplier<FilestorageClient> filestorageClient;
20-
2119
protected final Supplier<AtsClient> atsClient;
2220

21+
protected final Supplier<FilestorageClient> filestorageClient;
22+
2323
protected final Supplier<CrmClient> crmClient;
2424

2525
protected final Supplier<HrisClient> hrisClient;
@@ -30,22 +30,22 @@ public class MergeApiClient {
3030

3131
public MergeApiClient(ClientOptions clientOptions) {
3232
this.clientOptions = clientOptions;
33-
this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions));
3433
this.atsClient = Suppliers.memoize(() -> new AtsClient(clientOptions));
34+
this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions));
3535
this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions));
3636
this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions));
3737
this.ticketingClient = Suppliers.memoize(() -> new TicketingClient(clientOptions));
3838
this.accountingClient = Suppliers.memoize(() -> new AccountingClient(clientOptions));
3939
}
4040

41-
public FilestorageClient filestorage() {
42-
return this.filestorageClient.get();
43-
}
44-
4541
public AtsClient ats() {
4642
return this.atsClient.get();
4743
}
4844

45+
public FilestorageClient filestorage() {
46+
return this.filestorageClient.get();
47+
}
48+
4949
public CrmClient crm() {
5050
return this.crmClient.get();
5151
}

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ private ClientOptions(
2626
this.environment = environment;
2727
this.headers = new HashMap<>();
2828
this.headers.putAll(headers);
29-
this.headers.putAll(Map.of(
30-
"X-Fern-SDK-Name",
31-
"com.merge.fern:api-sdk",
32-
"X-Fern-SDK-Version",
33-
"1.0.10",
34-
"X-Fern-Language",
35-
"JAVA"));
29+
this.headers.putAll(new HashMap<String, String>() {
30+
{
31+
put("X-Fern-Language", "JAVA");
32+
put("X-Fern-SDK-Name", "com.merge.fern:api-sdk");
33+
put("X-Fern-SDK-Version", "1.0.11");
34+
}
35+
});
3636
this.headerSuppliers = headerSuppliers;
3737
this.httpClient = httpClient;
38-
;
3938
}
4039

4140
public Environment environment() {

0 commit comments

Comments
 (0)