From 89337f3f7a40241e7210cd0e02651a7ceb783b0e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 18:59:17 +0000 Subject: [PATCH 1/4] refactor(tests): switch from prism to steady --- scripts/mock | 26 +++++++++++++------------- scripts/test | 16 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/mock b/scripts/mock index bcf3b392b..14454c268 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.3 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 047bc1dbb..5922ac1f8 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi From 3779fcc67239b13c02aae426056a979213f65925 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 17:56:53 +0000 Subject: [PATCH 2/4] chore(tests): bump steady to v0.19.4 --- buildSrc/src/main/kotlin/increase.kotlin.gradle.kts | 2 +- scripts/fast-format | 6 +++--- scripts/mock | 6 +++--- scripts/test | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/kotlin/increase.kotlin.gradle.kts b/buildSrc/src/main/kotlin/increase.kotlin.gradle.kts index 77289c4fb..4f6ba063f 100644 --- a/buildSrc/src/main/kotlin/increase.kotlin.gradle.kts +++ b/buildSrc/src/main/kotlin/increase.kotlin.gradle.kts @@ -40,7 +40,7 @@ tasks.withType().configureEach { val ktfmt by configurations.creating dependencies { - ktfmt("com.facebook:ktfmt:0.56") + ktfmt("com.facebook:ktfmt:0.61") } fun registerKtfmt( diff --git a/scripts/fast-format b/scripts/fast-format index 1b3bc473a..35a1dee25 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -24,8 +24,8 @@ if [ ! -f "$FILE_LIST" ]; then exit 1 fi -if ! command -v ktfmt-fast-format &> /dev/null; then - echo "Error: ktfmt-fast-format not found" +if ! command -v ktfmt &> /dev/null; then + echo "Error: ktfmt not found" exit 1 fi @@ -36,7 +36,7 @@ echo "==> Done looking for Kotlin files" if [[ -n "$kt_files" ]]; then echo "==> will format Kotlin files" - echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt-fast-format --kotlinlang-style "$@" + echo "$kt_files" | tr '\n' '\0' | xargs -0 ktfmt --kotlinlang-style "$@" else echo "No Kotlin files to format -- expected outcome during incremental formatting" fi diff --git a/scripts/mock b/scripts/mock index 14454c268..fe19534ac 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.3 -- steady --version + npm exec --package=@stdy/cli@0.19.4 -- steady --version - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 5922ac1f8..b8e74698e 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" echo exit 1 From 2bf986f5ae16d07169db0a6d9ca3aeb4832d97a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:31:45 +0000 Subject: [PATCH 3/4] feat(api): api update --- .stats.yml | 4 +- .../DeclinedTransaction.kt | 125 +++--- .../InboundRealTimePaymentsTransfer.kt | 120 +++--- .../RealTimePaymentsTransfer.kt | 254 ++++++------ .../RealTimePaymentsTransferCreateParams.kt | 324 ++++++++++----- ...undRealTimePaymentsTransferCreateParams.kt | 145 +++---- .../api/models/transactions/Transaction.kt | 370 +++++++++--------- ...DeclinedTransactionListPageResponseTest.kt | 6 +- .../DeclinedTransactionTest.kt | 6 +- ...imePaymentsTransferListPageResponseTest.kt | 6 +- .../InboundRealTimePaymentsTransferTest.kt | 8 +- ...ealTimePaymentsTransferCreateParamsTest.kt | 28 +- ...imePaymentsTransferListPageResponseTest.kt | 18 +- .../RealTimePaymentsTransferTest.kt | 19 +- .../CardAuthorizationCreateResponseTest.kt | 6 +- ...ealTimePaymentsTransferCreateParamsTest.kt | 6 +- .../TransactionListPageResponseTest.kt | 24 +- .../models/transactions/TransactionTest.kt | 24 +- ...ealTimePaymentsTransferServiceAsyncTest.kt | 8 +- ...ealTimePaymentsTransferServiceAsyncTest.kt | 2 +- .../RealTimePaymentsTransferServiceTest.kt | 8 +- ...oundRealTimePaymentsTransferServiceTest.kt | 2 +- 22 files changed, 846 insertions(+), 667 deletions(-) diff --git a/.stats.yml b/.stats.yml index e317ba884..06952e266 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a8fb0a78ec74e41f3c1f5d8d455b1496d567948e3a7a3ae375338173ced538e.yml -openapi_spec_hash: 6dbffca55fa0226c3603ee180594bd2b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94bc2ca163218a155dad247a2a8ef93a09f66139dd56c6eabbcadbc0feecae6e.yml +openapi_spec_hash: b83e3838cc2d4729b3f0156e4294dc45 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt index d0937ecc9..03214e6af 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransaction.kt @@ -14585,9 +14585,9 @@ private constructor( private val debtorName: JsonField, private val debtorRoutingNumber: JsonField, private val reason: JsonField, - private val remittanceInformation: JsonField, private val transactionIdentification: JsonField, private val transferId: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -14612,15 +14612,15 @@ private constructor( @JsonProperty("reason") @ExcludeMissing reason: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") - @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), @JsonProperty("transaction_identification") @ExcludeMissing transactionIdentification: JsonField = JsonMissing.of(), @JsonProperty("transfer_id") @ExcludeMissing transferId: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( amount, creditorName, @@ -14629,9 +14629,9 @@ private constructor( debtorName, debtorRoutingNumber, reason, - remittanceInformation, transactionIdentification, transferId, + unstructuredRemittanceInformation, mutableMapOf(), ) @@ -14702,15 +14702,6 @@ private constructor( */ fun reason(): Reason = reason.getRequired("reason") - /** - * Additional information included with the transfer. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. - * if the server responded with an unexpected value). - */ - fun remittanceInformation(): Optional = - remittanceInformation.getOptional("remittance_information") - /** * The Real-Time Payments network identification of the declined transfer. * @@ -14730,6 +14721,15 @@ private constructor( */ fun transferId(): String = transferId.getRequired("transfer_id") + /** + * Additional information included with the transfer. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun unstructuredRemittanceInformation(): Optional = + unstructuredRemittanceInformation.getOptional("unstructured_remittance_information") + /** * Returns the raw JSON value of [amount]. * @@ -14794,16 +14794,6 @@ private constructor( */ @JsonProperty("reason") @ExcludeMissing fun _reason(): JsonField = reason - /** - * Returns the raw JSON value of [remittanceInformation]. - * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("remittance_information") - @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation - /** * Returns the raw JSON value of [transactionIdentification]. * @@ -14824,6 +14814,17 @@ private constructor( @ExcludeMissing fun _transferId(): JsonField = transferId + /** + * Returns the raw JSON value of [unstructuredRemittanceInformation]. + * + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON + * field has an unexpected type. + */ + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -14851,9 +14852,9 @@ private constructor( * .debtorName() * .debtorRoutingNumber() * .reason() - * .remittanceInformation() * .transactionIdentification() * .transferId() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -14869,9 +14870,9 @@ private constructor( private var debtorName: JsonField? = null private var debtorRoutingNumber: JsonField? = null private var reason: JsonField? = null - private var remittanceInformation: JsonField? = null private var transactionIdentification: JsonField? = null private var transferId: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -14885,11 +14886,11 @@ private constructor( debtorName = inboundRealTimePaymentsTransferDecline.debtorName debtorRoutingNumber = inboundRealTimePaymentsTransferDecline.debtorRoutingNumber reason = inboundRealTimePaymentsTransferDecline.reason - remittanceInformation = - inboundRealTimePaymentsTransferDecline.remittanceInformation transactionIdentification = inboundRealTimePaymentsTransferDecline.transactionIdentification transferId = inboundRealTimePaymentsTransferDecline.transferId + unstructuredRemittanceInformation = + inboundRealTimePaymentsTransferDecline.unstructuredRemittanceInformation additionalProperties = inboundRealTimePaymentsTransferDecline.additionalProperties.toMutableMap() } @@ -14996,28 +14997,6 @@ private constructor( */ fun reason(reason: JsonField) = apply { this.reason = reason } - /** Additional information included with the transfer. */ - fun remittanceInformation(remittanceInformation: String?) = - remittanceInformation(JsonField.ofNullable(remittanceInformation)) - - /** - * Alias for calling [Builder.remittanceInformation] with - * `remittanceInformation.orElse(null)`. - */ - fun remittanceInformation(remittanceInformation: Optional) = - remittanceInformation(remittanceInformation.getOrNull()) - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed - * [String] value instead. This method is primarily for setting the field to an - * undocumented or not yet supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation - } - /** The Real-Time Payments network identification of the declined transfer. */ fun transactionIdentification(transactionIdentification: String) = transactionIdentification(JsonField.of(transactionIdentification)) @@ -15050,6 +15029,33 @@ private constructor( this.transferId = transferId } + /** Additional information included with the transfer. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String?) = + unstructuredRemittanceInformation( + JsonField.ofNullable(unstructuredRemittanceInformation) + ) + + /** + * Alias for calling [Builder.unstructuredRemittanceInformation] with + * `unstructuredRemittanceInformation.orElse(null)`. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: Optional + ) = unstructuredRemittanceInformation(unstructuredRemittanceInformation.getOrNull()) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a + * well-typed [String] value instead. This method is primarily for setting the field + * to an undocumented or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { + this.unstructuredRemittanceInformation = unstructuredRemittanceInformation + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -15086,9 +15092,9 @@ private constructor( * .debtorName() * .debtorRoutingNumber() * .reason() - * .remittanceInformation() * .transactionIdentification() * .transferId() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -15102,9 +15108,12 @@ private constructor( checkRequired("debtorName", debtorName), checkRequired("debtorRoutingNumber", debtorRoutingNumber), checkRequired("reason", reason), - checkRequired("remittanceInformation", remittanceInformation), checkRequired("transactionIdentification", transactionIdentification), checkRequired("transferId", transferId), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -15123,9 +15132,9 @@ private constructor( debtorName() debtorRoutingNumber() reason().validate() - remittanceInformation() transactionIdentification() transferId() + unstructuredRemittanceInformation() validated = true } @@ -15152,9 +15161,9 @@ private constructor( (if (debtorName.asKnown().isPresent) 1 else 0) + (if (debtorRoutingNumber.asKnown().isPresent) 1 else 0) + (reason.asKnown().getOrNull()?.validity() ?: 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + (if (transactionIdentification.asKnown().isPresent) 1 else 0) + - (if (transferId.asKnown().isPresent) 1 else 0) + (if (transferId.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined @@ -15476,9 +15485,9 @@ private constructor( debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && reason == other.reason && - remittanceInformation == other.remittanceInformation && transactionIdentification == other.transactionIdentification && transferId == other.transferId && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } @@ -15491,9 +15500,9 @@ private constructor( debtorName, debtorRoutingNumber, reason, - remittanceInformation, transactionIdentification, transferId, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -15501,7 +15510,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundRealTimePaymentsTransferDecline{amount=$amount, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, reason=$reason, remittanceInformation=$remittanceInformation, transactionIdentification=$transactionIdentification, transferId=$transferId, additionalProperties=$additionalProperties}" + "InboundRealTimePaymentsTransferDecline{amount=$amount, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, reason=$reason, transactionIdentification=$transactionIdentification, transferId=$transferId, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransfer.kt index c56e952f1..f0faa72d6 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransfer.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransfer.kt @@ -38,10 +38,10 @@ private constructor( private val debtorName: JsonField, private val debtorRoutingNumber: JsonField, private val decline: JsonField, - private val remittanceInformation: JsonField, private val status: JsonField, private val transactionIdentification: JsonField, private val type: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -73,14 +73,14 @@ private constructor( @ExcludeMissing debtorRoutingNumber: JsonField = JsonMissing.of(), @JsonProperty("decline") @ExcludeMissing decline: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") - @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("transaction_identification") @ExcludeMissing transactionIdentification: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( id, accountId, @@ -94,10 +94,10 @@ private constructor( debtorName, debtorRoutingNumber, decline, - remittanceInformation, status, transactionIdentification, type, + unstructuredRemittanceInformation, mutableMapOf(), ) @@ -199,15 +199,6 @@ private constructor( */ fun decline(): Optional = decline.getOptional("decline") - /** - * Additional information included with the transfer. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the - * server responded with an unexpected value). - */ - fun remittanceInformation(): Optional = - remittanceInformation.getOptional("remittance_information") - /** * The lifecycle status of the transfer. * @@ -234,6 +225,15 @@ private constructor( */ fun type(): Type = type.getRequired("type") + /** + * Additional information included with the transfer. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun unstructuredRemittanceInformation(): Optional = + unstructuredRemittanceInformation.getOptional("unstructured_remittance_information") + /** * Returns the raw JSON value of [id]. * @@ -332,16 +332,6 @@ private constructor( */ @JsonProperty("decline") @ExcludeMissing fun _decline(): JsonField = decline - /** - * Returns the raw JSON value of [remittanceInformation]. - * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an unexpected - * type. - */ - @JsonProperty("remittance_information") - @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation - /** * Returns the raw JSON value of [status]. * @@ -366,6 +356,16 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonField = type + /** + * Returns the raw JSON value of [unstructuredRemittanceInformation]. + * + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has + * an unexpected type. + */ + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + fun _unstructuredRemittanceInformation(): JsonField = unstructuredRemittanceInformation + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -398,10 +398,10 @@ private constructor( * .debtorName() * .debtorRoutingNumber() * .decline() - * .remittanceInformation() * .status() * .transactionIdentification() * .type() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -422,10 +422,10 @@ private constructor( private var debtorName: JsonField? = null private var debtorRoutingNumber: JsonField? = null private var decline: JsonField? = null - private var remittanceInformation: JsonField? = null private var status: JsonField? = null private var transactionIdentification: JsonField? = null private var type: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -443,11 +443,12 @@ private constructor( debtorName = inboundRealTimePaymentsTransfer.debtorName debtorRoutingNumber = inboundRealTimePaymentsTransfer.debtorRoutingNumber decline = inboundRealTimePaymentsTransfer.decline - remittanceInformation = inboundRealTimePaymentsTransfer.remittanceInformation status = inboundRealTimePaymentsTransfer.status transactionIdentification = inboundRealTimePaymentsTransfer.transactionIdentification type = inboundRealTimePaymentsTransfer.type + unstructuredRemittanceInformation = + inboundRealTimePaymentsTransfer.unstructuredRemittanceInformation additionalProperties = inboundRealTimePaymentsTransfer.additionalProperties.toMutableMap() } @@ -620,28 +621,6 @@ private constructor( */ fun decline(decline: JsonField) = apply { this.decline = decline } - /** Additional information included with the transfer. */ - fun remittanceInformation(remittanceInformation: String?) = - remittanceInformation(JsonField.ofNullable(remittanceInformation)) - - /** - * Alias for calling [Builder.remittanceInformation] with - * `remittanceInformation.orElse(null)`. - */ - fun remittanceInformation(remittanceInformation: Optional) = - remittanceInformation(remittanceInformation.getOrNull()) - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation - } - /** The lifecycle status of the transfer. */ fun status(status: Status) = status(JsonField.of(status)) @@ -682,6 +661,30 @@ private constructor( */ fun type(type: JsonField) = apply { this.type = type } + /** Additional information included with the transfer. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String?) = + unstructuredRemittanceInformation( + JsonField.ofNullable(unstructuredRemittanceInformation) + ) + + /** + * Alias for calling [Builder.unstructuredRemittanceInformation] with + * `unstructuredRemittanceInformation.orElse(null)`. + */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: Optional) = + unstructuredRemittanceInformation(unstructuredRemittanceInformation.getOrNull()) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -720,10 +723,10 @@ private constructor( * .debtorName() * .debtorRoutingNumber() * .decline() - * .remittanceInformation() * .status() * .transactionIdentification() * .type() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -742,10 +745,13 @@ private constructor( checkRequired("debtorName", debtorName), checkRequired("debtorRoutingNumber", debtorRoutingNumber), checkRequired("decline", decline), - checkRequired("remittanceInformation", remittanceInformation), checkRequired("status", status), checkRequired("transactionIdentification", transactionIdentification), checkRequired("type", type), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -769,10 +775,10 @@ private constructor( debtorName() debtorRoutingNumber() decline().ifPresent { it.validate() } - remittanceInformation() status().validate() transactionIdentification() type().validate() + unstructuredRemittanceInformation() validated = true } @@ -803,10 +809,10 @@ private constructor( (if (debtorName.asKnown().isPresent) 1 else 0) + (if (debtorRoutingNumber.asKnown().isPresent) 1 else 0) + (decline.asKnown().getOrNull()?.validity() ?: 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + (if (transactionIdentification.asKnown().isPresent) 1 else 0) + - (type.asKnown().getOrNull()?.validity() ?: 0) + (type.asKnown().getOrNull()?.validity() ?: 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) /** If your transfer is confirmed, this will contain details of the confirmation. */ class Confirmation @@ -1871,10 +1877,10 @@ private constructor( debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && decline == other.decline && - remittanceInformation == other.remittanceInformation && status == other.status && transactionIdentification == other.transactionIdentification && type == other.type && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } @@ -1892,10 +1898,10 @@ private constructor( debtorName, debtorRoutingNumber, decline, - remittanceInformation, status, transactionIdentification, type, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -1903,5 +1909,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundRealTimePaymentsTransfer{id=$id, accountId=$accountId, accountNumberId=$accountNumberId, amount=$amount, confirmation=$confirmation, createdAt=$createdAt, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, decline=$decline, remittanceInformation=$remittanceInformation, status=$status, transactionIdentification=$transactionIdentification, type=$type, additionalProperties=$additionalProperties}" + "InboundRealTimePaymentsTransfer{id=$id, accountId=$accountId, accountNumberId=$accountNumberId, amount=$amount, confirmation=$confirmation, createdAt=$createdAt, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, decline=$decline, status=$status, transactionIdentification=$transactionIdentification, type=$type, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransfer.kt index 2db944325..9a981dd87 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransfer.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransfer.kt @@ -28,6 +28,7 @@ class RealTimePaymentsTransfer private constructor( private val id: JsonField, private val accountId: JsonField, + private val accountNumber: JsonField, private val acknowledgement: JsonField, private val amount: JsonField, private val approval: JsonField, @@ -37,13 +38,11 @@ private constructor( private val creditorName: JsonField, private val currency: JsonField, private val debtorName: JsonField, - private val destinationAccountNumber: JsonField, - private val destinationRoutingNumber: JsonField, private val externalAccountId: JsonField, private val idempotencyKey: JsonField, private val pendingTransactionId: JsonField, private val rejection: JsonField, - private val remittanceInformation: JsonField, + private val routingNumber: JsonField, private val sourceAccountNumberId: JsonField, private val status: JsonField, private val submission: JsonField, @@ -51,6 +50,7 @@ private constructor( private val type: JsonField, private val ultimateCreditorName: JsonField, private val ultimateDebtorName: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -58,6 +58,9 @@ private constructor( private constructor( @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(), @JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(), + @JsonProperty("account_number") + @ExcludeMissing + accountNumber: JsonField = JsonMissing.of(), @JsonProperty("acknowledgement") @ExcludeMissing acknowledgement: JsonField = JsonMissing.of(), @@ -79,12 +82,6 @@ private constructor( @JsonProperty("debtor_name") @ExcludeMissing debtorName: JsonField = JsonMissing.of(), - @JsonProperty("destination_account_number") - @ExcludeMissing - destinationAccountNumber: JsonField = JsonMissing.of(), - @JsonProperty("destination_routing_number") - @ExcludeMissing - destinationRoutingNumber: JsonField = JsonMissing.of(), @JsonProperty("external_account_id") @ExcludeMissing externalAccountId: JsonField = JsonMissing.of(), @@ -97,9 +94,9 @@ private constructor( @JsonProperty("rejection") @ExcludeMissing rejection: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") + @JsonProperty("routing_number") @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), + routingNumber: JsonField = JsonMissing.of(), @JsonProperty("source_account_number_id") @ExcludeMissing sourceAccountNumberId: JsonField = JsonMissing.of(), @@ -117,9 +114,13 @@ private constructor( @JsonProperty("ultimate_debtor_name") @ExcludeMissing ultimateDebtorName: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( id, accountId, + accountNumber, acknowledgement, amount, approval, @@ -129,13 +130,11 @@ private constructor( creditorName, currency, debtorName, - destinationAccountNumber, - destinationRoutingNumber, externalAccountId, idempotencyKey, pendingTransactionId, rejection, - remittanceInformation, + routingNumber, sourceAccountNumberId, status, submission, @@ -143,6 +142,7 @@ private constructor( type, ultimateCreditorName, ultimateDebtorName, + unstructuredRemittanceInformation, mutableMapOf(), ) @@ -162,6 +162,14 @@ private constructor( */ fun accountId(): String = accountId.getRequired("account_id") + /** + * The destination account number. + * + * @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 accountNumber(): String = accountNumber.getRequired("account_number") + /** * If the transfer is acknowledged by the recipient bank, this will contain supplemental * details. @@ -241,24 +249,6 @@ private constructor( */ fun debtorName(): Optional = debtorName.getOptional("debtor_name") - /** - * The destination account number. - * - * @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 destinationAccountNumber(): String = - destinationAccountNumber.getRequired("destination_account_number") - - /** - * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). - * - * @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 destinationRoutingNumber(): String = - destinationRoutingNumber.getRequired("destination_routing_number") - /** * The identifier of the External Account the transfer was made to, if any. * @@ -299,13 +289,12 @@ private constructor( fun rejection(): Optional = rejection.getOptional("rejection") /** - * Unstructured information that will show on the recipient's bank statement. + * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). * * @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 remittanceInformation(): String = - remittanceInformation.getRequired("remittance_information") + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** * The Account Number the recipient will see as having sent the transfer. @@ -370,6 +359,15 @@ private constructor( fun ultimateDebtorName(): Optional = ultimateDebtorName.getOptional("ultimate_debtor_name") + /** + * Unstructured information that will show on the recipient's bank statement. + * + * @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 unstructuredRemittanceInformation(): String = + unstructuredRemittanceInformation.getRequired("unstructured_remittance_information") + /** * Returns the raw JSON value of [id]. * @@ -384,6 +382,15 @@ private constructor( */ @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId + /** + * Returns the raw JSON value of [accountNumber]. + * + * Unlike [accountNumber], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("account_number") + @ExcludeMissing + fun _accountNumber(): JsonField = accountNumber + /** * Returns the raw JSON value of [acknowledgement]. * @@ -455,26 +462,6 @@ private constructor( */ @JsonProperty("debtor_name") @ExcludeMissing fun _debtorName(): JsonField = debtorName - /** - * Returns the raw JSON value of [destinationAccountNumber]. - * - * Unlike [destinationAccountNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("destination_account_number") - @ExcludeMissing - fun _destinationAccountNumber(): JsonField = destinationAccountNumber - - /** - * Returns the raw JSON value of [destinationRoutingNumber]. - * - * Unlike [destinationRoutingNumber], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("destination_routing_number") - @ExcludeMissing - fun _destinationRoutingNumber(): JsonField = destinationRoutingNumber - /** * Returns the raw JSON value of [externalAccountId]. * @@ -512,14 +499,13 @@ private constructor( @JsonProperty("rejection") @ExcludeMissing fun _rejection(): JsonField = rejection /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [routingNumber]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("remittance_information") + @JsonProperty("routing_number") @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation + fun _routingNumber(): JsonField = routingNumber /** * Returns the raw JSON value of [sourceAccountNumberId]. @@ -583,6 +569,16 @@ private constructor( @ExcludeMissing fun _ultimateDebtorName(): JsonField = ultimateDebtorName + /** + * Returns the raw JSON value of [unstructuredRemittanceInformation]. + * + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has + * an unexpected type. + */ + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + fun _unstructuredRemittanceInformation(): JsonField = unstructuredRemittanceInformation + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -604,6 +600,7 @@ private constructor( * ```java * .id() * .accountId() + * .accountNumber() * .acknowledgement() * .amount() * .approval() @@ -613,13 +610,11 @@ private constructor( * .creditorName() * .currency() * .debtorName() - * .destinationAccountNumber() - * .destinationRoutingNumber() * .externalAccountId() * .idempotencyKey() * .pendingTransactionId() * .rejection() - * .remittanceInformation() + * .routingNumber() * .sourceAccountNumberId() * .status() * .submission() @@ -627,6 +622,7 @@ private constructor( * .type() * .ultimateCreditorName() * .ultimateDebtorName() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -637,6 +633,7 @@ private constructor( private var id: JsonField? = null private var accountId: JsonField? = null + private var accountNumber: JsonField? = null private var acknowledgement: JsonField? = null private var amount: JsonField? = null private var approval: JsonField? = null @@ -646,13 +643,11 @@ private constructor( private var creditorName: JsonField? = null private var currency: JsonField? = null private var debtorName: JsonField? = null - private var destinationAccountNumber: JsonField? = null - private var destinationRoutingNumber: JsonField? = null private var externalAccountId: JsonField? = null private var idempotencyKey: JsonField? = null private var pendingTransactionId: JsonField? = null private var rejection: JsonField? = null - private var remittanceInformation: JsonField? = null + private var routingNumber: JsonField? = null private var sourceAccountNumberId: JsonField? = null private var status: JsonField? = null private var submission: JsonField? = null @@ -660,12 +655,14 @@ private constructor( private var type: JsonField? = null private var ultimateCreditorName: JsonField? = null private var ultimateDebtorName: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(realTimePaymentsTransfer: RealTimePaymentsTransfer) = apply { id = realTimePaymentsTransfer.id accountId = realTimePaymentsTransfer.accountId + accountNumber = realTimePaymentsTransfer.accountNumber acknowledgement = realTimePaymentsTransfer.acknowledgement amount = realTimePaymentsTransfer.amount approval = realTimePaymentsTransfer.approval @@ -675,13 +672,11 @@ private constructor( creditorName = realTimePaymentsTransfer.creditorName currency = realTimePaymentsTransfer.currency debtorName = realTimePaymentsTransfer.debtorName - destinationAccountNumber = realTimePaymentsTransfer.destinationAccountNumber - destinationRoutingNumber = realTimePaymentsTransfer.destinationRoutingNumber externalAccountId = realTimePaymentsTransfer.externalAccountId idempotencyKey = realTimePaymentsTransfer.idempotencyKey pendingTransactionId = realTimePaymentsTransfer.pendingTransactionId rejection = realTimePaymentsTransfer.rejection - remittanceInformation = realTimePaymentsTransfer.remittanceInformation + routingNumber = realTimePaymentsTransfer.routingNumber sourceAccountNumberId = realTimePaymentsTransfer.sourceAccountNumberId status = realTimePaymentsTransfer.status submission = realTimePaymentsTransfer.submission @@ -689,6 +684,8 @@ private constructor( type = realTimePaymentsTransfer.type ultimateCreditorName = realTimePaymentsTransfer.ultimateCreditorName ultimateDebtorName = realTimePaymentsTransfer.ultimateDebtorName + unstructuredRemittanceInformation = + realTimePaymentsTransfer.unstructuredRemittanceInformation additionalProperties = realTimePaymentsTransfer.additionalProperties.toMutableMap() } @@ -715,6 +712,20 @@ private constructor( */ fun accountId(accountId: JsonField) = apply { this.accountId = accountId } + /** The destination account number. */ + fun accountNumber(accountNumber: String) = accountNumber(JsonField.of(accountNumber)) + + /** + * Sets [Builder.accountNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.accountNumber] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun accountNumber(accountNumber: JsonField) = apply { + this.accountNumber = accountNumber + } + /** * If the transfer is acknowledged by the recipient bank, this will contain supplemental * details. @@ -868,36 +879,6 @@ private constructor( */ fun debtorName(debtorName: JsonField) = apply { this.debtorName = debtorName } - /** The destination account number. */ - fun destinationAccountNumber(destinationAccountNumber: String) = - destinationAccountNumber(JsonField.of(destinationAccountNumber)) - - /** - * Sets [Builder.destinationAccountNumber] to an arbitrary JSON value. - * - * You should usually call [Builder.destinationAccountNumber] with a well-typed [String] - * value instead. This method is primarily for setting the field to an undocumented or not - * yet supported value. - */ - fun destinationAccountNumber(destinationAccountNumber: JsonField) = apply { - this.destinationAccountNumber = destinationAccountNumber - } - - /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ - fun destinationRoutingNumber(destinationRoutingNumber: String) = - destinationRoutingNumber(JsonField.of(destinationRoutingNumber)) - - /** - * Sets [Builder.destinationRoutingNumber] to an arbitrary JSON value. - * - * You should usually call [Builder.destinationRoutingNumber] with a well-typed [String] - * value instead. This method is primarily for setting the field to an undocumented or not - * yet supported value. - */ - fun destinationRoutingNumber(destinationRoutingNumber: JsonField) = apply { - this.destinationRoutingNumber = destinationRoutingNumber - } - /** The identifier of the External Account the transfer was made to, if any. */ fun externalAccountId(externalAccountId: String?) = externalAccountId(JsonField.ofNullable(externalAccountId)) @@ -985,19 +966,18 @@ private constructor( */ fun rejection(rejection: JsonField) = apply { this.rejection = rejection } - /** Unstructured information that will show on the recipient's bank statement. */ - fun remittanceInformation(remittanceInformation: String) = - remittanceInformation(JsonField.of(remittanceInformation)) + /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. + * Sets [Builder.routingNumber] to an arbitrary JSON value. * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. + * You should usually call [Builder.routingNumber] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** The Account Number the recipient will see as having sent the transfer. */ @@ -1126,6 +1106,21 @@ private constructor( this.ultimateDebtorName = ultimateDebtorName } + /** Unstructured information that will show on the recipient's bank statement. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = + unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation)) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -1154,6 +1149,7 @@ private constructor( * ```java * .id() * .accountId() + * .accountNumber() * .acknowledgement() * .amount() * .approval() @@ -1163,13 +1159,11 @@ private constructor( * .creditorName() * .currency() * .debtorName() - * .destinationAccountNumber() - * .destinationRoutingNumber() * .externalAccountId() * .idempotencyKey() * .pendingTransactionId() * .rejection() - * .remittanceInformation() + * .routingNumber() * .sourceAccountNumberId() * .status() * .submission() @@ -1177,6 +1171,7 @@ private constructor( * .type() * .ultimateCreditorName() * .ultimateDebtorName() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -1185,6 +1180,7 @@ private constructor( RealTimePaymentsTransfer( checkRequired("id", id), checkRequired("accountId", accountId), + checkRequired("accountNumber", accountNumber), checkRequired("acknowledgement", acknowledgement), checkRequired("amount", amount), checkRequired("approval", approval), @@ -1194,13 +1190,11 @@ private constructor( checkRequired("creditorName", creditorName), checkRequired("currency", currency), checkRequired("debtorName", debtorName), - checkRequired("destinationAccountNumber", destinationAccountNumber), - checkRequired("destinationRoutingNumber", destinationRoutingNumber), checkRequired("externalAccountId", externalAccountId), checkRequired("idempotencyKey", idempotencyKey), checkRequired("pendingTransactionId", pendingTransactionId), checkRequired("rejection", rejection), - checkRequired("remittanceInformation", remittanceInformation), + checkRequired("routingNumber", routingNumber), checkRequired("sourceAccountNumberId", sourceAccountNumberId), checkRequired("status", status), checkRequired("submission", submission), @@ -1208,6 +1202,10 @@ private constructor( checkRequired("type", type), checkRequired("ultimateCreditorName", ultimateCreditorName), checkRequired("ultimateDebtorName", ultimateDebtorName), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -1221,6 +1219,7 @@ private constructor( id() accountId() + accountNumber() acknowledgement().ifPresent { it.validate() } amount() approval().ifPresent { it.validate() } @@ -1230,13 +1229,11 @@ private constructor( creditorName() currency().validate() debtorName() - destinationAccountNumber() - destinationRoutingNumber() externalAccountId() idempotencyKey() pendingTransactionId() rejection().ifPresent { it.validate() } - remittanceInformation() + routingNumber() sourceAccountNumberId() status().validate() submission().ifPresent { it.validate() } @@ -1244,6 +1241,7 @@ private constructor( type().validate() ultimateCreditorName() ultimateDebtorName() + unstructuredRemittanceInformation() validated = true } @@ -1264,6 +1262,7 @@ private constructor( internal fun validity(): Int = (if (id.asKnown().isPresent) 1 else 0) + (if (accountId.asKnown().isPresent) 1 else 0) + + (if (accountNumber.asKnown().isPresent) 1 else 0) + (acknowledgement.asKnown().getOrNull()?.validity() ?: 0) + (if (amount.asKnown().isPresent) 1 else 0) + (approval.asKnown().getOrNull()?.validity() ?: 0) + @@ -1273,20 +1272,19 @@ private constructor( (if (creditorName.asKnown().isPresent) 1 else 0) + (currency.asKnown().getOrNull()?.validity() ?: 0) + (if (debtorName.asKnown().isPresent) 1 else 0) + - (if (destinationAccountNumber.asKnown().isPresent) 1 else 0) + - (if (destinationRoutingNumber.asKnown().isPresent) 1 else 0) + (if (externalAccountId.asKnown().isPresent) 1 else 0) + (if (idempotencyKey.asKnown().isPresent) 1 else 0) + (if (pendingTransactionId.asKnown().isPresent) 1 else 0) + (rejection.asKnown().getOrNull()?.validity() ?: 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + + (if (routingNumber.asKnown().isPresent) 1 else 0) + (if (sourceAccountNumberId.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + (submission.asKnown().getOrNull()?.validity() ?: 0) + (if (transactionId.asKnown().isPresent) 1 else 0) + (type.asKnown().getOrNull()?.validity() ?: 0) + (if (ultimateCreditorName.asKnown().isPresent) 1 else 0) + - (if (ultimateDebtorName.asKnown().isPresent) 1 else 0) + (if (ultimateDebtorName.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) /** * If the transfer is acknowledged by the recipient bank, this will contain supplemental @@ -4341,6 +4339,7 @@ private constructor( return other is RealTimePaymentsTransfer && id == other.id && accountId == other.accountId && + accountNumber == other.accountNumber && acknowledgement == other.acknowledgement && amount == other.amount && approval == other.approval && @@ -4350,13 +4349,11 @@ private constructor( creditorName == other.creditorName && currency == other.currency && debtorName == other.debtorName && - destinationAccountNumber == other.destinationAccountNumber && - destinationRoutingNumber == other.destinationRoutingNumber && externalAccountId == other.externalAccountId && idempotencyKey == other.idempotencyKey && pendingTransactionId == other.pendingTransactionId && rejection == other.rejection && - remittanceInformation == other.remittanceInformation && + routingNumber == other.routingNumber && sourceAccountNumberId == other.sourceAccountNumberId && status == other.status && submission == other.submission && @@ -4364,6 +4361,7 @@ private constructor( type == other.type && ultimateCreditorName == other.ultimateCreditorName && ultimateDebtorName == other.ultimateDebtorName && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } @@ -4371,6 +4369,7 @@ private constructor( Objects.hash( id, accountId, + accountNumber, acknowledgement, amount, approval, @@ -4380,13 +4379,11 @@ private constructor( creditorName, currency, debtorName, - destinationAccountNumber, - destinationRoutingNumber, externalAccountId, idempotencyKey, pendingTransactionId, rejection, - remittanceInformation, + routingNumber, sourceAccountNumberId, status, submission, @@ -4394,6 +4391,7 @@ private constructor( type, ultimateCreditorName, ultimateDebtorName, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -4401,5 +4399,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "RealTimePaymentsTransfer{id=$id, accountId=$accountId, acknowledgement=$acknowledgement, amount=$amount, approval=$approval, cancellation=$cancellation, createdAt=$createdAt, createdBy=$createdBy, creditorName=$creditorName, currency=$currency, debtorName=$debtorName, destinationAccountNumber=$destinationAccountNumber, destinationRoutingNumber=$destinationRoutingNumber, externalAccountId=$externalAccountId, idempotencyKey=$idempotencyKey, pendingTransactionId=$pendingTransactionId, rejection=$rejection, remittanceInformation=$remittanceInformation, sourceAccountNumberId=$sourceAccountNumberId, status=$status, submission=$submission, transactionId=$transactionId, type=$type, ultimateCreditorName=$ultimateCreditorName, ultimateDebtorName=$ultimateDebtorName, additionalProperties=$additionalProperties}" + "RealTimePaymentsTransfer{id=$id, accountId=$accountId, accountNumber=$accountNumber, acknowledgement=$acknowledgement, amount=$amount, approval=$approval, cancellation=$cancellation, createdAt=$createdAt, createdBy=$createdBy, creditorName=$creditorName, currency=$currency, debtorName=$debtorName, externalAccountId=$externalAccountId, idempotencyKey=$idempotencyKey, pendingTransactionId=$pendingTransactionId, rejection=$rejection, routingNumber=$routingNumber, sourceAccountNumberId=$sourceAccountNumberId, status=$status, submission=$submission, transactionId=$transactionId, type=$type, ultimateCreditorName=$ultimateCreditorName, ultimateDebtorName=$ultimateDebtorName, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParams.kt index 571e71a87..2454256f1 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParams.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParams.kt @@ -44,20 +44,28 @@ private constructor( fun creditorName(): String = body.creditorName() /** - * Unstructured information that will show on the recipient's bank statement. + * The identifier of the Account Number from which to send the transfer. * * @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 remittanceInformation(): String = body.remittanceInformation() + fun sourceAccountNumberId(): String = body.sourceAccountNumberId() /** - * The identifier of the Account Number from which to send the transfer. + * Unstructured information that will show on the recipient's bank statement. * * @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 sourceAccountNumberId(): String = body.sourceAccountNumberId() + fun unstructuredRemittanceInformation(): String = body.unstructuredRemittanceInformation() + + /** + * The destination account number. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun accountNumber(): Optional = body.accountNumber() /** * The name of the transfer's sender. If not provided, defaults to the name of the account's @@ -69,16 +77,12 @@ private constructor( fun debtorName(): Optional = body.debtorName() /** - * The destination account number. - * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ fun destinationAccountNumber(): Optional = body.destinationAccountNumber() /** - * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). - * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ @@ -86,7 +90,7 @@ private constructor( /** * The ID of an External Account to initiate a transfer to. If this parameter is provided, - * `destination_account_number` and `destination_routing_number` must be absent. + * `account_number` and `routing_number` must be absent. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -101,6 +105,14 @@ private constructor( */ fun requireApproval(): Optional = body.requireApproval() + /** + * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun routingNumber(): Optional = body.routingNumber() + /** * The name of the ultimate recipient of the transfer. Set this if the creditor is an * intermediary receiving the payment for someone else. @@ -134,20 +146,28 @@ private constructor( fun _creditorName(): JsonField = body._creditorName() /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [sourceAccountNumberId]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an unexpected + * Unlike [sourceAccountNumberId], this method doesn't throw if the JSON field has an unexpected * type. */ - fun _remittanceInformation(): JsonField = body._remittanceInformation() + fun _sourceAccountNumberId(): JsonField = body._sourceAccountNumberId() /** - * Returns the raw JSON value of [sourceAccountNumberId]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [sourceAccountNumberId], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has + * an unexpected type. */ - fun _sourceAccountNumberId(): JsonField = body._sourceAccountNumberId() + fun _unstructuredRemittanceInformation(): JsonField = + body._unstructuredRemittanceInformation() + + /** + * Returns the raw JSON value of [accountNumber]. + * + * Unlike [accountNumber], this method doesn't throw if the JSON field has an unexpected type. + */ + fun _accountNumber(): JsonField = body._accountNumber() /** * Returns the raw JSON value of [debtorName]. @@ -187,6 +207,13 @@ private constructor( */ fun _requireApproval(): JsonField = body._requireApproval() + /** + * Returns the raw JSON value of [routingNumber]. + * + * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected type. + */ + fun _routingNumber(): JsonField = body._routingNumber() + /** * Returns the raw JSON value of [ultimateCreditorName]. * @@ -223,8 +250,8 @@ private constructor( * ```java * .amount() * .creditorName() - * .remittanceInformation() * .sourceAccountNumberId() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -254,9 +281,9 @@ private constructor( * Otherwise, it's more convenient to use the top-level setters instead: * - [amount] * - [creditorName] - * - [remittanceInformation] * - [sourceAccountNumberId] - * - [debtorName] + * - [unstructuredRemittanceInformation] + * - [accountNumber] * - etc. */ fun body(body: Body) = apply { this.body = body.toBuilder() } @@ -286,22 +313,6 @@ private constructor( body.creditorName(creditorName) } - /** Unstructured information that will show on the recipient's bank statement. */ - fun remittanceInformation(remittanceInformation: String) = apply { - body.remittanceInformation(remittanceInformation) - } - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - body.remittanceInformation(remittanceInformation) - } - /** The identifier of the Account Number from which to send the transfer. */ fun sourceAccountNumberId(sourceAccountNumberId: String) = apply { body.sourceAccountNumberId(sourceAccountNumberId) @@ -318,6 +329,36 @@ private constructor( body.sourceAccountNumberId(sourceAccountNumberId) } + /** Unstructured information that will show on the recipient's bank statement. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = apply { + body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) + } + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) } + + /** The destination account number. */ + fun accountNumber(accountNumber: String) = apply { body.accountNumber(accountNumber) } + + /** + * Sets [Builder.accountNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.accountNumber] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun accountNumber(accountNumber: JsonField) = apply { + body.accountNumber(accountNumber) + } + /** * The name of the transfer's sender. If not provided, defaults to the name of the account's * entity. @@ -333,7 +374,6 @@ private constructor( */ fun debtorName(debtorName: JsonField) = apply { body.debtorName(debtorName) } - /** The destination account number. */ fun destinationAccountNumber(destinationAccountNumber: String) = apply { body.destinationAccountNumber(destinationAccountNumber) } @@ -349,7 +389,6 @@ private constructor( body.destinationAccountNumber(destinationAccountNumber) } - /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ fun destinationRoutingNumber(destinationRoutingNumber: String) = apply { body.destinationRoutingNumber(destinationRoutingNumber) } @@ -367,7 +406,7 @@ private constructor( /** * The ID of an External Account to initiate a transfer to. If this parameter is provided, - * `destination_account_number` and `destination_routing_number` must be absent. + * `account_number` and `routing_number` must be absent. */ fun externalAccountId(externalAccountId: String) = apply { body.externalAccountId(externalAccountId) @@ -400,6 +439,20 @@ private constructor( body.requireApproval(requireApproval) } + /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ + fun routingNumber(routingNumber: String) = apply { body.routingNumber(routingNumber) } + + /** + * Sets [Builder.routingNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.routingNumber] with a well-typed [String] value instead. + * This method is primarily for setting the field to an undocumented or not yet supported + * value. + */ + fun routingNumber(routingNumber: JsonField) = apply { + body.routingNumber(routingNumber) + } + /** * The name of the ultimate recipient of the transfer. Set this if the creditor is an * intermediary receiving the payment for someone else. @@ -564,8 +617,8 @@ private constructor( * ```java * .amount() * .creditorName() - * .remittanceInformation() * .sourceAccountNumberId() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -589,13 +642,15 @@ private constructor( private constructor( private val amount: JsonField, private val creditorName: JsonField, - private val remittanceInformation: JsonField, private val sourceAccountNumberId: JsonField, + private val unstructuredRemittanceInformation: JsonField, + private val accountNumber: JsonField, private val debtorName: JsonField, private val destinationAccountNumber: JsonField, private val destinationRoutingNumber: JsonField, private val externalAccountId: JsonField, private val requireApproval: JsonField, + private val routingNumber: JsonField, private val ultimateCreditorName: JsonField, private val ultimateDebtorName: JsonField, private val additionalProperties: MutableMap, @@ -607,12 +662,15 @@ private constructor( @JsonProperty("creditor_name") @ExcludeMissing creditorName: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") - @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), @JsonProperty("source_account_number_id") @ExcludeMissing sourceAccountNumberId: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), + @JsonProperty("account_number") + @ExcludeMissing + accountNumber: JsonField = JsonMissing.of(), @JsonProperty("debtor_name") @ExcludeMissing debtorName: JsonField = JsonMissing.of(), @@ -628,6 +686,9 @@ private constructor( @JsonProperty("require_approval") @ExcludeMissing requireApproval: JsonField = JsonMissing.of(), + @JsonProperty("routing_number") + @ExcludeMissing + routingNumber: JsonField = JsonMissing.of(), @JsonProperty("ultimate_creditor_name") @ExcludeMissing ultimateCreditorName: JsonField = JsonMissing.of(), @@ -637,13 +698,15 @@ private constructor( ) : this( amount, creditorName, - remittanceInformation, sourceAccountNumberId, + unstructuredRemittanceInformation, + accountNumber, debtorName, destinationAccountNumber, destinationRoutingNumber, externalAccountId, requireApproval, + routingNumber, ultimateCreditorName, ultimateDebtorName, mutableMapOf(), @@ -666,22 +729,30 @@ private constructor( fun creditorName(): String = creditorName.getRequired("creditor_name") /** - * Unstructured information that will show on the recipient's bank statement. + * The identifier of the Account Number from which to send the transfer. * * @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 remittanceInformation(): String = - remittanceInformation.getRequired("remittance_information") + fun sourceAccountNumberId(): String = + sourceAccountNumberId.getRequired("source_account_number_id") /** - * The identifier of the Account Number from which to send the transfer. + * Unstructured information that will show on the recipient's bank statement. * * @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 sourceAccountNumberId(): String = - sourceAccountNumberId.getRequired("source_account_number_id") + fun unstructuredRemittanceInformation(): String = + unstructuredRemittanceInformation.getRequired("unstructured_remittance_information") + + /** + * The destination account number. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun accountNumber(): Optional = accountNumber.getOptional("account_number") /** * The name of the transfer's sender. If not provided, defaults to the name of the account's @@ -693,8 +764,6 @@ private constructor( fun debtorName(): Optional = debtorName.getOptional("debtor_name") /** - * The destination account number. - * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if * the server responded with an unexpected value). */ @@ -702,8 +771,6 @@ private constructor( destinationAccountNumber.getOptional("destination_account_number") /** - * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). - * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if * the server responded with an unexpected value). */ @@ -712,7 +779,7 @@ private constructor( /** * The ID of an External Account to initiate a transfer to. If this parameter is provided, - * `destination_account_number` and `destination_routing_number` must be absent. + * `account_number` and `routing_number` must be absent. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if * the server responded with an unexpected value). @@ -728,6 +795,14 @@ private constructor( */ fun requireApproval(): Optional = requireApproval.getOptional("require_approval") + /** + * The destination American Bankers' Association (ABA) Routing Transit Number (RTN). + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun routingNumber(): Optional = routingNumber.getOptional("routing_number") + /** * The name of the ultimate recipient of the transfer. Set this if the creditor is an * intermediary receiving the payment for someone else. @@ -766,24 +841,35 @@ private constructor( fun _creditorName(): JsonField = creditorName /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [sourceAccountNumberId]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an + * Unlike [sourceAccountNumberId], this method doesn't throw if the JSON field has an * unexpected type. */ - @JsonProperty("remittance_information") + @JsonProperty("source_account_number_id") @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation + fun _sourceAccountNumberId(): JsonField = sourceAccountNumberId /** - * Returns the raw JSON value of [sourceAccountNumberId]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [sourceAccountNumberId], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field + * has an unexpected type. */ - @JsonProperty("source_account_number_id") + @JsonProperty("unstructured_remittance_information") @ExcludeMissing - fun _sourceAccountNumberId(): JsonField = sourceAccountNumberId + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation + + /** + * Returns the raw JSON value of [accountNumber]. + * + * Unlike [accountNumber], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("account_number") + @ExcludeMissing + fun _accountNumber(): JsonField = accountNumber /** * Returns the raw JSON value of [debtorName]. @@ -834,6 +920,16 @@ private constructor( @ExcludeMissing fun _requireApproval(): JsonField = requireApproval + /** + * Returns the raw JSON value of [routingNumber]. + * + * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("routing_number") + @ExcludeMissing + fun _routingNumber(): JsonField = routingNumber + /** * Returns the raw JSON value of [ultimateCreditorName]. * @@ -875,8 +971,8 @@ private constructor( * ```java * .amount() * .creditorName() - * .remittanceInformation() * .sourceAccountNumberId() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -887,13 +983,15 @@ private constructor( private var amount: JsonField? = null private var creditorName: JsonField? = null - private var remittanceInformation: JsonField? = null private var sourceAccountNumberId: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null + private var accountNumber: JsonField = JsonMissing.of() private var debtorName: JsonField = JsonMissing.of() private var destinationAccountNumber: JsonField = JsonMissing.of() private var destinationRoutingNumber: JsonField = JsonMissing.of() private var externalAccountId: JsonField = JsonMissing.of() private var requireApproval: JsonField = JsonMissing.of() + private var routingNumber: JsonField = JsonMissing.of() private var ultimateCreditorName: JsonField = JsonMissing.of() private var ultimateDebtorName: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -902,13 +1000,15 @@ private constructor( internal fun from(body: Body) = apply { amount = body.amount creditorName = body.creditorName - remittanceInformation = body.remittanceInformation sourceAccountNumberId = body.sourceAccountNumberId + unstructuredRemittanceInformation = body.unstructuredRemittanceInformation + accountNumber = body.accountNumber debtorName = body.debtorName destinationAccountNumber = body.destinationAccountNumber destinationRoutingNumber = body.destinationRoutingNumber externalAccountId = body.externalAccountId requireApproval = body.requireApproval + routingNumber = body.routingNumber ultimateCreditorName = body.ultimateCreditorName ultimateDebtorName = body.ultimateDebtorName additionalProperties = body.additionalProperties.toMutableMap() @@ -942,21 +1042,6 @@ private constructor( this.creditorName = creditorName } - /** Unstructured information that will show on the recipient's bank statement. */ - fun remittanceInformation(remittanceInformation: String) = - remittanceInformation(JsonField.of(remittanceInformation)) - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] - * value instead. This method is primarily for setting the field to an undocumented or - * not yet supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation - } - /** The identifier of the Account Number from which to send the transfer. */ fun sourceAccountNumberId(sourceAccountNumberId: String) = sourceAccountNumberId(JsonField.of(sourceAccountNumberId)) @@ -972,6 +1057,35 @@ private constructor( this.sourceAccountNumberId = sourceAccountNumberId } + /** Unstructured information that will show on the recipient's bank statement. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = + unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation)) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation } + + /** The destination account number. */ + fun accountNumber(accountNumber: String) = accountNumber(JsonField.of(accountNumber)) + + /** + * Sets [Builder.accountNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.accountNumber] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun accountNumber(accountNumber: JsonField) = apply { + this.accountNumber = accountNumber + } + /** * The name of the transfer's sender. If not provided, defaults to the name of the * account's entity. @@ -987,7 +1101,6 @@ private constructor( */ fun debtorName(debtorName: JsonField) = apply { this.debtorName = debtorName } - /** The destination account number. */ fun destinationAccountNumber(destinationAccountNumber: String) = destinationAccountNumber(JsonField.of(destinationAccountNumber)) @@ -1002,7 +1115,6 @@ private constructor( this.destinationAccountNumber = destinationAccountNumber } - /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ fun destinationRoutingNumber(destinationRoutingNumber: String) = destinationRoutingNumber(JsonField.of(destinationRoutingNumber)) @@ -1019,8 +1131,7 @@ private constructor( /** * The ID of an External Account to initiate a transfer to. If this parameter is - * provided, `destination_account_number` and `destination_routing_number` must be - * absent. + * provided, `account_number` and `routing_number` must be absent. */ fun externalAccountId(externalAccountId: String) = externalAccountId(JsonField.of(externalAccountId)) @@ -1051,6 +1162,20 @@ private constructor( this.requireApproval = requireApproval } + /** The destination American Bankers' Association (ABA) Routing Transit Number (RTN). */ + fun routingNumber(routingNumber: String) = routingNumber(JsonField.of(routingNumber)) + + /** + * Sets [Builder.routingNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.routingNumber] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber + } + /** * The name of the ultimate recipient of the transfer. Set this if the creditor is an * intermediary receiving the payment for someone else. @@ -1115,8 +1240,8 @@ private constructor( * ```java * .amount() * .creditorName() - * .remittanceInformation() * .sourceAccountNumberId() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -1125,13 +1250,18 @@ private constructor( Body( checkRequired("amount", amount), checkRequired("creditorName", creditorName), - checkRequired("remittanceInformation", remittanceInformation), checkRequired("sourceAccountNumberId", sourceAccountNumberId), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), + accountNumber, debtorName, destinationAccountNumber, destinationRoutingNumber, externalAccountId, requireApproval, + routingNumber, ultimateCreditorName, ultimateDebtorName, additionalProperties.toMutableMap(), @@ -1147,13 +1277,15 @@ private constructor( amount() creditorName() - remittanceInformation() sourceAccountNumberId() + unstructuredRemittanceInformation() + accountNumber() debtorName() destinationAccountNumber() destinationRoutingNumber() externalAccountId() requireApproval() + routingNumber() ultimateCreditorName() ultimateDebtorName() validated = true @@ -1177,13 +1309,15 @@ private constructor( internal fun validity(): Int = (if (amount.asKnown().isPresent) 1 else 0) + (if (creditorName.asKnown().isPresent) 1 else 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + (if (sourceAccountNumberId.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) + + (if (accountNumber.asKnown().isPresent) 1 else 0) + (if (debtorName.asKnown().isPresent) 1 else 0) + (if (destinationAccountNumber.asKnown().isPresent) 1 else 0) + (if (destinationRoutingNumber.asKnown().isPresent) 1 else 0) + (if (externalAccountId.asKnown().isPresent) 1 else 0) + (if (requireApproval.asKnown().isPresent) 1 else 0) + + (if (routingNumber.asKnown().isPresent) 1 else 0) + (if (ultimateCreditorName.asKnown().isPresent) 1 else 0) + (if (ultimateDebtorName.asKnown().isPresent) 1 else 0) @@ -1195,13 +1329,15 @@ private constructor( return other is Body && amount == other.amount && creditorName == other.creditorName && - remittanceInformation == other.remittanceInformation && sourceAccountNumberId == other.sourceAccountNumberId && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && + accountNumber == other.accountNumber && debtorName == other.debtorName && destinationAccountNumber == other.destinationAccountNumber && destinationRoutingNumber == other.destinationRoutingNumber && externalAccountId == other.externalAccountId && requireApproval == other.requireApproval && + routingNumber == other.routingNumber && ultimateCreditorName == other.ultimateCreditorName && ultimateDebtorName == other.ultimateDebtorName && additionalProperties == other.additionalProperties @@ -1211,13 +1347,15 @@ private constructor( Objects.hash( amount, creditorName, - remittanceInformation, sourceAccountNumberId, + unstructuredRemittanceInformation, + accountNumber, debtorName, destinationAccountNumber, destinationRoutingNumber, externalAccountId, requireApproval, + routingNumber, ultimateCreditorName, ultimateDebtorName, additionalProperties, @@ -1227,7 +1365,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Body{amount=$amount, creditorName=$creditorName, remittanceInformation=$remittanceInformation, sourceAccountNumberId=$sourceAccountNumberId, debtorName=$debtorName, destinationAccountNumber=$destinationAccountNumber, destinationRoutingNumber=$destinationRoutingNumber, externalAccountId=$externalAccountId, requireApproval=$requireApproval, ultimateCreditorName=$ultimateCreditorName, ultimateDebtorName=$ultimateDebtorName, additionalProperties=$additionalProperties}" + "Body{amount=$amount, creditorName=$creditorName, sourceAccountNumberId=$sourceAccountNumberId, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, accountNumber=$accountNumber, debtorName=$debtorName, destinationAccountNumber=$destinationAccountNumber, destinationRoutingNumber=$destinationRoutingNumber, externalAccountId=$externalAccountId, requireApproval=$requireApproval, routingNumber=$routingNumber, ultimateCreditorName=$ultimateCreditorName, ultimateDebtorName=$ultimateDebtorName, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParams.kt index be2277876..9de750c01 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParams.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParams.kt @@ -71,20 +71,21 @@ private constructor( fun debtorRoutingNumber(): Optional = body.debtorRoutingNumber() /** - * Additional information included with the transfer. + * The identifier of a pending Request for Payment that this transfer will fulfill. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun remittanceInformation(): Optional = body.remittanceInformation() + fun requestForPaymentId(): Optional = body.requestForPaymentId() /** - * The identifier of a pending Request for Payment that this transfer will fulfill. + * Additional information included with the transfer. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). */ - fun requestForPaymentId(): Optional = body.requestForPaymentId() + fun unstructuredRemittanceInformation(): Optional = + body.unstructuredRemittanceInformation() /** * Returns the raw JSON value of [accountNumberId]. @@ -124,20 +125,21 @@ private constructor( fun _debtorRoutingNumber(): JsonField = body._debtorRoutingNumber() /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [requestForPaymentId]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an unexpected + * Unlike [requestForPaymentId], this method doesn't throw if the JSON field has an unexpected * type. */ - fun _remittanceInformation(): JsonField = body._remittanceInformation() + fun _requestForPaymentId(): JsonField = body._requestForPaymentId() /** - * Returns the raw JSON value of [requestForPaymentId]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [requestForPaymentId], this method doesn't throw if the JSON field has an unexpected - * type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field has + * an unexpected type. */ - fun _requestForPaymentId(): JsonField = body._requestForPaymentId() + fun _unstructuredRemittanceInformation(): JsonField = + body._unstructuredRemittanceInformation() fun _additionalBodyProperties(): Map = body._additionalProperties() @@ -267,22 +269,6 @@ private constructor( body.debtorRoutingNumber(debtorRoutingNumber) } - /** Additional information included with the transfer. */ - fun remittanceInformation(remittanceInformation: String) = apply { - body.remittanceInformation(remittanceInformation) - } - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] value - * instead. This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - body.remittanceInformation(remittanceInformation) - } - /** The identifier of a pending Request for Payment that this transfer will fulfill. */ fun requestForPaymentId(requestForPaymentId: String) = apply { body.requestForPaymentId(requestForPaymentId) @@ -299,6 +285,22 @@ private constructor( body.requestForPaymentId(requestForPaymentId) } + /** Additional information included with the transfer. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = apply { + body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) + } + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { body.unstructuredRemittanceInformation(unstructuredRemittanceInformation) } + fun additionalBodyProperties(additionalBodyProperties: Map) = apply { body.additionalProperties(additionalBodyProperties) } @@ -451,8 +453,8 @@ private constructor( private val debtorAccountNumber: JsonField, private val debtorName: JsonField, private val debtorRoutingNumber: JsonField, - private val remittanceInformation: JsonField, private val requestForPaymentId: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -471,20 +473,20 @@ private constructor( @JsonProperty("debtor_routing_number") @ExcludeMissing debtorRoutingNumber: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") - @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), @JsonProperty("request_for_payment_id") @ExcludeMissing requestForPaymentId: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( accountNumberId, amount, debtorAccountNumber, debtorName, debtorRoutingNumber, - remittanceInformation, requestForPaymentId, + unstructuredRemittanceInformation, mutableMapOf(), ) @@ -531,22 +533,22 @@ private constructor( debtorRoutingNumber.getOptional("debtor_routing_number") /** - * Additional information included with the transfer. + * The identifier of a pending Request for Payment that this transfer will fulfill. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if * the server responded with an unexpected value). */ - fun remittanceInformation(): Optional = - remittanceInformation.getOptional("remittance_information") + fun requestForPaymentId(): Optional = + requestForPaymentId.getOptional("request_for_payment_id") /** - * The identifier of a pending Request for Payment that this transfer will fulfill. + * Additional information included with the transfer. * * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if * the server responded with an unexpected value). */ - fun requestForPaymentId(): Optional = - requestForPaymentId.getOptional("request_for_payment_id") + fun unstructuredRemittanceInformation(): Optional = + unstructuredRemittanceInformation.getOptional("unstructured_remittance_information") /** * Returns the raw JSON value of [accountNumberId]. @@ -595,24 +597,25 @@ private constructor( fun _debtorRoutingNumber(): JsonField = debtorRoutingNumber /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [requestForPaymentId]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an + * Unlike [requestForPaymentId], this method doesn't throw if the JSON field has an * unexpected type. */ - @JsonProperty("remittance_information") + @JsonProperty("request_for_payment_id") @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation + fun _requestForPaymentId(): JsonField = requestForPaymentId /** - * Returns the raw JSON value of [requestForPaymentId]. + * Returns the raw JSON value of [unstructuredRemittanceInformation]. * - * Unlike [requestForPaymentId], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON field + * has an unexpected type. */ - @JsonProperty("request_for_payment_id") + @JsonProperty("unstructured_remittance_information") @ExcludeMissing - fun _requestForPaymentId(): JsonField = requestForPaymentId + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { @@ -648,8 +651,8 @@ private constructor( private var debtorAccountNumber: JsonField = JsonMissing.of() private var debtorName: JsonField = JsonMissing.of() private var debtorRoutingNumber: JsonField = JsonMissing.of() - private var remittanceInformation: JsonField = JsonMissing.of() private var requestForPaymentId: JsonField = JsonMissing.of() + private var unstructuredRemittanceInformation: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -659,8 +662,8 @@ private constructor( debtorAccountNumber = body.debtorAccountNumber debtorName = body.debtorName debtorRoutingNumber = body.debtorRoutingNumber - remittanceInformation = body.remittanceInformation requestForPaymentId = body.requestForPaymentId + unstructuredRemittanceInformation = body.unstructuredRemittanceInformation additionalProperties = body.additionalProperties.toMutableMap() } @@ -735,21 +738,6 @@ private constructor( this.debtorRoutingNumber = debtorRoutingNumber } - /** Additional information included with the transfer. */ - fun remittanceInformation(remittanceInformation: String) = - remittanceInformation(JsonField.of(remittanceInformation)) - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed [String] - * value instead. This method is primarily for setting the field to an undocumented or - * not yet supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation - } - /** The identifier of a pending Request for Payment that this transfer will fulfill. */ fun requestForPaymentId(requestForPaymentId: String) = requestForPaymentId(JsonField.of(requestForPaymentId)) @@ -765,6 +753,21 @@ private constructor( this.requestForPaymentId = requestForPaymentId } + /** Additional information included with the transfer. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = + unstructuredRemittanceInformation(JsonField.of(unstructuredRemittanceInformation)) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a well-typed + * [String] value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { this.unstructuredRemittanceInformation = unstructuredRemittanceInformation } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -804,8 +807,8 @@ private constructor( debtorAccountNumber, debtorName, debtorRoutingNumber, - remittanceInformation, requestForPaymentId, + unstructuredRemittanceInformation, additionalProperties.toMutableMap(), ) } @@ -822,8 +825,8 @@ private constructor( debtorAccountNumber() debtorName() debtorRoutingNumber() - remittanceInformation() requestForPaymentId() + unstructuredRemittanceInformation() validated = true } @@ -848,8 +851,8 @@ private constructor( (if (debtorAccountNumber.asKnown().isPresent) 1 else 0) + (if (debtorName.asKnown().isPresent) 1 else 0) + (if (debtorRoutingNumber.asKnown().isPresent) 1 else 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + - (if (requestForPaymentId.asKnown().isPresent) 1 else 0) + (if (requestForPaymentId.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -862,8 +865,8 @@ private constructor( debtorAccountNumber == other.debtorAccountNumber && debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && - remittanceInformation == other.remittanceInformation && requestForPaymentId == other.requestForPaymentId && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } @@ -874,8 +877,8 @@ private constructor( debtorAccountNumber, debtorName, debtorRoutingNumber, - remittanceInformation, requestForPaymentId, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -883,7 +886,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Body{accountNumberId=$accountNumberId, amount=$amount, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, remittanceInformation=$remittanceInformation, requestForPaymentId=$requestForPaymentId, additionalProperties=$additionalProperties}" + "Body{accountNumberId=$accountNumberId, amount=$amount, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, requestForPaymentId=$requestForPaymentId, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt index 53d5fcbb1..3304e2a55 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/transactions/Transaction.kt @@ -44385,9 +44385,9 @@ private constructor( private val debtorAccountNumber: JsonField, private val debtorName: JsonField, private val debtorRoutingNumber: JsonField, - private val remittanceInformation: JsonField, private val transactionIdentification: JsonField, private val transferId: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @@ -44409,15 +44409,15 @@ private constructor( @JsonProperty("debtor_routing_number") @ExcludeMissing debtorRoutingNumber: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") - @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), @JsonProperty("transaction_identification") @ExcludeMissing transactionIdentification: JsonField = JsonMissing.of(), @JsonProperty("transfer_id") @ExcludeMissing transferId: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( amount, creditorName, @@ -44425,9 +44425,9 @@ private constructor( debtorAccountNumber, debtorName, debtorRoutingNumber, - remittanceInformation, transactionIdentification, transferId, + unstructuredRemittanceInformation, mutableMapOf(), ) @@ -44489,15 +44489,6 @@ private constructor( fun debtorRoutingNumber(): String = debtorRoutingNumber.getRequired("debtor_routing_number") - /** - * Additional information included with the transfer. - * - * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. - * if the server responded with an unexpected value). - */ - fun remittanceInformation(): Optional = - remittanceInformation.getOptional("remittance_information") - /** * The Real-Time Payments network identification of the transfer. * @@ -44517,6 +44508,15 @@ private constructor( */ fun transferId(): String = transferId.getRequired("transfer_id") + /** + * Additional information included with the transfer. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun unstructuredRemittanceInformation(): Optional = + unstructuredRemittanceInformation.getOptional("unstructured_remittance_information") + /** * Returns the raw JSON value of [amount]. * @@ -44574,16 +44574,6 @@ private constructor( @ExcludeMissing fun _debtorRoutingNumber(): JsonField = debtorRoutingNumber - /** - * Returns the raw JSON value of [remittanceInformation]. - * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an - * unexpected type. - */ - @JsonProperty("remittance_information") - @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation - /** * Returns the raw JSON value of [transactionIdentification]. * @@ -44604,6 +44594,17 @@ private constructor( @ExcludeMissing fun _transferId(): JsonField = transferId + /** + * Returns the raw JSON value of [unstructuredRemittanceInformation]. + * + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON + * field has an unexpected type. + */ + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -44630,9 +44631,9 @@ private constructor( * .debtorAccountNumber() * .debtorName() * .debtorRoutingNumber() - * .remittanceInformation() * .transactionIdentification() * .transferId() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -44647,9 +44648,9 @@ private constructor( private var debtorAccountNumber: JsonField? = null private var debtorName: JsonField? = null private var debtorRoutingNumber: JsonField? = null - private var remittanceInformation: JsonField? = null private var transactionIdentification: JsonField? = null private var transferId: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -44665,11 +44666,12 @@ private constructor( debtorName = inboundRealTimePaymentsTransferConfirmation.debtorName debtorRoutingNumber = inboundRealTimePaymentsTransferConfirmation.debtorRoutingNumber - remittanceInformation = - inboundRealTimePaymentsTransferConfirmation.remittanceInformation transactionIdentification = inboundRealTimePaymentsTransferConfirmation.transactionIdentification transferId = inboundRealTimePaymentsTransferConfirmation.transferId + unstructuredRemittanceInformation = + inboundRealTimePaymentsTransferConfirmation + .unstructuredRemittanceInformation additionalProperties = inboundRealTimePaymentsTransferConfirmation.additionalProperties .toMutableMap() @@ -44765,28 +44767,6 @@ private constructor( this.debtorRoutingNumber = debtorRoutingNumber } - /** Additional information included with the transfer. */ - fun remittanceInformation(remittanceInformation: String?) = - remittanceInformation(JsonField.ofNullable(remittanceInformation)) - - /** - * Alias for calling [Builder.remittanceInformation] with - * `remittanceInformation.orElse(null)`. - */ - fun remittanceInformation(remittanceInformation: Optional) = - remittanceInformation(remittanceInformation.getOrNull()) - - /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. - * - * You should usually call [Builder.remittanceInformation] with a well-typed - * [String] value instead. This method is primarily for setting the field to an - * undocumented or not yet supported value. - */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation - } - /** The Real-Time Payments network identification of the transfer. */ fun transactionIdentification(transactionIdentification: String) = transactionIdentification(JsonField.of(transactionIdentification)) @@ -44819,6 +44799,33 @@ private constructor( this.transferId = transferId } + /** Additional information included with the transfer. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String?) = + unstructuredRemittanceInformation( + JsonField.ofNullable(unstructuredRemittanceInformation) + ) + + /** + * Alias for calling [Builder.unstructuredRemittanceInformation] with + * `unstructuredRemittanceInformation.orElse(null)`. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: Optional + ) = unstructuredRemittanceInformation(unstructuredRemittanceInformation.getOrNull()) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a + * well-typed [String] value instead. This method is primarily for setting the field + * to an undocumented or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { + this.unstructuredRemittanceInformation = unstructuredRemittanceInformation + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -44854,9 +44861,9 @@ private constructor( * .debtorAccountNumber() * .debtorName() * .debtorRoutingNumber() - * .remittanceInformation() * .transactionIdentification() * .transferId() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. @@ -44869,9 +44876,12 @@ private constructor( checkRequired("debtorAccountNumber", debtorAccountNumber), checkRequired("debtorName", debtorName), checkRequired("debtorRoutingNumber", debtorRoutingNumber), - checkRequired("remittanceInformation", remittanceInformation), checkRequired("transactionIdentification", transactionIdentification), checkRequired("transferId", transferId), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -44889,9 +44899,9 @@ private constructor( debtorAccountNumber() debtorName() debtorRoutingNumber() - remittanceInformation() transactionIdentification() transferId() + unstructuredRemittanceInformation() validated = true } @@ -44917,9 +44927,9 @@ private constructor( (if (debtorAccountNumber.asKnown().isPresent) 1 else 0) + (if (debtorName.asKnown().isPresent) 1 else 0) + (if (debtorRoutingNumber.asKnown().isPresent) 1 else 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + (if (transactionIdentification.asKnown().isPresent) 1 else 0) + - (if (transferId.asKnown().isPresent) 1 else 0) + (if (transferId.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's @@ -45065,9 +45075,9 @@ private constructor( debtorAccountNumber == other.debtorAccountNumber && debtorName == other.debtorName && debtorRoutingNumber == other.debtorRoutingNumber && - remittanceInformation == other.remittanceInformation && transactionIdentification == other.transactionIdentification && transferId == other.transferId && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } @@ -45079,9 +45089,9 @@ private constructor( debtorAccountNumber, debtorName, debtorRoutingNumber, - remittanceInformation, transactionIdentification, transferId, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -45089,7 +45099,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "InboundRealTimePaymentsTransferConfirmation{amount=$amount, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, remittanceInformation=$remittanceInformation, transactionIdentification=$transactionIdentification, transferId=$transferId, additionalProperties=$additionalProperties}" + "InboundRealTimePaymentsTransferConfirmation{amount=$amount, creditorName=$creditorName, currency=$currency, debtorAccountNumber=$debtorAccountNumber, debtorName=$debtorName, debtorRoutingNumber=$debtorRoutingNumber, transactionIdentification=$transactionIdentification, transferId=$transferId, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } /** @@ -48547,56 +48557,55 @@ private constructor( class RealTimePaymentsTransferAcknowledgement @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( + private val accountNumber: JsonField, private val amount: JsonField, - private val destinationAccountNumber: JsonField, - private val destinationRoutingNumber: JsonField, - private val remittanceInformation: JsonField, + private val routingNumber: JsonField, private val transferId: JsonField, + private val unstructuredRemittanceInformation: JsonField, private val additionalProperties: MutableMap, ) { @JsonCreator private constructor( - @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(), - @JsonProperty("destination_account_number") - @ExcludeMissing - destinationAccountNumber: JsonField = JsonMissing.of(), - @JsonProperty("destination_routing_number") + @JsonProperty("account_number") @ExcludeMissing - destinationRoutingNumber: JsonField = JsonMissing.of(), - @JsonProperty("remittance_information") + accountNumber: JsonField = JsonMissing.of(), + @JsonProperty("amount") @ExcludeMissing amount: JsonField = JsonMissing.of(), + @JsonProperty("routing_number") @ExcludeMissing - remittanceInformation: JsonField = JsonMissing.of(), + routingNumber: JsonField = JsonMissing.of(), @JsonProperty("transfer_id") @ExcludeMissing transferId: JsonField = JsonMissing.of(), + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + unstructuredRemittanceInformation: JsonField = JsonMissing.of(), ) : this( + accountNumber, amount, - destinationAccountNumber, - destinationRoutingNumber, - remittanceInformation, + routingNumber, transferId, + unstructuredRemittanceInformation, mutableMapOf(), ) /** - * The transfer amount in USD cents. + * The destination account number. * * @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 amount(): Long = amount.getRequired("amount") + fun accountNumber(): String = accountNumber.getRequired("account_number") /** - * The destination account number. + * The transfer amount in USD 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 destinationAccountNumber(): String = - destinationAccountNumber.getRequired("destination_account_number") + fun amount(): Long = amount.getRequired("amount") /** * The American Bankers' Association (ABA) Routing Transit Number (RTN). @@ -48605,64 +48614,53 @@ private constructor( * unexpectedly missing or null (e.g. if the server responded with an unexpected * value). */ - fun destinationRoutingNumber(): String = - destinationRoutingNumber.getRequired("destination_routing_number") + fun routingNumber(): String = routingNumber.getRequired("routing_number") /** - * Unstructured information that will show on the recipient's bank statement. + * The identifier of the Real-Time Payments Transfer that led to this Transaction. * * @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 remittanceInformation(): String = - remittanceInformation.getRequired("remittance_information") + fun transferId(): String = transferId.getRequired("transfer_id") /** - * The identifier of the Real-Time Payments Transfer that led to this Transaction. + * Unstructured information that will show on the recipient's bank statement. * * @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 transferId(): String = transferId.getRequired("transfer_id") + fun unstructuredRemittanceInformation(): String = + unstructuredRemittanceInformation.getRequired("unstructured_remittance_information") /** - * Returns the raw JSON value of [amount]. - * - * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount - - /** - * Returns the raw JSON value of [destinationAccountNumber]. + * Returns the raw JSON value of [accountNumber]. * - * Unlike [destinationAccountNumber], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [accountNumber], this method doesn't throw if the JSON field has an unexpected + * type. */ - @JsonProperty("destination_account_number") + @JsonProperty("account_number") @ExcludeMissing - fun _destinationAccountNumber(): JsonField = destinationAccountNumber + fun _accountNumber(): JsonField = accountNumber /** - * Returns the raw JSON value of [destinationRoutingNumber]. + * Returns the raw JSON value of [amount]. * - * Unlike [destinationRoutingNumber], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [amount], this method doesn't throw if the JSON field has an unexpected type. */ - @JsonProperty("destination_routing_number") - @ExcludeMissing - fun _destinationRoutingNumber(): JsonField = destinationRoutingNumber + @JsonProperty("amount") @ExcludeMissing fun _amount(): JsonField = amount /** - * Returns the raw JSON value of [remittanceInformation]. + * Returns the raw JSON value of [routingNumber]. * - * Unlike [remittanceInformation], this method doesn't throw if the JSON field has an - * unexpected type. + * Unlike [routingNumber], this method doesn't throw if the JSON field has an unexpected + * type. */ - @JsonProperty("remittance_information") + @JsonProperty("routing_number") @ExcludeMissing - fun _remittanceInformation(): JsonField = remittanceInformation + fun _routingNumber(): JsonField = routingNumber /** * Returns the raw JSON value of [transferId]. @@ -48674,6 +48672,17 @@ private constructor( @ExcludeMissing fun _transferId(): JsonField = transferId + /** + * Returns the raw JSON value of [unstructuredRemittanceInformation]. + * + * Unlike [unstructuredRemittanceInformation], this method doesn't throw if the JSON + * field has an unexpected type. + */ + @JsonProperty("unstructured_remittance_information") + @ExcludeMissing + fun _unstructuredRemittanceInformation(): JsonField = + unstructuredRemittanceInformation + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -48694,11 +48703,11 @@ private constructor( * * The following fields are required: * ```java + * .accountNumber() * .amount() - * .destinationAccountNumber() - * .destinationRoutingNumber() - * .remittanceInformation() + * .routingNumber() * .transferId() + * .unstructuredRemittanceInformation() * ``` */ @JvmStatic fun builder() = Builder() @@ -48707,29 +48716,42 @@ private constructor( /** A builder for [RealTimePaymentsTransferAcknowledgement]. */ class Builder internal constructor() { + private var accountNumber: JsonField? = null private var amount: JsonField? = null - private var destinationAccountNumber: JsonField? = null - private var destinationRoutingNumber: JsonField? = null - private var remittanceInformation: JsonField? = null + private var routingNumber: JsonField? = null private var transferId: JsonField? = null + private var unstructuredRemittanceInformation: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from( realTimePaymentsTransferAcknowledgement: RealTimePaymentsTransferAcknowledgement ) = apply { + accountNumber = realTimePaymentsTransferAcknowledgement.accountNumber amount = realTimePaymentsTransferAcknowledgement.amount - destinationAccountNumber = - realTimePaymentsTransferAcknowledgement.destinationAccountNumber - destinationRoutingNumber = - realTimePaymentsTransferAcknowledgement.destinationRoutingNumber - remittanceInformation = - realTimePaymentsTransferAcknowledgement.remittanceInformation + routingNumber = realTimePaymentsTransferAcknowledgement.routingNumber transferId = realTimePaymentsTransferAcknowledgement.transferId + unstructuredRemittanceInformation = + realTimePaymentsTransferAcknowledgement.unstructuredRemittanceInformation additionalProperties = realTimePaymentsTransferAcknowledgement.additionalProperties.toMutableMap() } + /** The destination account number. */ + fun accountNumber(accountNumber: String) = + accountNumber(JsonField.of(accountNumber)) + + /** + * Sets [Builder.accountNumber] to an arbitrary JSON value. + * + * You should usually call [Builder.accountNumber] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun accountNumber(accountNumber: JsonField) = apply { + this.accountNumber = accountNumber + } + /** The transfer amount in USD cents. */ fun amount(amount: Long) = amount(JsonField.of(amount)) @@ -48742,49 +48764,19 @@ private constructor( */ fun amount(amount: JsonField) = apply { this.amount = amount } - /** The destination account number. */ - fun destinationAccountNumber(destinationAccountNumber: String) = - destinationAccountNumber(JsonField.of(destinationAccountNumber)) - - /** - * Sets [Builder.destinationAccountNumber] to an arbitrary JSON value. - * - * You should usually call [Builder.destinationAccountNumber] with a well-typed - * [String] value instead. This method is primarily for setting the field to an - * undocumented or not yet supported value. - */ - fun destinationAccountNumber(destinationAccountNumber: JsonField) = apply { - this.destinationAccountNumber = destinationAccountNumber - } - /** The American Bankers' Association (ABA) Routing Transit Number (RTN). */ - fun destinationRoutingNumber(destinationRoutingNumber: String) = - destinationRoutingNumber(JsonField.of(destinationRoutingNumber)) - - /** - * Sets [Builder.destinationRoutingNumber] to an arbitrary JSON value. - * - * You should usually call [Builder.destinationRoutingNumber] with a well-typed - * [String] value instead. This method is primarily for setting the field to an - * undocumented or not yet supported value. - */ - fun destinationRoutingNumber(destinationRoutingNumber: JsonField) = apply { - this.destinationRoutingNumber = destinationRoutingNumber - } - - /** Unstructured information that will show on the recipient's bank statement. */ - fun remittanceInformation(remittanceInformation: String) = - remittanceInformation(JsonField.of(remittanceInformation)) + fun routingNumber(routingNumber: String) = + routingNumber(JsonField.of(routingNumber)) /** - * Sets [Builder.remittanceInformation] to an arbitrary JSON value. + * Sets [Builder.routingNumber] to an arbitrary JSON value. * - * You should usually call [Builder.remittanceInformation] with a well-typed - * [String] value instead. This method is primarily for setting the field to an - * undocumented or not yet supported value. + * You should usually call [Builder.routingNumber] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. */ - fun remittanceInformation(remittanceInformation: JsonField) = apply { - this.remittanceInformation = remittanceInformation + fun routingNumber(routingNumber: JsonField) = apply { + this.routingNumber = routingNumber } /** @@ -48803,6 +48795,25 @@ private constructor( this.transferId = transferId } + /** Unstructured information that will show on the recipient's bank statement. */ + fun unstructuredRemittanceInformation(unstructuredRemittanceInformation: String) = + unstructuredRemittanceInformation( + JsonField.of(unstructuredRemittanceInformation) + ) + + /** + * Sets [Builder.unstructuredRemittanceInformation] to an arbitrary JSON value. + * + * You should usually call [Builder.unstructuredRemittanceInformation] with a + * well-typed [String] value instead. This method is primarily for setting the field + * to an undocumented or not yet supported value. + */ + fun unstructuredRemittanceInformation( + unstructuredRemittanceInformation: JsonField + ) = apply { + this.unstructuredRemittanceInformation = unstructuredRemittanceInformation + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -48832,22 +48843,25 @@ private constructor( * * The following fields are required: * ```java + * .accountNumber() * .amount() - * .destinationAccountNumber() - * .destinationRoutingNumber() - * .remittanceInformation() + * .routingNumber() * .transferId() + * .unstructuredRemittanceInformation() * ``` * * @throws IllegalStateException if any required field is unset. */ fun build(): RealTimePaymentsTransferAcknowledgement = RealTimePaymentsTransferAcknowledgement( + checkRequired("accountNumber", accountNumber), checkRequired("amount", amount), - checkRequired("destinationAccountNumber", destinationAccountNumber), - checkRequired("destinationRoutingNumber", destinationRoutingNumber), - checkRequired("remittanceInformation", remittanceInformation), + checkRequired("routingNumber", routingNumber), checkRequired("transferId", transferId), + checkRequired( + "unstructuredRemittanceInformation", + unstructuredRemittanceInformation, + ), additionalProperties.toMutableMap(), ) } @@ -48859,11 +48873,11 @@ private constructor( return@apply } + accountNumber() amount() - destinationAccountNumber() - destinationRoutingNumber() - remittanceInformation() + routingNumber() transferId() + unstructuredRemittanceInformation() validated = true } @@ -48883,11 +48897,11 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (if (amount.asKnown().isPresent) 1 else 0) + - (if (destinationAccountNumber.asKnown().isPresent) 1 else 0) + - (if (destinationRoutingNumber.asKnown().isPresent) 1 else 0) + - (if (remittanceInformation.asKnown().isPresent) 1 else 0) + - (if (transferId.asKnown().isPresent) 1 else 0) + (if (accountNumber.asKnown().isPresent) 1 else 0) + + (if (amount.asKnown().isPresent) 1 else 0) + + (if (routingNumber.asKnown().isPresent) 1 else 0) + + (if (transferId.asKnown().isPresent) 1 else 0) + + (if (unstructuredRemittanceInformation.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -48895,21 +48909,21 @@ private constructor( } return other is RealTimePaymentsTransferAcknowledgement && + accountNumber == other.accountNumber && amount == other.amount && - destinationAccountNumber == other.destinationAccountNumber && - destinationRoutingNumber == other.destinationRoutingNumber && - remittanceInformation == other.remittanceInformation && + routingNumber == other.routingNumber && transferId == other.transferId && + unstructuredRemittanceInformation == other.unstructuredRemittanceInformation && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { Objects.hash( + accountNumber, amount, - destinationAccountNumber, - destinationRoutingNumber, - remittanceInformation, + routingNumber, transferId, + unstructuredRemittanceInformation, additionalProperties, ) } @@ -48917,7 +48931,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "RealTimePaymentsTransferAcknowledgement{amount=$amount, destinationAccountNumber=$destinationAccountNumber, destinationRoutingNumber=$destinationRoutingNumber, remittanceInformation=$remittanceInformation, transferId=$transferId, additionalProperties=$additionalProperties}" + "RealTimePaymentsTransferAcknowledgement{accountNumber=$accountNumber, amount=$amount, routingNumber=$routingNumber, transferId=$transferId, unstructuredRemittanceInformation=$unstructuredRemittanceInformation, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt index 7ab0ab965..0643da90a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionListPageResponseTest.kt @@ -361,13 +361,13 @@ internal class DeclinedTransactionListPageResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -725,13 +725,13 @@ internal class DeclinedTransactionListPageResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -1106,13 +1106,13 @@ internal class DeclinedTransactionListPageResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionTest.kt index 1a842d39b..ad827b653 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/declinedtransactions/DeclinedTransactionTest.kt @@ -317,11 +317,11 @@ internal class DeclinedTransactionTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -628,9 +628,9 @@ internal class DeclinedTransactionTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId("inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -957,11 +957,11 @@ internal class DeclinedTransactionTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt index 4e9a0a751..7deec764c 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferListPageResponseTest.kt @@ -42,12 +42,12 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { ) .build() ) - .remittanceInformation("Invoice 29582") .status(InboundRealTimePaymentsTransfer.Status.CONFIRMED) .transactionIdentification("20220501234567891T1BSLZO01745013025") .type( InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") @@ -82,10 +82,10 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { ) .build() ) - .remittanceInformation("Invoice 29582") .status(InboundRealTimePaymentsTransfer.Status.CONFIRMED) .transactionIdentification("20220501234567891T1BSLZO01745013025") .type(InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) assertThat(inboundRealTimePaymentsTransferListPageResponse.nextCursor()).contains("v57w5d") @@ -124,12 +124,12 @@ internal class InboundRealTimePaymentsTransferListPageResponseTest { ) .build() ) - .remittanceInformation("Invoice 29582") .status(InboundRealTimePaymentsTransfer.Status.CONFIRMED) .transactionIdentification("20220501234567891T1BSLZO01745013025") .type( InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferTest.kt index 0b16607e0..30d3a4b74 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferTest.kt @@ -39,10 +39,10 @@ internal class InboundRealTimePaymentsTransferTest { ) .build() ) - .remittanceInformation("Invoice 29582") .status(InboundRealTimePaymentsTransfer.Status.CONFIRMED) .transactionIdentification("20220501234567891T1BSLZO01745013025") .type(InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER) + .unstructuredRemittanceInformation("Invoice 29582") .build() assertThat(inboundRealTimePaymentsTransfer.id()) @@ -76,14 +76,14 @@ internal class InboundRealTimePaymentsTransferTest { .reason(InboundRealTimePaymentsTransfer.Decline.Reason.ACCOUNT_NUMBER_CANCELED) .build() ) - assertThat(inboundRealTimePaymentsTransfer.remittanceInformation()) - .contains("Invoice 29582") assertThat(inboundRealTimePaymentsTransfer.status()) .isEqualTo(InboundRealTimePaymentsTransfer.Status.CONFIRMED) assertThat(inboundRealTimePaymentsTransfer.transactionIdentification()) .isEqualTo("20220501234567891T1BSLZO01745013025") assertThat(inboundRealTimePaymentsTransfer.type()) .isEqualTo(InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER) + assertThat(inboundRealTimePaymentsTransfer.unstructuredRemittanceInformation()) + .contains("Invoice 29582") } @Test @@ -116,10 +116,10 @@ internal class InboundRealTimePaymentsTransferTest { ) .build() ) - .remittanceInformation("Invoice 29582") .status(InboundRealTimePaymentsTransfer.Status.CONFIRMED) .transactionIdentification("20220501234567891T1BSLZO01745013025") .type(InboundRealTimePaymentsTransfer.Type.INBOUND_REAL_TIME_PAYMENTS_TRANSFER) + .unstructuredRemittanceInformation("Invoice 29582") .build() val roundtrippedInboundRealTimePaymentsTransfer = diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParamsTest.kt index eaf2dc17e..21382f4c2 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParamsTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferCreateParamsTest.kt @@ -12,13 +12,15 @@ internal class RealTimePaymentsTransferCreateParamsTest { RealTimePaymentsTransferCreateParams.builder() .amount(100L) .creditorName("Ian Crease") - .remittanceInformation("Invoice 29582") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") + .unstructuredRemittanceInformation("Invoice 29582") + .accountNumber("987654321") .debtorName("x") - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") + .destinationAccountNumber("x") + .destinationRoutingNumber("xxxxxxxxx") .externalAccountId("external_account_id") .requireApproval(true) + .routingNumber("101050001") .ultimateCreditorName("x") .ultimateDebtorName("x") .build() @@ -30,13 +32,15 @@ internal class RealTimePaymentsTransferCreateParamsTest { RealTimePaymentsTransferCreateParams.builder() .amount(100L) .creditorName("Ian Crease") - .remittanceInformation("Invoice 29582") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") + .unstructuredRemittanceInformation("Invoice 29582") + .accountNumber("987654321") .debtorName("x") - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") + .destinationAccountNumber("x") + .destinationRoutingNumber("xxxxxxxxx") .externalAccountId("external_account_id") .requireApproval(true) + .routingNumber("101050001") .ultimateCreditorName("x") .ultimateDebtorName("x") .build() @@ -45,13 +49,15 @@ internal class RealTimePaymentsTransferCreateParamsTest { assertThat(body.amount()).isEqualTo(100L) assertThat(body.creditorName()).isEqualTo("Ian Crease") - assertThat(body.remittanceInformation()).isEqualTo("Invoice 29582") assertThat(body.sourceAccountNumberId()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2") + assertThat(body.unstructuredRemittanceInformation()).isEqualTo("Invoice 29582") + assertThat(body.accountNumber()).contains("987654321") assertThat(body.debtorName()).contains("x") - assertThat(body.destinationAccountNumber()).contains("987654321") - assertThat(body.destinationRoutingNumber()).contains("101050001") + assertThat(body.destinationAccountNumber()).contains("x") + assertThat(body.destinationRoutingNumber()).contains("xxxxxxxxx") assertThat(body.externalAccountId()).contains("external_account_id") assertThat(body.requireApproval()).contains(true) + assertThat(body.routingNumber()).contains("101050001") assertThat(body.ultimateCreditorName()).contains("x") assertThat(body.ultimateDebtorName()).contains("x") } @@ -62,15 +68,15 @@ internal class RealTimePaymentsTransferCreateParamsTest { RealTimePaymentsTransferCreateParams.builder() .amount(100L) .creditorName("Ian Crease") - .remittanceInformation("Invoice 29582") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") + .unstructuredRemittanceInformation("Invoice 29582") .build() val body = params._body() assertThat(body.amount()).isEqualTo(100L) assertThat(body.creditorName()).isEqualTo("Ian Crease") - assertThat(body.remittanceInformation()).isEqualTo("Invoice 29582") assertThat(body.sourceAccountNumberId()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2") + assertThat(body.unstructuredRemittanceInformation()).isEqualTo("Invoice 29582") } } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt index 188d74a9e..c90aff524 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferListPageResponseTest.kt @@ -18,6 +18,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") .accountId("account_in71c4amph0vgo2qllky") + .accountNumber("987654321") .acknowledgement( RealTimePaymentsTransfer.Acknowledgement.builder() .acknowledgedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -60,8 +61,6 @@ internal class RealTimePaymentsTransferListPageResponseTest { .creditorName("Ian Crease") .currency(RealTimePaymentsTransfer.Currency.USD) .debtorName(null) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") .externalAccountId(null) .idempotencyKey(null) .pendingTransactionId(null) @@ -75,7 +74,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") .status(RealTimePaymentsTransfer.Status.COMPLETE) .submission( @@ -88,6 +87,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .type(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) .ultimateCreditorName(null) .ultimateDebtorName(null) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") @@ -98,6 +98,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") .accountId("account_in71c4amph0vgo2qllky") + .accountNumber("987654321") .acknowledgement( RealTimePaymentsTransfer.Acknowledgement.builder() .acknowledgedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -140,8 +141,6 @@ internal class RealTimePaymentsTransferListPageResponseTest { .creditorName("Ian Crease") .currency(RealTimePaymentsTransfer.Currency.USD) .debtorName(null) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") .externalAccountId(null) .idempotencyKey(null) .pendingTransactionId(null) @@ -154,7 +153,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") .status(RealTimePaymentsTransfer.Status.COMPLETE) .submission( @@ -167,6 +166,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .type(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) .ultimateCreditorName(null) .ultimateDebtorName(null) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) assertThat(realTimePaymentsTransferListPageResponse.nextCursor()).contains("v57w5d") @@ -181,6 +181,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") .accountId("account_in71c4amph0vgo2qllky") + .accountNumber("987654321") .acknowledgement( RealTimePaymentsTransfer.Acknowledgement.builder() .acknowledgedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -223,8 +224,6 @@ internal class RealTimePaymentsTransferListPageResponseTest { .creditorName("Ian Crease") .currency(RealTimePaymentsTransfer.Currency.USD) .debtorName(null) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") .externalAccountId(null) .idempotencyKey(null) .pendingTransactionId(null) @@ -238,7 +237,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") .status(RealTimePaymentsTransfer.Status.COMPLETE) .submission( @@ -251,6 +250,7 @@ internal class RealTimePaymentsTransferListPageResponseTest { .type(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) .ultimateCreditorName(null) .ultimateDebtorName(null) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .nextCursor("v57w5d") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferTest.kt index 1c5e9eda0..c41c549b5 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/realtimepaymentstransfers/RealTimePaymentsTransferTest.kt @@ -16,6 +16,7 @@ internal class RealTimePaymentsTransferTest { RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") .accountId("account_in71c4amph0vgo2qllky") + .accountNumber("987654321") .acknowledgement( RealTimePaymentsTransfer.Acknowledgement.builder() .acknowledgedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -58,8 +59,6 @@ internal class RealTimePaymentsTransferTest { .creditorName("Ian Crease") .currency(RealTimePaymentsTransfer.Currency.USD) .debtorName(null) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") .externalAccountId(null) .idempotencyKey(null) .pendingTransactionId(null) @@ -72,7 +71,7 @@ internal class RealTimePaymentsTransferTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") .status(RealTimePaymentsTransfer.Status.COMPLETE) .submission( @@ -85,11 +84,13 @@ internal class RealTimePaymentsTransferTest { .type(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) .ultimateCreditorName(null) .ultimateDebtorName(null) + .unstructuredRemittanceInformation("Invoice 29582") .build() assertThat(realTimePaymentsTransfer.id()) .isEqualTo("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") assertThat(realTimePaymentsTransfer.accountId()).isEqualTo("account_in71c4amph0vgo2qllky") + assertThat(realTimePaymentsTransfer.accountNumber()).isEqualTo("987654321") assertThat(realTimePaymentsTransfer.acknowledgement()) .contains( RealTimePaymentsTransfer.Acknowledgement.builder() @@ -138,8 +139,6 @@ internal class RealTimePaymentsTransferTest { assertThat(realTimePaymentsTransfer.currency()) .isEqualTo(RealTimePaymentsTransfer.Currency.USD) assertThat(realTimePaymentsTransfer.debtorName()).isEmpty - assertThat(realTimePaymentsTransfer.destinationAccountNumber()).isEqualTo("987654321") - assertThat(realTimePaymentsTransfer.destinationRoutingNumber()).isEqualTo("101050001") assertThat(realTimePaymentsTransfer.externalAccountId()).isEmpty assertThat(realTimePaymentsTransfer.idempotencyKey()).isEmpty assertThat(realTimePaymentsTransfer.pendingTransactionId()).isEmpty @@ -153,7 +152,7 @@ internal class RealTimePaymentsTransferTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - assertThat(realTimePaymentsTransfer.remittanceInformation()).isEqualTo("Invoice 29582") + assertThat(realTimePaymentsTransfer.routingNumber()).isEqualTo("101050001") assertThat(realTimePaymentsTransfer.sourceAccountNumberId()) .isEqualTo("account_number_v18nkfqm6afpsrvy82b2") assertThat(realTimePaymentsTransfer.status()) @@ -171,6 +170,8 @@ internal class RealTimePaymentsTransferTest { .isEqualTo(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) assertThat(realTimePaymentsTransfer.ultimateCreditorName()).isEmpty assertThat(realTimePaymentsTransfer.ultimateDebtorName()).isEmpty + assertThat(realTimePaymentsTransfer.unstructuredRemittanceInformation()) + .isEqualTo("Invoice 29582") } @Test @@ -180,6 +181,7 @@ internal class RealTimePaymentsTransferTest { RealTimePaymentsTransfer.builder() .id("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") .accountId("account_in71c4amph0vgo2qllky") + .accountNumber("987654321") .acknowledgement( RealTimePaymentsTransfer.Acknowledgement.builder() .acknowledgedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -222,8 +224,6 @@ internal class RealTimePaymentsTransferTest { .creditorName("Ian Crease") .currency(RealTimePaymentsTransfer.Currency.USD) .debtorName(null) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") .externalAccountId(null) .idempotencyKey(null) .pendingTransactionId(null) @@ -236,7 +236,7 @@ internal class RealTimePaymentsTransferTest { .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") .status(RealTimePaymentsTransfer.Status.COMPLETE) .submission( @@ -249,6 +249,7 @@ internal class RealTimePaymentsTransferTest { .type(RealTimePaymentsTransfer.Type.REAL_TIME_PAYMENTS_TRANSFER) .ultimateCreditorName(null) .ultimateDebtorName(null) + .unstructuredRemittanceInformation("Invoice 29582") .build() val roundtrippedRealTimePaymentsTransfer = diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/cardauthorizations/CardAuthorizationCreateResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/cardauthorizations/CardAuthorizationCreateResponseTest.kt index 00f45bbc9..aad94c64d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/cardauthorizations/CardAuthorizationCreateResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/cardauthorizations/CardAuthorizationCreateResponseTest.kt @@ -364,13 +364,13 @@ internal class CardAuthorizationCreateResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -1138,13 +1138,13 @@ internal class CardAuthorizationCreateResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) @@ -1912,13 +1912,13 @@ internal class CardAuthorizationCreateResponseTest { .Reason .ACCOUNT_NUMBER_DISABLED ) - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .other(DeclinedTransaction.Source.Other.builder().build()) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParamsTest.kt index dab9acbf6..1acaf78f7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParamsTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundrealtimepaymentstransfers/InboundRealTimePaymentsTransferCreateParamsTest.kt @@ -15,8 +15,8 @@ internal class InboundRealTimePaymentsTransferCreateParamsTest { .debtorAccountNumber("x") .debtorName("x") .debtorRoutingNumber("xxxxxxxxx") - .remittanceInformation("x") .requestForPaymentId("real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7") + .unstructuredRemittanceInformation("x") .build() } @@ -29,8 +29,8 @@ internal class InboundRealTimePaymentsTransferCreateParamsTest { .debtorAccountNumber("x") .debtorName("x") .debtorRoutingNumber("xxxxxxxxx") - .remittanceInformation("x") .requestForPaymentId("real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7") + .unstructuredRemittanceInformation("x") .build() val body = params._body() @@ -40,9 +40,9 @@ internal class InboundRealTimePaymentsTransferCreateParamsTest { assertThat(body.debtorAccountNumber()).contains("x") assertThat(body.debtorName()).contains("x") assertThat(body.debtorRoutingNumber()).contains("xxxxxxxxx") - assertThat(body.remittanceInformation()).contains("x") assertThat(body.requestForPaymentId()) .contains("real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7") + assertThat(body.unstructuredRemittanceInformation()).contains("x") } @Test diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt index 22ca651e6..53a3a0f77 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionListPageResponseTest.kt @@ -1048,13 +1048,13 @@ internal class TransactionListPageResponseTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -1129,13 +1129,13 @@ internal class TransactionListPageResponseTest { .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement .builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId( "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( @@ -2140,13 +2140,13 @@ internal class TransactionListPageResponseTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -2214,11 +2214,11 @@ internal class TransactionListPageResponseTest { .other(Transaction.Source.Other.builder().build()) .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement.builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( @@ -3291,13 +3291,13 @@ internal class TransactionListPageResponseTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification( "20220501234567891T1BSLZO01745013025" ) .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -3372,13 +3372,13 @@ internal class TransactionListPageResponseTest { .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement .builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId( "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt index 0efa119f8..357e080a5 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/transactions/TransactionTest.kt @@ -939,11 +939,11 @@ internal class TransactionTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -1009,11 +1009,11 @@ internal class TransactionTest { .other(Transaction.Source.Other.builder().build()) .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement.builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( @@ -1916,9 +1916,9 @@ internal class TransactionTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId("inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -1984,11 +1984,11 @@ internal class TransactionTest { .other(Transaction.Source.Other.builder().build()) .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement.builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( @@ -2947,11 +2947,11 @@ internal class TransactionTest { .debtorAccountNumber("987654321") .debtorName("National Phonograph Company") .debtorRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") .transactionIdentification("20220501234567891T1BSLZO01745013025") .transferId( "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr" ) + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .inboundWireReversal( @@ -3017,11 +3017,11 @@ internal class TransactionTest { .other(Transaction.Source.Other.builder().build()) .realTimePaymentsTransferAcknowledgement( Transaction.Source.RealTimePaymentsTransferAcknowledgement.builder() + .accountNumber("987654321") .amount(100L) - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") - .remittanceInformation("Invoice 29582") + .routingNumber("101050001") .transferId("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq") + .unstructuredRemittanceInformation("Invoice 29582") .build() ) .sampleFunds( diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt index 5ee858f6b..81aeeb4ec 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/RealTimePaymentsTransferServiceAsyncTest.kt @@ -25,13 +25,15 @@ internal class RealTimePaymentsTransferServiceAsyncTest { RealTimePaymentsTransferCreateParams.builder() .amount(100L) .creditorName("Ian Crease") - .remittanceInformation("Invoice 29582") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") + .unstructuredRemittanceInformation("Invoice 29582") + .accountNumber("987654321") .debtorName("x") - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") + .destinationAccountNumber("x") + .destinationRoutingNumber("xxxxxxxxx") .externalAccountId("external_account_id") .requireApproval(true) + .routingNumber("101050001") .ultimateCreditorName("x") .ultimateDebtorName("x") .build() diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundRealTimePaymentsTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundRealTimePaymentsTransferServiceAsyncTest.kt index 368f622bd..a31f2d311 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundRealTimePaymentsTransferServiceAsyncTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundRealTimePaymentsTransferServiceAsyncTest.kt @@ -29,10 +29,10 @@ internal class InboundRealTimePaymentsTransferServiceAsyncTest { .debtorAccountNumber("x") .debtorName("x") .debtorRoutingNumber("xxxxxxxxx") - .remittanceInformation("x") .requestForPaymentId( "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7" ) + .unstructuredRemittanceInformation("x") .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt index c084cc8ea..ad9b84d04 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/RealTimePaymentsTransferServiceTest.kt @@ -25,13 +25,15 @@ internal class RealTimePaymentsTransferServiceTest { RealTimePaymentsTransferCreateParams.builder() .amount(100L) .creditorName("Ian Crease") - .remittanceInformation("Invoice 29582") .sourceAccountNumberId("account_number_v18nkfqm6afpsrvy82b2") + .unstructuredRemittanceInformation("Invoice 29582") + .accountNumber("987654321") .debtorName("x") - .destinationAccountNumber("987654321") - .destinationRoutingNumber("101050001") + .destinationAccountNumber("x") + .destinationRoutingNumber("xxxxxxxxx") .externalAccountId("external_account_id") .requireApproval(true) + .routingNumber("101050001") .ultimateCreditorName("x") .ultimateDebtorName("x") .build() diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundRealTimePaymentsTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundRealTimePaymentsTransferServiceTest.kt index a3efc5ce4..19236f159 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundRealTimePaymentsTransferServiceTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundRealTimePaymentsTransferServiceTest.kt @@ -29,10 +29,10 @@ internal class InboundRealTimePaymentsTransferServiceTest { .debtorAccountNumber("x") .debtorName("x") .debtorRoutingNumber("xxxxxxxxx") - .remittanceInformation("x") .requestForPaymentId( "real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7" ) + .unstructuredRemittanceInformation("x") .build() ) From efdc001551ca039c2609016571089882176f01b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:32:51 +0000 Subject: [PATCH 4/4] release: 0.488.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 18 ++++++++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4e8550cd0..3327ce303 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.487.0" + ".": "0.488.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bd21a28c7..5d79c3b72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.488.0 (2026-03-20) + +Full Changelog: [v0.487.0...v0.488.0](https://github.com/Increase/increase-java/compare/v0.487.0...v0.488.0) + +### Features + +* **api:** api update ([2bf986f](https://github.com/Increase/increase-java/commit/2bf986f5ae16d07169db0a6d9ca3aeb4832d97a1)) + + +### Chores + +* **tests:** bump steady to v0.19.4 ([3779fcc](https://github.com/Increase/increase-java/commit/3779fcc67239b13c02aae426056a979213f65925)) + + +### Refactors + +* **tests:** switch from prism to steady ([89337f3](https://github.com/Increase/increase-java/commit/89337f3f7a40241e7210cd0e02651a7ceb783b0e)) + ## 0.487.0 (2026-03-19) Full Changelog: [v0.486.0...v0.487.0](https://github.com/Increase/increase-java/compare/v0.486.0...v0.487.0) diff --git a/README.md b/README.md index 2ceddde3c..a09ff0b0d 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.487.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.487.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.487.0) +[![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.488.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.488.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.488.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.487.0). +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.488.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.487.0") +implementation("com.increase.api:increase-java:0.488.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.487.0") com.increase.api increase-java - 0.487.0 + 0.488.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 17a2a0923..b7dfb6b3f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.487.0" // x-release-please-version + version = "0.488.0" // x-release-please-version } subprojects {