diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 026ca50f..65040b66 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 5bbaa3a9-baa0-471b-ba6a-13fd88e8c119 management: - docChecksum: 7730a6996a95e1d8080b529747d4c86f + docChecksum: 77fd647d60bf5f580d3e38677a9343c9 docVersion: 1.0.0 speakeasyVersion: 1.790.3 generationVersion: 2.918.4 - releaseVersion: 2.16.114 - configChecksum: b839d264a750d6b555fbc58448bc78aa + releaseVersion: 2.16.115 + configChecksum: db1de4976388bbc53d869efb3d04dc27 repoURL: https://github.com/gr4vy/gr4vy-java.git installationURL: https://github.com/gr4vy/gr4vy-java published: true persistentEdits: - generation_id: ef9723f4-c634-4fca-b68c-79b993b9b7a7 - pristine_commit_hash: a581c193206bad7c58ce6824569c3caceb3d2852 - pristine_tree_hash: b2ae052c1fb121072967d7116e363af1b0c8c8f5 + generation_id: 1b5d3c10-fcb3-4432-b6e6-435ed4ebd28a + pristine_commit_hash: 8ee93ae11423bdd01ab7735f872bbc41030cf8dd + pristine_tree_hash: 90c5c6f419d611cc8e4374c255d9debac2c7f946 features: java: additionalDependencies: 0.1.0 @@ -238,8 +238,8 @@ trackedFiles: pristine_git_object: 983c5ca0faebd5342868833ca7f8b8b6c5b59939 docs/models/components/Buyer.md: id: 0ec7798c2f1e - last_write_checksum: sha1:33053343e912b3b52cf35a1b394daf8f662cefe2 - pristine_git_object: 89785dff2ab9a81263f06553a20efe3e67afcc63 + last_write_checksum: sha1:3591ebe5b5e389144818b962861e45253cd4ac63 + pristine_git_object: 644ee855bc568d07e22700010119947ce5e81ca8 docs/models/components/BuyerCreate.md: id: 3c8953927ef9 last_write_checksum: sha1:8bbb2eae37b7c3051d47f8753d74c633da8df006 @@ -2778,8 +2778,8 @@ trackedFiles: pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:4b7f8f894b35951ff12f296db0eda695a6251d19 - pristine_git_object: c78c94bb7714142a5555594f1e5f0b18131c1462 + last_write_checksum: sha1:8671ceaeb22f4eb413d22dba73267e648de02d9c + pristine_git_object: c9cea298678c55e5abd49fdc0aabc13869ee913e gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -3098,8 +3098,8 @@ trackedFiles: pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f src/main/java/com/gr4vy/sdk/SDKConfiguration.java: id: 73a7edeaca45 - last_write_checksum: sha1:4fb8911da63c98eec8a39493c15eb69a49f01012 - pristine_git_object: bffe0eaf48302f10c2acf2043f99208a006acfd9 + last_write_checksum: sha1:8fe7bb2f55bf5291f8d9e0536027fa54901932fc + pristine_git_object: 06d75919c02c06502aacd89bb2f17d47362895ed src/main/java/com/gr4vy/sdk/SecuritySource.java: id: 1b6add6b9b50 last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd @@ -3322,8 +3322,8 @@ trackedFiles: pristine_git_object: 3f893d0f5a712e5053b1dae1a71ea09e3120e7e0 src/main/java/com/gr4vy/sdk/models/components/Buyer.java: id: dcf09dd4bed8 - last_write_checksum: sha1:790f7ff67b0ce67b0d9a7db499493eeb55024d2d - pristine_git_object: db4df225c314486d6749738c57d2993fdb4eb2c5 + last_write_checksum: sha1:86af18a87f0e90ca0cf25271a1fdb8f78aca77b6 + pristine_git_object: 9fd72922f0ddd167d2af054360508f0c44183c76 src/main/java/com/gr4vy/sdk/models/components/BuyerCreate.java: id: 5fae9252e332 last_write_checksum: sha1:d099590c56a0cbebbd6fccb75a701c73cb2a4440 @@ -7939,7 +7939,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"items": [{"type": "buyer", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}, {"type": "buyer", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}], "limit": 20} + application/json: {"items": [{"type": "buyer", "id": "fe26475d-ec3e-4884-9553-f7356683f7f9", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}, {"type": "buyer", "id": "fe26475d-ec3e-4884-9553-f7356683f7f9", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"}], "limit": 20} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -7976,7 +7976,7 @@ examples: application/json: {} responses: "201": - application/json: {"type": "buyer", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "buyer", "id": "fe26475d-ec3e-4884-9553-f7356683f7f9", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -8012,7 +8012,7 @@ examples: x-gr4vy-merchant-account-id: "default" responses: "200": - application/json: {"type": "buyer", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "buyer", "id": "fe26475d-ec3e-4884-9553-f7356683f7f9", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -8051,7 +8051,7 @@ examples: application/json: {} responses: "200": - application/json: {"type": "buyer", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} + application/json: {"type": "buyer", "id": "fe26475d-ec3e-4884-9553-f7356683f7f9", "merchant_account_id": "default", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00"} "400": application/json: {"type": "error", "code": "bad_request", "status": 400, "message": "Request failed validation"} "401": @@ -12069,7 +12069,19 @@ 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.transactions.create()`: \n * `request.transactionCreate.description` **Added**\n" +releaseNotes: | + ## Java SDK Changes: + * `gr4vy.buyers.list()`: `response.items[].id` **Changed** (Breaking ⚠️) + * `gr4vy.buyers.create()`: `response.id` **Changed** (Breaking ⚠️) + * `gr4vy.buyers.get()`: `response.id` **Changed** (Breaking ⚠️) + * `gr4vy.buyers.update()`: `response.id` **Changed** (Breaking ⚠️) + * `gr4vy.paymentMethods.list()`: `response.items[].buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.paymentMethods.create()`: `response.buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.paymentMethods.get()`: `response.buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.paymentMethods.update()`: `response.buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.giftCards.get()`: `response.buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.giftCards.create()`: `response.buyer.id` **Changed** (Breaking ⚠️) + * `gr4vy.giftCards.list()`: `response.items[].buyer.id` **Changed** (Breaking ⚠️) generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2e551372..3a9f6643 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 2.16.114 + version: 2.16.115 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 87ec720f..a56da4f5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -9,8 +9,8 @@ sources: - 1.0.0 openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:928b90ff5b4b3aa2bd27dd23b5f2f54780b8351ceb452e0f02153935c7f6753d - sourceBlobDigest: sha256:afcea77d0ff67d1e6669be854ff01728b23ea9701c785061012f245a3563452a + sourceRevisionDigest: sha256:cd56949ad5625ccff0ee16ad67dda6e251a12e1829329d5f01968c8b58a5961e + sourceBlobDigest: sha256:02abff73446e5578464836dd8979b8de9942d7e1ec81767b660b9dbfa7b1b07e tags: - latest - 1.0.0 @@ -25,10 +25,10 @@ targets: java: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:928b90ff5b4b3aa2bd27dd23b5f2f54780b8351ceb452e0f02153935c7f6753d - sourceBlobDigest: sha256:afcea77d0ff67d1e6669be854ff01728b23ea9701c785061012f245a3563452a + sourceRevisionDigest: sha256:cd56949ad5625ccff0ee16ad67dda6e251a12e1829329d5f01968c8b58a5961e + sourceBlobDigest: sha256:02abff73446e5578464836dd8979b8de9942d7e1ec81767b660b9dbfa7b1b07e codeSamplesNamespace: openapi-java-code-samples - codeSamplesRevisionDigest: sha256:bd4cdb6fe57d1788322ba2935ddc519b0900e36f508df82366fa71921a897e10 + codeSamplesRevisionDigest: sha256:f38e704cb32ca05779cdd391887675af8c6510ee16f6ac94f9b0a1bc1ebff112 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 20386145..d87668fa 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.gr4vy:sdk:2.16.114' +implementation 'com.gr4vy:sdk:2.16.115' ``` Maven: @@ -67,7 +67,7 @@ Maven: com.gr4vy sdk - 2.16.114 + 2.16.115 ``` diff --git a/RELEASES.md b/RELEASES.md index 73127988..7c2257a1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1978,4 +1978,14 @@ Based on: ### Generated - [java v2.16.114] . ### Releases -- [Maven Central v2.16.114] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.114 - . \ No newline at end of file +- [Maven Central v2.16.114] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.114 - . + +## 2026-07-23 09:59:09 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.790.3 (2.918.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v2.16.115] . +### Releases +- [Maven Central v2.16.115] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.16.115 - . \ No newline at end of file diff --git a/docs/models/components/Buyer.md b/docs/models/components/Buyer.md index 89785dff..644ee855 100644 --- a/docs/models/components/Buyer.md +++ b/docs/models/components/Buyer.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `type` | *Optional\* | :heavy_minus_sign: | Always `buyer`. | buyer | -| `id` | *JsonNullable\* | :heavy_minus_sign: | The ID for the buyer. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `id` | *String* | :heavy_check_mark: | The ID for the buyer. | fe26475d-ec3e-4884-9553-f7356683f7f9 | | `merchantAccountId` | *String* | :heavy_check_mark: | The ID of the merchant account this buyer belongs to. | default | | `displayName` | *JsonNullable\* | :heavy_minus_sign: | The display name for the buyer. | John Doe | | `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The merchant identifier for this buyer. | buyer-12345 | diff --git a/gradle.properties b/gradle.properties index c78c94bb..c9cea298 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.gr4vy artifactId=sdk -version=2.16.114 +version=2.16.115 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 bffe0eaf..06d75919 100644 --- a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java +++ b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java @@ -22,7 +22,7 @@ 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.114"; + public static final String SDK_VERSION = "2.16.115"; public static final String GEN_VERSION = "2.918.4"; private static final String BASE_PACKAGE = "com.gr4vy.sdk"; public static final String USER_AGENT = diff --git a/src/main/java/com/gr4vy/sdk/models/components/Buyer.java b/src/main/java/com/gr4vy/sdk/models/components/Buyer.java index db4df225..9fd72922 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/Buyer.java +++ b/src/main/java/com/gr4vy/sdk/models/components/Buyer.java @@ -30,9 +30,8 @@ public class Buyer { /** * The ID for the buyer. */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") - private JsonNullable id; + private String id; /** * The ID of the merchant account this buyer belongs to. @@ -82,7 +81,7 @@ public class Buyer { @JsonCreator public Buyer( - @JsonProperty("id") JsonNullable id, + @JsonProperty("id") String id, @JsonProperty("merchant_account_id") String merchantAccountId, @JsonProperty("display_name") JsonNullable displayName, @JsonProperty("external_identifier") JsonNullable externalIdentifier, @@ -110,10 +109,11 @@ public Buyer( } public Buyer( + String id, String merchantAccountId, OffsetDateTime createdAt, OffsetDateTime updatedAt) { - this(JsonNullable.undefined(), merchantAccountId, JsonNullable.undefined(), + this(id, merchantAccountId, JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), createdAt, updatedAt); } @@ -130,7 +130,7 @@ public Optional type() { * The ID for the buyer. */ @JsonIgnore - public JsonNullable id() { + public String id() { return id; } @@ -200,15 +200,6 @@ public static Builder builder() { * The ID for the buyer. */ public Buyer withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = JsonNullable.of(id); - return this; - } - - /** - * The ID for the buyer. - */ - public Buyer withId(JsonNullable id) { Utils.checkNotNull(id, "id"); this.id = id; return this; @@ -359,7 +350,7 @@ public String toString() { @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private JsonNullable id = JsonNullable.undefined(); + private String id; private String merchantAccountId; @@ -384,15 +375,6 @@ private Builder() { * The ID for the buyer. */ public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = JsonNullable.of(id); - return this; - } - - /** - * The ID for the buyer. - */ - public Builder id(JsonNullable id) { Utils.checkNotNull(id, "id"); this.id = id; return this; diff --git a/src/test/java/com/gr4vy/sdk/flows/BuyerLifecycleTest.java b/src/test/java/com/gr4vy/sdk/flows/BuyerLifecycleTest.java index 8ea8e97d..8120d81f 100644 --- a/src/test/java/com/gr4vy/sdk/flows/BuyerLifecycleTest.java +++ b/src/test/java/com/gr4vy/sdk/flows/BuyerLifecycleTest.java @@ -46,9 +46,8 @@ void buyerLifecycle() throws Exception { .build()) .call(); Buyer created = createRes.buyer().orElseThrow(); - assertTrue(created.id().isPresent(), "buyer create returned no id"); - String buyerId = created.id().get(); - assertNotNull(buyerId); + String buyerId = created.id(); + assertNotNull(buyerId, "buyer create returned no id"); assertEquals("E2E buyer", created.displayName().orElse(null)); // 2. Read the buyer back. @@ -56,7 +55,7 @@ void buyerLifecycle() throws Exception { .buyerId(buyerId) .call(); Buyer fetched = getRes.buyer().orElseThrow(); - assertEquals(buyerId, fetched.id().orElse(null)); + assertEquals(buyerId, fetched.id()); // 3. Update the display name. UpdateBuyerResponse updateRes = client.buyers().update() diff --git a/src/test/java/com/gr4vy/sdk/processing/BuyersTest.java b/src/test/java/com/gr4vy/sdk/processing/BuyersTest.java index b4b445d5..89b38f22 100644 --- a/src/test/java/com/gr4vy/sdk/processing/BuyersTest.java +++ b/src/test/java/com/gr4vy/sdk/processing/BuyersTest.java @@ -34,10 +34,11 @@ private static Buyer createBuyer(Gr4vy client) throws Exception { } private static String buyerId(Buyer b) { - if (!b.id().isPresent()) { + String id = b.id(); + if (id == null) { fail("buyer id was not present on create response"); } - return b.id().get(); + return id; } @Test