diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 210236d4..b9cf5d93 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,23 +1,23 @@
lockVersion: 2.0.0
id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119
management:
- docChecksum: 015577bc8385a7076a14323a8626b8a6
+ docChecksum: 733faddd8b412a7f73bbeb5877d5cd3e
docVersion: 1.0.0
- speakeasyVersion: 1.684.0
- generationVersion: 2.793.0
- releaseVersion: 2.16.9
- configChecksum: c0b1f13b3e92a18eb6fa33aec3a6e58a
+ speakeasyVersion: 1.685.0
+ generationVersion: 2.794.1
+ releaseVersion: 2.16.10
+ configChecksum: d8b13e64ab13699905fe50a72ff733ce
repoURL: https://github.com/gr4vy/gr4vy-java.git
published: true
persistentEdits:
- generation_id: 8e92904d-cb9c-4758-831a-0566b4789fe3
- pristine_commit_hash: 9aac918b67687bed83fe71dd061761bc1a88c517
- pristine_tree_hash: 2fd66b859db199ed4681ffb4c2c306da81b25fbc
+ generation_id: 09277a46-8aba-4341-a475-546e1b335832
+ pristine_commit_hash: 7669970d3aab31fcf13afe17397d3325658d90b8
+ pristine_tree_hash: e3aa740b599491e46dc1b13a48ba8592dd3ecd64
features:
java:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.1
- core: 3.55.5
+ core: 3.55.7
flattening: 2.81.1
globalSecurity: 2.83.1
globalSecurityCallbacks: 0.1.0
@@ -665,12 +665,12 @@ trackedFiles:
pristine_git_object: b9eae99580cd6785b330ea6c37e4bc84109b7b93
docs/models/components/PaymentLink.md:
id: 14e920f19b2f
- last_write_checksum: sha1:0f02c4577f2f964db001e5105979367e44dc2e7e
- pristine_git_object: b9569ee973bba8e25521f9acaa47c6fed3cb4f72
+ last_write_checksum: sha1:9814b2e4c740d2d9b5d6b87984ee81ece9e2ee89
+ pristine_git_object: 15cfd9d3c1217e0531b211ad686e80bb2d7a3aea
docs/models/components/PaymentLinkCreate.md:
id: abdc9863afe0
- last_write_checksum: sha1:84fdc7bd6ff0187653a687cb46e02dfef53efbdc
- pristine_git_object: 22158360bb19a75e98e5af0278332944dfa36e7f
+ last_write_checksum: sha1:78b4bbf19885d94750c971805d11a48967a0c57d
+ pristine_git_object: 9253d0264e5420f185c537783483ecc4155f4365
docs/models/components/PaymentLinkStatus.md:
id: 025fb96de5be
last_write_checksum: sha1:91f595831b6fc3f17eac79fcba8b6e2c5ac31a6e
@@ -2173,8 +2173,8 @@ trackedFiles:
pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b
gradle.properties:
id: 2afbb999f001
- last_write_checksum: sha1:9ac6cc6759a20dd9706b1414e4bcc55612b8f844
- pristine_git_object: dd0e4e2c434938f2617f83841621d372a5be1477
+ last_write_checksum: sha1:e5f65cc8c2552f023f23fa728b62f8372aa526d2
+ pristine_git_object: 381475305b4c7fb264c1ac280af8af08a4d4adcc
gradle/wrapper/gradle-wrapper.jar:
id: ec27dae6e852
last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611
@@ -2489,8 +2489,8 @@ trackedFiles:
pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f
src/main/java/com/gr4vy/sdk/SDKConfiguration.java:
id: 73a7edeaca45
- last_write_checksum: sha1:7129a529f26754b31e9f797addcd2705c6162146
- pristine_git_object: 558a85d24b980c164fb0e670cc2e7a614dc7641f
+ last_write_checksum: sha1:dcb79e7e72e157d7670d75fc99561e51a78ee43d
+ pristine_git_object: cbb783d9716390305b4dfda96eb1a1c5993cb8c5
src/main/java/com/gr4vy/sdk/SecuritySource.java:
id: 1b6add6b9b50
last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd
@@ -3133,12 +3133,12 @@ trackedFiles:
pristine_git_object: 93cd102383d443b2e8b6f5ea69536f4f1f040f35
src/main/java/com/gr4vy/sdk/models/components/PaymentLink.java:
id: 35a81283c9d3
- last_write_checksum: sha1:81bf79f24e4612234c54412199a49838b9e7b9b0
- pristine_git_object: db906622eca1176419563ab4c26e4732b64ed8f5
+ last_write_checksum: sha1:2b07162bb8dfa0de4ae49b3b95b5f542d3774462
+ pristine_git_object: 34ef5cc2c7856051714183b4ff287ffd706b7dd3
src/main/java/com/gr4vy/sdk/models/components/PaymentLinkCreate.java:
id: f4795aff8cb9
- last_write_checksum: sha1:ad2402894c615d56a1d6f97bf32a5ee25dca2345
- pristine_git_object: c0ecb2cf7a6a24a728166722b7c08a647f64e1c4
+ last_write_checksum: sha1:0905b70a2df5489d9425c41385c199fef9cb8c87
+ pristine_git_object: 1a6915c4c5355d1cd2b3e60185196439f3a567df
src/main/java/com/gr4vy/sdk/models/components/PaymentLinkStatus.java:
id: bd297c5e4aa2
last_write_checksum: sha1:2817e8cae2751ecb7a8aea9937433b20dfad689c
@@ -6213,8 +6213,8 @@ trackedFiles:
pristine_git_object: df92c61bb0010c80d2700f712f082b34b9f7eab0
src/main/java/com/gr4vy/sdk/utils/RequestBody.java:
id: efa677061666
- last_write_checksum: sha1:b62f05db7c690be9dbc05c4dde8827ff258144e4
- pristine_git_object: a034bd66feb83a842e8a3159c704ab9eb355ccf7
+ last_write_checksum: sha1:10a97d9be8d824050f8a9ab2d407b76d3679a040
+ pristine_git_object: 2824b555c140f67692c79e9311cc2e648cd700cd
src/main/java/com/gr4vy/sdk/utils/RequestMetadata.java:
id: 125ab30c9af8
last_write_checksum: sha1:00f95e4c1241b99313a42b972b55fd5f2adf15a4
@@ -9795,6 +9795,7 @@ examples:
application/json: {"type": "error", "code": "gateway_timeout", "status": 504, "message": "Request could not be processed"}
examplesVersion: 1.0.2
generatedTests: {}
+releaseNotes: "## Java SDK Changes:\n* `gr4vy.paymentLinks.list()`: `response.items.[].installmentCount` **Added**\n* `gr4vy.paymentLinks.create()`: \n * `request.paymentlinkcreate.installmentCount` **Added**\n * `response.installment_count` **Added**\n* `gr4vy.paymentLinks.get()`: `response.installment_count` **Added**\n"
generatedFiles:
- .gitattributes
- USAGE.md
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index cbd873ff..423cf1be 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -27,7 +27,7 @@ generation:
generateNewTests: false
skipResponseBodyAssertions: false
java:
- version: 2.16.9
+ version: 2.16.10
additionalDependencies:
- testImplementation:org.junit.jupiter:junit-jupiter:5.10.0
- implementation:com.auth0:java-jwt:4.5.0
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 55e1bb1d..8ba9aaed 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,4 +1,4 @@
-speakeasyVersion: 1.684.0
+speakeasyVersion: 1.685.0
sources:
Gr4vy:
sourceNamespace: openapi
@@ -9,11 +9,11 @@ sources:
- 1.0.0
openapi:
sourceNamespace: openapi
- sourceRevisionDigest: sha256:026169b086a18d07dbb1bbec9d82bb1a7f4fdab10ee9239559887bb011289a34
- sourceBlobDigest: sha256:9f90cca5b410ccb00ad539b2101b31be96d1b54c4d159993670eb3d15212ce8a
+ sourceRevisionDigest: sha256:ddedc9fb785d2533932ac9046f3704756c8de3ecae8ec5ea6d20649126e0ab2c
+ sourceBlobDigest: sha256:e527365740eddcaa7c5dda9dba11438640fbaa4c2cccbd92a54b9231b708e897
tags:
- latest
- - speakeasy-sdk-regen-1768244931
+ - speakeasy-sdk-regen-1768292735
- 1.0.0
targets:
gr-4-vy:
@@ -26,10 +26,10 @@ targets:
java:
source: openapi
sourceNamespace: openapi
- sourceRevisionDigest: sha256:026169b086a18d07dbb1bbec9d82bb1a7f4fdab10ee9239559887bb011289a34
- sourceBlobDigest: sha256:9f90cca5b410ccb00ad539b2101b31be96d1b54c4d159993670eb3d15212ce8a
+ sourceRevisionDigest: sha256:ddedc9fb785d2533932ac9046f3704756c8de3ecae8ec5ea6d20649126e0ab2c
+ sourceBlobDigest: sha256:e527365740eddcaa7c5dda9dba11438640fbaa4c2cccbd92a54b9231b708e897
codeSamplesNamespace: openapi-java-code-samples
- codeSamplesRevisionDigest: sha256:925cdb36757c51d7902a52176e8b5a4ce3df9ecec527e7896b05ddec5f5d02c0
+ codeSamplesRevisionDigest: sha256:b6691efe178f287d60a5623ad1ce08b2f0211a9de37e560bce7cbb7677438e85
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/README.md b/README.md
index 9ac9296e..f3a42693 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ The samples below show how a published SDK artifact is used:
Gradle:
```groovy
-implementation 'com.gr4vy:sdk:2.16.9'
+implementation 'com.gr4vy:sdk:2.16.10'
```
Maven:
@@ -66,7 +66,7 @@ Maven:
com.gr4vy
sdk
- 2.16.9
+ 2.16.10
```
diff --git a/RELEASES.md b/RELEASES.md
index ee571281..cc62b308 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -928,4 +928,14 @@ Based on:
### Generated
- [java v2.16.9] .
### Releases
-- [Maven Central v2.16.9] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.9 - .
\ No newline at end of file
+- [Maven Central v2.16.9] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.9 - .
+
+## 2026-01-13 08:25:13
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.685.0 (2.794.1) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [java v2.16.10] .
+### Releases
+- [Maven Central v2.16.10] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.10 - .
\ No newline at end of file
diff --git a/docs/models/components/PaymentLink.md b/docs/models/components/PaymentLink.md
index b9569ee9..15cfd9d3 100644
--- a/docs/models/components/PaymentLink.md
+++ b/docs/models/components/PaymentLink.md
@@ -34,4 +34,5 @@
| `shippingDetails` | [JsonNullable\](../../models/components/ShippingDetails.md) | :heavy_minus_sign: | The shipping details for the payment link. | |
| `connectionOptions` | Map\> | :heavy_minus_sign: | The connection options for the payment link. | |
| `store` | *Optional\* | :heavy_minus_sign: | Whether the payment method was stored. | |
-| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate with the stored payment method. | a1b2c3d4-5678-90ab-cdef-1234567890ab |
\ No newline at end of file
+| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate with the stored payment method. | a1b2c3d4-5678-90ab-cdef-1234567890ab |
+| `installmentCount` | *JsonNullable\* | :heavy_minus_sign: | The number of installments a buyer is required to make. | |
\ No newline at end of file
diff --git a/docs/models/components/PaymentLinkCreate.md b/docs/models/components/PaymentLinkCreate.md
index 22158360..9253d026 100644
--- a/docs/models/components/PaymentLinkCreate.md
+++ b/docs/models/components/PaymentLinkCreate.md
@@ -27,4 +27,5 @@
| `metadata` | Map\ | :heavy_minus_sign: | Arbitrary metadata for the payment link. | {
"order_id": "ORD-12345"
} |
| `paymentSource` | [Optional\](../../models/components/TransactionPaymentSource.md) | :heavy_minus_sign: | The way payment method information made it to this transaction. | |
| `store` | *Optional\* | :heavy_minus_sign: | Whether to store the payment method for future use. | true |
-| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate the payment method with. Note: When `buyer_id` is provided, the payment link should be treated as a secret as it will allow the user to manage payment methods for the associated buyer. | a1b2c3d4-5678-90ab-cdef-1234567890ab |
\ No newline at end of file
+| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate the payment method with. Note: When `buyer_id` is provided, the payment link should be treated as a secret as it will allow the user to manage payment methods for the associated buyer. | a1b2c3d4-5678-90ab-cdef-1234567890ab |
+| `installmentCount` | *JsonNullable\* | :heavy_minus_sign: | The number of installments a buyer is required to make. | |
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index dd0e4e2c..38147530 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
groupId=com.gr4vy
artifactId=sdk
-version=2.16.9
+version=2.16.10
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 558a85d2..cbb783d9 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.9";
- public static final String GEN_VERSION = "2.793.0";
+ public static final String SDK_VERSION = "2.16.10";
+ public static final String GEN_VERSION = "2.794.1";
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/PaymentLink.java b/src/main/java/com/gr4vy/sdk/models/components/PaymentLink.java
index db906622..34ef5cc2 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/PaymentLink.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/PaymentLink.java
@@ -221,6 +221,13 @@ public class PaymentLink {
@JsonProperty("buyer_id")
private JsonNullable buyerId;
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("installment_count")
+ private JsonNullable installmentCount;
+
@JsonCreator
public PaymentLink(
@JsonProperty("id") String id,
@@ -251,7 +258,8 @@ public PaymentLink(
@JsonProperty("shipping_details") JsonNullable extends ShippingDetails> shippingDetails,
@JsonProperty("connection_options") JsonNullable extends Map>> connectionOptions,
@JsonProperty("store") Optional store,
- @JsonProperty("buyer_id") JsonNullable buyerId) {
+ @JsonProperty("buyer_id") JsonNullable buyerId,
+ @JsonProperty("installment_count") JsonNullable installmentCount) {
Utils.checkNotNull(id, "id");
Utils.checkNotNull(url, "url");
Utils.checkNotNull(expiresAt, "expiresAt");
@@ -281,6 +289,7 @@ public PaymentLink(
Utils.checkNotNull(connectionOptions, "connectionOptions");
Utils.checkNotNull(store, "store");
Utils.checkNotNull(buyerId, "buyerId");
+ Utils.checkNotNull(installmentCount, "installmentCount");
this.id = id;
this.type = Builder._SINGLETON_VALUE_Type.value();
this.url = url;
@@ -311,6 +320,7 @@ public PaymentLink(
this.connectionOptions = connectionOptions;
this.store = store;
this.buyerId = buyerId;
+ this.installmentCount = installmentCount;
}
public PaymentLink(
@@ -333,7 +343,7 @@ public PaymentLink(
Optional.empty(), JsonNullable.undefined(), paymentSource,
createdAt, updatedAt, status,
JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(),
- Optional.empty(), JsonNullable.undefined());
+ Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined());
}
/**
@@ -576,6 +586,14 @@ public JsonNullable buyerId() {
return buyerId;
}
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ @JsonIgnore
+ public JsonNullable installmentCount() {
+ return installmentCount;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -1009,6 +1027,24 @@ public PaymentLink withBuyerId(JsonNullable buyerId) {
return this;
}
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public PaymentLink withInstallmentCount(long installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = JsonNullable.of(installmentCount);
+ return this;
+ }
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public PaymentLink withInstallmentCount(JsonNullable installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = installmentCount;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -1048,7 +1084,8 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.shippingDetails, other.shippingDetails) &&
Utils.enhancedDeepEquals(this.connectionOptions, other.connectionOptions) &&
Utils.enhancedDeepEquals(this.store, other.store) &&
- Utils.enhancedDeepEquals(this.buyerId, other.buyerId);
+ Utils.enhancedDeepEquals(this.buyerId, other.buyerId) &&
+ Utils.enhancedDeepEquals(this.installmentCount, other.installmentCount);
}
@Override
@@ -1063,7 +1100,8 @@ public int hashCode() {
returnUrl, cartItems, metadata,
paymentSource, createdAt, updatedAt,
status, buyer, shippingDetails,
- connectionOptions, store, buyerId);
+ connectionOptions, store, buyerId,
+ installmentCount);
}
@Override
@@ -1098,7 +1136,8 @@ public String toString() {
"shippingDetails", shippingDetails,
"connectionOptions", connectionOptions,
"store", store,
- "buyerId", buyerId);
+ "buyerId", buyerId,
+ "installmentCount", installmentCount);
}
@SuppressWarnings("UnusedReturnValue")
@@ -1162,6 +1201,8 @@ public final static class Builder {
private JsonNullable buyerId = JsonNullable.undefined();
+ private JsonNullable installmentCount = JsonNullable.undefined();
+
private Builder() {
// force use of static builder() method
}
@@ -1621,6 +1662,25 @@ public Builder buyerId(JsonNullable buyerId) {
return this;
}
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public Builder installmentCount(long installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = JsonNullable.of(installmentCount);
+ return this;
+ }
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public Builder installmentCount(JsonNullable installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = installmentCount;
+ return this;
+ }
+
public PaymentLink build() {
if (store == null) {
store = _SINGLETON_VALUE_Store.value();
@@ -1636,7 +1696,7 @@ public PaymentLink build() {
cartItems, metadata, paymentSource,
createdAt, updatedAt, status,
buyer, shippingDetails, connectionOptions,
- store, buyerId);
+ store, buyerId, installmentCount);
}
diff --git a/src/main/java/com/gr4vy/sdk/models/components/PaymentLinkCreate.java b/src/main/java/com/gr4vy/sdk/models/components/PaymentLinkCreate.java
index c0ecb2cf..1a6915c4 100644
--- a/src/main/java/com/gr4vy/sdk/models/components/PaymentLinkCreate.java
+++ b/src/main/java/com/gr4vy/sdk/models/components/PaymentLinkCreate.java
@@ -183,6 +183,13 @@ public class PaymentLinkCreate {
@JsonProperty("buyer_id")
private JsonNullable buyerId;
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("installment_count")
+ private JsonNullable installmentCount;
+
@JsonCreator
public PaymentLinkCreate(
@JsonProperty("buyer") JsonNullable extends GuestBuyer> buyer,
@@ -207,7 +214,8 @@ public PaymentLinkCreate(
@JsonProperty("metadata") JsonNullable extends Map> metadata,
@JsonProperty("payment_source") Optional extends TransactionPaymentSource> paymentSource,
@JsonProperty("store") Optional store,
- @JsonProperty("buyer_id") JsonNullable buyerId) {
+ @JsonProperty("buyer_id") JsonNullable buyerId,
+ @JsonProperty("installment_count") JsonNullable installmentCount) {
Utils.checkNotNull(buyer, "buyer");
Utils.checkNotNull(expiresAt, "expiresAt");
Utils.checkNotNull(connectionOptions, "connectionOptions");
@@ -231,6 +239,7 @@ public PaymentLinkCreate(
Utils.checkNotNull(paymentSource, "paymentSource");
Utils.checkNotNull(store, "store");
Utils.checkNotNull(buyerId, "buyerId");
+ Utils.checkNotNull(installmentCount, "installmentCount");
this.buyer = buyer;
this.expiresAt = expiresAt;
this.connectionOptions = connectionOptions;
@@ -254,6 +263,7 @@ public PaymentLinkCreate(
this.paymentSource = paymentSource;
this.store = store;
this.buyerId = buyerId;
+ this.installmentCount = installmentCount;
}
public PaymentLinkCreate(
@@ -267,7 +277,7 @@ public PaymentLinkCreate(
JsonNullable.undefined(), amount, country,
currency, Optional.empty(), JsonNullable.undefined(),
JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(),
- Optional.empty(), JsonNullable.undefined());
+ Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined());
}
/**
@@ -460,6 +470,14 @@ public JsonNullable buyerId() {
return buyerId;
}
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ @JsonIgnore
+ public JsonNullable installmentCount() {
+ return installmentCount;
+ }
+
public static Builder builder() {
return new Builder();
}
@@ -853,6 +871,24 @@ public PaymentLinkCreate withBuyerId(JsonNullable buyerId) {
return this;
}
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public PaymentLinkCreate withInstallmentCount(long installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = JsonNullable.of(installmentCount);
+ return this;
+ }
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public PaymentLinkCreate withInstallmentCount(JsonNullable installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = installmentCount;
+ return this;
+ }
+
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
@@ -885,7 +921,8 @@ public boolean equals(java.lang.Object o) {
Utils.enhancedDeepEquals(this.metadata, other.metadata) &&
Utils.enhancedDeepEquals(this.paymentSource, other.paymentSource) &&
Utils.enhancedDeepEquals(this.store, other.store) &&
- Utils.enhancedDeepEquals(this.buyerId, other.buyerId);
+ Utils.enhancedDeepEquals(this.buyerId, other.buyerId) &&
+ Utils.enhancedDeepEquals(this.installmentCount, other.installmentCount);
}
@Override
@@ -898,7 +935,7 @@ public int hashCode() {
merchantFaviconUrl, amount, country,
currency, intent, returnUrl,
cartItems, metadata, paymentSource,
- store, buyerId);
+ store, buyerId, installmentCount);
}
@Override
@@ -926,7 +963,8 @@ public String toString() {
"metadata", metadata,
"paymentSource", paymentSource,
"store", store,
- "buyerId", buyerId);
+ "buyerId", buyerId,
+ "installmentCount", installmentCount);
}
@SuppressWarnings("UnusedReturnValue")
@@ -978,6 +1016,8 @@ public final static class Builder {
private JsonNullable buyerId = JsonNullable.undefined();
+ private JsonNullable installmentCount = JsonNullable.undefined();
+
private Builder() {
// force use of static builder() method
}
@@ -1390,6 +1430,25 @@ public Builder buyerId(JsonNullable buyerId) {
return this;
}
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public Builder installmentCount(long installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = JsonNullable.of(installmentCount);
+ return this;
+ }
+
+ /**
+ * The number of installments a buyer is required to make.
+ */
+ public Builder installmentCount(JsonNullable installmentCount) {
+ Utils.checkNotNull(installmentCount, "installmentCount");
+ this.installmentCount = installmentCount;
+ return this;
+ }
+
public PaymentLinkCreate build() {
if (store == null) {
store = _SINGLETON_VALUE_Store.value();
@@ -1403,7 +1462,7 @@ public PaymentLinkCreate build() {
merchantFaviconUrl, amount, country,
currency, intent, returnUrl,
cartItems, metadata, paymentSource,
- store, buyerId);
+ store, buyerId, installmentCount);
}
diff --git a/src/main/java/com/gr4vy/sdk/utils/RequestBody.java b/src/main/java/com/gr4vy/sdk/utils/RequestBody.java
index a034bd66..2824b555 100644
--- a/src/main/java/com/gr4vy/sdk/utils/RequestBody.java
+++ b/src/main/java/com/gr4vy/sdk/utils/RequestBody.java
@@ -76,10 +76,10 @@ public static SerializedBody serialize(Object request, String requestField, Stri
private static SerializedBody serializeContentType(String fieldName, String contentType, Object value)
throws IllegalArgumentException, IllegalAccessException, UnsupportedOperationException, IOException {
- Pattern jsonPattern = Pattern.compile("(application|text)\\/.*?\\+*json.*");
- Pattern multipartPattern = Pattern.compile("multipart\\/.*");
- Pattern formPattern = Pattern.compile("application\\/x-www-form-urlencoded.*");
- Pattern textPattern = Pattern.compile("text\\/plain");
+ Pattern jsonPattern = Pattern.compile("^(application|text)\\/([^+]+\\+)*json.*");
+ Pattern multipartPattern = Pattern.compile("^multipart\\/.*");
+ Pattern formPattern = Pattern.compile("^application\\/x-www-form-urlencoded.*");
+ Pattern textPattern = Pattern.compile("^text\\/plain");
final SerializedBody body;