From 2a2a00acc9cd3a92991a7ae50b6e02cdebaa930d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:11:20 +0000 Subject: [PATCH 1/7] fix(types): add EMPTY exemption type, make fields optional in Account/Card/NonPciCard --- .stats.yml | 4 +- .../kotlin/com/lithic/api/models/Account.kt | 5 ++- ...tHolderSimulateEnrollmentReviewResponse.kt | 13 ++++-- .../api/models/AccountHolderUpdateResponse.kt | 6 +-- .../lithic/api/models/AccountUpdateParams.kt | 10 ++++- .../main/kotlin/com/lithic/api/models/Card.kt | 37 +++++++++++----- .../com/lithic/api/models/NonPciCard.kt | 44 +++++++++++++------ .../kotlin/com/lithic/api/models/CardTest.kt | 2 +- .../com/lithic/api/models/NonPciCardTest.kt | 2 +- 9 files changed, 85 insertions(+), 38 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a1957f0a..ccbfde879 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d29b68bb85936070878d8badaa8a7c5991313285e70a990bc812c838eba85373.yml -openapi_spec_hash: 54b44da68df22eb0ea99f2bc564667a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml +openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt index e10c836a8..076c8a777 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt @@ -504,7 +504,10 @@ private constructor( * * `OTHER` - The reason for the account's current status does not fall into any of the * above categories. A comment should be provided to specify the particular reason. */ - fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus)) + fun substatus(substatus: Substatus?) = substatus(JsonField.ofNullable(substatus)) + + /** Alias for calling [Builder.substatus] with `substatus.orElse(null)`. */ + fun substatus(substatus: Optional) = substatus(substatus.getOrNull()) /** * Sets [Builder.substatus] to an arbitrary JSON value. diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt index 380871128..1c070317d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt @@ -209,7 +209,7 @@ private constructor( fun email(): Optional = email.getOptional("email") /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder is + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder is * not KYC-Exempt. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -733,10 +733,15 @@ private constructor( fun email(email: JsonField) = apply { this.email = email } /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder * is not KYC-Exempt. */ - fun exemptionType(exemptionType: ExemptionType) = exemptionType(JsonField.of(exemptionType)) + fun exemptionType(exemptionType: ExemptionType?) = + exemptionType(JsonField.ofNullable(exemptionType)) + + /** Alias for calling [Builder.exemptionType] with `exemptionType.orElse(null)`. */ + fun exemptionType(exemptionType: Optional) = + exemptionType(exemptionType.getOrNull()) /** * Sets [Builder.exemptionType] to an arbitrary JSON value. @@ -1871,7 +1876,7 @@ private constructor( } /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder is + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder is * not KYC-Exempt. */ class ExemptionType @JsonCreator private constructor(private val value: JsonField) : diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt index 538514761..4b7bbe625 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUpdateResponse.kt @@ -402,7 +402,7 @@ private constructor( fun email(): Optional = email.getOptional("email") /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder * is not KYC-Exempt. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -927,7 +927,7 @@ private constructor( fun email(email: JsonField) = apply { this.email = email } /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account * holder is not KYC-Exempt. */ fun exemptionType(exemptionType: ExemptionType) = @@ -2098,7 +2098,7 @@ private constructor( } /** - * The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account holder + * The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account holder * is not KYC-Exempt. */ class ExemptionType @JsonCreator private constructor(private val value: JsonField) : diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt index 9a75e9e55..d84a4d310 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt @@ -337,7 +337,10 @@ private constructor( * * `OTHER` - The reason for the account's current status does not fall into any of the * above categories. A comment should be provided to specify the particular reason. */ - fun substatus(substatus: Substatus) = apply { body.substatus(substatus) } + fun substatus(substatus: Substatus?) = apply { body.substatus(substatus) } + + /** Alias for calling [Builder.substatus] with `substatus.orElse(null)`. */ + fun substatus(substatus: Optional) = substatus(substatus.getOrNull()) /** * Sets [Builder.substatus] to an arbitrary JSON value. @@ -864,7 +867,10 @@ private constructor( * * `OTHER` - The reason for the account's current status does not fall into any of the * above categories. A comment should be provided to specify the particular reason. */ - fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus)) + fun substatus(substatus: Substatus?) = substatus(JsonField.ofNullable(substatus)) + + /** Alias for calling [Builder.substatus] with `substatus.orElse(null)`. */ + fun substatus(substatus: Optional) = substatus(substatus.getOrNull()) /** * Sets [Builder.substatus] to an arbitrary JSON value. diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt index 605ca9af2..b6d2162d6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt @@ -206,12 +206,12 @@ private constructor( fun created(): OffsetDateTime = created.getRequired("created") /** - * Deprecated: Funding account for the card. + * Funding account for a card * - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun funding(): NonPciCard.FundingAccount = funding.getRequired("funding") + fun funding(): Optional = funding.getOptional("funding") /** * Last four digits of the card number. @@ -822,8 +822,11 @@ private constructor( */ fun created(created: JsonField) = apply { this.created = created } - /** Deprecated: Funding account for the card. */ - fun funding(funding: NonPciCard.FundingAccount) = funding(JsonField.of(funding)) + /** Funding account for a card */ + fun funding(funding: NonPciCard.FundingAccount?) = funding(JsonField.ofNullable(funding)) + + /** Alias for calling [Builder.funding] with `funding.orElse(null)`. */ + fun funding(funding: Optional) = funding(funding.getOrNull()) /** * Sets [Builder.funding] to an arbitrary JSON value. @@ -1040,8 +1043,14 @@ private constructor( * tokenization. This artwork must be approved by Mastercard and configured by Lithic to * use. */ - fun digitalCardArtToken(digitalCardArtToken: String) = - digitalCardArtToken(JsonField.of(digitalCardArtToken)) + fun digitalCardArtToken(digitalCardArtToken: String?) = + digitalCardArtToken(JsonField.ofNullable(digitalCardArtToken)) + + /** + * Alias for calling [Builder.digitalCardArtToken] with `digitalCardArtToken.orElse(null)`. + */ + fun digitalCardArtToken(digitalCardArtToken: Optional) = + digitalCardArtToken(digitalCardArtToken.getOrNull()) /** * Sets [Builder.digitalCardArtToken] to an arbitrary JSON value. @@ -1159,7 +1168,10 @@ private constructor( * use. Specifies the configuration (i.e., physical card art) that the card should be * manufactured with. */ - fun productId(productId: String) = productId(JsonField.of(productId)) + fun productId(productId: String?) = productId(JsonField.ofNullable(productId)) + + /** Alias for calling [Builder.productId] with `productId.orElse(null)`. */ + fun productId(productId: Optional) = productId(productId.getOrNull()) /** * Sets [Builder.productId] to an arbitrary JSON value. @@ -1212,7 +1224,10 @@ private constructor( * has been returned. * `OTHER` - The reason for the status does not fall into any of the * above categories. A comment can be provided to specify the reason. */ - fun substatus(substatus: NonPciCard.Substatus) = substatus(JsonField.of(substatus)) + fun substatus(substatus: NonPciCard.Substatus?) = substatus(JsonField.ofNullable(substatus)) + + /** Alias for calling [Builder.substatus] with `substatus.orElse(null)`. */ + fun substatus(substatus: Optional) = substatus(substatus.getOrNull()) /** * Sets [Builder.substatus] to an arbitrary JSON value. @@ -1336,7 +1351,7 @@ private constructor( accountToken() cardProgramToken() created() - funding().validate() + funding().ifPresent { it.validate() } lastFour() pinStatus().validate() spendLimit() diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NonPciCard.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NonPciCard.kt index b736b2c5a..295e7a801 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/NonPciCard.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/NonPciCard.kt @@ -170,12 +170,12 @@ private constructor( fun created(): OffsetDateTime = created.getRequired("created") /** - * Deprecated: Funding account for the card. + * Funding account for a card * - * @throws LithicInvalidDataException if the JSON field has an unexpected type or is - * unexpectedly missing or null (e.g. if the server responded with an unexpected value). + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). */ - fun funding(): FundingAccount = funding.getRequired("funding") + fun funding(): Optional = funding.getOptional("funding") /** * Last four digits of the card number. @@ -745,8 +745,11 @@ private constructor( */ fun created(created: JsonField) = apply { this.created = created } - /** Deprecated: Funding account for the card. */ - fun funding(funding: FundingAccount) = funding(JsonField.of(funding)) + /** Funding account for a card */ + fun funding(funding: FundingAccount?) = funding(JsonField.ofNullable(funding)) + + /** Alias for calling [Builder.funding] with `funding.orElse(null)`. */ + fun funding(funding: Optional) = funding(funding.getOrNull()) /** * Sets [Builder.funding] to an arbitrary JSON value. @@ -957,8 +960,14 @@ private constructor( * tokenization. This artwork must be approved by Mastercard and configured by Lithic to * use. */ - fun digitalCardArtToken(digitalCardArtToken: String) = - digitalCardArtToken(JsonField.of(digitalCardArtToken)) + fun digitalCardArtToken(digitalCardArtToken: String?) = + digitalCardArtToken(JsonField.ofNullable(digitalCardArtToken)) + + /** + * Alias for calling [Builder.digitalCardArtToken] with `digitalCardArtToken.orElse(null)`. + */ + fun digitalCardArtToken(digitalCardArtToken: Optional) = + digitalCardArtToken(digitalCardArtToken.getOrNull()) /** * Sets [Builder.digitalCardArtToken] to an arbitrary JSON value. @@ -1076,7 +1085,10 @@ private constructor( * use. Specifies the configuration (i.e., physical card art) that the card should be * manufactured with. */ - fun productId(productId: String) = productId(JsonField.of(productId)) + fun productId(productId: String?) = productId(JsonField.ofNullable(productId)) + + /** Alias for calling [Builder.productId] with `productId.orElse(null)`. */ + fun productId(productId: Optional) = productId(productId.getOrNull()) /** * Sets [Builder.productId] to an arbitrary JSON value. @@ -1129,7 +1141,10 @@ private constructor( * has been returned. * `OTHER` - The reason for the status does not fall into any of the * above categories. A comment can be provided to specify the reason. */ - fun substatus(substatus: Substatus) = substatus(JsonField.of(substatus)) + fun substatus(substatus: Substatus?) = substatus(JsonField.ofNullable(substatus)) + + /** Alias for calling [Builder.substatus] with `substatus.orElse(null)`. */ + fun substatus(substatus: Optional) = substatus(substatus.getOrNull()) /** * Sets [Builder.substatus] to an arbitrary JSON value. @@ -1223,7 +1238,7 @@ private constructor( accountToken() cardProgramToken() created() - funding().validate() + funding().ifPresent { it.validate() } lastFour() pinStatus().validate() spendLimit() @@ -1288,7 +1303,7 @@ private constructor( (if (replacementFor.asKnown().isPresent) 1 else 0) + (substatus.asKnown().getOrNull()?.validity() ?: 0) - /** Deprecated: Funding account for the card. */ + /** Funding account for a card */ class FundingAccount @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -1574,7 +1589,10 @@ private constructor( } /** The nickname given to the `FundingAccount` or `null` if it has no nickname. */ - fun nickname(nickname: String) = nickname(JsonField.of(nickname)) + fun nickname(nickname: String?) = nickname(JsonField.ofNullable(nickname)) + + /** Alias for calling [Builder.nickname] with `nickname.orElse(null)`. */ + fun nickname(nickname: Optional) = nickname(nickname.getOrNull()) /** * Sets [Builder.nickname] to an arbitrary JSON value. diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardTest.kt index e257cbab9..cdadd7a87 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/CardTest.kt @@ -59,7 +59,7 @@ internal class CardTest { assertThat(card.cardProgramToken()).isEqualTo("5e9483eb-8103-4e16-9794-2106111b2eca") assertThat(card.created()).isEqualTo(OffsetDateTime.parse("2021-06-28T22:53:15Z")) assertThat(card.funding()) - .isEqualTo( + .contains( NonPciCard.FundingAccount.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/NonPciCardTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/NonPciCardTest.kt index c9e11ef66..50aba8bd6 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/NonPciCardTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/NonPciCardTest.kt @@ -57,7 +57,7 @@ internal class NonPciCardTest { assertThat(nonPciCard.cardProgramToken()).isEqualTo("5e9483eb-8103-4e16-9794-2106111b2eca") assertThat(nonPciCard.created()).isEqualTo(OffsetDateTime.parse("2021-06-28T22:53:15Z")) assertThat(nonPciCard.funding()) - .isEqualTo( + .contains( NonPciCard.FundingAccount.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) From 386e6bb68e78c4dd7ca9fa217cbb6132daa912f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:35:08 +0000 Subject: [PATCH 2/7] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccbfde879..a0da87563 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml -openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml +openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc config_hash: ac8326134e692f3f3bdec82396bbec80 From 638084a329e3e2da55a350e950f6752e185b5ae4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:46:27 +0000 Subject: [PATCH 3/7] feat(api): add AMEX to Network enum in settlement params and models --- .stats.yml | 4 ++-- .../api/models/ReportSettlementNetworkTotalListParams.kt | 6 ++++++ .../main/kotlin/com/lithic/api/models/SettlementDetail.kt | 6 ++++++ .../com/lithic/api/models/SettlementSummaryDetails.kt | 6 ++++++ .../models/ReportSettlementNetworkTotalListParamsTest.kt | 6 +++--- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0da87563..cba45ec26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml -openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt index 8a01a41b5..550364f2f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParams.kt @@ -394,6 +394,8 @@ private constructor( companion object { + @JvmField val AMEX = of("AMEX") + @JvmField val VISA = of("VISA") @JvmField val MASTERCARD = of("MASTERCARD") @@ -407,6 +409,7 @@ private constructor( /** An enum containing [Network]'s known values. */ enum class Known { + AMEX, VISA, MASTERCARD, MAESTRO, @@ -423,6 +426,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + AMEX, VISA, MASTERCARD, MAESTRO, @@ -440,6 +444,7 @@ private constructor( */ fun value(): Value = when (this) { + AMEX -> Value.AMEX VISA -> Value.VISA MASTERCARD -> Value.MASTERCARD MAESTRO -> Value.MAESTRO @@ -458,6 +463,7 @@ private constructor( */ fun known(): Known = when (this) { + AMEX -> Known.AMEX VISA -> Known.VISA MASTERCARD -> Known.MASTERCARD MAESTRO -> Known.MAESTRO diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt index d0eb9c223..300bd7349 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt @@ -1048,6 +1048,8 @@ private constructor( companion object { + @JvmField val AMEX = of("AMEX") + @JvmField val INTERLINK = of("INTERLINK") @JvmField val MAESTRO = of("MAESTRO") @@ -1063,6 +1065,7 @@ private constructor( /** An enum containing [Network]'s known values. */ enum class Known { + AMEX, INTERLINK, MAESTRO, MASTERCARD, @@ -1080,6 +1083,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + AMEX, INTERLINK, MAESTRO, MASTERCARD, @@ -1098,6 +1102,7 @@ private constructor( */ fun value(): Value = when (this) { + AMEX -> Value.AMEX INTERLINK -> Value.INTERLINK MAESTRO -> Value.MAESTRO MASTERCARD -> Value.MASTERCARD @@ -1117,6 +1122,7 @@ private constructor( */ fun known(): Known = when (this) { + AMEX -> Known.AMEX INTERLINK -> Known.INTERLINK MAESTRO -> Known.MAESTRO MASTERCARD -> Known.MASTERCARD diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt index 2ccf58242..853ff9b01 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt @@ -461,6 +461,8 @@ private constructor( companion object { + @JvmField val AMEX = of("AMEX") + @JvmField val INTERLINK = of("INTERLINK") @JvmField val MAESTRO = of("MAESTRO") @@ -476,6 +478,7 @@ private constructor( /** An enum containing [Network]'s known values. */ enum class Known { + AMEX, INTERLINK, MAESTRO, MASTERCARD, @@ -493,6 +496,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + AMEX, INTERLINK, MAESTRO, MASTERCARD, @@ -511,6 +515,7 @@ private constructor( */ fun value(): Value = when (this) { + AMEX -> Value.AMEX INTERLINK -> Value.INTERLINK MAESTRO -> Value.MAESTRO MASTERCARD -> Value.MASTERCARD @@ -530,6 +535,7 @@ private constructor( */ fun known(): Known = when (this) { + AMEX -> Known.AMEX INTERLINK -> Known.INTERLINK MAESTRO -> Known.MAESTRO MASTERCARD -> Known.MASTERCARD diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParamsTest.kt index f02ea7495..29fecaa0f 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ReportSettlementNetworkTotalListParamsTest.kt @@ -17,7 +17,7 @@ internal class ReportSettlementNetworkTotalListParamsTest { .end(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endingBefore("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .institutionId("institution_id") - .network(ReportSettlementNetworkTotalListParams.Network.VISA) + .network(ReportSettlementNetworkTotalListParams.Network.AMEX) .pageSize(1L) .reportDate(LocalDate.parse("2019-12-27")) .reportDateBegin(LocalDate.parse("2019-12-27")) @@ -35,7 +35,7 @@ internal class ReportSettlementNetworkTotalListParamsTest { .end(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endingBefore("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .institutionId("institution_id") - .network(ReportSettlementNetworkTotalListParams.Network.VISA) + .network(ReportSettlementNetworkTotalListParams.Network.AMEX) .pageSize(1L) .reportDate(LocalDate.parse("2019-12-27")) .reportDateBegin(LocalDate.parse("2019-12-27")) @@ -53,7 +53,7 @@ internal class ReportSettlementNetworkTotalListParamsTest { .put("end", "2019-12-27T18:11:19.117Z") .put("ending_before", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .put("institution_id", "institution_id") - .put("network", "VISA") + .put("network", "AMEX") .put("page_size", "1") .put("report_date", "2019-12-27") .put("report_date_begin", "2019-12-27") From 36c34a04d23013e6504d322f84ed85506ab46220 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:36:30 +0000 Subject: [PATCH 4/7] docs(api): update exp_month/exp_year descriptions in card create/renew --- .stats.yml | 2 +- .../com/lithic/api/models/CardCreateParams.kt | 23 ++++++++++++------- .../com/lithic/api/models/CardRenewParams.kt | 23 ++++++++++++------- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index cba45ec26..bf2a162bb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml -openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 +openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt index efa44b41c..68a64b274 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt @@ -106,7 +106,7 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration - * date will be generated. + * date five years in the future will be generated. Five years is the maximum expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -115,7 +115,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -591,7 +592,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expMonth(expMonth: String) = apply { body.expMonth(expMonth) } @@ -605,7 +607,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expYear(expYear: String) = apply { body.expYear(expYear) } @@ -1181,7 +1184,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1190,7 +1194,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1721,7 +1726,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expMonth(expMonth: String) = expMonth(JsonField.of(expMonth)) @@ -1736,7 +1742,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expYear(expYear: String) = expYear(JsonField.of(expYear)) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt index 0f50a0c78..a98d73c1e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt @@ -58,7 +58,7 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an expiration - * date six years in the future will be generated. + * date five years in the future will be generated. Five years is the maximum expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -67,7 +67,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -232,7 +233,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expMonth(expMonth: String) = apply { body.expMonth(expMonth) } @@ -246,7 +248,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expYear(expYear: String) = apply { body.expYear(expYear) } @@ -510,7 +513,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -519,7 +523,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -681,7 +686,8 @@ private constructor( /** * Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expMonth(expMonth: String) = expMonth(JsonField.of(expMonth)) @@ -696,7 +702,8 @@ private constructor( /** * Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided, an - * expiration date six years in the future will be generated. + * expiration date five years in the future will be generated. Five years is the maximum + * expiration date. */ fun expYear(expYear: String) = expYear(JsonField.of(expYear)) From 0493d0ad4f3d8e45f35b652e670e505bcbfaf67a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:32:58 +0000 Subject: [PATCH 5/7] feat: support setting headers via env --- .../src/main/kotlin/com/lithic/api/core/ClientOptions.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt index f90712b8f..667a1df54 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt @@ -428,6 +428,14 @@ private constructor( } (System.getProperty("lithic.webhookSecret") ?: System.getenv("LITHIC_WEBHOOK_SECRET")) ?.let { webhookSecret(it) } + System.getenv("LITHIC_CUSTOM_HEADERS")?.let { customHeadersEnv -> + for (line in customHeadersEnv.split("\n")) { + val colon = line.indexOf(':') + if (colon >= 0) { + putHeader(line.substring(0, colon).trim(), line.substring(colon + 1).trim()) + } + } + } } /** From a2900ed6d6c1dda7d5145329972e1acce7a5201f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:04:15 +0000 Subject: [PATCH 6/7] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf2a162bb..6e83ca3b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 5ab442890580237a38fa3e357d304f59850b38dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:05:01 +0000 Subject: [PATCH 7/7] release: 0.125.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cadbcc6fc..f3343e210 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.124.0" + ".": "0.125.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dbb06e50..62f8bb0ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.125.0 (2026-04-28) + +Full Changelog: [v0.124.0...v0.125.0](https://github.com/lithic-com/lithic-java/compare/v0.124.0...v0.125.0) + +### Features + +* **api:** add AMEX to Network enum in settlement params and models ([638084a](https://github.com/lithic-com/lithic-java/commit/638084a329e3e2da55a350e950f6752e185b5ae4)) +* support setting headers via env ([0493d0a](https://github.com/lithic-com/lithic-java/commit/0493d0ad4f3d8e45f35b652e670e505bcbfaf67a)) + + +### Bug Fixes + +* **types:** add EMPTY exemption type, make fields optional in Account/Card/NonPciCard ([2a2a00a](https://github.com/lithic-com/lithic-java/commit/2a2a00acc9cd3a92991a7ae50b6e02cdebaa930d)) + + +### Documentation + +* **api:** update exp_month/exp_year descriptions in card create/renew ([36c34a0](https://github.com/lithic-com/lithic-java/commit/36c34a04d23013e6504d322f84ed85506ab46220)) + ## 0.124.0 (2026-04-20) Full Changelog: [v0.123.0...v0.124.0](https://github.com/lithic-com/lithic-java/compare/v0.123.0...v0.124.0) diff --git a/README.md b/README.md index 0af7be254..d67ab8dc9 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.124.0) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.124.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.124.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.125.0) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.125.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.125.0) @@ -22,7 +22,7 @@ Use the Lithic MCP Server to enable AI assistants to interact with this API, all -The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.124.0). +The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.125.0). @@ -33,7 +33,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic ### Gradle ```kotlin -implementation("com.lithic.api:lithic-java:0.124.0") +implementation("com.lithic.api:lithic-java:0.125.0") ``` ### Maven @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.124.0") com.lithic.api lithic-java - 0.124.0 + 0.125.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 666c01572..4ee64cf4d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.124.0" // x-release-please-version + version = "0.125.0" // x-release-please-version } subprojects {