From ecd9f3cbc291cd92a8a54016a7f93fdfd188e080 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 19:30:27 +0000 Subject: [PATCH 1/3] chore: improve example values --- .../AccountTransferListPageResponseTest.kt | 12 +- .../accounttransfers/AccountTransferTest.kt | 12 +- .../AchPrenotificationListPageResponseTest.kt | 12 +- .../AchPrenotificationTest.kt | 13 +- .../AchTransferListPageResponseTest.kt | 98 ++++---- .../models/achtransfers/AchTransferTest.kt | 90 +++---- .../CardPaymentListPageResponseTest.kt | 96 ++++---- .../models/cardpayments/CardPaymentTest.kt | 96 ++++---- .../CardPushTransferListPageResponseTest.kt | 111 +++++---- .../cardpushtransfers/CardPushTransferTest.kt | 104 ++++---- .../CheckDepositListPageResponseTest.kt | 172 +++++++------- .../models/checkdeposits/CheckDepositTest.kt | 174 +++++++------- .../CheckTransferListPageResponseTest.kt | 36 +-- .../checktransfers/CheckTransferTest.kt | 36 +-- .../InboundAchTransferListPageResponseTest.kt | 222 ++++++++---------- .../InboundAchTransferTest.kt | 216 ++++++++--------- ...imePaymentsTransferListPageResponseTest.kt | 42 ++-- .../RealTimePaymentsTransferTest.kt | 36 +-- .../CardAuthorizationCreateResponseTest.kt | 42 ++-- .../TransactionListPageResponseTest.kt | 24 +- .../models/transactions/TransactionTest.kt | 24 +- .../WireTransferListPageResponseTest.kt | 114 +++++---- .../models/wiretransfers/WireTransferTest.kt | 108 ++++----- 23 files changed, 893 insertions(+), 997 deletions(-) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt index 863f79cbf..bc0d1d51e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferListPageResponseTest.kt @@ -27,8 +27,8 @@ internal class AccountTransferListPageResponseTest { ) .cancellation( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -81,8 +81,8 @@ internal class AccountTransferListPageResponseTest { ) .cancellation( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -139,8 +139,8 @@ internal class AccountTransferListPageResponseTest { ) .cancellation( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferTest.kt index a121de112..947195bd7 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/accounttransfers/AccountTransferTest.kt @@ -25,8 +25,8 @@ internal class AccountTransferTest { ) .cancellation( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -75,8 +75,8 @@ internal class AccountTransferTest { assertThat(accountTransfer.cancellation()) .contains( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(accountTransfer.createdAt()) @@ -127,8 +127,8 @@ internal class AccountTransferTest { ) .cancellation( AccountTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt index d7bbbce4a..42deb3c4a 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt @@ -42,10 +42,10 @@ internal class AchPrenotificationListPageResponseTest { ) .prenotificationReturn( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( AchPrenotification.PrenotificationReturn.ReturnReasonCode - .INSUFFICIENT_FUND + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) @@ -87,10 +87,10 @@ internal class AchPrenotificationListPageResponseTest { ) .prenotificationReturn( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( AchPrenotification.PrenotificationReturn.ReturnReasonCode - .INSUFFICIENT_FUND + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) @@ -136,10 +136,10 @@ internal class AchPrenotificationListPageResponseTest { ) .prenotificationReturn( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( AchPrenotification.PrenotificationReturn.ReturnReasonCode - .INSUFFICIENT_FUND + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt index e742e13c0..37e9889a3 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt @@ -40,10 +40,10 @@ internal class AchPrenotificationTest { ) .prenotificationReturn( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( AchPrenotification.PrenotificationReturn.ReturnReasonCode - .INSUFFICIENT_FUND + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) @@ -82,9 +82,10 @@ internal class AchPrenotificationTest { assertThat(achPrenotification.prenotificationReturn()) .contains( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( - AchPrenotification.PrenotificationReturn.ReturnReasonCode.INSUFFICIENT_FUND + AchPrenotification.PrenotificationReturn.ReturnReasonCode + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) @@ -125,10 +126,10 @@ internal class AchPrenotificationTest { ) .prenotificationReturn( AchPrenotification.PrenotificationReturn.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .returnReasonCode( AchPrenotification.PrenotificationReturn.ReturnReasonCode - .INSUFFICIENT_FUND + .CORPORATE_CUSTOMER_ADVISED_NOT_AUTHORIZED ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt index aeb7029e3..038621031 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferListPageResponseTest.kt @@ -32,9 +32,7 @@ internal class AchTransferListPageResponseTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation( - "payment_related_information" - ) + .paymentRelatedInformation("addendum") .build() ) .build() @@ -61,8 +59,8 @@ internal class AchTransferListPageResponseTest { ) .cancellation( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .companyDescriptiveDate(null) @@ -98,15 +96,15 @@ internal class AchTransferListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( AchTransfer.InboundFundsHold.builder() - .amount(0L) + .amount(100L) .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") + OffsetDateTime.parse("2020-01-31T23:59:59Z") ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -135,14 +133,14 @@ internal class AchTransferListPageResponseTest { ) .return_( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode( AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND ) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) .routingNumber("101050001") @@ -194,9 +192,7 @@ internal class AchTransferListPageResponseTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation( - "payment_related_information" - ) + .paymentRelatedInformation("addendum") .build() ) .build() @@ -223,8 +219,8 @@ internal class AchTransferListPageResponseTest { ) .cancellation( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .companyDescriptiveDate(null) @@ -260,15 +256,13 @@ internal class AchTransferListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( AchTransfer.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") - ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -297,12 +291,12 @@ internal class AchTransferListPageResponseTest { ) .return_( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode(AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) .routingNumber("101050001") @@ -356,9 +350,7 @@ internal class AchTransferListPageResponseTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation( - "payment_related_information" - ) + .paymentRelatedInformation("addendum") .build() ) .build() @@ -385,8 +377,8 @@ internal class AchTransferListPageResponseTest { ) .cancellation( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .companyDescriptiveDate(null) @@ -422,15 +414,15 @@ internal class AchTransferListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( AchTransfer.InboundFundsHold.builder() - .amount(0L) + .amount(100L) .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") + OffsetDateTime.parse("2020-01-31T23:59:59Z") ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -459,14 +451,14 @@ internal class AchTransferListPageResponseTest { ) .return_( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode( AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND ) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) .routingNumber("101050001") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferTest.kt index 184e842dc..4916a6b36 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achtransfers/AchTransferTest.kt @@ -30,7 +30,7 @@ internal class AchTransferTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation("payment_related_information") + .paymentRelatedInformation("addendum") .build() ) .build() @@ -57,8 +57,8 @@ internal class AchTransferTest { ) .cancellation( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .companyDescriptiveDate(null) @@ -90,13 +90,13 @@ internal class AchTransferTest { .idempotencyKey(null) .inboundFundsHold( AchTransfer.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -124,12 +124,12 @@ internal class AchTransferTest { ) .return_( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode(AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) .routingNumber("101050001") @@ -173,7 +173,7 @@ internal class AchTransferTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation("payment_related_information") + .paymentRelatedInformation("addendum") .build() ) .build() @@ -201,8 +201,8 @@ internal class AchTransferTest { assertThat(achTransfer.cancellation()) .contains( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(achTransfer.companyDescriptiveDate()).isEmpty @@ -234,13 +234,13 @@ internal class AchTransferTest { assertThat(achTransfer.inboundFundsHold()) .contains( AchTransfer.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -271,12 +271,12 @@ internal class AchTransferTest { assertThat(achTransfer.return_()) .contains( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode(AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) assertThat(achTransfer.routingNumber()).isEqualTo("101050001") @@ -326,7 +326,7 @@ internal class AchTransferTest { AchTransfer.Addenda.Freeform.builder() .addEntry( AchTransfer.Addenda.Freeform.Entry.builder() - .paymentRelatedInformation("payment_related_information") + .paymentRelatedInformation("addendum") .build() ) .build() @@ -353,8 +353,8 @@ internal class AchTransferTest { ) .cancellation( AchTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .companyDescriptiveDate(null) @@ -386,13 +386,13 @@ internal class AchTransferTest { .idempotencyKey(null) .inboundFundsHold( AchTransfer.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(AchTransfer.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(AchTransfer.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(AchTransfer.InboundFundsHold.Status.HELD) .type(AchTransfer.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -420,12 +420,12 @@ internal class AchTransferTest { ) .return_( AchTransfer.Return.builder() - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .rawReturnReasonCode("raw_return_reason_code") + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .rawReturnReasonCode("R01") .returnReasonCode(AchTransfer.Return.ReturnReasonCode.INSUFFICIENT_FUND) - .traceNumber("trace_number") - .transactionId("transaction_id") - .transferId("transfer_id") + .traceNumber("111122223292834") + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q") .build() ) .routingNumber("101050001") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt index e5660f37d..e32345aa8 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt @@ -697,11 +697,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -1007,11 +1007,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -2148,11 +2148,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -2458,11 +2458,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -3599,11 +3599,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -3909,11 +3909,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -5050,11 +5050,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -5360,11 +5360,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -6501,10 +6501,10 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -6789,11 +6789,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -7879,10 +7879,10 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -8167,11 +8167,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -9257,10 +9257,10 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -9545,11 +9545,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -10635,10 +10635,10 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -10923,11 +10923,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -12073,11 +12073,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -12383,11 +12383,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -13524,11 +13524,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -13834,11 +13834,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -14975,11 +14975,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -15285,11 +15285,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -16426,11 +16426,11 @@ internal class CardPaymentListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardRefund.Cashback .Currency - .CAD + .USD ) .build() ) @@ -16736,11 +16736,11 @@ internal class CardPaymentListPageResponseTest { .cashback( CardPayment.Element.CardSettlement.Cashback .builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt index 55cda823c..71c08a803 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt @@ -611,9 +611,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -890,10 +890,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -1894,9 +1894,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -2173,10 +2173,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -3177,9 +3177,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -3456,10 +3456,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -4460,9 +4460,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -4739,10 +4739,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -5700,8 +5700,8 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") - .currency(CardPayment.Element.CardRefund.Cashback.Currency.CAD) + .amount("0.137465") + .currency(CardPayment.Element.CardRefund.Cashback.Currency.USD) .build() ) .currency(CardPayment.Element.CardRefund.Currency.USD) @@ -5951,9 +5951,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardSettlement.Cashback.Currency.CAD + CardPayment.Element.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -6849,8 +6849,8 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") - .currency(CardPayment.Element.CardRefund.Cashback.Currency.CAD) + .amount("0.137465") + .currency(CardPayment.Element.CardRefund.Cashback.Currency.USD) .build() ) .currency(CardPayment.Element.CardRefund.Currency.USD) @@ -7100,9 +7100,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardSettlement.Cashback.Currency.CAD + CardPayment.Element.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -7998,8 +7998,8 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") - .currency(CardPayment.Element.CardRefund.Cashback.Currency.CAD) + .amount("0.137465") + .currency(CardPayment.Element.CardRefund.Cashback.Currency.USD) .build() ) .currency(CardPayment.Element.CardRefund.Currency.USD) @@ -8249,9 +8249,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardSettlement.Cashback.Currency.CAD + CardPayment.Element.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -9147,8 +9147,8 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") - .currency(CardPayment.Element.CardRefund.Cashback.Currency.CAD) + .amount("0.137465") + .currency(CardPayment.Element.CardRefund.Cashback.Currency.USD) .build() ) .currency(CardPayment.Element.CardRefund.Currency.USD) @@ -9398,9 +9398,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardSettlement.Cashback.Currency.CAD + CardPayment.Element.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -10388,9 +10388,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -10667,10 +10667,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -11671,9 +11671,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -11950,10 +11950,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -12954,9 +12954,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -13233,10 +13233,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -14237,9 +14237,9 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - CardPayment.Element.CardRefund.Cashback.Currency.CAD + CardPayment.Element.CardRefund.Cashback.Currency.USD ) .build() ) @@ -14516,10 +14516,10 @@ internal class CardPaymentTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( CardPayment.Element.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( CardPayment.Element.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt index 693ed4ed6..286f4cf50 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferListPageResponseTest.kt @@ -19,22 +19,18 @@ internal class CardPushTransferListPageResponseTest { .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") .acceptance( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse( - "authorization_identification_response" - ) - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) .accountId("account_in71c4amph0vgo2qllky") .amount(100L) .approval( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .businessApplicationIdentifier( @@ -42,8 +38,8 @@ internal class CardPushTransferListPageResponseTest { ) .cancellation( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -70,9 +66,12 @@ internal class CardPushTransferListPageResponseTest { .currency(CardPushTransfer.Currency.USD) .decline( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason( + CardPushTransfer.Decline.Reason + .TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER + ) .build() ) .idempotencyKey(null) @@ -92,10 +91,10 @@ internal class CardPushTransferListPageResponseTest { .status(CardPushTransfer.Status.PENDING_SUBMISSION) .submission( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) @@ -110,22 +109,18 @@ internal class CardPushTransferListPageResponseTest { .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") .acceptance( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse( - "authorization_identification_response" - ) - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) .accountId("account_in71c4amph0vgo2qllky") .amount(100L) .approval( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .businessApplicationIdentifier( @@ -133,8 +128,8 @@ internal class CardPushTransferListPageResponseTest { ) .cancellation( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -161,9 +156,12 @@ internal class CardPushTransferListPageResponseTest { .currency(CardPushTransfer.Currency.USD) .decline( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason( + CardPushTransfer.Decline.Reason + .TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER + ) .build() ) .idempotencyKey(null) @@ -183,10 +181,10 @@ internal class CardPushTransferListPageResponseTest { .status(CardPushTransfer.Status.PENDING_SUBMISSION) .submission( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) @@ -205,22 +203,18 @@ internal class CardPushTransferListPageResponseTest { .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") .acceptance( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse( - "authorization_identification_response" - ) - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) .accountId("account_in71c4amph0vgo2qllky") .amount(100L) .approval( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .businessApplicationIdentifier( @@ -228,8 +222,8 @@ internal class CardPushTransferListPageResponseTest { ) .cancellation( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -256,9 +250,12 @@ internal class CardPushTransferListPageResponseTest { .currency(CardPushTransfer.Currency.USD) .decline( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason( + CardPushTransfer.Decline.Reason + .TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER + ) .build() ) .idempotencyKey(null) @@ -278,10 +275,10 @@ internal class CardPushTransferListPageResponseTest { .status(CardPushTransfer.Status.PENDING_SUBMISSION) .submission( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt index 37e7292a8..858034ac4 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransferTest.kt @@ -17,22 +17,18 @@ internal class CardPushTransferTest { .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") .acceptance( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse( - "authorization_identification_response" - ) - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) .accountId("account_in71c4amph0vgo2qllky") .amount(100L) .approval( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .businessApplicationIdentifier( @@ -40,8 +36,8 @@ internal class CardPushTransferTest { ) .cancellation( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -68,9 +64,11 @@ internal class CardPushTransferTest { .currency(CardPushTransfer.Currency.USD) .decline( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason( + CardPushTransfer.Decline.Reason.TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER + ) .build() ) .idempotencyKey(null) @@ -90,10 +88,10 @@ internal class CardPushTransferTest { .status(CardPushTransfer.Status.PENDING_SUBMISSION) .submission( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) @@ -104,12 +102,10 @@ internal class CardPushTransferTest { assertThat(cardPushTransfer.acceptance()) .contains( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse("authorization_identification_response") - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) assertThat(cardPushTransfer.accountId()).isEqualTo("account_in71c4amph0vgo2qllky") @@ -117,8 +113,8 @@ internal class CardPushTransferTest { assertThat(cardPushTransfer.approval()) .contains( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) assertThat(cardPushTransfer.businessApplicationIdentifier()) @@ -126,8 +122,8 @@ internal class CardPushTransferTest { assertThat(cardPushTransfer.cancellation()) .contains( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(cardPushTransfer.createdAt()) @@ -153,9 +149,9 @@ internal class CardPushTransferTest { assertThat(cardPushTransfer.decline()) .contains( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason(CardPushTransfer.Decline.Reason.TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER) .build() ) assertThat(cardPushTransfer.idempotencyKey()).isEmpty @@ -177,10 +173,10 @@ internal class CardPushTransferTest { assertThat(cardPushTransfer.submission()) .contains( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) assertThat(cardPushTransfer.type()).isEqualTo(CardPushTransfer.Type.CARD_PUSH_TRANSFER) @@ -194,22 +190,18 @@ internal class CardPushTransferTest { .id("outbound_card_push_transfer_e0z9rdpamraczh4tvwye") .acceptance( CardPushTransfer.Acceptance.builder() - .acceptedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .authorizationIdentificationResponse( - "authorization_identification_response" - ) - .cardVerificationValue2Result( - CardPushTransfer.Acceptance.CardVerificationValue2Result.MATCH - ) - .networkTransactionIdentifier("network_transaction_identifier") + .acceptedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .authorizationIdentificationResponse("ABCDEF") + .cardVerificationValue2Result(null) + .networkTransactionIdentifier("841488484271872") .build() ) .accountId("account_in71c4amph0vgo2qllky") .amount(100L) .approval( CardPushTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .businessApplicationIdentifier( @@ -217,8 +209,8 @@ internal class CardPushTransferTest { ) .cancellation( CardPushTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -245,9 +237,11 @@ internal class CardPushTransferTest { .currency(CardPushTransfer.Currency.USD) .decline( CardPushTransfer.Decline.builder() - .declinedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .networkTransactionIdentifier("network_transaction_identifier") - .reason(CardPushTransfer.Decline.Reason.DO_NOT_HONOR) + .declinedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .networkTransactionIdentifier("841488484271872") + .reason( + CardPushTransfer.Decline.Reason.TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER + ) .build() ) .idempotencyKey(null) @@ -267,10 +261,10 @@ internal class CardPushTransferTest { .status(CardPushTransfer.Status.PENDING_SUBMISSION) .submission( CardPushTransfer.Submission.builder() - .retrievalReferenceNumber("retrieval_reference_number") - .senderReference("sender_reference") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .traceNumber("trace_number") + .retrievalReferenceNumber("123456789012") + .senderReference("OPQRRX3BNAKA6QLT") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .traceNumber("123456") .build() ) .type(CardPushTransfer.Type.CARD_PUSH_TRANSFER) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt index bddc26168..9e8764df3 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositListPageResponseTest.kt @@ -23,43 +23,42 @@ internal class CheckDepositListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .depositAcceptance( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) .depositRejection( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .depositReturn( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) .returnReason( - CheckDeposit.DepositReturn.ReturnReason - .ACH_CONVERSION_NOT_SUPPORTED + CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) .depositSubmission( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) .description(null) @@ -67,15 +66,15 @@ internal class CheckDepositListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( CheckDeposit.InboundFundsHold.builder() - .amount(0L) + .amount(100L) .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") + OffsetDateTime.parse("2020-01-31T23:59:59Z") ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -100,42 +99,42 @@ internal class CheckDepositListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .depositAcceptance( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) .depositRejection( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .depositReturn( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) .returnReason( - CheckDeposit.DepositReturn.ReturnReason.ACH_CONVERSION_NOT_SUPPORTED + CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) .depositSubmission( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) .description(null) @@ -143,15 +142,13 @@ internal class CheckDepositListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( CheckDeposit.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") - ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -180,43 +177,42 @@ internal class CheckDepositListPageResponseTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .depositAcceptance( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) .depositRejection( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .depositReturn( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) .returnReason( - CheckDeposit.DepositReturn.ReturnReason - .ACH_CONVERSION_NOT_SUPPORTED + CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) .depositSubmission( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) .description(null) @@ -224,15 +220,15 @@ internal class CheckDepositListPageResponseTest { .idempotencyKey(null) .inboundFundsHold( CheckDeposit.InboundFundsHold.builder() - .amount(0L) + .amount(100L) .automaticallyReleasesAt( - OffsetDateTime.parse("2019-12-27T18:11:19.117Z") + OffsetDateTime.parse("2020-01-31T23:59:59Z") ) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositTest.kt index 8b1f4a3fa..6552aa14e 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checkdeposits/CheckDepositTest.kt @@ -21,42 +21,40 @@ internal class CheckDepositTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .depositAcceptance( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) .depositRejection( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .depositReturn( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) - .returnReason( - CheckDeposit.DepositReturn.ReturnReason.ACH_CONVERSION_NOT_SUPPORTED - ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) + .returnReason(CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS) + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) .depositSubmission( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) .description(null) @@ -64,13 +62,13 @@ internal class CheckDepositTest { .idempotencyKey(null) .inboundFundsHold( CheckDeposit.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -90,45 +88,43 @@ internal class CheckDepositTest { assertThat(checkDeposit.depositAcceptance()) .contains( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) assertThat(checkDeposit.depositRejection()) .contains( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) assertThat(checkDeposit.depositReturn()) .contains( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) - .returnReason( - CheckDeposit.DepositReturn.ReturnReason.ACH_CONVERSION_NOT_SUPPORTED - ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) + .returnReason(CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS) + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) assertThat(checkDeposit.depositSubmission()) .contains( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) assertThat(checkDeposit.description()).isEmpty @@ -137,13 +133,13 @@ internal class CheckDepositTest { assertThat(checkDeposit.inboundFundsHold()) .contains( CheckDeposit.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() @@ -167,42 +163,40 @@ internal class CheckDepositTest { .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .depositAcceptance( CheckDeposit.DepositAcceptance.builder() - .accountNumber("account_number") - .amount(0L) - .auxiliaryOnUs("auxiliary_on_us") - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositAcceptance.Currency.CAD) - .routingNumber("routing_number") - .serialNumber("serial_number") + .accountNumber("987654321") + .amount(100L) + .auxiliaryOnUs("101") + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositAcceptance.Currency.USD) + .routingNumber("101050001") + .serialNumber(null) .build() ) .depositRejection( CheckDeposit.DepositRejection.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositRejection.Currency.CAD) - .declinedTransactionId("declined_transaction_id") + .amount(1750L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositRejection.Currency.USD) + .declinedTransactionId("declined_transaction_17jbn0yyhvkt4v4ooym8") .reason(CheckDeposit.DepositRejection.Reason.INCOMPLETE_IMAGE) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .depositReturn( CheckDeposit.DepositReturn.builder() - .amount(0L) - .checkDepositId("check_deposit_id") - .currency(CheckDeposit.DepositReturn.Currency.CAD) - .returnReason( - CheckDeposit.DepositReturn.ReturnReason.ACH_CONVERSION_NOT_SUPPORTED - ) - .returnedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transactionId("transaction_id") + .amount(100L) + .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1") + .currency(CheckDeposit.DepositReturn.Currency.USD) + .returnReason(CheckDeposit.DepositReturn.ReturnReason.INSUFFICIENT_FUNDS) + .returnedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transactionId("transaction_uyrp7fld2ium70oa7oi") .build() ) .depositSubmission( CheckDeposit.DepositSubmission.builder() - .backFileId("back_file_id") - .frontFileId("front_file_id") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .backFileId("file_frhw4s443nh7noss55kq") + .frontFileId("file_j7ed9mrve741m6yui9ju") + .submittedAt(OffsetDateTime.parse("2020-02-01T00:59:59+00:00")) .build() ) .description(null) @@ -210,13 +204,13 @@ internal class CheckDepositTest { .idempotencyKey(null) .inboundFundsHold( CheckDeposit.InboundFundsHold.builder() - .amount(0L) - .automaticallyReleasesAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(CheckDeposit.InboundFundsHold.Currency.CAD) - .heldTransactionId("held_transaction_id") - .pendingTransactionId("pending_transaction_id") - .releasedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .amount(100L) + .automaticallyReleasesAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(CheckDeposit.InboundFundsHold.Currency.USD) + .heldTransactionId("transaction_uyrp7fld2ium70oa7oi") + .pendingTransactionId("pending_transaction_k1sfetcau2qbvjbzgju4") + .releasedAt(null) .status(CheckDeposit.InboundFundsHold.Status.HELD) .type(CheckDeposit.InboundFundsHold.Type.INBOUND_FUNDS_HOLD) .build() diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt index c39086b24..f1b756cfa 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt @@ -22,16 +22,16 @@ internal class CheckTransferListPageResponseTest { .amount(1000L) .approval( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra") .balanceCheck(null) .cancellation( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .checkNumber("123") @@ -128,8 +128,8 @@ internal class CheckTransferListPageResponseTest { .reason( CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED ) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type( CheckTransfer.StopPaymentRequest.Type .CHECK_TRANSFER_STOP_PAYMENT_REQUEST @@ -174,16 +174,16 @@ internal class CheckTransferListPageResponseTest { .amount(1000L) .approval( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra") .balanceCheck(null) .cancellation( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .checkNumber("123") @@ -278,8 +278,8 @@ internal class CheckTransferListPageResponseTest { .stopPaymentRequest( CheckTransfer.StopPaymentRequest.builder() .reason(CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type( CheckTransfer.StopPaymentRequest.Type .CHECK_TRANSFER_STOP_PAYMENT_REQUEST @@ -326,16 +326,16 @@ internal class CheckTransferListPageResponseTest { .amount(1000L) .approval( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra") .balanceCheck(null) .cancellation( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .checkNumber("123") @@ -432,8 +432,8 @@ internal class CheckTransferListPageResponseTest { .reason( CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED ) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type( CheckTransfer.StopPaymentRequest.Type .CHECK_TRANSFER_STOP_PAYMENT_REQUEST diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt index 050942014..de3f5a2eb 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt @@ -20,16 +20,16 @@ internal class CheckTransferTest { .amount(1000L) .approval( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra") .balanceCheck(null) .cancellation( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .checkNumber("123") @@ -119,8 +119,8 @@ internal class CheckTransferTest { .stopPaymentRequest( CheckTransfer.StopPaymentRequest.builder() .reason(CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type( CheckTransfer.StopPaymentRequest.Type .CHECK_TRANSFER_STOP_PAYMENT_REQUEST @@ -158,8 +158,8 @@ internal class CheckTransferTest { assertThat(checkTransfer.approval()) .contains( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) assertThat(checkTransfer.approvedInboundCheckDepositId()) @@ -168,8 +168,8 @@ internal class CheckTransferTest { assertThat(checkTransfer.cancellation()) .contains( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(checkTransfer.checkNumber()).isEqualTo("123") @@ -263,8 +263,8 @@ internal class CheckTransferTest { .contains( CheckTransfer.StopPaymentRequest.builder() .reason(CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type(CheckTransfer.StopPaymentRequest.Type.CHECK_TRANSFER_STOP_PAYMENT_REQUEST) .build() ) @@ -303,16 +303,16 @@ internal class CheckTransferTest { .amount(1000L) .approval( CheckTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra") .balanceCheck(null) .cancellation( CheckTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .checkNumber("123") @@ -402,8 +402,8 @@ internal class CheckTransferTest { .stopPaymentRequest( CheckTransfer.StopPaymentRequest.builder() .reason(CheckTransfer.StopPaymentRequest.Reason.MAIL_DELIVERY_FAILED) - .requestedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .transferId("transfer_id") + .requestedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .transferId("check_transfer_30b43acfu9vw8fyc4f5") .type( CheckTransfer.StopPaymentRequest.Type .CHECK_TRANSFER_STOP_PAYMENT_REQUEST diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt index 849caca38..187456f3d 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferListPageResponseTest.kt @@ -56,71 +56,59 @@ internal class InboundAchTransferListPageResponseTest { .effectiveDate(LocalDate.parse("2023-04-02")) .internationalAddenda( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda .ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda .InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName( - "receiving_company_or_individual_name" - ) - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) @@ -206,71 +194,59 @@ internal class InboundAchTransferListPageResponseTest { .effectiveDate(LocalDate.parse("2023-04-02")) .internationalAddenda( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda .ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda .InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName( - "receiving_company_or_individual_name" - ) - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) @@ -360,71 +336,59 @@ internal class InboundAchTransferListPageResponseTest { .effectiveDate(LocalDate.parse("2023-04-02")) .internationalAddenda( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda .ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda .InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName( - "receiving_company_or_individual_name" - ) - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferTest.kt index fddd10ac8..2c0a042e8 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/inboundachtransfers/InboundAchTransferTest.kt @@ -52,68 +52,58 @@ internal class InboundAchTransferTest { .effectiveDate(LocalDate.parse("2023-04-02")) .internationalAddenda( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda .ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda.InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName("receiving_company_or_individual_name") - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) @@ -198,67 +188,57 @@ internal class InboundAchTransferTest { assertThat(inboundAchTransfer.internationalAddenda()) .contains( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda.InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName("receiving_company_or_individual_name") - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) @@ -342,68 +322,58 @@ internal class InboundAchTransferTest { .effectiveDate(LocalDate.parse("2023-04-02")) .internationalAddenda( InboundAchTransfer.InternationalAddenda.builder() - .destinationCountryCode("destination_country_code") - .destinationCurrencyCode("destination_currency_code") + .destinationCountryCode("US") + .destinationCurrencyCode("USD") .foreignExchangeIndicator( InboundAchTransfer.InternationalAddenda.ForeignExchangeIndicator - .FIXED_TO_VARIABLE + .FIXED_TO_FIXED ) - .foreignExchangeReference("foreign_exchange_reference") + .foreignExchangeReference(null) .foreignExchangeReferenceIndicator( InboundAchTransfer.InternationalAddenda .ForeignExchangeReferenceIndicator - .FOREIGN_EXCHANGE_RATE + .BLANK ) - .foreignPaymentAmount(0L) - .foreignTraceNumber("foreign_trace_number") + .foreignPaymentAmount(199L) + .foreignTraceNumber(null) .internationalTransactionTypeCode( InboundAchTransfer.InternationalAddenda.InternationalTransactionTypeCode - .ANNUITY - ) - .originatingCurrencyCode("originating_currency_code") - .originatingDepositoryFinancialInstitutionBranchCountry( - "originating_depository_financial_institution_branch_country" - ) - .originatingDepositoryFinancialInstitutionId( - "originating_depository_financial_institution_id" + .INTERNET_INITIATED ) + .originatingCurrencyCode("USD") + .originatingDepositoryFinancialInstitutionBranchCountry("US") + .originatingDepositoryFinancialInstitutionId("091000019") .originatingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .OriginatingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) - .originatingDepositoryFinancialInstitutionName( - "originating_depository_financial_institution_name" - ) - .originatorCity("originator_city") - .originatorCountry("originator_country") - .originatorIdentification("originator_identification") - .originatorName("originator_name") - .originatorPostalCode("originator_postal_code") - .originatorStateOrProvince("originator_state_or_province") - .originatorStreetAddress("originator_street_address") - .paymentRelatedInformation("payment_related_information") - .paymentRelatedInformation2("payment_related_information2") - .receiverCity("receiver_city") - .receiverCountry("receiver_country") - .receiverIdentificationNumber("receiver_identification_number") - .receiverPostalCode("receiver_postal_code") - .receiverStateOrProvince("receiver_state_or_province") - .receiverStreetAddress("receiver_street_address") - .receivingCompanyOrIndividualName("receiving_company_or_individual_name") - .receivingDepositoryFinancialInstitutionCountry( - "receiving_depository_financial_institution_country" - ) - .receivingDepositoryFinancialInstitutionId( - "receiving_depository_financial_institution_id" - ) + .originatingDepositoryFinancialInstitutionName("WELLS FARGO BANK") + .originatorCity("BERLIN") + .originatorCountry("DE") + .originatorIdentification("770510487A") + .originatorName("BERGHAIN") + .originatorPostalCode("50825") + .originatorStateOrProvince(null) + .originatorStreetAddress("Ruedersdorferstr. 7") + .paymentRelatedInformation(null) + .paymentRelatedInformation2(null) + .receiverCity("BEVERLY HILLS") + .receiverCountry("US") + .receiverIdentificationNumber("1018790279274") + .receiverPostalCode("90210") + .receiverStateOrProvince("CA") + .receiverStreetAddress("123 FAKE ST") + .receivingCompanyOrIndividualName("IAN CREASE") + .receivingDepositoryFinancialInstitutionCountry("US") + .receivingDepositoryFinancialInstitutionId("101050001") .receivingDepositoryFinancialInstitutionIdQualifier( InboundAchTransfer.InternationalAddenda .ReceivingDepositoryFinancialInstitutionIdQualifier .NATIONAL_CLEARING_SYSTEM_NUMBER ) .receivingDepositoryFinancialInstitutionName( - "receiving_depository_financial_institution_name" + "BLUE RIDGE BANK, NATIONAL ASSOCIATI" ) .build() ) 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 57a294a4c..ceea65faf 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 @@ -26,14 +26,14 @@ internal class RealTimePaymentsTransferListPageResponseTest { .amount(100L) .approval( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .cancellation( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -67,14 +67,12 @@ internal class RealTimePaymentsTransferListPageResponseTest { .pendingTransactionId(null) .rejection( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation( - "reject_reason_additional_information" - ) + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode .ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .remittanceInformation("Invoice 29582") @@ -108,14 +106,14 @@ internal class RealTimePaymentsTransferListPageResponseTest { .amount(100L) .approval( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .cancellation( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -149,13 +147,11 @@ internal class RealTimePaymentsTransferListPageResponseTest { .pendingTransactionId(null) .rejection( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation( - "reject_reason_additional_information" - ) + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode.ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .remittanceInformation("Invoice 29582") @@ -193,14 +189,14 @@ internal class RealTimePaymentsTransferListPageResponseTest { .amount(100L) .approval( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .cancellation( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -234,14 +230,12 @@ internal class RealTimePaymentsTransferListPageResponseTest { .pendingTransactionId(null) .rejection( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation( - "reject_reason_additional_information" - ) + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode .ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .remittanceInformation("Invoice 29582") 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 502cc4217..93596c505 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 @@ -24,14 +24,14 @@ internal class RealTimePaymentsTransferTest { .amount(100L) .approval( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .cancellation( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -65,11 +65,11 @@ internal class RealTimePaymentsTransferTest { .pendingTransactionId(null) .rejection( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation("reject_reason_additional_information") + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode.ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .remittanceInformation("Invoice 29582") @@ -100,15 +100,15 @@ internal class RealTimePaymentsTransferTest { assertThat(realTimePaymentsTransfer.approval()) .contains( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) assertThat(realTimePaymentsTransfer.cancellation()) .contains( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(realTimePaymentsTransfer.createdAt()) @@ -146,11 +146,11 @@ internal class RealTimePaymentsTransferTest { assertThat(realTimePaymentsTransfer.rejection()) .contains( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation("reject_reason_additional_information") + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode.ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) assertThat(realTimePaymentsTransfer.remittanceInformation()).isEqualTo("Invoice 29582") @@ -188,14 +188,14 @@ internal class RealTimePaymentsTransferTest { .amount(100L) .approval( RealTimePaymentsTransfer.Approval.builder() - .approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .approvedBy("approved_by") + .approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .approvedBy(null) .build() ) .cancellation( RealTimePaymentsTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -229,11 +229,11 @@ internal class RealTimePaymentsTransferTest { .pendingTransactionId(null) .rejection( RealTimePaymentsTransfer.Rejection.builder() - .rejectReasonAdditionalInformation("reject_reason_additional_information") + .rejectReasonAdditionalInformation(null) .rejectReasonCode( RealTimePaymentsTransfer.Rejection.RejectReasonCode.ACCOUNT_CLOSED ) - .rejectedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .remittanceInformation("Invoice 29582") 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 61b5ce8e5..895289406 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 @@ -19,13 +19,13 @@ internal class CardAuthorizationCreateResponseTest { CardAuthorizationCreateResponse.builder() .declinedTransaction( DeclinedTransaction.builder() - .id("id") - .accountId("account_id") - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(DeclinedTransaction.Currency.CAD) - .description("description") - .routeId("route_id") + .id("declined_transaction_17jbn0yyhvkt4v4ooym8") + .accountId("account_in71c4amph0vgo2qllky") + .amount(1750L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(DeclinedTransaction.Currency.USD) + .description("INVOICE 2468") + .routeId("account_number_v18nkfqm6afpsrvy82b2") .routeType(DeclinedTransaction.RouteType.ACCOUNT_NUMBER) .source( DeclinedTransaction.Source.builder() @@ -710,13 +710,13 @@ internal class CardAuthorizationCreateResponseTest { assertThat(cardAuthorizationCreateResponse.declinedTransaction()) .contains( DeclinedTransaction.builder() - .id("id") - .accountId("account_id") - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(DeclinedTransaction.Currency.CAD) - .description("description") - .routeId("route_id") + .id("declined_transaction_17jbn0yyhvkt4v4ooym8") + .accountId("account_in71c4amph0vgo2qllky") + .amount(1750L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(DeclinedTransaction.Currency.USD) + .description("INVOICE 2468") + .routeId("account_number_v18nkfqm6afpsrvy82b2") .routeType(DeclinedTransaction.RouteType.ACCOUNT_NUMBER) .source( DeclinedTransaction.Source.builder() @@ -1381,13 +1381,13 @@ internal class CardAuthorizationCreateResponseTest { CardAuthorizationCreateResponse.builder() .declinedTransaction( DeclinedTransaction.builder() - .id("id") - .accountId("account_id") - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .currency(DeclinedTransaction.Currency.CAD) - .description("description") - .routeId("route_id") + .id("declined_transaction_17jbn0yyhvkt4v4ooym8") + .accountId("account_in71c4amph0vgo2qllky") + .amount(1750L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .currency(DeclinedTransaction.Currency.USD) + .description("INVOICE 2468") + .routeId("account_number_v18nkfqm6afpsrvy82b2") .routeType(DeclinedTransaction.RouteType.ACCOUNT_NUMBER) .source( DeclinedTransaction.Source.builder() 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 a4f6a258b..b66ceec24 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 @@ -124,10 +124,10 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( Transaction.Source.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -388,11 +388,11 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( Transaction.Source.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) @@ -1021,9 +1021,9 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardRefund.Cashback.Currency.CAD + Transaction.Source.CardRefund.Cashback.Currency.USD ) .build() ) @@ -1271,10 +1271,10 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( Transaction.Source.CardSettlement.Cashback.Currency - .CAD + .USD ) .build() ) @@ -1885,10 +1885,10 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( Transaction.Source.CardRefund.Cashback.Currency - .CAD + .USD ) .build() ) @@ -2149,11 +2149,11 @@ internal class TransactionListPageResponseTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( Transaction.Source.CardSettlement.Cashback .Currency - .CAD + .USD ) .build() ) 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 8a4536fb5..c274b4a43 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 @@ -111,9 +111,9 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardRefund.Cashback.Currency.CAD + Transaction.Source.CardRefund.Cashback.Currency.USD ) .build() ) @@ -348,9 +348,9 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardSettlement.Cashback.Currency.CAD + Transaction.Source.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -919,8 +919,8 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") - .currency(Transaction.Source.CardRefund.Cashback.Currency.CAD) + .amount("0.137465") + .currency(Transaction.Source.CardRefund.Cashback.Currency.USD) .build() ) .currency(Transaction.Source.CardRefund.Currency.USD) @@ -1141,9 +1141,9 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardSettlement.Cashback.Currency.CAD + Transaction.Source.CardSettlement.Cashback.Currency.USD ) .build() ) @@ -1690,9 +1690,9 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardRefund.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardRefund.Cashback.Currency.CAD + Transaction.Source.CardRefund.Cashback.Currency.USD ) .build() ) @@ -1927,9 +1927,9 @@ internal class TransactionTest { .cardPaymentId("card_payment_nd3k2kacrqjli8482ave") .cashback( Transaction.Source.CardSettlement.Cashback.builder() - .amount("-16699") + .amount("0.137465") .currency( - Transaction.Source.CardSettlement.Cashback.Currency.CAD + Transaction.Source.CardSettlement.Cashback.Currency.USD ) .build() ) diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt index b49e84363..6cc652adf 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListPageResponseTest.kt @@ -33,8 +33,8 @@ internal class WireTransferListPageResponseTest { .beneficiaryName(null) .cancellation( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -88,22 +88,20 @@ internal class WireTransferListPageResponseTest { ) .reversal( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation( - "return_reason_additional_information" - ) - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) .routingNumber("101050001") @@ -111,8 +109,8 @@ internal class WireTransferListPageResponseTest { .status(WireTransfer.Status.COMPLETE) .submission( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .transactionId("transaction_uyrp7fld2ium70oa7oi") @@ -141,8 +139,8 @@ internal class WireTransferListPageResponseTest { .beneficiaryName(null) .cancellation( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -196,22 +194,20 @@ internal class WireTransferListPageResponseTest { ) .reversal( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation( - "return_reason_additional_information" - ) - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) .routingNumber("101050001") @@ -219,8 +215,8 @@ internal class WireTransferListPageResponseTest { .status(WireTransfer.Status.COMPLETE) .submission( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .transactionId("transaction_uyrp7fld2ium70oa7oi") @@ -253,8 +249,8 @@ internal class WireTransferListPageResponseTest { .beneficiaryName(null) .cancellation( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -308,22 +304,20 @@ internal class WireTransferListPageResponseTest { ) .reversal( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation( - "return_reason_additional_information" - ) - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) .routingNumber("101050001") @@ -331,8 +325,8 @@ internal class WireTransferListPageResponseTest { .status(WireTransfer.Status.COMPLETE) .submission( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .transactionId("transaction_uyrp7fld2ium70oa7oi") diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferTest.kt index 47a78cbe3..22002a893 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferTest.kt @@ -31,8 +31,8 @@ internal class WireTransferTest { .beneficiaryName(null) .cancellation( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -82,20 +82,20 @@ internal class WireTransferTest { ) .reversal( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation("return_reason_additional_information") - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) .routingNumber("101050001") @@ -103,8 +103,8 @@ internal class WireTransferTest { .status(WireTransfer.Status.COMPLETE) .submission( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .transactionId("transaction_uyrp7fld2ium70oa7oi") @@ -129,8 +129,8 @@ internal class WireTransferTest { assertThat(wireTransfer.cancellation()) .contains( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) assertThat(wireTransfer.createdAt()).isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -180,20 +180,20 @@ internal class WireTransferTest { assertThat(wireTransfer.reversal()) .contains( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation("return_reason_additional_information") - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) assertThat(wireTransfer.routingNumber()).isEqualTo("101050001") @@ -202,8 +202,8 @@ internal class WireTransferTest { assertThat(wireTransfer.submission()) .contains( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) assertThat(wireTransfer.transactionId()).contains("transaction_uyrp7fld2ium70oa7oi") @@ -231,8 +231,8 @@ internal class WireTransferTest { .beneficiaryName(null) .cancellation( WireTransfer.Cancellation.builder() - .canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .canceledBy("canceled_by") + .canceledAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .canceledBy(null) .build() ) .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) @@ -282,20 +282,20 @@ internal class WireTransferTest { ) .reversal( WireTransfer.Reversal.builder() - .amount(0L) - .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) - .debtorRoutingNumber("debtor_routing_number") - .description("description") - .inputCycleDate(LocalDate.parse("2019-12-27")) - .inputMessageAccountabilityData("input_message_accountability_data") - .inputSequenceNumber("input_sequence_number") - .inputSource("input_source") - .instructionIdentification("instruction_identification") - .returnReasonAdditionalInformation("return_reason_additional_information") - .returnReasonCode("return_reason_code") - .returnReasonCodeDescription("return_reason_code_description") - .transactionId("transaction_id") - .wireTransferId("wire_transfer_id") + .amount(12345L) + .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) + .debtorRoutingNumber("101050001") + .description("Inbound wire reversal 2022021100335128") + .inputCycleDate(LocalDate.parse("2022-02-11")) + .inputMessageAccountabilityData("20220211B6B7HU2R011023") + .inputSequenceNumber("11023") + .inputSource("B6B7HU2R") + .instructionIdentification(null) + .returnReasonAdditionalInformation(null) + .returnReasonCode(null) + .returnReasonCodeDescription(null) + .transactionId("transaction_uyrp7fld2ium70oa7oi") + .wireTransferId("wire_transfer_5akynk7dqsq25qwk9q2u") .build() ) .routingNumber("101050001") @@ -303,8 +303,8 @@ internal class WireTransferTest { .status(WireTransfer.Status.COMPLETE) .submission( WireTransfer.Submission.builder() - .inputMessageAccountabilityData("input_message_accountability_data") - .submittedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .inputMessageAccountabilityData("20220118MMQFMP0P000002") + .submittedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z")) .build() ) .transactionId("transaction_uyrp7fld2ium70oa7oi") From 6e1b0499ac786a3b1a04c707b64a2cfd5ecb2aa2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:27:22 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 +- .../api/models/cardpayments/CardPayment.kt | 283 +++++++++++++++++- .../api/models/transactions/Transaction.kt | 283 +++++++++++++++++- .../CardPaymentListPageResponseTest.kt | 80 +++++ .../models/cardpayments/CardPaymentTest.kt | 72 +++++ .../TransactionListPageResponseTest.kt | 18 ++ .../models/transactions/TransactionTest.kt | 18 ++ 7 files changed, 754 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index e5dc4c9fa..86d1fe70d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d0d6147287983a83fc0ad164f706c3cdc48a13e223fd601aa954bbf0bbc402ed.yml -openapi_spec_hash: a3ccd1aa9bc5d03e6660b535d25401b1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-884e347f765b181f0f15f821b0c5786f51d532aae1077294aedf3fff0d6f9b22.yml +openapi_spec_hash: 119e76f07825b0975b385de037fe8d96 config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt index 41e75f825..8fafb0ece 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpayments/CardPayment.kt @@ -38667,6 +38667,7 @@ private constructor( private val presentmentAmount: JsonField, private val presentmentCurrency: JsonField, private val purchaseDetails: JsonField, + private val surcharge: JsonField, private val transactionId: JsonField, private val type: JsonField, private val additionalProperties: MutableMap, @@ -38730,6 +38731,9 @@ private constructor( @JsonProperty("purchase_details") @ExcludeMissing purchaseDetails: JsonField = JsonMissing.of(), + @JsonProperty("surcharge") + @ExcludeMissing + surcharge: JsonField = JsonMissing.of(), @JsonProperty("transaction_id") @ExcludeMissing transactionId: JsonField = JsonMissing.of(), @@ -38755,6 +38759,7 @@ private constructor( presentmentAmount, presentmentCurrency, purchaseDetails, + surcharge, transactionId, type, mutableMapOf(), @@ -38946,6 +38951,16 @@ private constructor( fun purchaseDetails(): Optional = purchaseDetails.getOptional("purchase_details") + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the surcharge + * is deducted from the overall transaction amount (discount). + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun surcharge(): Optional = surcharge.getOptional("surcharge") + /** * The identifier of the Transaction associated with this Transaction. * @@ -39156,6 +39171,16 @@ private constructor( @ExcludeMissing fun _purchaseDetails(): JsonField = purchaseDetails + /** + * Returns the raw JSON value of [surcharge]. + * + * Unlike [surcharge], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("surcharge") + @ExcludeMissing + fun _surcharge(): JsonField = surcharge + /** * Returns the raw JSON value of [transactionId]. * @@ -39212,6 +39237,7 @@ private constructor( * .presentmentAmount() * .presentmentCurrency() * .purchaseDetails() + * .surcharge() * .transactionId() * .type() * ``` @@ -39242,6 +39268,7 @@ private constructor( private var presentmentAmount: JsonField? = null private var presentmentCurrency: JsonField? = null private var purchaseDetails: JsonField? = null + private var surcharge: JsonField? = null private var transactionId: JsonField? = null private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -39268,6 +39295,7 @@ private constructor( presentmentAmount = cardSettlement.presentmentAmount presentmentCurrency = cardSettlement.presentmentCurrency purchaseDetails = cardSettlement.purchaseDetails + surcharge = cardSettlement.surcharge transactionId = cardSettlement.transactionId type = cardSettlement.type additionalProperties = cardSettlement.additionalProperties.toMutableMap() @@ -39617,6 +39645,27 @@ private constructor( this.purchaseDetails = purchaseDetails } + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the + * surcharge is deducted from the overall transaction amount (discount). + */ + fun surcharge(surcharge: Surcharge?) = surcharge(JsonField.ofNullable(surcharge)) + + /** Alias for calling [Builder.surcharge] with `surcharge.orElse(null)`. */ + fun surcharge(surcharge: Optional) = surcharge(surcharge.getOrNull()) + + /** + * Sets [Builder.surcharge] to an arbitrary JSON value. + * + * You should usually call [Builder.surcharge] with a well-typed [Surcharge] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun surcharge(surcharge: JsonField) = apply { + this.surcharge = surcharge + } + /** The identifier of the Transaction associated with this Transaction. */ fun transactionId(transactionId: String) = transactionId(JsonField.of(transactionId)) @@ -39696,6 +39745,7 @@ private constructor( * .presentmentAmount() * .presentmentCurrency() * .purchaseDetails() + * .surcharge() * .transactionId() * .type() * ``` @@ -39724,6 +39774,7 @@ private constructor( checkRequired("presentmentAmount", presentmentAmount), checkRequired("presentmentCurrency", presentmentCurrency), checkRequired("purchaseDetails", purchaseDetails), + checkRequired("surcharge", surcharge), checkRequired("transactionId", transactionId), checkRequired("type", type), additionalProperties.toMutableMap(), @@ -39757,6 +39808,7 @@ private constructor( presentmentAmount() presentmentCurrency() purchaseDetails().ifPresent { it.validate() } + surcharge().ifPresent { it.validate() } transactionId() type().validate() validated = true @@ -39798,6 +39850,7 @@ private constructor( (if (presentmentAmount.asKnown().isPresent) 1 else 0) + (if (presentmentCurrency.asKnown().isPresent) 1 else 0) + (purchaseDetails.asKnown().getOrNull()?.validity() ?: 0) + + (surcharge.asKnown().getOrNull()?.validity() ?: 0) + (if (transactionId.asKnown().isPresent) 1 else 0) + (type.asKnown().getOrNull()?.validity() ?: 0) @@ -48241,6 +48294,232 @@ private constructor( "PurchaseDetails{carRental=$carRental, customerReferenceIdentifier=$customerReferenceIdentifier, localTaxAmount=$localTaxAmount, localTaxCurrency=$localTaxCurrency, lodging=$lodging, nationalTaxAmount=$nationalTaxAmount, nationalTaxCurrency=$nationalTaxCurrency, purchaseIdentifier=$purchaseIdentifier, purchaseIdentifierFormat=$purchaseIdentifierFormat, travel=$travel, additionalProperties=$additionalProperties}" } + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the surcharge + * is deducted from the overall transaction amount (discount). + */ + class Surcharge + private constructor( + private val amount: JsonField, + private val presentmentAmount: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("amount") + @ExcludeMissing + amount: JsonField = JsonMissing.of(), + @JsonProperty("presentment_amount") + @ExcludeMissing + presentmentAmount: JsonField = JsonMissing.of(), + ) : this(amount, presentmentAmount, mutableMapOf()) + + /** + * The surcharge amount in the minor unit of the transaction's settlement currency. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun amount(): Long = amount.getRequired("amount") + + /** + * The surcharge amount in the minor unit of the transaction's presentment currency. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun presentmentAmount(): Long = presentmentAmount.getRequired("presentment_amount") + + /** + * 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 [presentmentAmount]. + * + * Unlike [presentmentAmount], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("presentment_amount") + @ExcludeMissing + fun _presentmentAmount(): JsonField = presentmentAmount + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [Surcharge]. + * + * The following fields are required: + * ```java + * .amount() + * .presentmentAmount() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Surcharge]. */ + class Builder internal constructor() { + + private var amount: JsonField? = null + private var presentmentAmount: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(surcharge: Surcharge) = apply { + amount = surcharge.amount + presentmentAmount = surcharge.presentmentAmount + additionalProperties = surcharge.additionalProperties.toMutableMap() + } + + /** + * The surcharge amount in the minor unit of the transaction's settlement + * currency. + */ + fun amount(amount: Long) = amount(JsonField.of(amount)) + + /** + * Sets [Builder.amount] to an arbitrary JSON value. + * + * You should usually call [Builder.amount] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun amount(amount: JsonField) = apply { this.amount = amount } + + /** + * The surcharge amount in the minor unit of the transaction's presentment + * currency. + */ + fun presentmentAmount(presentmentAmount: Long) = + presentmentAmount(JsonField.of(presentmentAmount)) + + /** + * Sets [Builder.presentmentAmount] to an arbitrary JSON value. + * + * You should usually call [Builder.presentmentAmount] with a well-typed [Long] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun presentmentAmount(presentmentAmount: JsonField) = apply { + this.presentmentAmount = presentmentAmount + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Surcharge]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .amount() + * .presentmentAmount() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): Surcharge = + Surcharge( + checkRequired("amount", amount), + checkRequired("presentmentAmount", presentmentAmount), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Surcharge = apply { + if (validated) { + return@apply + } + + amount() + presentmentAmount() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (amount.asKnown().isPresent) 1 else 0) + + (if (presentmentAmount.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Surcharge && + amount == other.amount && + presentmentAmount == other.presentmentAmount && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(amount, presentmentAmount, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Surcharge{amount=$amount, presentmentAmount=$presentmentAmount, additionalProperties=$additionalProperties}" + } + /** * A constant representing the object's type. For this resource it will always be * `card_settlement`. @@ -48395,6 +48674,7 @@ private constructor( presentmentAmount == other.presentmentAmount && presentmentCurrency == other.presentmentCurrency && purchaseDetails == other.purchaseDetails && + surcharge == other.surcharge && transactionId == other.transactionId && type == other.type && additionalProperties == other.additionalProperties @@ -48422,6 +48702,7 @@ private constructor( presentmentAmount, presentmentCurrency, purchaseDetails, + surcharge, transactionId, type, additionalProperties, @@ -48431,7 +48712,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CardSettlement{id=$id, amount=$amount, cardAuthorization=$cardAuthorization, cardPaymentId=$cardPaymentId, cashback=$cashback, currency=$currency, interchange=$interchange, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, presentmentAmount=$presentmentAmount, presentmentCurrency=$presentmentCurrency, purchaseDetails=$purchaseDetails, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}" + "CardSettlement{id=$id, amount=$amount, cardAuthorization=$cardAuthorization, cardPaymentId=$cardPaymentId, cashback=$cashback, currency=$currency, interchange=$interchange, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, presentmentAmount=$presentmentAmount, presentmentCurrency=$presentmentCurrency, purchaseDetails=$purchaseDetails, surcharge=$surcharge, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}" } /** 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 c19e76bc3..0ea925703 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 @@ -17986,6 +17986,7 @@ private constructor( private val presentmentAmount: JsonField, private val presentmentCurrency: JsonField, private val purchaseDetails: JsonField, + private val surcharge: JsonField, private val transactionId: JsonField, private val type: JsonField, private val additionalProperties: MutableMap, @@ -18049,6 +18050,9 @@ private constructor( @JsonProperty("purchase_details") @ExcludeMissing purchaseDetails: JsonField = JsonMissing.of(), + @JsonProperty("surcharge") + @ExcludeMissing + surcharge: JsonField = JsonMissing.of(), @JsonProperty("transaction_id") @ExcludeMissing transactionId: JsonField = JsonMissing.of(), @@ -18074,6 +18078,7 @@ private constructor( presentmentAmount, presentmentCurrency, purchaseDetails, + surcharge, transactionId, type, mutableMapOf(), @@ -18265,6 +18270,16 @@ private constructor( fun purchaseDetails(): Optional = purchaseDetails.getOptional("purchase_details") + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the surcharge + * is deducted from the overall transaction amount (discount). + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. + * if the server responded with an unexpected value). + */ + fun surcharge(): Optional = surcharge.getOptional("surcharge") + /** * The identifier of the Transaction associated with this Transaction. * @@ -18475,6 +18490,16 @@ private constructor( @ExcludeMissing fun _purchaseDetails(): JsonField = purchaseDetails + /** + * Returns the raw JSON value of [surcharge]. + * + * Unlike [surcharge], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("surcharge") + @ExcludeMissing + fun _surcharge(): JsonField = surcharge + /** * Returns the raw JSON value of [transactionId]. * @@ -18531,6 +18556,7 @@ private constructor( * .presentmentAmount() * .presentmentCurrency() * .purchaseDetails() + * .surcharge() * .transactionId() * .type() * ``` @@ -18561,6 +18587,7 @@ private constructor( private var presentmentAmount: JsonField? = null private var presentmentCurrency: JsonField? = null private var purchaseDetails: JsonField? = null + private var surcharge: JsonField? = null private var transactionId: JsonField? = null private var type: JsonField? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -18587,6 +18614,7 @@ private constructor( presentmentAmount = cardSettlement.presentmentAmount presentmentCurrency = cardSettlement.presentmentCurrency purchaseDetails = cardSettlement.purchaseDetails + surcharge = cardSettlement.surcharge transactionId = cardSettlement.transactionId type = cardSettlement.type additionalProperties = cardSettlement.additionalProperties.toMutableMap() @@ -18936,6 +18964,27 @@ private constructor( this.purchaseDetails = purchaseDetails } + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the + * surcharge is deducted from the overall transaction amount (discount). + */ + fun surcharge(surcharge: Surcharge?) = surcharge(JsonField.ofNullable(surcharge)) + + /** Alias for calling [Builder.surcharge] with `surcharge.orElse(null)`. */ + fun surcharge(surcharge: Optional) = surcharge(surcharge.getOrNull()) + + /** + * Sets [Builder.surcharge] to an arbitrary JSON value. + * + * You should usually call [Builder.surcharge] with a well-typed [Surcharge] value + * instead. This method is primarily for setting the field to an undocumented or not + * yet supported value. + */ + fun surcharge(surcharge: JsonField) = apply { + this.surcharge = surcharge + } + /** The identifier of the Transaction associated with this Transaction. */ fun transactionId(transactionId: String) = transactionId(JsonField.of(transactionId)) @@ -19015,6 +19064,7 @@ private constructor( * .presentmentAmount() * .presentmentCurrency() * .purchaseDetails() + * .surcharge() * .transactionId() * .type() * ``` @@ -19043,6 +19093,7 @@ private constructor( checkRequired("presentmentAmount", presentmentAmount), checkRequired("presentmentCurrency", presentmentCurrency), checkRequired("purchaseDetails", purchaseDetails), + checkRequired("surcharge", surcharge), checkRequired("transactionId", transactionId), checkRequired("type", type), additionalProperties.toMutableMap(), @@ -19076,6 +19127,7 @@ private constructor( presentmentAmount() presentmentCurrency() purchaseDetails().ifPresent { it.validate() } + surcharge().ifPresent { it.validate() } transactionId() type().validate() validated = true @@ -19117,6 +19169,7 @@ private constructor( (if (presentmentAmount.asKnown().isPresent) 1 else 0) + (if (presentmentCurrency.asKnown().isPresent) 1 else 0) + (purchaseDetails.asKnown().getOrNull()?.validity() ?: 0) + + (surcharge.asKnown().getOrNull()?.validity() ?: 0) + (if (transactionId.asKnown().isPresent) 1 else 0) + (type.asKnown().getOrNull()?.validity() ?: 0) @@ -27560,6 +27613,232 @@ private constructor( "PurchaseDetails{carRental=$carRental, customerReferenceIdentifier=$customerReferenceIdentifier, localTaxAmount=$localTaxAmount, localTaxCurrency=$localTaxCurrency, lodging=$lodging, nationalTaxAmount=$nationalTaxAmount, nationalTaxCurrency=$nationalTaxCurrency, purchaseIdentifier=$purchaseIdentifier, purchaseIdentifierFormat=$purchaseIdentifierFormat, travel=$travel, additionalProperties=$additionalProperties}" } + /** + * Surcharge amount details, if applicable. The amounts positive if the surcharge is + * added to to the overall transaction amount (surcharge), and negative if the surcharge + * is deducted from the overall transaction amount (discount). + */ + class Surcharge + private constructor( + private val amount: JsonField, + private val presentmentAmount: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("amount") + @ExcludeMissing + amount: JsonField = JsonMissing.of(), + @JsonProperty("presentment_amount") + @ExcludeMissing + presentmentAmount: JsonField = JsonMissing.of(), + ) : this(amount, presentmentAmount, mutableMapOf()) + + /** + * The surcharge amount in the minor unit of the transaction's settlement currency. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun amount(): Long = amount.getRequired("amount") + + /** + * The surcharge amount in the minor unit of the transaction's presentment currency. + * + * @throws IncreaseInvalidDataException if the JSON field has an unexpected type or + * is unexpectedly missing or null (e.g. if the server responded with an + * unexpected value). + */ + fun presentmentAmount(): Long = presentmentAmount.getRequired("presentment_amount") + + /** + * 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 [presentmentAmount]. + * + * Unlike [presentmentAmount], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("presentment_amount") + @ExcludeMissing + fun _presentmentAmount(): JsonField = presentmentAmount + + @JsonAnySetter + private fun putAdditionalProperty(key: String, value: JsonValue) { + additionalProperties.put(key, value) + } + + @JsonAnyGetter + @ExcludeMissing + fun _additionalProperties(): Map = + Collections.unmodifiableMap(additionalProperties) + + fun toBuilder() = Builder().from(this) + + companion object { + + /** + * Returns a mutable builder for constructing an instance of [Surcharge]. + * + * The following fields are required: + * ```java + * .amount() + * .presentmentAmount() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Surcharge]. */ + class Builder internal constructor() { + + private var amount: JsonField? = null + private var presentmentAmount: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from(surcharge: Surcharge) = apply { + amount = surcharge.amount + presentmentAmount = surcharge.presentmentAmount + additionalProperties = surcharge.additionalProperties.toMutableMap() + } + + /** + * The surcharge amount in the minor unit of the transaction's settlement + * currency. + */ + fun amount(amount: Long) = amount(JsonField.of(amount)) + + /** + * Sets [Builder.amount] to an arbitrary JSON value. + * + * You should usually call [Builder.amount] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun amount(amount: JsonField) = apply { this.amount = amount } + + /** + * The surcharge amount in the minor unit of the transaction's presentment + * currency. + */ + fun presentmentAmount(presentmentAmount: Long) = + presentmentAmount(JsonField.of(presentmentAmount)) + + /** + * Sets [Builder.presentmentAmount] to an arbitrary JSON value. + * + * You should usually call [Builder.presentmentAmount] with a well-typed [Long] + * value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun presentmentAmount(presentmentAmount: JsonField) = apply { + this.presentmentAmount = presentmentAmount + } + + fun additionalProperties(additionalProperties: Map) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: JsonValue) = apply { + additionalProperties.put(key, value) + } + + fun putAllAdditionalProperties(additionalProperties: Map) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun removeAdditionalProperty(key: String) = apply { + additionalProperties.remove(key) + } + + fun removeAllAdditionalProperties(keys: Set) = apply { + keys.forEach(::removeAdditionalProperty) + } + + /** + * Returns an immutable instance of [Surcharge]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .amount() + * .presentmentAmount() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): Surcharge = + Surcharge( + checkRequired("amount", amount), + checkRequired("presentmentAmount", presentmentAmount), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): Surcharge = apply { + if (validated) { + return@apply + } + + amount() + presentmentAmount() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: IncreaseInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic + internal fun validity(): Int = + (if (amount.asKnown().isPresent) 1 else 0) + + (if (presentmentAmount.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Surcharge && + amount == other.amount && + presentmentAmount == other.presentmentAmount && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(amount, presentmentAmount, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "Surcharge{amount=$amount, presentmentAmount=$presentmentAmount, additionalProperties=$additionalProperties}" + } + /** * A constant representing the object's type. For this resource it will always be * `card_settlement`. @@ -27714,6 +27993,7 @@ private constructor( presentmentAmount == other.presentmentAmount && presentmentCurrency == other.presentmentCurrency && purchaseDetails == other.purchaseDetails && + surcharge == other.surcharge && transactionId == other.transactionId && type == other.type && additionalProperties == other.additionalProperties @@ -27741,6 +28021,7 @@ private constructor( presentmentAmount, presentmentCurrency, purchaseDetails, + surcharge, transactionId, type, additionalProperties, @@ -27750,7 +28031,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CardSettlement{id=$id, amount=$amount, cardAuthorization=$cardAuthorization, cardPaymentId=$cardPaymentId, cashback=$cashback, currency=$currency, interchange=$interchange, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, presentmentAmount=$presentmentAmount, presentmentCurrency=$presentmentCurrency, purchaseDetails=$purchaseDetails, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}" + "CardSettlement{id=$id, amount=$amount, cardAuthorization=$cardAuthorization, cardPaymentId=$cardPaymentId, cashback=$cashback, currency=$currency, interchange=$interchange, merchantAcceptorId=$merchantAcceptorId, merchantCategoryCode=$merchantCategoryCode, merchantCity=$merchantCity, merchantCountry=$merchantCountry, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, network=$network, networkIdentifiers=$networkIdentifiers, pendingTransactionId=$pendingTransactionId, presentmentAmount=$presentmentAmount, presentmentCurrency=$presentmentCurrency, purchaseDetails=$purchaseDetails, surcharge=$surcharge, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}" } /** diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt index e32345aa8..0cbe42bb0 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentListPageResponseTest.kt @@ -1272,6 +1272,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -2723,6 +2730,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -4174,6 +4188,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -5625,6 +5646,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -7037,6 +7065,12 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT @@ -8415,6 +8449,12 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT @@ -9793,6 +9833,12 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT @@ -11171,6 +11217,12 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT @@ -12648,6 +12700,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -14099,6 +14158,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -15550,6 +15616,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type @@ -17001,6 +17074,13 @@ internal class CardPaymentListPageResponseTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge + .builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( CardPayment.Element.CardSettlement.Type diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt index 71c08a803..7622f6a45 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardpayments/CardPaymentTest.kt @@ -1125,6 +1125,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -2408,6 +2414,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -3691,6 +3703,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -4974,6 +4992,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -6161,6 +6185,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -7310,6 +7340,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -8459,6 +8495,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -9608,6 +9650,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -10902,6 +10950,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -12185,6 +12239,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -13468,6 +13528,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -14751,6 +14817,12 @@ internal class CardPaymentTest { ) .build() ) + .surcharge( + CardPayment.Element.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(CardPayment.Element.CardSettlement.Type.CARD_SETTLEMENT) .build() 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 b66ceec24..651b43a3b 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 @@ -636,6 +636,12 @@ internal class TransactionListPageResponseTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT @@ -1506,6 +1512,12 @@ internal class TransactionListPageResponseTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -2397,6 +2409,12 @@ internal class TransactionListPageResponseTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type( Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT 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 c274b4a43..879b5117d 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 @@ -579,6 +579,12 @@ internal class TransactionTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -1351,6 +1357,12 @@ internal class TransactionTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT) .build() @@ -2158,6 +2170,12 @@ internal class TransactionTest { ) .build() ) + .surcharge( + Transaction.Source.CardSettlement.Surcharge.builder() + .amount(0L) + .presentmentAmount(0L) + .build() + ) .transactionId("transaction_uyrp7fld2ium70oa7oi") .type(Transaction.Source.CardSettlement.Type.CARD_SETTLEMENT) .build() From 39df5ddec7addc9d44fa23925681523adedf6cc8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:27:49 +0000 Subject: [PATCH 3/3] release: 0.333.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e4f54275b..4e9c70e85 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.332.0" + ".": "0.333.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cf42cec1..5f09c8068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.333.0 (2025-09-22) + +Full Changelog: [v0.332.0...v0.333.0](https://github.com/Increase/increase-java/compare/v0.332.0...v0.333.0) + +### Features + +* **api:** api update ([6e1b049](https://github.com/Increase/increase-java/commit/6e1b0499ac786a3b1a04c707b64a2cfd5ecb2aa2)) + + +### Chores + +* improve example values ([ecd9f3c](https://github.com/Increase/increase-java/commit/ecd9f3cbc291cd92a8a54016a7f93fdfd188e080)) + ## 0.332.0 (2025-09-19) Full Changelog: [v0.331.0...v0.332.0](https://github.com/Increase/increase-java/compare/v0.331.0...v0.332.0) diff --git a/README.md b/README.md index a2f025fef..7d0b75ffd 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.332.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.332.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.332.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.333.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.333.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.333.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.332.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.333.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.332.0") +implementation("com.increase.api:increase-java:0.333.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.332.0") com.increase.api increase-java - 0.332.0 + 0.333.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index d2274a3a5..5df051c69 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.332.0" // x-release-please-version + version = "0.333.0" // x-release-please-version } subprojects {