From e6d1162957a63df987014d36469cbfae2761d05c Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 29 Jul 2026 14:47:34 +0000 Subject: [PATCH 1/2] ## Java SDK Changes: * `gr4vy.giftCards.activations.create()`: `request.giftCardActivationCreate` **Changed** --- .speakeasy/gen.lock | 44 ++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README.md | 4 +- RELEASES.md | 12 +- .../components/GiftCardActivationCreate.md | 17 +- docs/sdks/activations/README.md | 2 +- gradle.properties | 2 +- src/main/java/com/gr4vy/sdk/Activations.java | 9 +- .../java/com/gr4vy/sdk/AsyncActivations.java | 9 +- .../java/com/gr4vy/sdk/SDKConfiguration.java | 2 +- .../components/GiftCardActivationCreate.java | 216 +++++++++++++++++- 12 files changed, 277 insertions(+), 52 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 32ef86c1..5213e00e 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: 1150a398b609785e5aa64ea3f16cccb8 + docChecksum: 57bff7b3113898886542ccac9c513e7c docVersion: 1.0.0 speakeasyVersion: 1.791.0 generationVersion: 2.924.0 - releaseVersion: 2.18.0 - configChecksum: 80724afce2746e110a53a219ee0278ba + releaseVersion: 2.18.1 + configChecksum: cd06d67d5008d04c500af047b75afc24 repoURL: https://github.com/gr4vy/gr4vy-java.git installationURL: https://github.com/gr4vy/gr4vy-java published: true persistentEdits: - generation_id: 0f44ed22-763b-4f58-a20e-fa812d3f906a - pristine_commit_hash: 5f65d15e1d360cc7a8102792ea065d782ea1533a - pristine_tree_hash: b11f03460b34a06b094afce8af0a15ff98f5d441 + generation_id: f441994c-c980-46c8-bc06-64f999342368 + pristine_commit_hash: db7107f1ebe9a53b16767b68ad72903980cf4bdc + pristine_tree_hash: 2f18ee3fe50d5c2d80326f9e3381146dffb2d989 features: java: additionalDependencies: 0.1.0 @@ -571,8 +571,8 @@ trackedFiles: pristine_git_object: f22b3db40cca48b74c4d9598566460696a05d4e4 docs/models/components/GiftCardActivationCreate.md: id: e2ba13478fe3 - last_write_checksum: sha1:78bbf8f02cb0c8c983ceb80093a96eb7f601aba0 - pristine_git_object: a751465e2c306d612a5d1535e434b2ef512df48c + last_write_checksum: sha1:380ff874e049ff2e01690a13faa122be99d8c9c8 + pristine_git_object: 5579ede262dadfc60c47d21ef9b339ce27f9a76e docs/models/components/GiftCardBalanceRequest.md: id: c80a3eda305b last_write_checksum: sha1:c1f2778ba0fe150682aef69158b5019168d9459c @@ -2655,8 +2655,8 @@ trackedFiles: pristine_git_object: 0f7d8fa069ab3f04c91515239d103b286359bd3d docs/sdks/activations/README.md: id: 5e6a3a8cf62a - last_write_checksum: sha1:df91083b2d54f4ee6fa90a29ef725a0d524e5e14 - pristine_git_object: 5ce22e0995ff775c947eb81da5617e8c5bb033dc + last_write_checksum: sha1:7ee78930dea961c12da4a03a99ee7fb450836420 + pristine_git_object: e8d89620628a2a3d31eeb5748d924c363d8e38e9 docs/sdks/all/README.md: id: 936653be5c4b last_write_checksum: sha1:97da642dcdafbb8a8d55336d987af073423d3643 @@ -2815,8 +2815,8 @@ trackedFiles: pristine_git_object: 15c4e4642f204ccb312d8814155b69e153b4e19b gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:225e3202f01ce0eb3a2c7584597717b8c81c40da - pristine_git_object: bdee5eb133719ed8c27b53fc99816e19e68f85b1 + last_write_checksum: sha1:789ac9c1771f38932e6db67471280b17352957be + pristine_git_object: da64f5d583de4bd954be55ca457d4b597ff21f4f gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -2851,8 +2851,8 @@ trackedFiles: pristine_git_object: b86ebe2ce835d4b6e1021be71f78aa98cd5d477c src/main/java/com/gr4vy/sdk/Activations.java: id: f4748ece3b9b - last_write_checksum: sha1:c1c04ebcdca70f4f390b2c8dd41b0af0e05be949 - pristine_git_object: f8d575aeff5a4ae95238fca7c103c8ba03ecfac7 + last_write_checksum: sha1:8948def6cf7f851d42e02f323d428183cbf4afbd + pristine_git_object: 6c8e957a3e087f1116aa45c577d261b03ea529ef src/main/java/com/gr4vy/sdk/All.java: id: 234c521b6941 last_write_checksum: sha1:6ef88cfdfc33ec118f9cc83b188b69433ee939a3 @@ -2871,8 +2871,8 @@ trackedFiles: pristine_git_object: 028d3696be7da66d76b84b1353133139769e2079 src/main/java/com/gr4vy/sdk/AsyncActivations.java: id: bd7db28e97c1 - last_write_checksum: sha1:cd8fc9c05774d534000831e440ace6114220658d - pristine_git_object: fd9f0372db00a7f0eb65b30dac091a3f799af396 + last_write_checksum: sha1:bb4c101f06aaa9f24347a9083d4ad1f4bbd1df24 + pristine_git_object: 57f944984fcc7ec562c8eaff3e28a18d374f6040 src/main/java/com/gr4vy/sdk/AsyncAll.java: id: 42ccc0a41ddf last_write_checksum: sha1:7252df5451de1c20d538f2de57ef003c53c06b65 @@ -3151,8 +3151,8 @@ trackedFiles: pristine_git_object: 502a7312d3dc82c102dbaf7ed5e952d0c793e26f src/main/java/com/gr4vy/sdk/SDKConfiguration.java: id: 73a7edeaca45 - last_write_checksum: sha1:a69adb8571e06cdf11d229ebf1a05c67852ad757 - pristine_git_object: bc127b5d047a55029732ed537e1d1c270926ff8c + last_write_checksum: sha1:83c49e7997f802d78b6ea9e6086fe671794fffc9 + pristine_git_object: 0722eb268f72a918d429747677cde29a0333a088 src/main/java/com/gr4vy/sdk/SecuritySource.java: id: 1b6add6b9b50 last_write_checksum: sha1:2f365cc823c6243188e83f4df618c9737fcee8bd @@ -3707,8 +3707,8 @@ trackedFiles: pristine_git_object: 86e82602250ebfd5bb1c46be7009785dd34dd693 src/main/java/com/gr4vy/sdk/models/components/GiftCardActivationCreate.java: id: 888f251c8e49 - last_write_checksum: sha1:5a418c7d1d2ec2556a69929b565956227bf8f3b8 - pristine_git_object: 14f65504b8de0f60f7de854697bb76d498d6aed6 + last_write_checksum: sha1:ecfc374dd54fd6b35dec98657065d61e49a821ac + pristine_git_object: 92d833cf07a35c9955109ba20d6550809c4920ff src/main/java/com/gr4vy/sdk/models/components/GiftCardBalanceRequest.java: id: 170501161b7d last_write_checksum: sha1:f742fd871283b30d36fd4a9c99d95508f71a4efd @@ -12183,7 +12183,7 @@ examples: activate_gift_card: speakeasy-default-activate-gift-card: requestBody: - application/json: {"number": "4123455541234561234"} + application/json: {"number": "4123455541234561234", "store": false} responses: "201": application/json: {"type": "gift-card", "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e", "merchant_account_id": "default", "gift_card_service": {"type": "gift-card-service", "id": "35b60feec-a7c7-4844-b503-f39b09192d81", "gift_card_service_definition_id": "valuelink-gift-card", "display_name": "Qwikcilver USA"}, "bin": "412345", "sub_bin": "554", "last4": "1234", "created_at": "2013-07-16T19:23:00.000+00:00", "updated_at": "2013-07-16T19:23:00.000+00:00", "usage_count": 100, "cit_usage_count": 50} @@ -12246,7 +12246,7 @@ examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Java SDK Changes: - * `gr4vy.transactions.events.list()`: `response.items[].name` **Changed** + * `gr4vy.giftCards.activations.create()`: `request.giftCardActivationCreate` **Changed** generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 20268de8..c236f91e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 2.18.0 + version: 2.18.1 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 01793fa1..4737c007 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -9,8 +9,8 @@ sources: - 1.0.0 openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:d675c2734e1e086829dc3f3962bbc74cd812bae5517d6493c8af548544ec6a03 - sourceBlobDigest: sha256:8edbc7303d21c6e7e02f43c4c0c69e4ac53f7f5817a925dc4c594d0f14be0c6b + sourceRevisionDigest: sha256:40142eb27b062ec3d5bf96f80f06ce3d88d43aee60f0edd4c4b3b0f72bdd272b + sourceBlobDigest: sha256:a58ea678374be899011661fe24b944b4c56f547de6f53720a2f0d134e5532de9 tags: - latest - 1.0.0 @@ -25,10 +25,10 @@ targets: java: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:d675c2734e1e086829dc3f3962bbc74cd812bae5517d6493c8af548544ec6a03 - sourceBlobDigest: sha256:8edbc7303d21c6e7e02f43c4c0c69e4ac53f7f5817a925dc4c594d0f14be0c6b + sourceRevisionDigest: sha256:40142eb27b062ec3d5bf96f80f06ce3d88d43aee60f0edd4c4b3b0f72bdd272b + sourceBlobDigest: sha256:a58ea678374be899011661fe24b944b4c56f547de6f53720a2f0d134e5532de9 codeSamplesNamespace: openapi-java-code-samples - codeSamplesRevisionDigest: sha256:322d3c996503046ecfed149488ef186f93312eea0d6e34c2db0be3e983ee02a2 + codeSamplesRevisionDigest: sha256:3821dacf015d22f5d672439ddfa0233754cb80ed899bb95a84c043de7e230d70 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 768921eb..ed00dafd 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.18.0' +implementation 'com.gr4vy:sdk:2.18.1' ``` Maven: @@ -67,7 +67,7 @@ Maven: com.gr4vy sdk - 2.18.0 + 2.18.1 ``` diff --git a/RELEASES.md b/RELEASES.md index 02c1ed7f..a9591c02 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -2028,4 +2028,14 @@ Based on: ### Generated - [java v2.18.0] . ### Releases -- [Maven Central v2.18.0] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.0 - . \ No newline at end of file +- [Maven Central v2.18.0] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.0 - . + +## 2026-07-29 14:45:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.791.0 (2.924.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v2.18.1] . +### Releases +- [Maven Central v2.18.1] https://central.sonatype.com/artifact/com.gr4vy/sdk/2.18.1 - . \ No newline at end of file diff --git a/docs/models/components/GiftCardActivationCreate.md b/docs/models/components/GiftCardActivationCreate.md index a751465e..5579ede2 100644 --- a/docs/models/components/GiftCardActivationCreate.md +++ b/docs/models/components/GiftCardActivationCreate.md @@ -5,10 +5,13 @@ The details used to activate a physical gift card. ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `number` | *String* | :heavy_check_mark: | The 16-19 digit number for the gift card. | 4123455541234561234 | -| `pin` | *JsonNullable\* | :heavy_minus_sign: | The PIN for this gift card. | 1234 | -| `amount` | *JsonNullable\* | :heavy_minus_sign: | The amount to load onto the gift card, in the smallest denomination for the currency. Required if `currency` is provided. | 5000 | -| `currency` | *JsonNullable\* | :heavy_minus_sign: | The ISO-4217 currency code for the `amount`. Required if `amount` is provided. | USD | -| `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | An optional external identifier for this activation. | order-12345 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `number` | *String* | :heavy_check_mark: | The 16-19 digit number for the gift card. | 4123455541234561234 | +| `pin` | *JsonNullable\* | :heavy_minus_sign: | The PIN for this gift card. | 1234 | +| `amount` | *JsonNullable\* | :heavy_minus_sign: | The amount to load onto the gift card, in the smallest denomination for the currency. Required if `currency` is provided. | 5000 | +| `currency` | *JsonNullable\* | :heavy_minus_sign: | The ISO-4217 currency code for the `amount`. Required if `amount` is provided. | USD | +| `externalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | An optional external identifier for this activation. | order-12345 | +| `store` | *Optional\* | :heavy_minus_sign: | Whether to store the activated gift card in the vault. When `true`, a `pin` is required. | false | +| `buyerId` | *JsonNullable\* | :heavy_minus_sign: | The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_external_identifier` field needs to be unset. | fe26475d-ec3e-4884-9553-f7356683f7f9 | +| `buyerExternalIdentifier` | *JsonNullable\* | :heavy_minus_sign: | The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this field is provided then the `buyer_id` field needs to be unset. | user-789123 | \ No newline at end of file diff --git a/docs/sdks/activations/README.md b/docs/sdks/activations/README.md index 5ce22e09..e8d89620 100644 --- a/docs/sdks/activations/README.md +++ b/docs/sdks/activations/README.md @@ -8,7 +8,7 @@ ## create -Activate a physical gift card through the primary gift card service. +Activate a physical gift card through the primary gift card service. Set `store` to `true` to also store the activated gift card. ### Example Usage diff --git a/gradle.properties b/gradle.properties index bdee5eb1..da64f5d5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.gr4vy artifactId=sdk -version=2.18.0 +version=2.18.1 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/gr4vy/sdk/Activations.java b/src/main/java/com/gr4vy/sdk/Activations.java index f8d575ae..6c8e957a 100644 --- a/src/main/java/com/gr4vy/sdk/Activations.java +++ b/src/main/java/com/gr4vy/sdk/Activations.java @@ -37,7 +37,8 @@ public AsyncActivations async() { /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @return The call builder */ @@ -48,7 +49,8 @@ public ActivateGiftCardRequestBuilder create() { /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @param giftCardActivationCreate The details used to activate a physical gift card. * @return The response from the API call @@ -61,7 +63,8 @@ public ActivateGiftCardResponse create(GiftCardActivationCreate giftCardActivati /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @param idempotencyKey A unique key that identifies this request. If supported by the gift card service, the value will be forwarded to make the activation idempotent. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. * @param merchantAccountId diff --git a/src/main/java/com/gr4vy/sdk/AsyncActivations.java b/src/main/java/com/gr4vy/sdk/AsyncActivations.java index fd9f0372..57f94498 100644 --- a/src/main/java/com/gr4vy/sdk/AsyncActivations.java +++ b/src/main/java/com/gr4vy/sdk/AsyncActivations.java @@ -39,7 +39,8 @@ public Activations sync() { /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @return The async call builder */ @@ -50,7 +51,8 @@ public ActivateGiftCardRequestBuilder create() { /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @param giftCardActivationCreate The details used to activate a physical gift card. * @return {@code CompletableFuture} - The async response @@ -62,7 +64,8 @@ public CompletableFuture create(GiftCardActivationCrea /** * Activate a gift card * - *

Activate a physical gift card through the primary gift card service. + *

Activate a physical gift card through the primary gift card service. Set `store` to `true` to also + * store the activated gift card. * * @param idempotencyKey A unique key that identifies this request. If supported by the gift card service, the value will be forwarded to make the activation idempotent. We recommend using V4 UUIDs, or another random string with enough entropy to avoid collisions. * @param merchantAccountId diff --git a/src/main/java/com/gr4vy/sdk/SDKConfiguration.java b/src/main/java/com/gr4vy/sdk/SDKConfiguration.java index bc127b5d..0722eb26 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.18.0"; + public static final String SDK_VERSION = "2.18.1"; public static final String GEN_VERSION = "2.924.0"; 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/GiftCardActivationCreate.java b/src/main/java/com/gr4vy/sdk/models/components/GiftCardActivationCreate.java index 14f65504..92d833cf 100644 --- a/src/main/java/com/gr4vy/sdk/models/components/GiftCardActivationCreate.java +++ b/src/main/java/com/gr4vy/sdk/models/components/GiftCardActivationCreate.java @@ -8,10 +8,14 @@ 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.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; /** @@ -55,28 +59,61 @@ public class GiftCardActivationCreate { @JsonProperty("external_identifier") private JsonNullable externalIdentifier; + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("store") + private Optional store; + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("buyer_id") + private JsonNullable buyerId; + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("buyer_external_identifier") + private JsonNullable buyerExternalIdentifier; + @JsonCreator public GiftCardActivationCreate( @JsonProperty("number") String number, @JsonProperty("pin") JsonNullable pin, @JsonProperty("amount") JsonNullable amount, @JsonProperty("currency") JsonNullable currency, - @JsonProperty("external_identifier") JsonNullable externalIdentifier) { + @JsonProperty("external_identifier") JsonNullable externalIdentifier, + @JsonProperty("store") Optional store, + @JsonProperty("buyer_id") JsonNullable buyerId, + @JsonProperty("buyer_external_identifier") JsonNullable buyerExternalIdentifier) { Utils.checkNotNull(number, "number"); Utils.checkNotNull(pin, "pin"); Utils.checkNotNull(amount, "amount"); Utils.checkNotNull(currency, "currency"); Utils.checkNotNull(externalIdentifier, "externalIdentifier"); + Utils.checkNotNull(store, "store"); + Utils.checkNotNull(buyerId, "buyerId"); + Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); this.number = number; this.pin = pin; this.amount = amount; this.currency = currency; this.externalIdentifier = externalIdentifier; + this.store = store; + this.buyerId = buyerId; + this.buyerExternalIdentifier = buyerExternalIdentifier; } public GiftCardActivationCreate( String number) { this(number, JsonNullable.undefined(), JsonNullable.undefined(), + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); } @@ -121,6 +158,32 @@ public JsonNullable externalIdentifier() { return externalIdentifier; } + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + @JsonIgnore + public Optional store() { + return store; + } + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + @JsonIgnore + public JsonNullable buyerId() { + return buyerId; + } + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + @JsonIgnore + public JsonNullable buyerExternalIdentifier() { + return buyerExternalIdentifier; + } + public static Builder builder() { return new Builder(); } @@ -209,6 +272,65 @@ public GiftCardActivationCreate withExternalIdentifier(JsonNullable exte return this; } + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + public GiftCardActivationCreate withStore(boolean store) { + Utils.checkNotNull(store, "store"); + this.store = Optional.ofNullable(store); + return this; + } + + + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + public GiftCardActivationCreate withStore(Optional store) { + Utils.checkNotNull(store, "store"); + this.store = store; + return this; + } + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + public GiftCardActivationCreate withBuyerId(String buyerId) { + Utils.checkNotNull(buyerId, "buyerId"); + this.buyerId = JsonNullable.of(buyerId); + return this; + } + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + public GiftCardActivationCreate withBuyerId(JsonNullable buyerId) { + Utils.checkNotNull(buyerId, "buyerId"); + this.buyerId = buyerId; + return this; + } + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + public GiftCardActivationCreate withBuyerExternalIdentifier(String buyerExternalIdentifier) { + Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); + this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier); + return this; + } + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + public GiftCardActivationCreate withBuyerExternalIdentifier(JsonNullable buyerExternalIdentifier) { + Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); + this.buyerExternalIdentifier = buyerExternalIdentifier; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -223,14 +345,18 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.pin, other.pin) && Utils.enhancedDeepEquals(this.amount, other.amount) && Utils.enhancedDeepEquals(this.currency, other.currency) && - Utils.enhancedDeepEquals(this.externalIdentifier, other.externalIdentifier); + Utils.enhancedDeepEquals(this.externalIdentifier, other.externalIdentifier) && + Utils.enhancedDeepEquals(this.store, other.store) && + Utils.enhancedDeepEquals(this.buyerId, other.buyerId) && + Utils.enhancedDeepEquals(this.buyerExternalIdentifier, other.buyerExternalIdentifier); } @Override public int hashCode() { return Utils.enhancedHash( number, pin, amount, - currency, externalIdentifier); + currency, externalIdentifier, store, + buyerId, buyerExternalIdentifier); } @Override @@ -240,7 +366,10 @@ public String toString() { "pin", pin, "amount", amount, "currency", currency, - "externalIdentifier", externalIdentifier); + "externalIdentifier", externalIdentifier, + "store", store, + "buyerId", buyerId, + "buyerExternalIdentifier", buyerExternalIdentifier); } @SuppressWarnings("UnusedReturnValue") @@ -256,6 +385,12 @@ public final static class Builder { private JsonNullable externalIdentifier = JsonNullable.undefined(); + private Optional store; + + private JsonNullable buyerId = JsonNullable.undefined(); + + private JsonNullable buyerExternalIdentifier = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -348,12 +483,83 @@ public Builder externalIdentifier(JsonNullable externalIdentifier) { return this; } + + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + public Builder store(boolean store) { + Utils.checkNotNull(store, "store"); + this.store = Optional.ofNullable(store); + return this; + } + + /** + * Whether to store the activated gift card in the vault. When `true`, a `pin` is required. + */ + public Builder store(Optional store) { + Utils.checkNotNull(store, "store"); + this.store = store; + return this; + } + + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + public Builder buyerId(String buyerId) { + Utils.checkNotNull(buyerId, "buyerId"); + this.buyerId = JsonNullable.of(buyerId); + return this; + } + + /** + * The ID of the buyer to associate this gift card to. Only allowed when `store` is `true`. If this + * field is provided then the `buyer_external_identifier` field needs to be unset. + */ + public Builder buyerId(JsonNullable buyerId) { + Utils.checkNotNull(buyerId, "buyerId"); + this.buyerId = buyerId; + return this; + } + + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + public Builder buyerExternalIdentifier(String buyerExternalIdentifier) { + Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); + this.buyerExternalIdentifier = JsonNullable.of(buyerExternalIdentifier); + return this; + } + + /** + * The `external_identifier` of the buyer to associate this gift card to. Only allowed when `store` is + * `true`. If this field is provided then the `buyer_id` field needs to be unset. + */ + public Builder buyerExternalIdentifier(JsonNullable buyerExternalIdentifier) { + Utils.checkNotNull(buyerExternalIdentifier, "buyerExternalIdentifier"); + this.buyerExternalIdentifier = buyerExternalIdentifier; + return this; + } + public GiftCardActivationCreate build() { + if (store == null) { + store = _SINGLETON_VALUE_Store.value(); + } return new GiftCardActivationCreate( number, pin, amount, - currency, externalIdentifier); + currency, externalIdentifier, store, + buyerId, buyerExternalIdentifier); } + + private static final LazySingletonValue> _SINGLETON_VALUE_Store = + new LazySingletonValue<>( + "store", + "false", + new TypeReference>() {}); } } From ec0fa41dd1f61d970f4a4bd67d2101f243f484e7 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 14:47:46 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow