Skip to content

🌿 Fern Regeneration -- March 4, 2025 #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ java {

group = 'dev.merge'

version = '1.1.1'
version = '1.1.2'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand All @@ -71,7 +71,7 @@ publishing {
maven(MavenPublication) {
groupId = 'dev.merge'
artifactId = 'merge-java-client'
version = '1.1.1'
version = '1.1.2'
from components.java
pom {
licenses {
Expand Down
28 changes: 14 additions & 14 deletions src/main/java/com/merge/api/MergeApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,46 @@ public class MergeApiClient {

protected final Supplier<AtsClient> atsClient;

protected final Supplier<CrmClient> crmClient;

protected final Supplier<FilestorageClient> filestorageClient;

protected final Supplier<TicketingClient> ticketingClient;

protected final Supplier<HrisClient> hrisClient;

protected final Supplier<CrmClient> crmClient;

protected final Supplier<TicketingClient> ticketingClient;

protected final Supplier<AccountingClient> accountingClient;

public MergeApiClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.atsClient = Suppliers.memoize(() -> new AtsClient(clientOptions));
this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions));
this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions));
this.ticketingClient = Suppliers.memoize(() -> new TicketingClient(clientOptions));
this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions));
this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions));
this.ticketingClient = Suppliers.memoize(() -> new TicketingClient(clientOptions));
this.accountingClient = Suppliers.memoize(() -> new AccountingClient(clientOptions));
}

public AtsClient ats() {
return this.atsClient.get();
}

public CrmClient crm() {
return this.crmClient.get();
}

public FilestorageClient filestorage() {
return this.filestorageClient.get();
}

public TicketingClient ticketing() {
return this.ticketingClient.get();
}

public HrisClient hris() {
return this.hrisClient.get();
}

public CrmClient crm() {
return this.crmClient.get();
}

public TicketingClient ticketing() {
return this.ticketingClient.get();
}

public AccountingClient accounting() {
return this.accountingClient.get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/merge/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private ClientOptions(
{
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.merge.fern:api-sdk");
put("X-Fern-SDK-Version", "1.1.1");
put("X-Fern-SDK-Version", "1.1.2");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
import com.merge.api.resources.accounting.linkedaccounts.LinkedAccountsClient;
import com.merge.api.resources.accounting.linktoken.LinkTokenClient;
import com.merge.api.resources.accounting.passthrough.PassthroughClient;
import com.merge.api.resources.accounting.paymentmethods.PaymentMethodsClient;
import com.merge.api.resources.accounting.payments.PaymentsClient;
import com.merge.api.resources.accounting.paymentterms.PaymentTermsClient;
import com.merge.api.resources.accounting.phonenumbers.PhoneNumbersClient;
import com.merge.api.resources.accounting.purchaseorders.PurchaseOrdersClient;
import com.merge.api.resources.accounting.regeneratekey.RegenerateKeyClient;
Expand Down Expand Up @@ -117,6 +119,10 @@ public class AccountingClient {

protected final Supplier<PassthroughClient> passthroughClient;

protected final Supplier<PaymentMethodsClient> paymentMethodsClient;

protected final Supplier<PaymentTermsClient> paymentTermsClient;

protected final Supplier<PaymentsClient> paymentsClient;

protected final Supplier<PhoneNumbersClient> phoneNumbersClient;
Expand Down Expand Up @@ -174,6 +180,8 @@ public AccountingClient(ClientOptions clientOptions) {
this.linkTokenClient = Suppliers.memoize(() -> new LinkTokenClient(clientOptions));
this.linkedAccountsClient = Suppliers.memoize(() -> new LinkedAccountsClient(clientOptions));
this.passthroughClient = Suppliers.memoize(() -> new PassthroughClient(clientOptions));
this.paymentMethodsClient = Suppliers.memoize(() -> new PaymentMethodsClient(clientOptions));
this.paymentTermsClient = Suppliers.memoize(() -> new PaymentTermsClient(clientOptions));
this.paymentsClient = Suppliers.memoize(() -> new PaymentsClient(clientOptions));
this.phoneNumbersClient = Suppliers.memoize(() -> new PhoneNumbersClient(clientOptions));
this.purchaseOrdersClient = Suppliers.memoize(() -> new PurchaseOrdersClient(clientOptions));
Expand Down Expand Up @@ -315,6 +323,14 @@ public PassthroughClient passthrough() {
return this.passthroughClient.get();
}

public PaymentMethodsClient paymentMethods() {
return this.paymentMethodsClient.get();
}

public PaymentTermsClient paymentTerms() {
return this.paymentTermsClient.get();
}

public PaymentsClient payments() {
return this.paymentsClient.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public AccountingPeriod retrieve(
httpUrl.addQueryParameter(
"include_remote_data", request.getIncludeRemoteData().get().toString());
}
if (request.getIncludeShellData().isPresent()) {
httpUrl.addQueryParameter(
"include_shell_data", request.getIncludeShellData().get().toString());
}
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
public final class AccountingPeriodsRetrieveRequest {
private final Optional<Boolean> includeRemoteData;

private final Optional<Boolean> includeShellData;

private final Map<String, Object> additionalProperties;

private AccountingPeriodsRetrieveRequest(
Optional<Boolean> includeRemoteData, Map<String, Object> additionalProperties) {
Optional<Boolean> includeRemoteData,
Optional<Boolean> includeShellData,
Map<String, Object> additionalProperties) {
this.includeRemoteData = includeRemoteData;
this.includeShellData = includeShellData;
this.additionalProperties = additionalProperties;
}

Expand All @@ -38,6 +43,14 @@ public Optional<Boolean> getIncludeRemoteData() {
return includeRemoteData;
}

/**
* @return Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
*/
@JsonProperty("include_shell_data")
public Optional<Boolean> getIncludeShellData() {
return includeShellData;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -50,12 +63,12 @@ public Map<String, Object> getAdditionalProperties() {
}

private boolean equalTo(AccountingPeriodsRetrieveRequest other) {
return includeRemoteData.equals(other.includeRemoteData);
return includeRemoteData.equals(other.includeRemoteData) && includeShellData.equals(other.includeShellData);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.includeRemoteData);
return Objects.hash(this.includeRemoteData, this.includeShellData);
}

@java.lang.Override
Expand All @@ -71,13 +84,16 @@ public static Builder builder() {
public static final class Builder {
private Optional<Boolean> includeRemoteData = Optional.empty();

private Optional<Boolean> includeShellData = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

private Builder() {}

public Builder from(AccountingPeriodsRetrieveRequest other) {
includeRemoteData(other.getIncludeRemoteData());
includeShellData(other.getIncludeShellData());
return this;
}

Expand All @@ -92,8 +108,19 @@ public Builder includeRemoteData(Boolean includeRemoteData) {
return this;
}

@JsonSetter(value = "include_shell_data", nulls = Nulls.SKIP)
public Builder includeShellData(Optional<Boolean> includeShellData) {
this.includeShellData = includeShellData;
return this;
}

public Builder includeShellData(Boolean includeShellData) {
this.includeShellData = Optional.ofNullable(includeShellData);
return this;
}

public AccountingPeriodsRetrieveRequest build() {
return new AccountingPeriodsRetrieveRequest(includeRemoteData, additionalProperties);
return new AccountingPeriodsRetrieveRequest(includeRemoteData, includeShellData, additionalProperties);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req
httpUrl.addQueryParameter(
"modified_before", request.getModifiedBefore().get().toString());
}
if (request.getName().isPresent()) {
httpUrl.addQueryParameter("name", request.getName().get());
}
if (request.getPageSize().isPresent()) {
httpUrl.addQueryParameter("page_size", request.getPageSize().get().toString());
}
Expand Down Expand Up @@ -221,6 +224,10 @@ public Account retrieve(String id, AccountsRetrieveRequest request, RequestOptio
httpUrl.addQueryParameter(
"include_remote_data", request.getIncludeRemoteData().get().toString());
}
if (request.getIncludeShellData().isPresent()) {
httpUrl.addQueryParameter(
"include_shell_data", request.getIncludeShellData().get().toString());
}
if (request.getRemoteFields().isPresent()) {
httpUrl.addQueryParameter(
"remote_fields", request.getRemoteFields().get().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public final class AccountsListRequest {

private final Optional<OffsetDateTime> modifiedBefore;

private final Optional<String> name;

private final Optional<Integer> pageSize;

private final Optional<AccountsListRequestRemoteFields> remoteFields;
Expand All @@ -67,6 +69,7 @@ private AccountsListRequest(
Optional<Boolean> includeShellData,
Optional<OffsetDateTime> modifiedAfter,
Optional<OffsetDateTime> modifiedBefore,
Optional<String> name,
Optional<Integer> pageSize,
Optional<AccountsListRequestRemoteFields> remoteFields,
Optional<String> remoteId,
Expand All @@ -83,6 +86,7 @@ private AccountsListRequest(
this.includeShellData = includeShellData;
this.modifiedAfter = modifiedAfter;
this.modifiedBefore = modifiedBefore;
this.name = name;
this.pageSize = pageSize;
this.remoteFields = remoteFields;
this.remoteId = remoteId;
Expand Down Expand Up @@ -178,6 +182,14 @@ public Optional<OffsetDateTime> getModifiedBefore() {
return modifiedBefore;
}

/**
* @return If provided, will only return Accounts with this name.
*/
@JsonProperty("name")
public Optional<String> getName() {
return name;
}

/**
* @return Number of results to return per page.
*/
Expand Down Expand Up @@ -233,6 +245,7 @@ private boolean equalTo(AccountsListRequest other) {
&& includeShellData.equals(other.includeShellData)
&& modifiedAfter.equals(other.modifiedAfter)
&& modifiedBefore.equals(other.modifiedBefore)
&& name.equals(other.name)
&& pageSize.equals(other.pageSize)
&& remoteFields.equals(other.remoteFields)
&& remoteId.equals(other.remoteId)
Expand All @@ -253,6 +266,7 @@ public int hashCode() {
this.includeShellData,
this.modifiedAfter,
this.modifiedBefore,
this.name,
this.pageSize,
this.remoteFields,
this.remoteId,
Expand Down Expand Up @@ -292,6 +306,8 @@ public static final class Builder {

private Optional<OffsetDateTime> modifiedBefore = Optional.empty();

private Optional<String> name = Optional.empty();

private Optional<Integer> pageSize = Optional.empty();

private Optional<AccountsListRequestRemoteFields> remoteFields = Optional.empty();
Expand All @@ -317,6 +333,7 @@ public Builder from(AccountsListRequest other) {
includeShellData(other.getIncludeShellData());
modifiedAfter(other.getModifiedAfter());
modifiedBefore(other.getModifiedBefore());
name(other.getName());
pageSize(other.getPageSize());
remoteFields(other.getRemoteFields());
remoteId(other.getRemoteId());
Expand Down Expand Up @@ -445,6 +462,17 @@ public Builder modifiedBefore(OffsetDateTime modifiedBefore) {
return this;
}

@JsonSetter(value = "name", nulls = Nulls.SKIP)
public Builder name(Optional<String> name) {
this.name = name;
return this;
}

public Builder name(String name) {
this.name = Optional.ofNullable(name);
return this;
}

@JsonSetter(value = "page_size", nulls = Nulls.SKIP)
public Builder pageSize(Optional<Integer> pageSize) {
this.pageSize = pageSize;
Expand Down Expand Up @@ -502,6 +530,7 @@ public AccountsListRequest build() {
includeShellData,
modifiedAfter,
modifiedBefore,
name,
pageSize,
remoteFields,
remoteId,
Expand Down
Loading
Loading