* | :heavy_minus_sign: | The merchant identifier for this payment method. | payment-method-12345 |
\ No newline at end of file
diff --git a/docs/models/components/InstrumentType.md b/docs/models/components/InstrumentType.md
index 0bfc1370..d48b31c9 100644
--- a/docs/models/components/InstrumentType.md
+++ b/docs/models/components/InstrumentType.md
@@ -24,4 +24,4 @@ InstrumentType custom = InstrumentType.of("custom_value");
| `APPLEPAY` | applepay |
| `NETWORK_TOKEN` | network_token |
| `PLAID` | plaid |
-| `BANK_DETAILS` | bank_details |
\ No newline at end of file
+| `BANK` | bank |
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index e1838172..e69bf17f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.45
+version=2.16.46
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
index 6a3216f4..10faef98 100644
--- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
+++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java
@@ -22,8 +22,8 @@ public class SDKConfiguration {
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "1.0.0";
- public static final String SDK_VERSION = "2.16.45";
- public static final String GEN_VERSION = "2.865.2";
+ public static final String SDK_VERSION = "2.16.46";
+ public static final String GEN_VERSION = "2.866.2";
private static final String BASE_PACKAGE = "com.gr4vy.sdk";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
diff --git a/src/main/java/com/gr4vy/sdk/models/components/BaseBankPaymentMethodCreate.java b/src/main/java/com/gr4vy/sdk/models/components/BaseBankPaymentMethodCreate.java
new file mode 100644
index 00000000..9fbef9ca
--- /dev/null
+++ b/src/main/java/com/gr4vy/sdk/models/components/BaseBankPaymentMethodCreate.java
@@ -0,0 +1,309 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+package com.gr4vy.sdk.models.components;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.gr4vy.sdk.utils.LazySingletonValue;
+import com.gr4vy.sdk.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+/**
+ * BaseBankPaymentMethodCreate
+ *
+ * Base class for Bank Payment Methods.
+ */
+public class BaseBankPaymentMethodCreate {
+ /**
+ * Always `bank`.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("method")
+ private Optional method;
+
+
+ @JsonProperty("account_holder")
+ private BankAccountHolder accountHolder;
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("buyer_id")
+ private JsonNullable buyerId;
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("buyer_external_identifier")
+ private JsonNullable buyerExternalIdentifier;
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("external_identifier")
+ private JsonNullable externalIdentifier;
+
+ @JsonCreator
+ public BaseBankPaymentMethodCreate(
+ @JsonProperty("account_holder") BankAccountHolder accountHolder,
+ @JsonProperty("buyer_id") JsonNullable buyerId,
+ @JsonProperty("buyer_external_identifier") JsonNullable buyerExternalIdentifier,
+ @JsonProperty("external_identifier") JsonNullable externalIdentifier) {
+ Utils.checkNotNull(accountHolder, "accountHolder");
+ Utils.checkNotNull(buyerId, "buyerId");
+ Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier");
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.method = Builder._SINGLETON_VALUE_Method.value();
+ this.accountHolder = accountHolder;
+ this.buyerId = buyerId;
+ this.buyerExternalIdentifier = buyerExternalIdentifier;
+ this.externalIdentifier = externalIdentifier;
+ }
+
+ public BaseBankPaymentMethodCreate(
+ BankAccountHolder accountHolder) {
+ this(accountHolder, JsonNullable.undefined(), JsonNullable.undefined(),
+ JsonNullable.undefined());
+ }
+
+ /**
+ * Always `bank`.
+ */
+ @JsonIgnore
+ public Optional method() {
+ return method;
+ }
+
+ @JsonIgnore
+ public BankAccountHolder accountHolder() {
+ return accountHolder;
+ }
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ @JsonIgnore
+ public JsonNullable buyerId() {
+ return buyerId;
+ }
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ @JsonIgnore
+ public JsonNullable buyerExternalIdentifier() {
+ return buyerExternalIdentifier;
+ }
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ @JsonIgnore
+ public JsonNullable externalIdentifier() {
+ return externalIdentifier;
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+
+ public BaseBankPaymentMethodCreate withAccountHolder(BankAccountHolder accountHolder) {
+ Utils.checkNotNull(accountHolder, "accountHolder");
+ this.accountHolder = accountHolder;
+ return this;
+ }
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ public BaseBankPaymentMethodCreate withBuyerId(String buyerId) {
+ Utils.checkNotNull(buyerId, "buyerId");
+ this.buyerId = JsonNullable.of(buyerId);
+ return this;
+ }
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ public BaseBankPaymentMethodCreate withBuyerId(JsonNullable buyerId) {
+ Utils.checkNotNull(buyerId, "buyerId");
+ this.buyerId = buyerId;
+ return this;
+ }
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ public BaseBankPaymentMethodCreate withBuyerExternalIdentifier(String buyerExternalIdentifier) {
+ Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier");
+ this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier);
+ return this;
+ }
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ public BaseBankPaymentMethodCreate withBuyerExternalIdentifier(JsonNullable buyerExternalIdentifier) {
+ Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier");
+ this.buyerExternalIdentifier = buyerExternalIdentifier;
+ return this;
+ }
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ public BaseBankPaymentMethodCreate withExternalIdentifier(String externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = JsonNullable.of(externalIdentifier);
+ return this;
+ }
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ public BaseBankPaymentMethodCreate withExternalIdentifier(JsonNullable externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = externalIdentifier;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BaseBankPaymentMethodCreate other = (BaseBankPaymentMethodCreate) o;
+ return
+ Utils.enhancedDeepEquals(this.method, other.method) &&
+ Utils.enhancedDeepEquals(this.accountHolder, other.accountHolder) &&
+ Utils.enhancedDeepEquals(this.buyerId, other.buyerId) &&
+ Utils.enhancedDeepEquals(this.buyerExternalIdentifier, other.buyerExternalIdentifier) &&
+ Utils.enhancedDeepEquals(this.externalIdentifier, other.externalIdentifier);
+ }
+
+ @Override
+ public int hashCode() {
+ return Utils.enhancedHash(
+ method, accountHolder, buyerId,
+ buyerExternalIdentifier, externalIdentifier);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(BaseBankPaymentMethodCreate.class,
+ "method", method,
+ "accountHolder", accountHolder,
+ "buyerId", buyerId,
+ "buyerExternalIdentifier", buyerExternalIdentifier,
+ "externalIdentifier", externalIdentifier);
+ }
+
+ @SuppressWarnings("UnusedReturnValue")
+ public final static class Builder {
+
+ private BankAccountHolder accountHolder;
+
+ private JsonNullable buyerId = JsonNullable.undefined();
+
+ private JsonNullable buyerExternalIdentifier = JsonNullable.undefined();
+
+ private JsonNullable externalIdentifier = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+
+ public Builder accountHolder(BankAccountHolder accountHolder) {
+ Utils.checkNotNull(accountHolder, "accountHolder");
+ this.accountHolder = accountHolder;
+ return this;
+ }
+
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ public Builder buyerId(String buyerId) {
+ Utils.checkNotNull(buyerId, "buyerId");
+ this.buyerId = JsonNullable.of(buyerId);
+ return this;
+ }
+
+ /**
+ * The ID of the buyer to attach the method to.
+ */
+ public Builder buyerId(JsonNullable buyerId) {
+ Utils.checkNotNull(buyerId, "buyerId");
+ this.buyerId = buyerId;
+ return this;
+ }
+
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ public Builder buyerExternalIdentifier(String buyerExternalIdentifier) {
+ Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier");
+ this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier);
+ return this;
+ }
+
+ /**
+ * The merchant reference for this payment method.
+ */
+ public Builder buyerExternalIdentifier(JsonNullable buyerExternalIdentifier) {
+ Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier");
+ this.buyerExternalIdentifier = buyerExternalIdentifier;
+ return this;
+ }
+
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ public Builder externalIdentifier(String externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = JsonNullable.of(externalIdentifier);
+ return this;
+ }
+
+ /**
+ * The merchant identifier for this payment method.
+ */
+ public Builder externalIdentifier(JsonNullable externalIdentifier) {
+ Utils.checkNotNull(externalIdentifier, "externalIdentifier");
+ this.externalIdentifier = externalIdentifier;
+ return this;
+ }
+
+ public BaseBankPaymentMethodCreate build() {
+
+ return new BaseBankPaymentMethodCreate(
+ accountHolder, buyerId, buyerExternalIdentifier,
+ externalIdentifier);
+ }
+
+
+ private static final LazySingletonValue> _SINGLETON_VALUE_Method =
+ new LazySingletonValue<>(
+ "method",
+ "\"bank\"",
+ new TypeReference>() {});
+ }
+}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/InstrumentType.java b/src/main/java/com/gr4vy/sdk/models/components/InstrumentType.java
index a8f09d5b..954d59a0 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/InstrumentType.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/InstrumentType.java
@@ -28,7 +28,7 @@ public class InstrumentType {
public static final InstrumentType APPLEPAY = new InstrumentType("applepay");
public static final InstrumentType NETWORK_TOKEN = new InstrumentType("network_token");
public static final InstrumentType PLAID = new InstrumentType("plaid");
- public static final InstrumentType BANK_DETAILS = new InstrumentType("bank_details");
+ public static final InstrumentType BANK = new InstrumentType("bank");
// This map will grow whenever a Color gets created with a new
// unrecognized value (a potential memory leak if the user is not
@@ -110,7 +110,7 @@ private static final Map createValuesMap() {
map.put("applepay", APPLEPAY);
map.put("network_token", NETWORK_TOKEN);
map.put("plaid", PLAID);
- map.put("bank_details", BANK_DETAILS);
+ map.put("bank", BANK);
return map;
}
@@ -124,7 +124,7 @@ private static final Map createEnumsMap() {
map.put("applepay", InstrumentTypeEnum.APPLEPAY);
map.put("network_token", InstrumentTypeEnum.NETWORK_TOKEN);
map.put("plaid", InstrumentTypeEnum.PLAID);
- map.put("bank_details", InstrumentTypeEnum.BANK_DETAILS);
+ map.put("bank", InstrumentTypeEnum.BANK);
return map;
}
@@ -139,7 +139,7 @@ public enum InstrumentTypeEnum {
APPLEPAY("applepay"),
NETWORK_TOKEN("network_token"),
PLAID("plaid"),
- BANK_DETAILS("bank_details"),;
+ BANK("bank"),;
private final String value;
diff --git a/src/main/java/com/gr4vy/sdk/models/components/TransactionCreatePaymentMethod.java b/src/main/java/com/gr4vy/sdk/models/components/TransactionCreatePaymentMethod.java
index aa67013a..bbe31721 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/TransactionCreatePaymentMethod.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/TransactionCreatePaymentMethod.java
@@ -81,6 +81,11 @@ public static TransactionCreatePaymentMethod of(PlaidPaymentMethodCreate value)
return new TransactionCreatePaymentMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){}));
}
+ public static TransactionCreatePaymentMethod of(BaseBankPaymentMethodCreate value) {
+ Utils.checkNotNull(value, "value");
+ return new TransactionCreatePaymentMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){}));
+ }
+
public static TransactionCreatePaymentMethod of(CheckoutSessionWithUrlPaymentMethodCreate value) {
Utils.checkNotNull(value, "value");
return new TransactionCreatePaymentMethod(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){}));
@@ -99,6 +104,7 @@ public static TransactionCreatePaymentMethod of(CheckoutSessionWithUrlPaymentMet
* {@code com.gr4vy.sdk.models.components.GooglePayFPANPaymentMethodCreate}
* {@code com.gr4vy.sdk.models.components.NetworkTokenPaymentMethodCreate}
* {@code com.gr4vy.sdk.models.components.PlaidPaymentMethodCreate}
+ * {@code com.gr4vy.sdk.models.components.BaseBankPaymentMethodCreate}
* {@code com.gr4vy.sdk.models.components.CheckoutSessionWithUrlPaymentMethodCreate}
*
*
@@ -149,6 +155,7 @@ public _Deserializer() {
TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT),
+ TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT),
TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT));
}
}