diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40ef7f83..906878cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 15 name: lint runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -46,7 +46,7 @@ jobs: contents: read id-token: write runs-on: ${{ github.repository == 'stainless-sdks/lithic-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd115b20..58ebf7f2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.122.0" + ".": "0.123.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2c9eb4a3..0f37c1b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 190 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-17c04dd1b0508b380c21e3acc3d4cd1e86b590f81d14fa26d1973b236f660e38.yml -openapi_spec_hash: f8ddee07358d2c938450a6889fbf7940 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bf54d7063b11e1b1656e00d02438f34f87938a9fdbdd5b980fce3cfae3dabffa.yml +openapi_spec_hash: c6efbc9d3105fa48f76ebb095b887e08 config_hash: edbdfefeb0d3d927c2f9fe3402793215 diff --git a/CHANGELOG.md b/CHANGELOG.md index 836ebac9..f9fb145e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.123.0 (2026-04-02) + +Full Changelog: [v0.122.0...v0.123.0](https://github.com/lithic-com/lithic-java/compare/v0.122.0...v0.123.0) + +### Features + +* **api:** add card decline count values to conditional authorization ([65f1c4b](https://github.com/lithic-com/lithic-java/commit/65f1c4b2a4c28c8a9fbc07a187fb01cf4567461c)) +* **api:** add override_company_name parameter to payment create ([899a3be](https://github.com/lithic-com/lithic-java/commit/899a3be4a06965cf3a37cf4ddf6f8581fac9351a)) +* **api:** add statement_totals field to Statement/StatementsCreatedWebhookEvent ([44d890e](https://github.com/lithic-com/lithic-java/commit/44d890e17988a1e587124a95afe3984c99a3bca0)) + + +### Bug Fixes + +* **types:** make data and has_more required in AccountActivityListPageResponse ([5feba92](https://github.com/lithic-com/lithic-java/commit/5feba92cc13a3877fb2769d8808e65959b4b12b9)) + + +### Chores + +* **ci:** skip lint on metadata-only changes ([c266aa2](https://github.com/lithic-com/lithic-java/commit/c266aa2a776ae772b05a025dab383477ec5c2d0d)) + + +### Documentation + +* **api:** update natureOfBusiness and qrCodeUrl parameter descriptions ([2fe328d](https://github.com/lithic-com/lithic-java/commit/2fe328dff29b7df2d9096274e5725e1bf37df25f)) + ## 0.122.0 (2026-03-23) Full Changelog: [v0.121.0...v0.122.0](https://github.com/lithic-com/lithic-java/compare/v0.121.0...v0.122.0) diff --git a/README.md b/README.md index 3f07769b..b7fe002a 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.122.0) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.122.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.122.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.123.0) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.123.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.123.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.122.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.123.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.122.0") +implementation("com.lithic.api:lithic-java:0.123.0") ``` ### Maven @@ -42,7 +42,7 @@ implementation("com.lithic.api:lithic-java:0.122.0") com.lithic.api lithic-java - 0.122.0 + 0.123.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index d37f4f1f..97b99941 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.122.0" // x-release-please-version + version = "0.123.0" // x-release-please-version } subprojects { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt index ccf10fd8..db504ef4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListPageResponse.kt @@ -11,11 +11,11 @@ import com.lithic.api.core.JsonField import com.lithic.api.core.JsonMissing import com.lithic.api.core.JsonValue import com.lithic.api.core.checkKnown +import com.lithic.api.core.checkRequired import com.lithic.api.core.toImmutable import com.lithic.api.errors.LithicInvalidDataException import java.util.Collections import java.util.Objects -import java.util.Optional import kotlin.jvm.optionals.getOrNull /** A response containing a list of transactions */ @@ -36,18 +36,18 @@ private constructor( ) : this(data, hasMore, mutableMapOf()) /** - * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @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). */ - fun data(): Optional> = data.getOptional("data") + fun data(): List = data.getRequired("data") /** * Indicates if there are more transactions available for pagination * - * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). + * @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). */ - fun hasMore(): Optional = hasMore.getOptional("has_more") + fun hasMore(): Boolean = hasMore.getRequired("has_more") /** * Returns the raw JSON value of [data]. @@ -82,6 +82,12 @@ private constructor( /** * Returns a mutable builder for constructing an instance of * [AccountActivityListPageResponse]. + * + * The following fields are required: + * ```java + * .data() + * .hasMore() + * ``` */ @JvmStatic fun builder() = Builder() } @@ -90,7 +96,7 @@ private constructor( class Builder internal constructor() { private var data: JsonField>? = null - private var hasMore: JsonField = JsonMissing.of() + private var hasMore: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -193,11 +199,19 @@ private constructor( * Returns an immutable instance of [AccountActivityListPageResponse]. * * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .data() + * .hasMore() + * ``` + * + * @throws IllegalStateException if any required field is unset. */ fun build(): AccountActivityListPageResponse = AccountActivityListPageResponse( - (data ?: JsonMissing.of()).map { it.toImmutable() }, - hasMore, + checkRequired("data", data).map { it.toImmutable() }, + checkRequired("hasMore", hasMore), additionalProperties.toMutableMap(), ) } @@ -209,7 +223,7 @@ private constructor( return@apply } - data().ifPresent { it.forEach { it.validate() } } + data().forEach { it.validate() } hasMore() validated = true } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt index 7de48325..d0a76573 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrder.kt @@ -116,7 +116,8 @@ private constructor( fun _shippingAddress(): JsonValue = shippingAddress /** - * Shipping method for all cards in this bulk order + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS + * are only available with Perfect Plastic Printing * * @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). @@ -330,7 +331,10 @@ private constructor( this.shippingAddress = shippingAddress } - /** Shipping method for all cards in this bulk order */ + /** + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing + */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -463,7 +467,10 @@ private constructor( (status.asKnown().getOrNull()?.validity() ?: 0) + (if (updated.asKnown().isPresent) 1 else 0) - /** Shipping method for all cards in this bulk order */ + /** + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS + * are only available with Perfect Plastic Printing + */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -481,12 +488,21 @@ private constructor( @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK_PRIORITY = of("BULK_PRIORITY") + + @JvmField val BULK_2_DAY = of("BULK_2_DAY") + + @JvmField val BULK_EXPRESS = of("BULK_EXPRESS") + @JvmStatic fun of(value: String) = ShippingMethod(JsonField.of(value)) } /** An enum containing [ShippingMethod]'s known values. */ enum class Known { - BULK_EXPEDITED + BULK_EXPEDITED, + BULK_PRIORITY, + BULK_2_DAY, + BULK_EXPRESS, } /** @@ -500,6 +516,9 @@ private constructor( */ enum class Value { BULK_EXPEDITED, + BULK_PRIORITY, + BULK_2_DAY, + BULK_EXPRESS, /** * An enum member indicating that [ShippingMethod] was instantiated with an unknown * value. @@ -517,6 +536,9 @@ private constructor( fun value(): Value = when (this) { BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK_PRIORITY -> Value.BULK_PRIORITY + BULK_2_DAY -> Value.BULK_2_DAY + BULK_EXPRESS -> Value.BULK_EXPRESS else -> Value._UNKNOWN } @@ -532,6 +554,9 @@ private constructor( fun known(): Known = when (this) { BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK_PRIORITY -> Known.BULK_PRIORITY + BULK_2_DAY -> Known.BULK_2_DAY + BULK_EXPRESS -> Known.BULK_EXPRESS else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt index 98a6abe3..e230278b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderCreateParams.kt @@ -21,8 +21,8 @@ import java.util.Objects import kotlin.jvm.optionals.getOrNull /** - * Create a new bulk order for physical card shipments **[BETA]**. Cards can be added to the order - * via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH + * Create a new bulk order for physical card shipments. Cards can be added to the order via the POST + * /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH * /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your Customer * Success Manager and card personalization bureau to ensure bulk shipping is supported for your * program. @@ -54,7 +54,8 @@ private constructor( fun _shippingAddress(): JsonValue = body._shippingAddress() /** - * Shipping method for all cards in this bulk order + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS + * are only available with Perfect Plastic Printing * * @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). @@ -150,7 +151,10 @@ private constructor( body.shippingAddress(shippingAddress) } - /** Shipping method for all cards in this bulk order */ + /** + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing + */ fun shippingMethod(shippingMethod: ShippingMethod) = apply { body.shippingMethod(shippingMethod) } @@ -360,7 +364,8 @@ private constructor( fun _shippingAddress(): JsonValue = shippingAddress /** - * Shipping method for all cards in this bulk order + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing * * @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). @@ -453,7 +458,10 @@ private constructor( this.shippingAddress = shippingAddress } - /** Shipping method for all cards in this bulk order */ + /** + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and + * BULK_EXPRESS are only available with Perfect Plastic Printing + */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -563,7 +571,10 @@ private constructor( "CreateBulkOrderRequest{customerProductId=$customerProductId, shippingAddress=$shippingAddress, shippingMethod=$shippingMethod, additionalProperties=$additionalProperties}" } - /** Shipping method for all cards in this bulk order */ + /** + * Shipping method for all cards in this bulk order. BULK_PRIORITY, BULK_2_DAY, and BULK_EXPRESS + * are only available with Perfect Plastic Printing + */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -581,12 +592,21 @@ private constructor( @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK_PRIORITY = of("BULK_PRIORITY") + + @JvmField val BULK_2_DAY = of("BULK_2_DAY") + + @JvmField val BULK_EXPRESS = of("BULK_EXPRESS") + @JvmStatic fun of(value: String) = ShippingMethod(JsonField.of(value)) } /** An enum containing [ShippingMethod]'s known values. */ enum class Known { - BULK_EXPEDITED + BULK_EXPEDITED, + BULK_PRIORITY, + BULK_2_DAY, + BULK_EXPRESS, } /** @@ -600,6 +620,9 @@ private constructor( */ enum class Value { BULK_EXPEDITED, + BULK_PRIORITY, + BULK_2_DAY, + BULK_EXPRESS, /** * An enum member indicating that [ShippingMethod] was instantiated with an unknown * value. @@ -617,6 +640,9 @@ private constructor( fun value(): Value = when (this) { BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK_PRIORITY -> Value.BULK_PRIORITY + BULK_2_DAY -> Value.BULK_2_DAY + BULK_EXPRESS -> Value.BULK_EXPRESS else -> Value._UNKNOWN } @@ -632,6 +658,9 @@ private constructor( fun known(): Known = when (this) { BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK_PRIORITY -> Known.BULK_PRIORITY + BULK_2_DAY -> Known.BULK_2_DAY + BULK_EXPRESS -> Known.BULK_EXPRESS else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt index 48db021e..3f841075 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderListParams.kt @@ -11,7 +11,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** List bulk orders for physical card shipments **[BETA]** */ +/** List bulk orders for physical card shipments */ class CardBulkOrderListParams private constructor( private val begin: OffsetDateTime?, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt index 554c19d6..bdda850c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderRetrieveParams.kt @@ -9,7 +9,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Retrieve a specific bulk order by token **[BETA]** */ +/** Retrieve a specific bulk order by token */ class CardBulkOrderRetrieveParams private constructor( private val bulkOrderToken: String?, diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt index c495aa14..2acbedea 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardBulkOrderUpdateParams.kt @@ -22,8 +22,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing additional cards - * from being added + * Update a bulk order. Primarily used to lock the order, preventing additional cards from being + * added */ class CardBulkOrderUpdateParams private constructor( diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt index a593b9c2..cf9eef55 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt @@ -78,7 +78,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -224,7 +225,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = apply { body.shippingMethod(shippingMethod) @@ -453,7 +455,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -594,7 +597,8 @@ private constructor( * tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping + * method and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -720,7 +724,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -739,7 +744,7 @@ private constructor( @JvmField val _2_DAY = of("2_DAY") - @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK = of("BULK") @JvmField val EXPEDITED = of("EXPEDITED") @@ -757,7 +762,7 @@ private constructor( /** An enum containing [ShippingMethod]'s known values. */ enum class Known { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -776,7 +781,7 @@ private constructor( */ enum class Value { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -799,7 +804,7 @@ private constructor( fun value(): Value = when (this) { _2_DAY -> Value._2_DAY - BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK -> Value.BULK EXPEDITED -> Value.EXPEDITED EXPRESS -> Value.EXPRESS PRIORITY -> Value.PRIORITY @@ -820,7 +825,7 @@ private constructor( fun known(): Known = when (this) { _2_DAY -> Known._2_DAY - BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK -> Known.BULK EXPEDITED -> Known.EXPEDITED EXPRESS -> Known.EXPRESS PRIORITY -> Known.PRIORITY 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 552485e7..efa44b41 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 @@ -224,7 +224,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -779,7 +780,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = apply { body.shippingMethod(shippingMethod) @@ -1303,7 +1305,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1915,7 +1918,8 @@ private constructor( * tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping + * method and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -2560,7 +2564,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -2579,7 +2584,7 @@ private constructor( @JvmField val _2_DAY = of("2_DAY") - @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK = of("BULK") @JvmField val EXPEDITED = of("EXPEDITED") @@ -2597,7 +2602,7 @@ private constructor( /** An enum containing [ShippingMethod]'s known values. */ enum class Known { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -2616,7 +2621,7 @@ private constructor( */ enum class Value { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -2639,7 +2644,7 @@ private constructor( fun value(): Value = when (this) { _2_DAY -> Value._2_DAY - BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK -> Value.BULK EXPEDITED -> Value.EXPEDITED EXPRESS -> Value.EXPRESS PRIORITY -> Value.PRIORITY @@ -2660,7 +2665,7 @@ private constructor( fun known(): Known = when (this) { _2_DAY -> Known._2_DAY - BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK -> Known.BULK EXPEDITED -> Known.EXPEDITED EXPRESS -> Known.EXPRESS PRIORITY -> Known.PRIORITY diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt index 9bdc4068..5567f469 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt @@ -73,7 +73,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -214,7 +215,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = apply { body.shippingMethod(shippingMethod) @@ -437,7 +439,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -571,7 +574,8 @@ private constructor( * tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping + * method and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -690,7 +694,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -709,7 +714,7 @@ private constructor( @JvmField val _2_DAY = of("2_DAY") - @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK = of("BULK") @JvmField val EXPEDITED = of("EXPEDITED") @@ -727,7 +732,7 @@ private constructor( /** An enum containing [ShippingMethod]'s known values. */ enum class Known { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -746,7 +751,7 @@ private constructor( */ enum class Value { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -769,7 +774,7 @@ private constructor( fun value(): Value = when (this) { _2_DAY -> Value._2_DAY - BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK -> Value.BULK EXPEDITED -> Value.EXPEDITED EXPRESS -> Value.EXPRESS PRIORITY -> Value.PRIORITY @@ -790,7 +795,7 @@ private constructor( fun known(): Known = when (this) { _2_DAY -> Known._2_DAY - BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK -> Known.BULK EXPEDITED -> Known.EXPEDITED EXPRESS -> Known.EXPRESS PRIORITY -> Known.PRIORITY 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 cffea8f5..0f50a0c7 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 @@ -95,7 +95,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -285,7 +286,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = apply { body.shippingMethod(shippingMethod) @@ -546,7 +548,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method + * and timeline are inherited from the parent bulk order. * * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -735,7 +738,8 @@ private constructor( * tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or * similar international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping + * method and timeline are inherited from the parent bulk order. */ fun shippingMethod(shippingMethod: ShippingMethod) = shippingMethod(JsonField.of(shippingMethod)) @@ -877,7 +881,8 @@ private constructor( * * `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with tracking * * `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight or similar * international option, with tracking - * * `BULK_EXPEDITED` - Bulk shipment with Expedited shipping + * * `BULK` - Card will be shipped as part of a bulk fulfillment order. The shipping method and + * timeline are inherited from the parent bulk order. */ class ShippingMethod @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -896,7 +901,7 @@ private constructor( @JvmField val _2_DAY = of("2_DAY") - @JvmField val BULK_EXPEDITED = of("BULK_EXPEDITED") + @JvmField val BULK = of("BULK") @JvmField val EXPEDITED = of("EXPEDITED") @@ -914,7 +919,7 @@ private constructor( /** An enum containing [ShippingMethod]'s known values. */ enum class Known { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -933,7 +938,7 @@ private constructor( */ enum class Value { _2_DAY, - BULK_EXPEDITED, + BULK, EXPEDITED, EXPRESS, PRIORITY, @@ -956,7 +961,7 @@ private constructor( fun value(): Value = when (this) { _2_DAY -> Value._2_DAY - BULK_EXPEDITED -> Value.BULK_EXPEDITED + BULK -> Value.BULK EXPEDITED -> Value.EXPEDITED EXPRESS -> Value.EXPRESS PRIORITY -> Value.PRIORITY @@ -977,7 +982,7 @@ private constructor( fun known(): Known = when (this) { _2_DAY -> Known._2_DAY - BULK_EXPEDITED -> Known.BULK_EXPEDITED + BULK -> Known.BULK EXPEDITED -> Known.EXPEDITED EXPRESS -> Known.EXPRESS PRIORITY -> Known.PRIORITY diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt index e148e23b..b571582e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAuthorizationActionParameters.kt @@ -409,6 +409,12 @@ private constructor( * hour up and until the authorization. * * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the trailing 24 * hours up and until the authorization. + * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the + * trailing 15 minutes before the authorization. + * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the + * trailing hour up and until the authorization. + * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the + * trailing 24 hours up and until the authorization. * * `CARD_STATE`: The current state of the card associated with the transaction. Valid * values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`. * * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid values @@ -563,6 +569,12 @@ private constructor( * hour up and until the authorization. * * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the * trailing 24 hours up and until the authorization. + * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the + * trailing 15 minutes before the authorization. + * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the + * trailing hour up and until the authorization. + * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the + * trailing 24 hours up and until the authorization. * * `CARD_STATE`: The current state of the card associated with the transaction. Valid * values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`. * * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid @@ -750,6 +762,12 @@ private constructor( * hour up and until the authorization. * * `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the trailing 24 * hours up and until the authorization. + * * `CARD_DECLINE_COUNT_15M`: The number of declined transactions on the card in the + * trailing 15 minutes before the authorization. + * * `CARD_DECLINE_COUNT_1H`: The number of declined transactions on the card in the + * trailing hour up and until the authorization. + * * `CARD_DECLINE_COUNT_24H`: The number of declined transactions on the card in the + * trailing 24 hours up and until the authorization. * * `CARD_STATE`: The current state of the card associated with the transaction. Valid * values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`. * * `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction. Valid values @@ -817,6 +835,12 @@ private constructor( @JvmField val CARD_TRANSACTION_COUNT_24_H = of("CARD_TRANSACTION_COUNT_24H") + @JvmField val CARD_DECLINE_COUNT_15_M = of("CARD_DECLINE_COUNT_15M") + + @JvmField val CARD_DECLINE_COUNT_1_H = of("CARD_DECLINE_COUNT_1H") + + @JvmField val CARD_DECLINE_COUNT_24_H = of("CARD_DECLINE_COUNT_24H") + @JvmField val CARD_STATE = of("CARD_STATE") @JvmField val PIN_ENTERED = of("PIN_ENTERED") @@ -855,6 +879,9 @@ private constructor( CARD_TRANSACTION_COUNT_15_M, CARD_TRANSACTION_COUNT_1_H, CARD_TRANSACTION_COUNT_24_H, + CARD_DECLINE_COUNT_15_M, + CARD_DECLINE_COUNT_1_H, + CARD_DECLINE_COUNT_24_H, CARD_STATE, PIN_ENTERED, PIN_STATUS, @@ -890,6 +917,9 @@ private constructor( CARD_TRANSACTION_COUNT_15_M, CARD_TRANSACTION_COUNT_1_H, CARD_TRANSACTION_COUNT_24_H, + CARD_DECLINE_COUNT_15_M, + CARD_DECLINE_COUNT_1_H, + CARD_DECLINE_COUNT_24_H, CARD_STATE, PIN_ENTERED, PIN_STATUS, @@ -929,6 +959,9 @@ private constructor( CARD_TRANSACTION_COUNT_15_M -> Value.CARD_TRANSACTION_COUNT_15_M CARD_TRANSACTION_COUNT_1_H -> Value.CARD_TRANSACTION_COUNT_1_H CARD_TRANSACTION_COUNT_24_H -> Value.CARD_TRANSACTION_COUNT_24_H + CARD_DECLINE_COUNT_15_M -> Value.CARD_DECLINE_COUNT_15_M + CARD_DECLINE_COUNT_1_H -> Value.CARD_DECLINE_COUNT_1_H + CARD_DECLINE_COUNT_24_H -> Value.CARD_DECLINE_COUNT_24_H CARD_STATE -> Value.CARD_STATE PIN_ENTERED -> Value.PIN_ENTERED PIN_STATUS -> Value.PIN_STATUS @@ -966,6 +999,9 @@ private constructor( CARD_TRANSACTION_COUNT_15_M -> Known.CARD_TRANSACTION_COUNT_15_M CARD_TRANSACTION_COUNT_1_H -> Known.CARD_TRANSACTION_COUNT_1_H CARD_TRANSACTION_COUNT_24_H -> Known.CARD_TRANSACTION_COUNT_24_H + CARD_DECLINE_COUNT_15_M -> Known.CARD_DECLINE_COUNT_15_M + CARD_DECLINE_COUNT_1_H -> Known.CARD_DECLINE_COUNT_1_H + CARD_DECLINE_COUNT_24_H -> Known.CARD_DECLINE_COUNT_24_H CARD_STATE -> Known.CARD_STATE PIN_ENTERED -> Known.PIN_ENTERED PIN_STATUS -> Known.PIN_STATUS diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt index c23de0e6..70698404 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt @@ -1152,6 +1152,7 @@ private constructor( private val secCode: JsonField, private val achHoldPeriod: JsonField, private val addenda: JsonField, + private val overrideCompanyName: JsonField, private val additionalProperties: MutableMap, ) { @@ -1164,7 +1165,10 @@ private constructor( @ExcludeMissing achHoldPeriod: JsonField = JsonMissing.of(), @JsonProperty("addenda") @ExcludeMissing addenda: JsonField = JsonMissing.of(), - ) : this(secCode, achHoldPeriod, addenda, mutableMapOf()) + @JsonProperty("override_company_name") + @ExcludeMissing + overrideCompanyName: JsonField = JsonMissing.of(), + ) : this(secCode, achHoldPeriod, addenda, overrideCompanyName, mutableMapOf()) /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is @@ -1186,6 +1190,16 @@ private constructor( */ fun addenda(): Optional = addenda.getOptional("addenda") + /** + * Value to override the configured company name with. Can only be used if allowed to + * override + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun overrideCompanyName(): Optional = + overrideCompanyName.getOptional("override_company_name") + /** * Returns the raw JSON value of [secCode]. * @@ -1210,6 +1224,16 @@ private constructor( */ @JsonProperty("addenda") @ExcludeMissing fun _addenda(): JsonField = addenda + /** + * Returns the raw JSON value of [overrideCompanyName]. + * + * Unlike [overrideCompanyName], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("override_company_name") + @ExcludeMissing + fun _overrideCompanyName(): JsonField = overrideCompanyName + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -1242,6 +1266,7 @@ private constructor( private var secCode: JsonField? = null private var achHoldPeriod: JsonField = JsonMissing.of() private var addenda: JsonField = JsonMissing.of() + private var overrideCompanyName: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -1250,6 +1275,7 @@ private constructor( secCode = paymentMethodRequestAttributes.secCode achHoldPeriod = paymentMethodRequestAttributes.achHoldPeriod addenda = paymentMethodRequestAttributes.addenda + overrideCompanyName = paymentMethodRequestAttributes.overrideCompanyName additionalProperties = paymentMethodRequestAttributes.additionalProperties.toMutableMap() } @@ -1293,6 +1319,31 @@ private constructor( */ fun addenda(addenda: JsonField) = apply { this.addenda = addenda } + /** + * Value to override the configured company name with. Can only be used if allowed to + * override + */ + fun overrideCompanyName(overrideCompanyName: String?) = + overrideCompanyName(JsonField.ofNullable(overrideCompanyName)) + + /** + * Alias for calling [Builder.overrideCompanyName] with + * `overrideCompanyName.orElse(null)`. + */ + fun overrideCompanyName(overrideCompanyName: Optional) = + overrideCompanyName(overrideCompanyName.getOrNull()) + + /** + * Sets [Builder.overrideCompanyName] to an arbitrary JSON value. + * + * You should usually call [Builder.overrideCompanyName] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun overrideCompanyName(overrideCompanyName: JsonField) = apply { + this.overrideCompanyName = overrideCompanyName + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -1329,6 +1380,7 @@ private constructor( checkRequired("secCode", secCode), achHoldPeriod, addenda, + overrideCompanyName, additionalProperties.toMutableMap(), ) } @@ -1343,6 +1395,7 @@ private constructor( secCode().validate() achHoldPeriod() addenda() + overrideCompanyName() validated = true } @@ -1364,7 +1417,8 @@ private constructor( internal fun validity(): Int = (secCode.asKnown().getOrNull()?.validity() ?: 0) + (if (achHoldPeriod.asKnown().isPresent) 1 else 0) + - (if (addenda.asKnown().isPresent) 1 else 0) + (if (addenda.asKnown().isPresent) 1 else 0) + + (if (overrideCompanyName.asKnown().isPresent) 1 else 0) class SecCode @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -1511,17 +1565,18 @@ private constructor( secCode == other.secCode && achHoldPeriod == other.achHoldPeriod && addenda == other.addenda && + overrideCompanyName == other.overrideCompanyName && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(secCode, achHoldPeriod, addenda, additionalProperties) + Objects.hash(secCode, achHoldPeriod, addenda, overrideCompanyName, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "PaymentMethodRequestAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, additionalProperties=$additionalProperties}" + "PaymentMethodRequestAttributes{secCode=$secCode, achHoldPeriod=$achHoldPeriod, addenda=$addenda, overrideCompanyName=$overrideCompanyName, additionalProperties=$additionalProperties}" } class Type @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt index c4cc252d..b919da1e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt @@ -45,6 +45,7 @@ private constructor( private val nextPaymentDueDate: JsonField, private val nextStatementEndDate: JsonField, private val payoffDetails: JsonField, + private val statementTotals: JsonField, private val additionalProperties: MutableMap, ) { @@ -114,6 +115,9 @@ private constructor( @JsonProperty("payoff_details") @ExcludeMissing payoffDetails: JsonField = JsonMissing.of(), + @JsonProperty("statement_totals") + @ExcludeMissing + statementTotals: JsonField = JsonMissing.of(), ) : this( token, accountStanding, @@ -137,6 +141,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, mutableMapOf(), ) @@ -309,6 +314,13 @@ private constructor( */ fun payoffDetails(): Optional = payoffDetails.getOptional("payoff_details") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun statementTotals(): Optional = + statementTotals.getOptional("statement_totals") + /** * Returns the raw JSON value of [token]. * @@ -504,6 +516,15 @@ private constructor( @ExcludeMissing fun _payoffDetails(): JsonField = payoffDetails + /** + * Returns the raw JSON value of [statementTotals]. + * + * Unlike [statementTotals], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("statement_totals") + @ExcludeMissing + fun _statementTotals(): JsonField = statementTotals + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -571,6 +592,7 @@ private constructor( private var nextPaymentDueDate: JsonField = JsonMissing.of() private var nextStatementEndDate: JsonField = JsonMissing.of() private var payoffDetails: JsonField = JsonMissing.of() + private var statementTotals: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -597,6 +619,7 @@ private constructor( nextPaymentDueDate = statement.nextPaymentDueDate nextStatementEndDate = statement.nextStatementEndDate payoffDetails = statement.payoffDetails + statementTotals = statement.statementTotals additionalProperties = statement.additionalProperties.toMutableMap() } @@ -915,6 +938,20 @@ private constructor( this.payoffDetails = payoffDetails } + fun statementTotals(statementTotals: StatementTotals) = + statementTotals(JsonField.of(statementTotals)) + + /** + * Sets [Builder.statementTotals] to an arbitrary JSON value. + * + * You should usually call [Builder.statementTotals] with a well-typed [StatementTotals] + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun statementTotals(statementTotals: JsonField) = apply { + this.statementTotals = statementTotals + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -987,6 +1024,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, additionalProperties.toMutableMap(), ) } @@ -1020,6 +1058,7 @@ private constructor( nextPaymentDueDate() nextStatementEndDate() payoffDetails().ifPresent { it.validate() } + statementTotals().ifPresent { it.validate() } validated = true } @@ -1059,7 +1098,8 @@ private constructor( (interestDetails.asKnown().getOrNull()?.validity() ?: 0) + (if (nextPaymentDueDate.asKnown().isPresent) 1 else 0) + (if (nextStatementEndDate.asKnown().isPresent) 1 else 0) + - (payoffDetails.asKnown().getOrNull()?.validity() ?: 0) + (payoffDetails.asKnown().getOrNull()?.validity() ?: 0) + + (statementTotals.asKnown().getOrNull()?.validity() ?: 0) class AccountStanding @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -3643,6 +3683,7 @@ private constructor( nextPaymentDueDate == other.nextPaymentDueDate && nextStatementEndDate == other.nextStatementEndDate && payoffDetails == other.payoffDetails && + statementTotals == other.statementTotals && additionalProperties == other.additionalProperties } @@ -3670,6 +3711,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, additionalProperties, ) } @@ -3677,5 +3719,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Statement{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, additionalProperties=$additionalProperties}" + "Statement{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, statementTotals=$statementTotals, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt index 521d74b8..6509608b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementsCreatedWebhookEvent.kt @@ -45,6 +45,7 @@ private constructor( private val nextPaymentDueDate: JsonField, private val nextStatementEndDate: JsonField, private val payoffDetails: JsonField, + private val statementTotals: JsonField, private val eventType: JsonField, private val additionalProperties: MutableMap, ) { @@ -115,6 +116,9 @@ private constructor( @JsonProperty("payoff_details") @ExcludeMissing payoffDetails: JsonField = JsonMissing.of(), + @JsonProperty("statement_totals") + @ExcludeMissing + statementTotals: JsonField = JsonMissing.of(), @JsonProperty("event_type") @ExcludeMissing eventType: JsonField = JsonMissing.of(), @@ -141,6 +145,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, eventType, mutableMapOf(), ) @@ -169,6 +174,7 @@ private constructor( .nextPaymentDueDate(nextPaymentDueDate) .nextStatementEndDate(nextStatementEndDate) .payoffDetails(payoffDetails) + .statementTotals(statementTotals) .build() /** @@ -342,6 +348,13 @@ private constructor( fun payoffDetails(): Optional = payoffDetails.getOptional("payoff_details") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun statementTotals(): Optional = + statementTotals.getOptional("statement_totals") + /** * The type of event that occurred. * @@ -547,6 +560,15 @@ private constructor( @ExcludeMissing fun _payoffDetails(): JsonField = payoffDetails + /** + * Returns the raw JSON value of [statementTotals]. + * + * Unlike [statementTotals], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("statement_totals") + @ExcludeMissing + fun _statementTotals(): JsonField = statementTotals + /** * Returns the raw JSON value of [eventType]. * @@ -623,6 +645,7 @@ private constructor( private var nextPaymentDueDate: JsonField = JsonMissing.of() private var nextStatementEndDate: JsonField = JsonMissing.of() private var payoffDetails: JsonField = JsonMissing.of() + private var statementTotals: JsonField = JsonMissing.of() private var eventType: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -650,6 +673,7 @@ private constructor( nextPaymentDueDate = statementsCreatedWebhookEvent.nextPaymentDueDate nextStatementEndDate = statementsCreatedWebhookEvent.nextStatementEndDate payoffDetails = statementsCreatedWebhookEvent.payoffDetails + statementTotals = statementsCreatedWebhookEvent.statementTotals eventType = statementsCreatedWebhookEvent.eventType additionalProperties = statementsCreatedWebhookEvent.additionalProperties.toMutableMap() } @@ -972,6 +996,20 @@ private constructor( this.payoffDetails = payoffDetails } + fun statementTotals(statementTotals: StatementTotals) = + statementTotals(JsonField.of(statementTotals)) + + /** + * Sets [Builder.statementTotals] to an arbitrary JSON value. + * + * You should usually call [Builder.statementTotals] with a well-typed [StatementTotals] + * value instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun statementTotals(statementTotals: JsonField) = apply { + this.statementTotals = statementTotals + } + /** The type of event that occurred. */ fun eventType(eventType: EventType) = eventType(JsonField.of(eventType)) @@ -1057,6 +1095,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, checkRequired("eventType", eventType), additionalProperties.toMutableMap(), ) @@ -1091,6 +1130,7 @@ private constructor( nextPaymentDueDate() nextStatementEndDate() payoffDetails().ifPresent { it.validate() } + statementTotals().ifPresent { it.validate() } eventType().validate() validated = true } @@ -1132,6 +1172,7 @@ private constructor( (if (nextPaymentDueDate.asKnown().isPresent) 1 else 0) + (if (nextStatementEndDate.asKnown().isPresent) 1 else 0) + (payoffDetails.asKnown().getOrNull()?.validity() ?: 0) + + (statementTotals.asKnown().getOrNull()?.validity() ?: 0) + (eventType.asKnown().getOrNull()?.validity() ?: 0) /** The type of event that occurred. */ @@ -1284,6 +1325,7 @@ private constructor( nextPaymentDueDate == other.nextPaymentDueDate && nextStatementEndDate == other.nextStatementEndDate && payoffDetails == other.payoffDetails && + statementTotals == other.statementTotals && eventType == other.eventType && additionalProperties == other.additionalProperties } @@ -1312,6 +1354,7 @@ private constructor( nextPaymentDueDate, nextStatementEndDate, payoffDetails, + statementTotals, eventType, additionalProperties, ) @@ -1320,5 +1363,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "StatementsCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, eventType=$eventType, additionalProperties=$additionalProperties}" + "StatementsCreatedWebhookEvent{token=$token, accountStanding=$accountStanding, amountDue=$amountDue, availableCredit=$availableCredit, created=$created, creditLimit=$creditLimit, creditProductToken=$creditProductToken, daysInBillingCycle=$daysInBillingCycle, endingBalance=$endingBalance, financialAccountToken=$financialAccountToken, paymentDueDate=$paymentDueDate, periodTotals=$periodTotals, startingBalance=$startingBalance, statementEndDate=$statementEndDate, statementStartDate=$statementStartDate, statementType=$statementType, updated=$updated, ytdTotals=$ytdTotals, interestDetails=$interestDetails, nextPaymentDueDate=$nextPaymentDueDate, nextStatementEndDate=$nextStatementEndDate, payoffDetails=$payoffDetails, statementTotals=$statementTotals, eventType=$eventType, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardBulkOrderServiceAsync.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardBulkOrderServiceAsync.kt index e21cf894..0bb832df 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardBulkOrderServiceAsync.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/async/CardBulkOrderServiceAsync.kt @@ -29,9 +29,9 @@ interface CardBulkOrderServiceAsync { fun withOptions(modifier: Consumer): CardBulkOrderServiceAsync /** - * Create a new bulk order for physical card shipments **[BETA]**. Cards can be added to the - * order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via - * PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your + * Create a new bulk order for physical card shipments. Cards can be added to the order via the + * POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH + * /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your * Customer Success Manager and card personalization bureau to ensure bulk shipping is supported * for your program. */ @@ -44,7 +44,7 @@ interface CardBulkOrderServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** Retrieve a specific bulk order by token **[BETA]** */ + /** Retrieve a specific bulk order by token */ fun retrieve(bulkOrderToken: String): CompletableFuture = retrieve(bulkOrderToken, CardBulkOrderRetrieveParams.none()) @@ -80,8 +80,8 @@ interface CardBulkOrderServiceAsync { retrieve(bulkOrderToken, CardBulkOrderRetrieveParams.none(), requestOptions) /** - * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing additional cards - * from being added + * Update a bulk order. Primarily used to lock the order, preventing additional cards from being + * added */ fun update( bulkOrderToken: String, @@ -106,7 +106,7 @@ interface CardBulkOrderServiceAsync { requestOptions: RequestOptions = RequestOptions.none(), ): CompletableFuture - /** List bulk orders for physical card shipments **[BETA]** */ + /** List bulk orders for physical card shipments */ fun list(): CompletableFuture = list(CardBulkOrderListParams.none()) /** @see list */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardBulkOrderService.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardBulkOrderService.kt index 6339c2cc..ad70ce11 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardBulkOrderService.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/services/blocking/CardBulkOrderService.kt @@ -29,9 +29,9 @@ interface CardBulkOrderService { fun withOptions(modifier: Consumer): CardBulkOrderService /** - * Create a new bulk order for physical card shipments **[BETA]**. Cards can be added to the - * order via the POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via - * PATCH /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your + * Create a new bulk order for physical card shipments. Cards can be added to the order via the + * POST /v1/cards endpoint by specifying the bulk_order_token. Lock the order via PATCH + * /v1/card_bulk_orders/{bulk_order_token} to prepare for shipment. Please work with your * Customer Success Manager and card personalization bureau to ensure bulk shipping is supported * for your program. */ @@ -44,7 +44,7 @@ interface CardBulkOrderService { requestOptions: RequestOptions = RequestOptions.none(), ): CardBulkOrder - /** Retrieve a specific bulk order by token **[BETA]** */ + /** Retrieve a specific bulk order by token */ fun retrieve(bulkOrderToken: String): CardBulkOrder = retrieve(bulkOrderToken, CardBulkOrderRetrieveParams.none()) @@ -77,8 +77,8 @@ interface CardBulkOrderService { retrieve(bulkOrderToken, CardBulkOrderRetrieveParams.none(), requestOptions) /** - * Update a bulk order **[BETA]**. Primarily used to lock the order, preventing additional cards - * from being added + * Update a bulk order. Primarily used to lock the order, preventing additional cards from being + * added */ fun update(bulkOrderToken: String, params: CardBulkOrderUpdateParams): CardBulkOrder = update(bulkOrderToken, params, RequestOptions.none()) @@ -101,7 +101,7 @@ interface CardBulkOrderService { requestOptions: RequestOptions = RequestOptions.none(), ): CardBulkOrder - /** List bulk orders for physical card shipments **[BETA]** */ + /** List bulk orders for physical card shipments */ fun list(): CardBulkOrderListPage = list(CardBulkOrderListParams.none()) /** @see list */ diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt index 97cb2ad4..032617c4 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListPageResponseTest.kt @@ -5,7 +5,6 @@ package com.lithic.api.models import com.fasterxml.jackson.module.kotlin.jacksonTypeRef import com.lithic.api.core.jsonMapper import java.time.OffsetDateTime -import kotlin.jvm.optionals.getOrNull import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -51,7 +50,7 @@ internal class AccountActivityListPageResponseTest { .hasMore(true) .build() - assertThat(accountActivityListPageResponse.data().getOrNull()) + assertThat(accountActivityListPageResponse.data()) .containsExactly( AccountActivityListResponse.ofInternal( AccountActivityListResponse.FinancialTransaction.builder() @@ -87,7 +86,7 @@ internal class AccountActivityListPageResponseTest { .build() ) ) - assertThat(accountActivityListPageResponse.hasMore()).contains(true) + assertThat(accountActivityListPageResponse.hasMore()).isEqualTo(true) } @Test diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt index 7c12415c..14272219 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/ParsedWebhookEventTest.kt @@ -8255,6 +8255,21 @@ internal class ParsedWebhookEventTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .eventType(StatementsCreatedWebhookEvent.EventType.STATEMENTS_CREATED) .build() @@ -8439,6 +8454,21 @@ internal class ParsedWebhookEventTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .eventType(StatementsCreatedWebhookEvent.EventType.STATEMENTS_CREATED) .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateParamsTest.kt index f94636cd..d69a590c 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/PaymentCreateParamsTest.kt @@ -19,6 +19,7 @@ internal class PaymentCreateParamsTest { .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD) .achHoldPeriod(0L) .addenda("addenda") + .overrideCompanyName("override_company_name") .build() ) .type(PaymentCreateParams.Type.COLLECTION) @@ -46,6 +47,7 @@ internal class PaymentCreateParamsTest { .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD) .achHoldPeriod(0L) .addenda("addenda") + .overrideCompanyName("override_company_name") .build() ) .type(PaymentCreateParams.Type.COLLECTION) @@ -72,6 +74,7 @@ internal class PaymentCreateParamsTest { .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD) .achHoldPeriod(0L) .addenda("addenda") + .overrideCompanyName("override_company_name") .build() ) assertThat(body.type()).isEqualTo(PaymentCreateParams.Type.COLLECTION) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementTest.kt index 550c9a4f..af21a7a7 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementTest.kt @@ -128,6 +128,21 @@ internal class StatementTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .build() assertThat(statement.token()).isEqualTo("token") @@ -249,6 +264,22 @@ internal class StatementTest { .payoffPeriodPaymentTotal(0L) .build() ) + assertThat(statement.statementTotals()) + .contains( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) } @Test @@ -368,6 +399,21 @@ internal class StatementTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .build() val roundtrippedStatement = diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsCreatedWebhookEventTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsCreatedWebhookEventTest.kt index 31c7e03b..c495d843 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsCreatedWebhookEventTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsCreatedWebhookEventTest.kt @@ -128,6 +128,21 @@ internal class StatementsCreatedWebhookEventTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .eventType(StatementsCreatedWebhookEvent.EventType.STATEMENTS_CREATED) .build() @@ -259,6 +274,22 @@ internal class StatementsCreatedWebhookEventTest { .payoffPeriodPaymentTotal(0L) .build() ) + assertThat(statementsCreatedWebhookEvent.statementTotals()) + .contains( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) assertThat(statementsCreatedWebhookEvent.eventType()) .isEqualTo(StatementsCreatedWebhookEvent.EventType.STATEMENTS_CREATED) } @@ -380,6 +411,21 @@ internal class StatementsCreatedWebhookEventTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .eventType(StatementsCreatedWebhookEvent.EventType.STATEMENTS_CREATED) .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsTest.kt index 9acf115b..5917526a 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/StatementsTest.kt @@ -130,6 +130,21 @@ internal class StatementsTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .build() ) .hasMore(true) @@ -250,6 +265,21 @@ internal class StatementsTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .build() ) assertThat(statements.hasMore()).isEqualTo(true) @@ -374,6 +404,21 @@ internal class StatementsTest { .payoffPeriodPaymentTotal(0L) .build() ) + .statementTotals( + StatementTotals.builder() + .balanceTransfers(0L) + .cashAdvances(0L) + .credits(0L) + .debits(0L) + .fees(0L) + .interest(0L) + .payments(0L) + .purchases(0L) + .creditDetails(JsonValue.from(mapOf())) + .debitDetails(JsonValue.from(mapOf())) + .paymentDetails(JsonValue.from(mapOf())) + .build() + ) .build() ) .hasMore(true) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/PaymentServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/PaymentServiceAsyncTest.kt index df3aafba..45c7d5e5 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/PaymentServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/PaymentServiceAsyncTest.kt @@ -38,6 +38,7 @@ internal class PaymentServiceAsyncTest { .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD) .achHoldPeriod(0L) .addenda("addenda") + .overrideCompanyName("override_company_name") .build() ) .type(PaymentCreateParams.Type.COLLECTION) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/PaymentServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/PaymentServiceTest.kt index 82d833e0..06ff4622 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/PaymentServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/PaymentServiceTest.kt @@ -38,6 +38,7 @@ internal class PaymentServiceTest { .secCode(PaymentCreateParams.PaymentMethodRequestAttributes.SecCode.CCD) .achHoldPeriod(0L) .addenda("addenda") + .overrideCompanyName("override_company_name") .build() ) .type(PaymentCreateParams.Type.COLLECTION)