From 2a0df215d33f5f1dc05482171f2ed77a507f4f8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 14:22:04 +0000 Subject: [PATCH 1/4] feat(client): ensure compat with proguard --- README.md | 6 + .../META-INF/proguard/increase-java-core.pro | 32 +++++ increase-java-proguard-test/build.gradle.kts | 74 +++++++++++ .../api/proguard/ProGuardCompatibilityTest.kt | 122 ++++++++++++++++++ increase-java-proguard-test/test.pro | 5 + settings.gradle.kts | 1 + 6 files changed, 240 insertions(+) create mode 100644 increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro create mode 100644 increase-java-proguard-test/build.gradle.kts create mode 100644 increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt create mode 100644 increase-java-proguard-test/test.pro diff --git a/README.md b/README.md index db521b953..7024dbdb9 100644 --- a/README.md +++ b/README.md @@ -434,6 +434,12 @@ both of which will raise an error if the signature is invalid. If secret is omit Note that the "body" parameter must be the raw JSON string sent from the server (do not parse it first). The `.unwrap()` method can parse this JSON for you. +## ProGuard and R8 + +Although the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `increase-java-core` is published with a [configuration file](increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage). + +ProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary. + ## Jackson The SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default. diff --git a/increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro b/increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro new file mode 100644 index 000000000..9a2cf7910 --- /dev/null +++ b/increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro @@ -0,0 +1,32 @@ +# Jackson uses reflection and depends heavily on runtime attributes. +-keepattributes + +# Jackson uses Kotlin reflection utilities, which themselves use reflection to access things. +-keep class kotlin.reflect.** { *; } +-keep class kotlin.Metadata { *; } + +# Jackson uses reflection to access enum members (e.g. via `java.lang.Class.getEnumConstants()`). +-keepclassmembers class com.fasterxml.jackson.** extends java.lang.Enum { + ; + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +# Jackson uses reflection to access annotation members. +-keepclassmembers @interface com.fasterxml.jackson.annotation.** { + *; +} + +# Jackson uses reflection to access the default constructors of serializers and deserializers. +-keepclassmembers class * extends com.increase.api.core.BaseSerializer { + (); +} +-keepclassmembers class * extends com.increase.api.core.BaseDeserializer { + (); +} + +# Jackson uses reflection to serialize and deserialize our classes based on their constructors and annotated members. +-keepclassmembers class com.increase.api.** { + (...); + @com.fasterxml.jackson.annotation.* *; +} \ No newline at end of file diff --git a/increase-java-proguard-test/build.gradle.kts b/increase-java-proguard-test/build.gradle.kts new file mode 100644 index 000000000..d1f45fa62 --- /dev/null +++ b/increase-java-proguard-test/build.gradle.kts @@ -0,0 +1,74 @@ +plugins { + id("increase.kotlin") + id("com.gradleup.shadow") version "8.3.8" +} + +buildscript { + dependencies { + classpath("com.guardsquare:proguard-gradle:7.4.2") + } +} + +dependencies { + testImplementation(project(":increase-java")) + testImplementation(kotlin("test")) + testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3") + testImplementation("org.assertj:assertj-core:3.25.3") + testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4") + testImplementation("org.junit.platform:junit-platform-console:1.10.1") +} + +tasks.shadowJar { + from(sourceSets.test.get().output) + configurations = listOf(project.configurations.testRuntimeClasspath.get()) +} + +val proguardJarPath = "${layout.buildDirectory.get()}/libs/${project.name}-${project.version}-proguard.jar" +val proguardJar by tasks.registering(proguard.gradle.ProGuardTask::class) { + group = "verification" + dependsOn(tasks.shadowJar) + notCompatibleWithConfigurationCache("ProGuard") + + injars(tasks.shadowJar) + outjars(proguardJarPath) + printmapping("${layout.buildDirectory.get()}/proguard-mapping.txt") + + verbose() + dontwarn() + + val javaHome = System.getProperty("java.home") + if (System.getProperty("java.version").startsWith("1.")) { + // Before Java 9, the runtime classes were packaged in a single jar file. + libraryjars("$javaHome/lib/rt.jar") + } else { + // As of Java 9, the runtime classes are packaged in modular jmod files. + libraryjars( + // Filters must be specified first, as a map. + mapOf("jarfilter" to "!**.jar", "filter" to "!module-info.class"), + "$javaHome/jmods/java.base.jmod" + ) + } + + configuration("./test.pro") + configuration("../increase-java-core/src/main/resources/META-INF/proguard/increase-java-core.pro") +} + +val testProGuard by tasks.registering(JavaExec::class) { + group = "verification" + dependsOn(proguardJar) + notCompatibleWithConfigurationCache("ProGuard") + + mainClass.set("org.junit.platform.console.ConsoleLauncher") + classpath = files(proguardJarPath) + args = listOf( + "--classpath", proguardJarPath, + "--scan-classpath", + "--details", "verbose", + ) +} + +tasks.test { + dependsOn(testProGuard) + // We defer to the tests run via the ProGuard JAR. + enabled = false +} diff --git a/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt b/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt new file mode 100644 index 000000000..ed80c450e --- /dev/null +++ b/increase-java-proguard-test/src/test/kotlin/com/increase/api/proguard/ProGuardCompatibilityTest.kt @@ -0,0 +1,122 @@ +// File generated from our OpenAPI spec by Stainless. + +package com.increase.api.proguard + +import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.increase.api.client.okhttp.IncreaseOkHttpClient +import com.increase.api.core.jsonMapper +import com.increase.api.models.accounts.Account +import java.time.LocalDate +import java.time.OffsetDateTime +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test + +internal class ProGuardCompatibilityTest { + + companion object { + + @BeforeAll + @JvmStatic + fun setUp() { + // To debug that we're using the right JAR. + val jarPath = this::class.java.getProtectionDomain().codeSource.location + println("JAR being used: $jarPath") + } + } + + @Test + fun proguardRules() { + val rulesFile = + javaClass.classLoader.getResourceAsStream("META-INF/proguard/increase-java-core.pro") + + assertThat(rulesFile).isNotNull() + } + + @Test + fun client() { + val client = IncreaseOkHttpClient.builder().apiKey("My API Key").build() + + assertThat(client).isNotNull() + assertThat(client.accounts()).isNotNull() + assertThat(client.accountNumbers()).isNotNull() + assertThat(client.cards()).isNotNull() + assertThat(client.cardPayments()).isNotNull() + assertThat(client.cardPurchaseSupplements()).isNotNull() + assertThat(client.cardDisputes()).isNotNull() + assertThat(client.physicalCards()).isNotNull() + assertThat(client.digitalCardProfiles()).isNotNull() + assertThat(client.physicalCardProfiles()).isNotNull() + assertThat(client.digitalWalletTokens()).isNotNull() + assertThat(client.transactions()).isNotNull() + assertThat(client.pendingTransactions()).isNotNull() + assertThat(client.declinedTransactions()).isNotNull() + assertThat(client.accountTransfers()).isNotNull() + assertThat(client.achTransfers()).isNotNull() + assertThat(client.achPrenotifications()).isNotNull() + assertThat(client.inboundAchTransfers()).isNotNull() + assertThat(client.wireTransfers()).isNotNull() + assertThat(client.inboundWireTransfers()).isNotNull() + assertThat(client.wireDrawdownRequests()).isNotNull() + assertThat(client.inboundWireDrawdownRequests()).isNotNull() + assertThat(client.checkTransfers()).isNotNull() + assertThat(client.inboundCheckDeposits()).isNotNull() + assertThat(client.realTimePaymentsTransfers()).isNotNull() + assertThat(client.inboundRealTimePaymentsTransfers()).isNotNull() + assertThat(client.checkDeposits()).isNotNull() + assertThat(client.lockboxes()).isNotNull() + assertThat(client.inboundMailItems()).isNotNull() + assertThat(client.routingNumbers()).isNotNull() + assertThat(client.externalAccounts()).isNotNull() + assertThat(client.entities()).isNotNull() + assertThat(client.supplementalDocuments()).isNotNull() + assertThat(client.programs()).isNotNull() + assertThat(client.accountStatements()).isNotNull() + assertThat(client.files()).isNotNull() + assertThat(client.fileLinks()).isNotNull() + assertThat(client.documents()).isNotNull() + assertThat(client.exports()).isNotNull() + assertThat(client.events()).isNotNull() + assertThat(client.eventSubscriptions()).isNotNull() + assertThat(client.realTimeDecisions()).isNotNull() + assertThat(client.bookkeepingAccounts()).isNotNull() + assertThat(client.bookkeepingEntrySets()).isNotNull() + assertThat(client.bookkeepingEntries()).isNotNull() + assertThat(client.groups()).isNotNull() + assertThat(client.oauthApplications()).isNotNull() + assertThat(client.oauthConnections()).isNotNull() + assertThat(client.oauthTokens()).isNotNull() + assertThat(client.intrafiAccountEnrollments()).isNotNull() + assertThat(client.intrafiBalances()).isNotNull() + assertThat(client.intrafiExclusions()).isNotNull() + assertThat(client.simulations()).isNotNull() + } + + @Test + fun accountRoundtrip() { + val jsonMapper = jsonMapper() + val account = + Account.builder() + .id("account_in71c4amph0vgo2qllky") + .bank(Account.Bank.FIRST_INTERNET_BANK) + .closedAt(null) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(Account.Currency.USD) + .entityId("entity_n8y8tnk2p9339ti393yi") + .idempotencyKey(null) + .informationalEntityId(null) + .interestAccrued("0.01") + .interestAccruedAt(LocalDate.parse("2020-01-31")) + .interestRate("0.055") + .name("My first account!") + .programId("program_i2v2os4mwza1oetokh9i") + .status(Account.Status.OPEN) + .type(Account.Type.ACCOUNT) + .build() + + val roundtrippedAccount = + jsonMapper.readValue(jsonMapper.writeValueAsString(account), jacksonTypeRef()) + + assertThat(roundtrippedAccount).isEqualTo(account) + } +} diff --git a/increase-java-proguard-test/test.pro b/increase-java-proguard-test/test.pro new file mode 100644 index 000000000..c7a0ba6cc --- /dev/null +++ b/increase-java-proguard-test/test.pro @@ -0,0 +1,5 @@ +# Specify the entrypoint where ProGuard starts to determine what's reachable. +-keep class com.increase.api.proguard.** { *; } + +# For the testing framework. +-keep class org.junit.** { *; } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 1bb296395..573cd1176 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,4 +3,5 @@ rootProject.name = "increase-java-root" include("increase-java") include("increase-java-client-okhttp") include("increase-java-core") +include("increase-java-proguard-test") include("increase-java-example") From 3beee7ef2b430fa43401ca77cd488246b66d86a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 11:50:50 +0000 Subject: [PATCH 2/4] feat: add retryable exception --- README.md | 2 + .../api/core/http/RetryingHttpClient.kt | 8 +- .../api/errors/IncreaseRetryableException.kt | 14 ++++ .../api/core/http/RetryingHttpClientTest.kt | 77 +++++++++++++++++++ 4 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseRetryableException.kt diff --git a/README.md b/README.md index 7024dbdb9..2fb3e8c2b 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,8 @@ The SDK throws custom unchecked exception types: - [`IncreaseIoException`](increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseIoException.kt): I/O networking errors. +- [`IncreaseRetryableException`](increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseRetryableException.kt): Generic error indicating a failure that could be retried by the client. + - [`IncreaseInvalidDataException`](increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that's supposed to be required, but the API unexpectedly omitted it from the response. - [`IncreaseException`](increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class. diff --git a/increase-java-core/src/main/kotlin/com/increase/api/core/http/RetryingHttpClient.kt b/increase-java-core/src/main/kotlin/com/increase/api/core/http/RetryingHttpClient.kt index 6de665f7a..dd525c06b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/core/http/RetryingHttpClient.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/core/http/RetryingHttpClient.kt @@ -3,6 +3,7 @@ package com.increase.api.core.http import com.increase.api.core.RequestOptions import com.increase.api.core.checkRequired import com.increase.api.errors.IncreaseIoException +import com.increase.api.errors.IncreaseRetryableException import java.io.IOException import java.time.Clock import java.time.Duration @@ -176,9 +177,10 @@ private constructor( } private fun shouldRetry(throwable: Throwable): Boolean = - // Only retry IOException and IncreaseIoException, other exceptions are not intended to be - // retried. - throwable is IOException || throwable is IncreaseIoException + // Only retry known retryable exceptions, other exceptions are not intended to be retried. + throwable is IOException || + throwable is IncreaseIoException || + throwable is IncreaseRetryableException private fun getRetryBackoffDuration(retries: Int, response: HttpResponse?): Duration { // About the Retry-After header: diff --git a/increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseRetryableException.kt b/increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseRetryableException.kt new file mode 100644 index 000000000..ca136cbbc --- /dev/null +++ b/increase-java-core/src/main/kotlin/com/increase/api/errors/IncreaseRetryableException.kt @@ -0,0 +1,14 @@ +package com.increase.api.errors + +/** + * Exception that indicates a transient error that can be retried. + * + * When this exception is thrown during an HTTP request, the SDK will automatically retry the + * request up to the maximum number of retries. + * + * @param message A descriptive error message + * @param cause The underlying cause of this exception, if any + */ +class IncreaseRetryableException +@JvmOverloads +constructor(message: String? = null, cause: Throwable? = null) : IncreaseException(message, cause) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/core/http/RetryingHttpClientTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/core/http/RetryingHttpClientTest.kt index 81953e913..65e9901c6 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/core/http/RetryingHttpClientTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/core/http/RetryingHttpClientTest.kt @@ -6,6 +6,7 @@ import com.github.tomakehurst.wiremock.junit5.WireMockTest import com.github.tomakehurst.wiremock.stubbing.Scenario import com.increase.api.client.okhttp.OkHttpClient import com.increase.api.core.RequestOptions +import com.increase.api.errors.IncreaseRetryableException import java.io.InputStream import java.time.Duration import java.util.concurrent.CompletableFuture @@ -251,6 +252,82 @@ internal class RetryingHttpClientTest { assertNoResponseLeaks() } + @ParameterizedTest + @ValueSource(booleans = [false, true]) + fun execute_withRetryableException(async: Boolean) { + stubFor(post(urlPathEqualTo("/something")).willReturn(ok())) + + var callCount = 0 + val failingHttpClient = + object : HttpClient { + override fun execute( + request: HttpRequest, + requestOptions: RequestOptions, + ): HttpResponse { + callCount++ + if (callCount == 1) { + throw IncreaseRetryableException("Simulated retryable failure") + } + return httpClient.execute(request, requestOptions) + } + + override fun executeAsync( + request: HttpRequest, + requestOptions: RequestOptions, + ): CompletableFuture { + callCount++ + if (callCount == 1) { + val future = CompletableFuture() + future.completeExceptionally( + IncreaseRetryableException("Simulated retryable failure") + ) + return future + } + return httpClient.executeAsync(request, requestOptions) + } + + override fun close() = httpClient.close() + } + + val retryingClient = + RetryingHttpClient.builder() + .httpClient(failingHttpClient) + .maxRetries(2) + .sleeper( + object : RetryingHttpClient.Sleeper { + + override fun sleep(duration: Duration) {} + + override fun sleepAsync(duration: Duration): CompletableFuture = + CompletableFuture.completedFuture(null) + } + ) + .build() + + val response = + retryingClient.execute( + HttpRequest.builder() + .method(HttpMethod.POST) + .baseUrl(baseUrl) + .addPathSegment("something") + .build(), + async, + ) + + assertThat(response.statusCode()).isEqualTo(200) + verify( + 1, + postRequestedFor(urlPathEqualTo("/something")) + .withHeader("x-stainless-retry-count", equalTo("1")), + ) + verify( + 0, + postRequestedFor(urlPathEqualTo("/something")) + .withHeader("x-stainless-retry-count", equalTo("0")), + ) + assertNoResponseLeaks() + } + private fun retryingHttpClientBuilder() = RetryingHttpClient.builder() .httpClient(httpClient) From 2fb6b195347be42452c7a477f8f1568b6ff3d239 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:44:12 +0000 Subject: [PATCH 3/4] feat(api): api update --- .stats.yml | 4 +- .../api/models/cardpayments/CardPayment.kt | 175 +++++++++++++++++- .../CardPaymentListPageResponseTest.kt | 36 ++++ .../models/cardpayments/CardPaymentTest.kt | 36 ++++ 4 files changed, 245 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c8c782764..093b8c5d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c88cd4c32889125cd4b50b7d6c53436b4bf61f3f1fa4acbb7494e778aa891f40.yml -openapi_spec_hash: d381528847ebbd39bbf825f9fe678925 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-976ae14d2349a3599f9bd33dba52b3c12c265493a8af9e581c71b2e819b8de04.yml +openapi_spec_hash: d8a9fef4dfe082acdf834ac0339e800c config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt index c5ec9025b..f42167ccd 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt @@ -27899,11 +27899,14 @@ private constructor( private val network: JsonField, private val networkIdentifiers: JsonField, private val pendingTransactionId: JsonField, + private val presentmentCurrency: JsonField, private val reversalAmount: JsonField, + private val reversalPresentmentAmount: JsonField, private val reversalReason: JsonField, private val terminalId: JsonField, private val type: JsonField, private val updatedAuthorizationAmount: JsonField, + private val updatedAuthorizationPresentmentAmount: JsonField, private val additionalProperties: MutableMap, ) { @@ -27946,9 +27949,15 @@ private constructor( @JsonProperty("pending_transaction_id") @ExcludeMissing pendingTransactionId: JsonField = JsonMissing.of(), + @JsonProperty("presentment_currency") + @ExcludeMissing + presentmentCurrency: JsonField = JsonMissing.of(), @JsonProperty("reversal_amount") @ExcludeMissing reversalAmount: JsonField = JsonMissing.of(), + @JsonProperty("reversal_presentment_amount") + @ExcludeMissing + reversalPresentmentAmount: JsonField = JsonMissing.of(), @JsonProperty("reversal_reason") @ExcludeMissing reversalReason: JsonField = JsonMissing.of(), @@ -27959,6 +27968,9 @@ private constructor( @JsonProperty("updated_authorization_amount") @ExcludeMissing updatedAuthorizationAmount: JsonField = JsonMissing.of(), + @JsonProperty("updated_authorization_presentment_amount") + @ExcludeMissing + updatedAuthorizationPresentmentAmount: JsonField = JsonMissing.of(), ) : this( id, cardAuthorizationId, @@ -27973,11 +27985,14 @@ private constructor( network, networkIdentifiers, pendingTransactionId, + presentmentCurrency, reversalAmount, + reversalPresentmentAmount, reversalReason, terminalId, type, updatedAuthorizationAmount, + updatedAuthorizationPresentmentAmount, mutableMapOf(), ) @@ -28104,6 +28119,17 @@ private constructor( fun pendingTransactionId(): Optional = pendingTransactionId.getOptional("pending_transaction_id") + /** + * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + * presentment currency. + * + * @throws IncreaseInvalidDataException 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 presentmentCurrency(): String = + presentmentCurrency.getRequired("presentment_currency") + /** * The amount of this reversal in the minor unit of the transaction's currency. For * dollars, for example, this is cents. @@ -28114,6 +28140,17 @@ private constructor( */ fun reversalAmount(): Long = reversalAmount.getRequired("reversal_amount") + /** + * The amount of this reversal in the minor unit of the transaction's presentment + * currency. For dollars, for example, this is cents. + * + * @throws IncreaseInvalidDataException 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 reversalPresentmentAmount(): Long = + reversalPresentmentAmount.getRequired("reversal_presentment_amount") + /** * Why this reversal was initiated. * @@ -28153,6 +28190,19 @@ private constructor( fun updatedAuthorizationAmount(): Long = updatedAuthorizationAmount.getRequired("updated_authorization_amount") + /** + * The amount left pending on the Card Authorization in the minor unit of the + * transaction's presentment currency. For dollars, for example, this is cents. + * + * @throws IncreaseInvalidDataException 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 updatedAuthorizationPresentmentAmount(): Long = + updatedAuthorizationPresentmentAmount.getRequired( + "updated_authorization_presentment_amount" + ) + /** * Returns the raw JSON value of [id]. * @@ -28277,6 +28327,16 @@ private constructor( @ExcludeMissing fun _pendingTransactionId(): JsonField = pendingTransactionId + /** + * Returns the raw JSON value of [presentmentCurrency]. + * + * Unlike [presentmentCurrency], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("presentment_currency") + @ExcludeMissing + fun _presentmentCurrency(): JsonField = presentmentCurrency + /** * Returns the raw JSON value of [reversalAmount]. * @@ -28287,6 +28347,16 @@ private constructor( @ExcludeMissing fun _reversalAmount(): JsonField = reversalAmount + /** + * Returns the raw JSON value of [reversalPresentmentAmount]. + * + * Unlike [reversalPresentmentAmount], this method doesn't throw if the JSON field has + * an unexpected type. + */ + @JsonProperty("reversal_presentment_amount") + @ExcludeMissing + fun _reversalPresentmentAmount(): JsonField = reversalPresentmentAmount + /** * Returns the raw JSON value of [reversalReason]. * @@ -28324,6 +28394,17 @@ private constructor( @ExcludeMissing fun _updatedAuthorizationAmount(): JsonField = updatedAuthorizationAmount + /** + * Returns the raw JSON value of [updatedAuthorizationPresentmentAmount]. + * + * Unlike [updatedAuthorizationPresentmentAmount], this method doesn't throw if the JSON + * field has an unexpected type. + */ + @JsonProperty("updated_authorization_presentment_amount") + @ExcludeMissing + fun _updatedAuthorizationPresentmentAmount(): JsonField = + updatedAuthorizationPresentmentAmount + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -28356,11 +28437,14 @@ private constructor( * .network() * .networkIdentifiers() * .pendingTransactionId() + * .presentmentCurrency() * .reversalAmount() + * .reversalPresentmentAmount() * .reversalReason() * .terminalId() * .type() * .updatedAuthorizationAmount() + * .updatedAuthorizationPresentmentAmount() * ``` */ @JvmStatic fun builder() = Builder() @@ -28382,11 +28466,14 @@ private constructor( private var network: JsonField? = null private var networkIdentifiers: JsonField? = null private var pendingTransactionId: JsonField? = null + private var presentmentCurrency: JsonField? = null private var reversalAmount: JsonField? = null + private var reversalPresentmentAmount: JsonField? = null private var reversalReason: JsonField? = null private var terminalId: JsonField? = null private var type: JsonField? = null private var updatedAuthorizationAmount: JsonField? = null + private var updatedAuthorizationPresentmentAmount: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -28404,11 +28491,15 @@ private constructor( network = cardReversal.network networkIdentifiers = cardReversal.networkIdentifiers pendingTransactionId = cardReversal.pendingTransactionId + presentmentCurrency = cardReversal.presentmentCurrency reversalAmount = cardReversal.reversalAmount + reversalPresentmentAmount = cardReversal.reversalPresentmentAmount reversalReason = cardReversal.reversalReason terminalId = cardReversal.terminalId type = cardReversal.type updatedAuthorizationAmount = cardReversal.updatedAuthorizationAmount + updatedAuthorizationPresentmentAmount = + cardReversal.updatedAuthorizationPresentmentAmount additionalProperties = cardReversal.additionalProperties.toMutableMap() } @@ -28638,6 +28729,24 @@ private constructor( this.pendingTransactionId = pendingTransactionId } + /** + * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + * presentment currency. + */ + fun presentmentCurrency(presentmentCurrency: String) = + presentmentCurrency(JsonField.of(presentmentCurrency)) + + /** + * Sets [Builder.presentmentCurrency] to an arbitrary JSON value. + * + * You should usually call [Builder.presentmentCurrency] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun presentmentCurrency(presentmentCurrency: JsonField) = apply { + this.presentmentCurrency = presentmentCurrency + } + /** * The amount of this reversal in the minor unit of the transaction's currency. For * dollars, for example, this is cents. @@ -28656,6 +28765,24 @@ private constructor( this.reversalAmount = reversalAmount } + /** + * The amount of this reversal in the minor unit of the transaction's presentment + * currency. For dollars, for example, this is cents. + */ + fun reversalPresentmentAmount(reversalPresentmentAmount: Long) = + reversalPresentmentAmount(JsonField.of(reversalPresentmentAmount)) + + /** + * Sets [Builder.reversalPresentmentAmount] to an arbitrary JSON value. + * + * You should usually call [Builder.reversalPresentmentAmount] with a well-typed + * [Long] value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun reversalPresentmentAmount(reversalPresentmentAmount: JsonField) = apply { + this.reversalPresentmentAmount = reversalPresentmentAmount + } + /** Why this reversal was initiated. */ fun reversalReason(reversalReason: ReversalReason?) = reversalReason(JsonField.ofNullable(reversalReason)) @@ -28731,6 +28858,31 @@ private constructor( this.updatedAuthorizationAmount = updatedAuthorizationAmount } + /** + * The amount left pending on the Card Authorization in the minor unit of the + * transaction's presentment currency. For dollars, for example, this is cents. + */ + fun updatedAuthorizationPresentmentAmount( + updatedAuthorizationPresentmentAmount: Long + ) = + updatedAuthorizationPresentmentAmount( + JsonField.of(updatedAuthorizationPresentmentAmount) + ) + + /** + * Sets [Builder.updatedAuthorizationPresentmentAmount] to an arbitrary JSON value. + * + * You should usually call [Builder.updatedAuthorizationPresentmentAmount] with a + * well-typed [Long] value instead. This method is primarily for setting the field + * to an undocumented or not yet supported value. + */ + fun updatedAuthorizationPresentmentAmount( + updatedAuthorizationPresentmentAmount: JsonField + ) = apply { + this.updatedAuthorizationPresentmentAmount = + updatedAuthorizationPresentmentAmount + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -28773,11 +28925,14 @@ private constructor( * .network() * .networkIdentifiers() * .pendingTransactionId() + * .presentmentCurrency() * .reversalAmount() + * .reversalPresentmentAmount() * .reversalReason() * .terminalId() * .type() * .updatedAuthorizationAmount() + * .updatedAuthorizationPresentmentAmount() * ``` * * @throws IllegalStateException if any required field is unset. @@ -28797,11 +28952,17 @@ private constructor( checkRequired("network", network), checkRequired("networkIdentifiers", networkIdentifiers), checkRequired("pendingTransactionId", pendingTransactionId), + checkRequired("presentmentCurrency", presentmentCurrency), checkRequired("reversalAmount", reversalAmount), + checkRequired("reversalPresentmentAmount", reversalPresentmentAmount), checkRequired("reversalReason", reversalReason), checkRequired("terminalId", terminalId), checkRequired("type", type), checkRequired("updatedAuthorizationAmount", updatedAuthorizationAmount), + checkRequired( + "updatedAuthorizationPresentmentAmount", + updatedAuthorizationPresentmentAmount, + ), additionalProperties.toMutableMap(), ) } @@ -28826,11 +28987,14 @@ private constructor( network().validate() networkIdentifiers().validate() pendingTransactionId() + presentmentCurrency() reversalAmount() + reversalPresentmentAmount() reversalReason().ifPresent { it.validate() } terminalId() type().validate() updatedAuthorizationAmount() + updatedAuthorizationPresentmentAmount() validated = true } @@ -28863,11 +29027,14 @@ private constructor( (network.asKnown().getOrNull()?.validity() ?: 0) + (networkIdentifiers.asKnown().getOrNull()?.validity() ?: 0) + (if (pendingTransactionId.asKnown().isPresent) 1 else 0) + + (if (presentmentCurrency.asKnown().isPresent) 1 else 0) + (if (reversalAmount.asKnown().isPresent) 1 else 0) + + (if (reversalPresentmentAmount.asKnown().isPresent) 1 else 0) + (reversalReason.asKnown().getOrNull()?.validity() ?: 0) + (if (terminalId.asKnown().isPresent) 1 else 0) + (type.asKnown().getOrNull()?.validity() ?: 0) + - (if (updatedAuthorizationAmount.asKnown().isPresent) 1 else 0) + (if (updatedAuthorizationAmount.asKnown().isPresent) 1 else 0) + + (if (updatedAuthorizationPresentmentAmount.asKnown().isPresent) 1 else 0) /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's @@ -29763,17 +29930,17 @@ private constructor( return true } - return /* spotless:off */ other is CardReversal && id == other.id && cardAuthorizationId == other.cardAuthorizationId && currency == other.currency && merchantAcceptorId == other.merchantAcceptorId && merchantCategoryCode == other.merchantCategoryCode && merchantCity == other.merchantCity && merchantCountry == other.merchantCountry && merchantDescriptor == other.merchantDescriptor && merchantPostalCode == other.merchantPostalCode && merchantState == other.merchantState && network == other.network && networkIdentifiers == other.networkIdentifiers && pendingTransactionId == other.pendingTransactionId && reversalAmount == other.reversalAmount && reversalReason == other.reversalReason && terminalId == other.terminalId && type == other.type && updatedAuthorizationAmount == other.updatedAuthorizationAmount && additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CardReversal && id == other.id && cardAuthorizationId == other.cardAuthorizationId && currency == other.currency && merchantAcceptorId == other.merchantAcceptorId && merchantCategoryCode == other.merchantCategoryCode && merchantCity == other.merchantCity && merchantCountry == other.merchantCountry && merchantDescriptor == other.merchantDescriptor && merchantPostalCode == other.merchantPostalCode && merchantState == other.merchantState && network == other.network && networkIdentifiers == other.networkIdentifiers && pendingTransactionId == other.pendingTransactionId && presentmentCurrency == other.presentmentCurrency && reversalAmount == other.reversalAmount && reversalPresentmentAmount == other.reversalPresentmentAmount && reversalReason == other.reversalReason && terminalId == other.terminalId && type == other.type && updatedAuthorizationAmount == other.updatedAuthorizationAmount && updatedAuthorizationPresentmentAmount == other.updatedAuthorizationPresentmentAmount && additionalProperties == other.additionalProperties /* spotless:on */ } /* spotless:off */ - private val hashCode: Int by lazy { Objects.hash(id, cardAuthorizationId, currency, merchantAcceptorId, merchantCategoryCode, merchantCity, merchantCountry, merchantDescriptor, merchantPostalCode, merchantState, network, networkIdentifiers, pendingTransactionId, reversalAmount, reversalReason, terminalId, type, updatedAuthorizationAmount, additionalProperties) } + private val hashCode: Int by lazy { Objects.hash(id, cardAuthorizationId, currency, merchantAcceptorId, merchantCategoryCode, merchantCity, merchantCountry, merchantDescriptor, merchantPostalCode, merchantState, network, networkIdentifiers, pendingTransactionId, presentmentCurrency, reversalAmount, reversalPresentmentAmount, reversalReason, terminalId, type, updatedAuthorizationAmount, updatedAuthorizationPresentmentAmount, additionalProperties) } /* spotless:on */ override fun hashCode(): Int = hashCode override fun toString() = - "CardReversal{id=$id, cardAuthorizationId=$cardAuthorizationId, currency=$currency, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantDescriptor=$merchantDescriptor, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, reversalAmount=$reversalAmount, reversalReason=$reversalReason, terminalId=$terminalId, type=$type, updatedAuthorizationAmount=$updatedAuthorizationAmount, additionalProperties=$additionalProperties}" + "CardReversal{id=$id, cardAuthorizationId=$cardAuthorizationId, currency=$currency, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantDescriptor=$merchantDescriptor, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, presentmentCurrency=$presentmentCurrency, reversalAmount=$reversalAmount, reversalPresentmentAmount=$reversalPresentmentAmount, reversalReason=$reversalReason, terminalId=$terminalId, type=$type, updatedAuthorizationAmount=$updatedAuthorizationAmount, updatedAuthorizationPresentmentAmount=$updatedAuthorizationPresentmentAmount, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt index 2c3ae7af4..ec7fbc4ed 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt @@ -721,7 +721,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -731,6 +733,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -1818,7 +1821,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -1828,6 +1833,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -2915,7 +2921,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -2925,6 +2933,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -4012,7 +4021,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -4022,6 +4033,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -5091,7 +5103,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -5099,6 +5113,7 @@ internal class CardPaymentListPageResponseTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -6118,7 +6133,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -6126,6 +6143,7 @@ internal class CardPaymentListPageResponseTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -7145,7 +7163,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -7153,6 +7173,7 @@ internal class CardPaymentListPageResponseTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -8172,7 +8193,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -8180,6 +8203,7 @@ internal class CardPaymentListPageResponseTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -9277,7 +9301,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -9287,6 +9313,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -10374,7 +10401,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -10384,6 +10413,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -11471,7 +11501,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -11481,6 +11513,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -12568,7 +12601,9 @@ internal class CardPaymentListPageResponseTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -12578,6 +12613,7 @@ internal class CardPaymentListPageResponseTest { CardPayment.Element.CardReversal.Type.CARD_REVERSAL ) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt index 83f7bd2ba..6d1ef0810 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt @@ -627,7 +627,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -635,6 +637,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -1587,7 +1590,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -1595,6 +1600,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -2547,7 +2553,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -2555,6 +2563,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -3507,7 +3516,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -3515,6 +3526,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -4419,13 +4431,16 @@ internal class CardPaymentTest { .build() ) .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason.REVERSED_BY_CUSTOMER ) .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -5273,13 +5288,16 @@ internal class CardPaymentTest { .build() ) .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason.REVERSED_BY_CUSTOMER ) .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -6127,13 +6145,16 @@ internal class CardPaymentTest { .build() ) .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason.REVERSED_BY_CUSTOMER ) .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -6981,13 +7002,16 @@ internal class CardPaymentTest { .build() ) .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason.REVERSED_BY_CUSTOMER ) .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -7932,7 +7956,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -7940,6 +7966,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -8892,7 +8919,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -8900,6 +8929,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -9852,7 +9882,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -9860,6 +9892,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( @@ -10812,7 +10845,9 @@ internal class CardPaymentTest { .pendingTransactionId( "pending_transaction_k1sfetcau2qbvjbzgju4" ) + .presentmentCurrency("USD") .reversalAmount(20L) + .reversalPresentmentAmount(20L) .reversalReason( CardPayment.Element.CardReversal.ReversalReason .REVERSED_BY_CUSTOMER @@ -10820,6 +10855,7 @@ internal class CardPaymentTest { .terminalId("RCN5VNXS") .type(CardPayment.Element.CardReversal.Type.CARD_REVERSAL) .updatedAuthorizationAmount(80L) + .updatedAuthorizationPresentmentAmount(80L) .build() ) .cardSettlement( From a46199a46fc4a608e8819efb1c2b1409d10fa5c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:44:40 +0000 Subject: [PATCH 4/4] release: 0.267.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ed571ec6..75b3f25b4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.266.1" + ".": "0.267.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index f23d681e1..3ecf86ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.267.0 (2025-07-29) + +Full Changelog: [v0.266.1...v0.267.0](https://github.com/Increase/increase-java/compare/v0.266.1...v0.267.0) + +### Features + +* add retryable exception ([3beee7e](https://github.com/Increase/increase-java/commit/3beee7ef2b430fa43401ca77cd488246b66d86a0)) +* **api:** api update ([2fb6b19](https://github.com/Increase/increase-java/commit/2fb6b195347be42452c7a477f8f1568b6ff3d239)) +* **client:** ensure compat with proguard ([2a0df21](https://github.com/Increase/increase-java/commit/2a0df215d33f5f1dc05482171f2ed77a507f4f8c)) + ## 0.266.1 (2025-07-28) Full Changelog: [v0.266.0...v0.266.1](https://github.com/Increase/increase-java/compare/v0.266.0...v0.266.1) diff --git a/README.md b/README.md index 2fb3e8c2b..57dbc244e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.266.1) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.266.1/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.266.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.267.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.267.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.267.0) @@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe -The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.266.1). +The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.267.0). @@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d ### Gradle ```kotlin -implementation("com.increase.api:increase-java:0.266.1") +implementation("com.increase.api:increase-java:0.267.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.266.1") com.increase.api increase-java - 0.266.1 + 0.267.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index b43e80222..b513e151e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.266.1" // x-release-please-version + version = "0.267.0" // x-release-please-version } subprojects {