externalUserId = Optional.empty();
@@ -231,7 +202,6 @@ public Builder from(CreateAccountRequest other) {
oauthAppId(other.getOauthAppId());
appSlug(other.getAppSlug());
cfmapJson(other.getCfmapJson());
- connectToken(other.getConnectToken());
name(other.getName());
return this;
}
@@ -243,52 +213,48 @@ public Builder from(CreateAccountRequest other) {
*/
@java.lang.Override
@JsonSetter("app_slug")
- public CfmapJsonStage appSlug(@NotNull String appSlug) {
+ public _FinalStage appSlug(@NotNull String appSlug) {
this.appSlug = Objects.requireNonNull(appSlug, "appSlug must not be null");
return this;
}
/**
- * JSON string containing the custom fields mapping
- * JSON string containing the custom fields mapping
+ * Optional name for the account
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("cfmap_json")
- public ConnectTokenStage cfmapJson(@NotNull String cfmapJson) {
- this.cfmapJson = Objects.requireNonNull(cfmapJson, "cfmapJson must not be null");
+ public _FinalStage name(String name) {
+ this.name = Optional.ofNullable(name);
return this;
}
/**
- * The connect token for authentication
- * The connect token for authentication
- * @return Reference to {@code this} so that method calls can be chained together.
+ * Optional name for the account
*/
@java.lang.Override
- @JsonSetter("connect_token")
- public _FinalStage connectToken(@NotNull String connectToken) {
- this.connectToken = Objects.requireNonNull(connectToken, "connectToken must not be null");
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public _FinalStage name(Optional name) {
+ this.name = name;
return this;
}
/**
- * Optional name for the account
+ * JSON string containing the custom fields mapping
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage name(String name) {
- this.name = Optional.ofNullable(name);
+ public _FinalStage cfmapJson(String cfmapJson) {
+ this.cfmapJson = Optional.ofNullable(cfmapJson);
return this;
}
/**
- * Optional name for the account
+ * JSON string containing the custom fields mapping
*/
@java.lang.Override
- @JsonSetter(value = "name", nulls = Nulls.SKIP)
- public _FinalStage name(Optional name) {
- this.name = name;
+ @JsonSetter(value = "cfmap_json", nulls = Nulls.SKIP)
+ public _FinalStage cfmapJson(Optional cfmapJson) {
+ this.cfmapJson = cfmapJson;
return this;
}
@@ -348,7 +314,7 @@ public _FinalStage appId(Optional appId) {
@java.lang.Override
public CreateAccountRequest build() {
return new CreateAccountRequest(
- appId, externalUserId, oauthAppId, appSlug, cfmapJson, connectToken, name, additionalProperties);
+ appId, externalUserId, oauthAppId, appSlug, cfmapJson, name, additionalProperties);
}
}
}
diff --git a/src/main/java/com/pipedream/api/core/ClientOptions.java b/src/main/java/com/pipedream/api/core/ClientOptions.java
index 71e9632..2282eda 100644
--- a/src/main/java/com/pipedream/api/core/ClientOptions.java
+++ b/src/main/java/com/pipedream/api/core/ClientOptions.java
@@ -37,7 +37,7 @@ private ClientOptions(
{
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
- put("X-Fern-SDK-Version", "0.0.190");
+ put("X-Fern-SDK-Version", "0.0.193");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
index 1c4a9bb..82dc947 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/AsyncRawAccountsClient.java
@@ -171,8 +171,9 @@ public CompletableFuture> create(
}
Map properties = new HashMap<>();
properties.put("app_slug", request.getAppSlug());
- properties.put("cfmap_json", request.getCfmapJson());
- properties.put("connect_token", request.getConnectToken());
+ if (request.getCfmapJson().isPresent()) {
+ properties.put("cfmap_json", request.getCfmapJson());
+ }
if (request.getName().isPresent()) {
properties.put("name", request.getName());
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java b/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
index 114533c..ad4652d 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/RawAccountsClient.java
@@ -145,8 +145,9 @@ public PipedreamApiHttpResponse create(CreateAccountRequest request, Re
}
Map properties = new HashMap<>();
properties.put("app_slug", request.getAppSlug());
- properties.put("cfmap_json", request.getCfmapJson());
- properties.put("connect_token", request.getConnectToken());
+ if (request.getCfmapJson().isPresent()) {
+ properties.put("cfmap_json", request.getCfmapJson());
+ }
if (request.getName().isPresent()) {
properties.put("name", request.getName());
}
diff --git a/src/main/java/com/pipedream/api/resources/accounts/requests/CreateAccountRequest.java b/src/main/java/com/pipedream/api/resources/accounts/requests/CreateAccountRequest.java
index aeec52a..fe25bb8 100644
--- a/src/main/java/com/pipedream/api/resources/accounts/requests/CreateAccountRequest.java
+++ b/src/main/java/com/pipedream/api/resources/accounts/requests/CreateAccountRequest.java
@@ -29,9 +29,7 @@ public final class CreateAccountRequest {
private final String appSlug;
- private final String cfmapJson;
-
- private final String connectToken;
+ private final Optional cfmapJson;
private final Optional name;
@@ -42,8 +40,7 @@ private CreateAccountRequest(
Optional externalUserId,
Optional oauthAppId,
String appSlug,
- String cfmapJson,
- String connectToken,
+ Optional cfmapJson,
Optional name,
Map additionalProperties) {
this.appId = appId;
@@ -51,7 +48,6 @@ private CreateAccountRequest(
this.oauthAppId = oauthAppId;
this.appSlug = appSlug;
this.cfmapJson = cfmapJson;
- this.connectToken = connectToken;
this.name = name;
this.additionalProperties = additionalProperties;
}
@@ -89,18 +85,10 @@ public String getAppSlug() {
* @return JSON string containing the custom fields mapping
*/
@JsonProperty("cfmap_json")
- public String getCfmapJson() {
+ public Optional getCfmapJson() {
return cfmapJson;
}
- /**
- * @return The connect token for authentication
- */
- @JsonProperty("connect_token")
- public String getConnectToken() {
- return connectToken;
- }
-
/**
* @return Optional name for the account
*/
@@ -126,20 +114,12 @@ private boolean equalTo(CreateAccountRequest other) {
&& oauthAppId.equals(other.oauthAppId)
&& appSlug.equals(other.appSlug)
&& cfmapJson.equals(other.cfmapJson)
- && connectToken.equals(other.connectToken)
&& name.equals(other.name);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(
- this.appId,
- this.externalUserId,
- this.oauthAppId,
- this.appSlug,
- this.cfmapJson,
- this.connectToken,
- this.name);
+ return Objects.hash(this.appId, this.externalUserId, this.oauthAppId, this.appSlug, this.cfmapJson, this.name);
}
@java.lang.Override
@@ -155,25 +135,11 @@ public interface AppSlugStage {
/**
* The app slug for the account
*/
- CfmapJsonStage appSlug(@NotNull String appSlug);
+ _FinalStage appSlug(@NotNull String appSlug);
Builder from(CreateAccountRequest other);
}
- public interface CfmapJsonStage {
- /**
- * JSON string containing the custom fields mapping
- */
- ConnectTokenStage cfmapJson(@NotNull String cfmapJson);
- }
-
- public interface ConnectTokenStage {
- /**
- * The connect token for authentication
- */
- _FinalStage connectToken(@NotNull String connectToken);
- }
-
public interface _FinalStage {
CreateAccountRequest build();
@@ -195,6 +161,13 @@ public interface _FinalStage {
_FinalStage oauthAppId(String oauthAppId);
+ /**
+ * JSON string containing the custom fields mapping
+ */
+ _FinalStage cfmapJson(Optional cfmapJson);
+
+ _FinalStage cfmapJson(String cfmapJson);
+
/**
* Optional name for the account
*/
@@ -204,15 +177,13 @@ public interface _FinalStage {
}
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements AppSlugStage, CfmapJsonStage, ConnectTokenStage, _FinalStage {
+ public static final class Builder implements AppSlugStage, _FinalStage {
private String appSlug;
- private String cfmapJson;
-
- private String connectToken;
-
private Optional name = Optional.empty();
+ private Optional cfmapJson = Optional.empty();
+
private Optional oauthAppId = Optional.empty();
private Optional externalUserId = Optional.empty();
@@ -231,7 +202,6 @@ public Builder from(CreateAccountRequest other) {
oauthAppId(other.getOauthAppId());
appSlug(other.getAppSlug());
cfmapJson(other.getCfmapJson());
- connectToken(other.getConnectToken());
name(other.getName());
return this;
}
@@ -243,52 +213,48 @@ public Builder from(CreateAccountRequest other) {
*/
@java.lang.Override
@JsonSetter("app_slug")
- public CfmapJsonStage appSlug(@NotNull String appSlug) {
+ public _FinalStage appSlug(@NotNull String appSlug) {
this.appSlug = Objects.requireNonNull(appSlug, "appSlug must not be null");
return this;
}
/**
- * JSON string containing the custom fields mapping
- * JSON string containing the custom fields mapping
+ * Optional name for the account
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("cfmap_json")
- public ConnectTokenStage cfmapJson(@NotNull String cfmapJson) {
- this.cfmapJson = Objects.requireNonNull(cfmapJson, "cfmapJson must not be null");
+ public _FinalStage name(String name) {
+ this.name = Optional.ofNullable(name);
return this;
}
/**
- * The connect token for authentication
- * The connect token for authentication
- * @return Reference to {@code this} so that method calls can be chained together.
+ * Optional name for the account
*/
@java.lang.Override
- @JsonSetter("connect_token")
- public _FinalStage connectToken(@NotNull String connectToken) {
- this.connectToken = Objects.requireNonNull(connectToken, "connectToken must not be null");
+ @JsonSetter(value = "name", nulls = Nulls.SKIP)
+ public _FinalStage name(Optional name) {
+ this.name = name;
return this;
}
/**
- * Optional name for the account
+ * JSON string containing the custom fields mapping
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- public _FinalStage name(String name) {
- this.name = Optional.ofNullable(name);
+ public _FinalStage cfmapJson(String cfmapJson) {
+ this.cfmapJson = Optional.ofNullable(cfmapJson);
return this;
}
/**
- * Optional name for the account
+ * JSON string containing the custom fields mapping
*/
@java.lang.Override
- @JsonSetter(value = "name", nulls = Nulls.SKIP)
- public _FinalStage name(Optional name) {
- this.name = name;
+ @JsonSetter(value = "cfmap_json", nulls = Nulls.SKIP)
+ public _FinalStage cfmapJson(Optional cfmapJson) {
+ this.cfmapJson = cfmapJson;
return this;
}
@@ -348,7 +314,7 @@ public _FinalStage appId(Optional appId) {
@java.lang.Override
public CreateAccountRequest build() {
return new CreateAccountRequest(
- appId, externalUserId, oauthAppId, appSlug, cfmapJson, connectToken, name, additionalProperties);
+ appId, externalUserId, oauthAppId, appSlug, cfmapJson, name, additionalProperties);
}
}
}