// File generated from our OpenAPI spec by Stainless.

package com.increase.api.models.simulations.cardauthorizations

import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
import com.increase.api.core.JsonValue
import com.increase.api.core.jsonMapper
import com.increase.api.models.declinedtransactions.DeclinedTransaction
import com.increase.api.models.pendingtransactions.PendingTransaction
import java.time.OffsetDateTime
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

internal class CardAuthorizationCreateResponseTest {

    @Test
    fun create() {
        val cardAuthorizationCreateResponse =
            CardAuthorizationCreateResponse.builder()
                .declinedTransaction(
                    DeclinedTransaction.builder()
                        .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()
                                .category(DeclinedTransaction.Source.Category.ACH_DECLINE)
                                .achDecline(
                                    DeclinedTransaction.Source.AchDecline.builder()
                                        .id("ach_decline_72v1mcwxudctq56efipa")
                                        .amount(1750L)
                                        .inboundAchTransferId(
                                            "inbound_ach_transfer_tdrwqr3fq9gnnq49odev"
                                        )
                                        .originatorCompanyDescriptiveDate(null)
                                        .originatorCompanyDiscretionaryData(null)
                                        .originatorCompanyId("0987654321")
                                        .originatorCompanyName("BIG BANK")
                                        .reason(
                                            DeclinedTransaction.Source.AchDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .receiverIdNumber("12345678900")
                                        .receiverName("IAN CREASE")
                                        .traceNumber("021000038461022")
                                        .type(
                                            DeclinedTransaction.Source.AchDecline.Type.ACH_DECLINE
                                        )
                                        .build()
                                )
                                .cardDecline(
                                    DeclinedTransaction.Source.CardDecline.builder()
                                        .id("card_decline_bx3o8zd7glq8yvtwg25v")
                                        .actioner(
                                            DeclinedTransaction.Source.CardDecline.Actioner.INCREASE
                                        )
                                        .additionalAmounts(
                                            DeclinedTransaction.Source.CardDecline.AdditionalAmounts
                                                .builder()
                                                .clinic(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Clinic
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .dental(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Dental
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .original(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Original
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .prescription(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Prescription
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .surcharge(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Surcharge
                                                        .builder()
                                                        .amount(10L)
                                                        .currency("USD")
                                                        .build()
                                                )
                                                .totalCumulative(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .TotalCumulative
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .totalHealthcare(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .TotalHealthcare
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .transit(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Transit
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .unknown(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Unknown
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .vision(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Vision
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .amount(-1000L)
                                        .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                        .currency(
                                            DeclinedTransaction.Source.CardDecline.Currency.USD
                                        )
                                        .declinedTransactionId(
                                            "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                        )
                                        .digitalWalletTokenId(null)
                                        .direction(
                                            DeclinedTransaction.Source.CardDecline.Direction
                                                .SETTLEMENT
                                        )
                                        .incrementedCardAuthorizationId(null)
                                        .merchantAcceptorId("5665270011000168")
                                        .merchantCategoryCode("5734")
                                        .merchantCity("New York")
                                        .merchantCountry("US")
                                        .merchantDescriptor("AMAZON.COM")
                                        .merchantPostalCode("10045")
                                        .merchantState(null)
                                        .networkDetails(
                                            DeclinedTransaction.Source.CardDecline.NetworkDetails
                                                .builder()
                                                .category(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Category
                                                        .VISA
                                                )
                                                .pulse(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Pulse
                                                        .builder()
                                                        .build()
                                                )
                                                .visa(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Visa
                                                        .builder()
                                                        .electronicCommerceIndicator(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .ElectronicCommerceIndicator
                                                                .SECURE_ELECTRONIC_COMMERCE
                                                        )
                                                        .pointOfServiceEntryMode(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .PointOfServiceEntryMode
                                                                .MANUAL
                                                        )
                                                        .standInProcessingReason(null)
                                                        .terminalEntryCapability(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .TerminalEntryCapability
                                                                .MAGNETIC_STRIPE
                                                        )
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .networkIdentifiers(
                                            DeclinedTransaction.Source.CardDecline
                                                .NetworkIdentifiers
                                                .builder()
                                                .authorizationIdentificationResponse(null)
                                                .retrievalReferenceNumber("785867080153")
                                                .traceNumber("487941")
                                                .transactionId("627199945183184")
                                                .build()
                                        )
                                        .networkRiskScore(10L)
                                        .physicalCardId(null)
                                        .presentmentAmount(-1000L)
                                        .presentmentCurrency("USD")
                                        .processingCategory(
                                            DeclinedTransaction.Source.CardDecline
                                                .ProcessingCategory
                                                .PURCHASE
                                        )
                                        .realTimeDecisionId(null)
                                        .realTimeDecisionReason(null)
                                        .reason(
                                            DeclinedTransaction.Source.CardDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .addSchemeFee(
                                            DeclinedTransaction.Source.CardDecline.SchemeFee
                                                .builder()
                                                .amount("0.137465")
                                                .createdAt(
                                                    OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                                )
                                                .currency(
                                                    DeclinedTransaction.Source.CardDecline.SchemeFee
                                                        .Currency
                                                        .USD
                                                )
                                                .feeType(
                                                    DeclinedTransaction.Source.CardDecline.SchemeFee
                                                        .FeeType
                                                        .VISA_CORPORATE_ACCEPTANCE_FEE
                                                )
                                                .fixedComponent(null)
                                                .variableRate("0.0002")
                                                .build()
                                        )
                                        .terminalId("RCN5VNXS")
                                        .verification(
                                            DeclinedTransaction.Source.CardDecline.Verification
                                                .builder()
                                                .cardVerificationCode(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardVerificationCode
                                                        .builder()
                                                        .result(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .Verification
                                                                .CardVerificationCode
                                                                .Result
                                                                .MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderAddress(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardholderAddress
                                                        .builder()
                                                        .actualLine1("33 Liberty Street")
                                                        .actualPostalCode("94131")
                                                        .providedLine1("33 Liberty Street")
                                                        .providedPostalCode("94132")
                                                        .result(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .Verification
                                                                .CardholderAddress
                                                                .Result
                                                                .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderName(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardholderName
                                                        .builder()
                                                        .providedFirstName("provided_first_name")
                                                        .providedLastName("provided_last_name")
                                                        .providedMiddleName("provided_middle_name")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .build()
                                )
                                .checkDecline(
                                    DeclinedTransaction.Source.CheckDecline.builder()
                                        .amount(-1000L)
                                        .auxiliaryOnUs("99999")
                                        .backImageFileId(null)
                                        .checkTransferId("check_transfer_30b43acfu9vw8fyc4f5")
                                        .frontImageFileId(null)
                                        .inboundCheckDepositId(
                                            "inbound_check_deposit_zoshvqybq0cjjm31mra"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.CheckDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .build()
                                )
                                .checkDepositRejection(
                                    DeclinedTransaction.Source.CheckDepositRejection.builder()
                                        .amount(1750L)
                                        .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                        .currency(
                                            DeclinedTransaction.Source.CheckDepositRejection
                                                .Currency
                                                .USD
                                        )
                                        .declinedTransactionId(
                                            "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.CheckDepositRejection.Reason
                                                .INCOMPLETE_IMAGE
                                        )
                                        .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .build()
                                )
                                .inboundFednowTransferDecline(
                                    DeclinedTransaction.Source.InboundFednowTransferDecline
                                        .builder()
                                        .reason(
                                            DeclinedTransaction.Source.InboundFednowTransferDecline
                                                .Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .transferId("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20")
                                        .build()
                                )
                                .inboundRealTimePaymentsTransferDecline(
                                    DeclinedTransaction.Source
                                        .InboundRealTimePaymentsTransferDecline
                                        .builder()
                                        .amount(100L)
                                        .creditorName("Ian Crease")
                                        .currency(
                                            DeclinedTransaction.Source
                                                .InboundRealTimePaymentsTransferDecline
                                                .Currency
                                                .USD
                                        )
                                        .debtorAccountNumber("987654321")
                                        .debtorName("National Phonograph Company")
                                        .debtorRoutingNumber("101050001")
                                        .reason(
                                            DeclinedTransaction.Source
                                                .InboundRealTimePaymentsTransferDecline
                                                .Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .transactionIdentification(
                                            "20220501234567891T1BSLZO01745013025"
                                        )
                                        .transferId(
                                            "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr"
                                        )
                                        .unstructuredRemittanceInformation("Invoice 29582")
                                        .build()
                                )
                                .other(DeclinedTransaction.Source.Other.builder().build())
                                .wireDecline(
                                    DeclinedTransaction.Source.WireDecline.builder()
                                        .inboundWireTransferId(
                                            "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.WireDecline.Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .build()
                                )
                                .build()
                        )
                        .type(DeclinedTransaction.Type.DECLINED_TRANSACTION)
                        .build()
                )
                .pendingTransaction(
                    PendingTransaction.builder()
                        .id("pending_transaction_k1sfetcau2qbvjbzgju4")
                        .accountId("account_in71c4amph0vgo2qllky")
                        .amount(100L)
                        .completedAt(null)
                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                        .currency(PendingTransaction.Currency.USD)
                        .description("INVOICE 2468")
                        .heldAmount(100L)
                        .routeId("card_oubs0hwk5rn6knuecxg2")
                        .routeType(PendingTransaction.RouteType.CARD)
                        .source(
                            PendingTransaction.Source.builder()
                                .category(PendingTransaction.Source.Category.CARD_AUTHORIZATION)
                                .accountTransferInstruction(
                                    PendingTransaction.Source.AccountTransferInstruction.builder()
                                        .amount(100L)
                                        .currency(
                                            PendingTransaction.Source.AccountTransferInstruction
                                                .Currency
                                                .USD
                                        )
                                        .transferId("account_transfer_7k9qe1ysdgqztnt63l7n")
                                        .build()
                                )
                                .achTransferInstruction(
                                    PendingTransaction.Source.AchTransferInstruction.builder()
                                        .amount(100L)
                                        .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q")
                                        .build()
                                )
                                .blockchainOfframpTransfer(
                                    PendingTransaction.Source.BlockchainOfframpTransfer.builder()
                                        .id("blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m")
                                        .token(
                                            PendingTransaction.Source.BlockchainOfframpTransfer
                                                .Token
                                                .USDC
                                        )
                                        .amount(10000L)
                                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .destinationAccountId("account_in71c4amph0vgo2qllky")
                                        .initiatingTransactionHash(
                                            "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a"
                                        )
                                        .sourceBlockchainAddressId(
                                            "blockchain_address_tijjpqp9t5d358ehydqi"
                                        )
                                        .status(
                                            PendingTransaction.Source.BlockchainOfframpTransfer
                                                .Status
                                                .SETTLED
                                        )
                                        .transactionId("transaction_uyrp7fld2ium70oa7oi")
                                        .type(
                                            PendingTransaction.Source.BlockchainOfframpTransfer.Type
                                                .BLOCKCHAIN_OFFRAMP_TRANSFER
                                        )
                                        .build()
                                )
                                .blockchainOnrampTransferInstruction(
                                    PendingTransaction.Source.BlockchainOnrampTransferInstruction
                                        .builder()
                                        .amount(10000L)
                                        .destinationBlockchainAddress(
                                            "0x304a554a310C7e546dfe434669C62820b7D83490"
                                        )
                                        .transferId(
                                            "blockchain_onramp_transfer_sg8nzy569rk0dnfk28bv"
                                        )
                                        .build()
                                )
                                .cardAuthorization(
                                    PendingTransaction.Source.CardAuthorization.builder()
                                        .id("card_authorization_6iqxap6ivd0fo5eu3i8x")
                                        .actioner(
                                            PendingTransaction.Source.CardAuthorization.Actioner
                                                .INCREASE
                                        )
                                        .additionalAmounts(
                                            PendingTransaction.Source.CardAuthorization
                                                .AdditionalAmounts
                                                .builder()
                                                .clinic(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Clinic
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .dental(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Dental
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .original(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Original
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .prescription(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Prescription
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .surcharge(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Surcharge
                                                        .builder()
                                                        .amount(10L)
                                                        .currency("USD")
                                                        .build()
                                                )
                                                .totalCumulative(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .TotalCumulative
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .totalHealthcare(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .TotalHealthcare
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .transit(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Transit
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .unknown(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Unknown
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .vision(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Vision
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .amount(100L)
                                        .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                        .currency(
                                            PendingTransaction.Source.CardAuthorization.Currency.USD
                                        )
                                        .digitalWalletTokenId(null)
                                        .direction(
                                            PendingTransaction.Source.CardAuthorization.Direction
                                                .SETTLEMENT
                                        )
                                        .expiresAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .healthcare(
                                            PendingTransaction.Source.CardAuthorization.Healthcare
                                                .builder()
                                                .merchantNinetyPercentEligibility(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Healthcare
                                                        .MerchantNinetyPercentEligibility
                                                        .ELIGIBLE
                                                )
                                                .build()
                                        )
                                        .merchantAcceptorId("5665270011000168")
                                        .merchantCategoryCode("5734")
                                        .merchantCity("New York")
                                        .merchantCountry("US")
                                        .merchantDescriptor("AMAZON.COM")
                                        .merchantPostalCode("10045")
                                        .merchantState("NY")
                                        .networkDetails(
                                            PendingTransaction.Source.CardAuthorization
                                                .NetworkDetails
                                                .builder()
                                                .category(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Category
                                                        .VISA
                                                )
                                                .pulse(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Pulse
                                                        .builder()
                                                        .build()
                                                )
                                                .visa(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Visa
                                                        .builder()
                                                        .electronicCommerceIndicator(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .ElectronicCommerceIndicator
                                                                .SECURE_ELECTRONIC_COMMERCE
                                                        )
                                                        .pointOfServiceEntryMode(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .PointOfServiceEntryMode
                                                                .MANUAL
                                                        )
                                                        .standInProcessingReason(null)
                                                        .terminalEntryCapability(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .TerminalEntryCapability
                                                                .MAGNETIC_STRIPE
                                                        )
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .networkIdentifiers(
                                            PendingTransaction.Source.CardAuthorization
                                                .NetworkIdentifiers
                                                .builder()
                                                .authorizationIdentificationResponse(null)
                                                .retrievalReferenceNumber("785867080153")
                                                .traceNumber("487941")
                                                .transactionId("627199945183184")
                                                .build()
                                        )
                                        .networkRiskScore(10L)
                                        .pendingTransactionId(null)
                                        .physicalCardId(null)
                                        .presentmentAmount(100L)
                                        .presentmentCurrency("USD")
                                        .processingCategory(
                                            PendingTransaction.Source.CardAuthorization
                                                .ProcessingCategory
                                                .PURCHASE
                                        )
                                        .realTimeDecisionId(null)
                                        .addSchemeFee(
                                            PendingTransaction.Source.CardAuthorization.SchemeFee
                                                .builder()
                                                .amount("0.137465")
                                                .createdAt(
                                                    OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                                )
                                                .currency(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .SchemeFee
                                                        .Currency
                                                        .USD
                                                )
                                                .feeType(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .SchemeFee
                                                        .FeeType
                                                        .VISA_CORPORATE_ACCEPTANCE_FEE
                                                )
                                                .fixedComponent(null)
                                                .variableRate("0.0002")
                                                .build()
                                        )
                                        .terminalId("RCN5VNXS")
                                        .type(
                                            PendingTransaction.Source.CardAuthorization.Type
                                                .CARD_AUTHORIZATION
                                        )
                                        .verification(
                                            PendingTransaction.Source.CardAuthorization.Verification
                                                .builder()
                                                .cardVerificationCode(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardVerificationCode
                                                        .builder()
                                                        .result(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .Verification
                                                                .CardVerificationCode
                                                                .Result
                                                                .MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderAddress(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardholderAddress
                                                        .builder()
                                                        .actualLine1("33 Liberty Street")
                                                        .actualPostalCode("94131")
                                                        .providedLine1("33 Liberty Street")
                                                        .providedPostalCode("94132")
                                                        .result(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .Verification
                                                                .CardholderAddress
                                                                .Result
                                                                .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderName(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardholderName
                                                        .builder()
                                                        .providedFirstName("provided_first_name")
                                                        .providedLastName("provided_last_name")
                                                        .providedMiddleName("provided_middle_name")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .build()
                                )
                                .cardPushTransferInstruction(
                                    PendingTransaction.Source.CardPushTransferInstruction.builder()
                                        .amount(100L)
                                        .transferId(
                                            "outbound_card_push_transfer_e0z9rdpamraczh4tvwye"
                                        )
                                        .build()
                                )
                                .checkDepositInstruction(
                                    PendingTransaction.Source.CheckDepositInstruction.builder()
                                        .amount(100L)
                                        .backImageFileId("file_26khfk98mzfz90a11oqx")
                                        .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                        .currency(
                                            PendingTransaction.Source.CheckDepositInstruction
                                                .Currency
                                                .USD
                                        )
                                        .frontImageFileId("file_makxrc67oh9l6sg7w9yc")
                                        .build()
                                )
                                .checkTransferInstruction(
                                    PendingTransaction.Source.CheckTransferInstruction.builder()
                                        .amount(100L)
                                        .currency(
                                            PendingTransaction.Source.CheckTransferInstruction
                                                .Currency
                                                .USD
                                        )
                                        .transferId("check_transfer_30b43acfu9vw8fyc4f5")
                                        .build()
                                )
                                .fednowTransferInstruction(
                                    PendingTransaction.Source.FednowTransferInstruction.builder()
                                        .transferId("fednow_transfer_4i0mptrdu1mueg1196bg")
                                        .build()
                                )
                                .inboundFundsHold(
                                    PendingTransaction.Source.InboundFundsHold.builder()
                                        .amount(100L)
                                        .automaticallyReleasesAt(
                                            OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                        )
                                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .currency(
                                            PendingTransaction.Source.InboundFundsHold.Currency.USD
                                        )
                                        .heldTransactionId("transaction_uyrp7fld2ium70oa7oi")
                                        .pendingTransactionId(
                                            "pending_transaction_k1sfetcau2qbvjbzgju4"
                                        )
                                        .releasedAt(null)
                                        .status(
                                            PendingTransaction.Source.InboundFundsHold.Status.HELD
                                        )
                                        .type(
                                            PendingTransaction.Source.InboundFundsHold.Type
                                                .INBOUND_FUNDS_HOLD
                                        )
                                        .build()
                                )
                                .inboundWireTransferReversal(
                                    PendingTransaction.Source.InboundWireTransferReversal.builder()
                                        .inboundWireTransferId(
                                            "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                        )
                                        .build()
                                )
                                .other(PendingTransaction.Source.Other.builder().build())
                                .realTimePaymentsTransferInstruction(
                                    PendingTransaction.Source.RealTimePaymentsTransferInstruction
                                        .builder()
                                        .amount(100L)
                                        .transferId(
                                            "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq"
                                        )
                                        .build()
                                )
                                .swiftTransferInstruction(
                                    PendingTransaction.Source.SwiftTransferInstruction.builder()
                                        .transferId("swift_transfer_29h21xkng03788zwd3fh")
                                        .build()
                                )
                                .userInitiatedHold(
                                    PendingTransaction.Source.UserInitiatedHold.builder()
                                        .putAdditionalProperty("foo", JsonValue.from("bar"))
                                        .build()
                                )
                                .wireTransferInstruction(
                                    PendingTransaction.Source.WireTransferInstruction.builder()
                                        .accountNumber("987654321")
                                        .amount(100L)
                                        .messageToRecipient("HELLO")
                                        .routingNumber("101050001")
                                        .transferId("wire_transfer_5akynk7dqsq25qwk9q2u")
                                        .build()
                                )
                                .build()
                        )
                        .status(PendingTransaction.Status.PENDING)
                        .type(PendingTransaction.Type.PENDING_TRANSACTION)
                        .build()
                )
                .type(
                    CardAuthorizationCreateResponse.Type
                        .INBOUND_CARD_AUTHORIZATION_SIMULATION_RESULT
                )
                .build()

        assertThat(cardAuthorizationCreateResponse.declinedTransaction())
            .contains(
                DeclinedTransaction.builder()
                    .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()
                            .category(DeclinedTransaction.Source.Category.ACH_DECLINE)
                            .achDecline(
                                DeclinedTransaction.Source.AchDecline.builder()
                                    .id("ach_decline_72v1mcwxudctq56efipa")
                                    .amount(1750L)
                                    .inboundAchTransferId(
                                        "inbound_ach_transfer_tdrwqr3fq9gnnq49odev"
                                    )
                                    .originatorCompanyDescriptiveDate(null)
                                    .originatorCompanyDiscretionaryData(null)
                                    .originatorCompanyId("0987654321")
                                    .originatorCompanyName("BIG BANK")
                                    .reason(
                                        DeclinedTransaction.Source.AchDecline.Reason
                                            .INSUFFICIENT_FUNDS
                                    )
                                    .receiverIdNumber("12345678900")
                                    .receiverName("IAN CREASE")
                                    .traceNumber("021000038461022")
                                    .type(DeclinedTransaction.Source.AchDecline.Type.ACH_DECLINE)
                                    .build()
                            )
                            .cardDecline(
                                DeclinedTransaction.Source.CardDecline.builder()
                                    .id("card_decline_bx3o8zd7glq8yvtwg25v")
                                    .actioner(
                                        DeclinedTransaction.Source.CardDecline.Actioner.INCREASE
                                    )
                                    .additionalAmounts(
                                        DeclinedTransaction.Source.CardDecline.AdditionalAmounts
                                            .builder()
                                            .clinic(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Clinic
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .dental(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Dental
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .original(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Original
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .prescription(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Prescription
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .surcharge(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Surcharge
                                                    .builder()
                                                    .amount(10L)
                                                    .currency("USD")
                                                    .build()
                                            )
                                            .totalCumulative(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .TotalCumulative
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .totalHealthcare(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .TotalHealthcare
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .transit(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Transit
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .unknown(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Unknown
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .vision(
                                                DeclinedTransaction.Source.CardDecline
                                                    .AdditionalAmounts
                                                    .Vision
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .amount(-1000L)
                                    .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                    .currency(DeclinedTransaction.Source.CardDecline.Currency.USD)
                                    .declinedTransactionId(
                                        "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                    )
                                    .digitalWalletTokenId(null)
                                    .direction(
                                        DeclinedTransaction.Source.CardDecline.Direction.SETTLEMENT
                                    )
                                    .incrementedCardAuthorizationId(null)
                                    .merchantAcceptorId("5665270011000168")
                                    .merchantCategoryCode("5734")
                                    .merchantCity("New York")
                                    .merchantCountry("US")
                                    .merchantDescriptor("AMAZON.COM")
                                    .merchantPostalCode("10045")
                                    .merchantState(null)
                                    .networkDetails(
                                        DeclinedTransaction.Source.CardDecline.NetworkDetails
                                            .builder()
                                            .category(
                                                DeclinedTransaction.Source.CardDecline
                                                    .NetworkDetails
                                                    .Category
                                                    .VISA
                                            )
                                            .pulse(
                                                DeclinedTransaction.Source.CardDecline
                                                    .NetworkDetails
                                                    .Pulse
                                                    .builder()
                                                    .build()
                                            )
                                            .visa(
                                                DeclinedTransaction.Source.CardDecline
                                                    .NetworkDetails
                                                    .Visa
                                                    .builder()
                                                    .electronicCommerceIndicator(
                                                        DeclinedTransaction.Source.CardDecline
                                                            .NetworkDetails
                                                            .Visa
                                                            .ElectronicCommerceIndicator
                                                            .SECURE_ELECTRONIC_COMMERCE
                                                    )
                                                    .pointOfServiceEntryMode(
                                                        DeclinedTransaction.Source.CardDecline
                                                            .NetworkDetails
                                                            .Visa
                                                            .PointOfServiceEntryMode
                                                            .MANUAL
                                                    )
                                                    .standInProcessingReason(null)
                                                    .terminalEntryCapability(
                                                        DeclinedTransaction.Source.CardDecline
                                                            .NetworkDetails
                                                            .Visa
                                                            .TerminalEntryCapability
                                                            .MAGNETIC_STRIPE
                                                    )
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .networkIdentifiers(
                                        DeclinedTransaction.Source.CardDecline.NetworkIdentifiers
                                            .builder()
                                            .authorizationIdentificationResponse(null)
                                            .retrievalReferenceNumber("785867080153")
                                            .traceNumber("487941")
                                            .transactionId("627199945183184")
                                            .build()
                                    )
                                    .networkRiskScore(10L)
                                    .physicalCardId(null)
                                    .presentmentAmount(-1000L)
                                    .presentmentCurrency("USD")
                                    .processingCategory(
                                        DeclinedTransaction.Source.CardDecline.ProcessingCategory
                                            .PURCHASE
                                    )
                                    .realTimeDecisionId(null)
                                    .realTimeDecisionReason(null)
                                    .reason(
                                        DeclinedTransaction.Source.CardDecline.Reason
                                            .INSUFFICIENT_FUNDS
                                    )
                                    .addSchemeFee(
                                        DeclinedTransaction.Source.CardDecline.SchemeFee.builder()
                                            .amount("0.137465")
                                            .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                            .currency(
                                                DeclinedTransaction.Source.CardDecline.SchemeFee
                                                    .Currency
                                                    .USD
                                            )
                                            .feeType(
                                                DeclinedTransaction.Source.CardDecline.SchemeFee
                                                    .FeeType
                                                    .VISA_CORPORATE_ACCEPTANCE_FEE
                                            )
                                            .fixedComponent(null)
                                            .variableRate("0.0002")
                                            .build()
                                    )
                                    .terminalId("RCN5VNXS")
                                    .verification(
                                        DeclinedTransaction.Source.CardDecline.Verification
                                            .builder()
                                            .cardVerificationCode(
                                                DeclinedTransaction.Source.CardDecline.Verification
                                                    .CardVerificationCode
                                                    .builder()
                                                    .result(
                                                        DeclinedTransaction.Source.CardDecline
                                                            .Verification
                                                            .CardVerificationCode
                                                            .Result
                                                            .MATCH
                                                    )
                                                    .build()
                                            )
                                            .cardholderAddress(
                                                DeclinedTransaction.Source.CardDecline.Verification
                                                    .CardholderAddress
                                                    .builder()
                                                    .actualLine1("33 Liberty Street")
                                                    .actualPostalCode("94131")
                                                    .providedLine1("33 Liberty Street")
                                                    .providedPostalCode("94132")
                                                    .result(
                                                        DeclinedTransaction.Source.CardDecline
                                                            .Verification
                                                            .CardholderAddress
                                                            .Result
                                                            .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                    )
                                                    .build()
                                            )
                                            .cardholderName(
                                                DeclinedTransaction.Source.CardDecline.Verification
                                                    .CardholderName
                                                    .builder()
                                                    .providedFirstName("provided_first_name")
                                                    .providedLastName("provided_last_name")
                                                    .providedMiddleName("provided_middle_name")
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .build()
                            )
                            .checkDecline(
                                DeclinedTransaction.Source.CheckDecline.builder()
                                    .amount(-1000L)
                                    .auxiliaryOnUs("99999")
                                    .backImageFileId(null)
                                    .checkTransferId("check_transfer_30b43acfu9vw8fyc4f5")
                                    .frontImageFileId(null)
                                    .inboundCheckDepositId(
                                        "inbound_check_deposit_zoshvqybq0cjjm31mra"
                                    )
                                    .reason(
                                        DeclinedTransaction.Source.CheckDecline.Reason
                                            .INSUFFICIENT_FUNDS
                                    )
                                    .build()
                            )
                            .checkDepositRejection(
                                DeclinedTransaction.Source.CheckDepositRejection.builder()
                                    .amount(1750L)
                                    .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                    .currency(
                                        DeclinedTransaction.Source.CheckDepositRejection.Currency
                                            .USD
                                    )
                                    .declinedTransactionId(
                                        "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                    )
                                    .reason(
                                        DeclinedTransaction.Source.CheckDepositRejection.Reason
                                            .INCOMPLETE_IMAGE
                                    )
                                    .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                    .build()
                            )
                            .inboundFednowTransferDecline(
                                DeclinedTransaction.Source.InboundFednowTransferDecline.builder()
                                    .reason(
                                        DeclinedTransaction.Source.InboundFednowTransferDecline
                                            .Reason
                                            .ACCOUNT_NUMBER_DISABLED
                                    )
                                    .transferId("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20")
                                    .build()
                            )
                            .inboundRealTimePaymentsTransferDecline(
                                DeclinedTransaction.Source.InboundRealTimePaymentsTransferDecline
                                    .builder()
                                    .amount(100L)
                                    .creditorName("Ian Crease")
                                    .currency(
                                        DeclinedTransaction.Source
                                            .InboundRealTimePaymentsTransferDecline
                                            .Currency
                                            .USD
                                    )
                                    .debtorAccountNumber("987654321")
                                    .debtorName("National Phonograph Company")
                                    .debtorRoutingNumber("101050001")
                                    .reason(
                                        DeclinedTransaction.Source
                                            .InboundRealTimePaymentsTransferDecline
                                            .Reason
                                            .ACCOUNT_NUMBER_DISABLED
                                    )
                                    .transactionIdentification(
                                        "20220501234567891T1BSLZO01745013025"
                                    )
                                    .transferId(
                                        "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr"
                                    )
                                    .unstructuredRemittanceInformation("Invoice 29582")
                                    .build()
                            )
                            .other(DeclinedTransaction.Source.Other.builder().build())
                            .wireDecline(
                                DeclinedTransaction.Source.WireDecline.builder()
                                    .inboundWireTransferId(
                                        "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                    )
                                    .reason(
                                        DeclinedTransaction.Source.WireDecline.Reason
                                            .ACCOUNT_NUMBER_DISABLED
                                    )
                                    .build()
                            )
                            .build()
                    )
                    .type(DeclinedTransaction.Type.DECLINED_TRANSACTION)
                    .build()
            )
        assertThat(cardAuthorizationCreateResponse.pendingTransaction())
            .contains(
                PendingTransaction.builder()
                    .id("pending_transaction_k1sfetcau2qbvjbzgju4")
                    .accountId("account_in71c4amph0vgo2qllky")
                    .amount(100L)
                    .completedAt(null)
                    .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                    .currency(PendingTransaction.Currency.USD)
                    .description("INVOICE 2468")
                    .heldAmount(100L)
                    .routeId("card_oubs0hwk5rn6knuecxg2")
                    .routeType(PendingTransaction.RouteType.CARD)
                    .source(
                        PendingTransaction.Source.builder()
                            .category(PendingTransaction.Source.Category.CARD_AUTHORIZATION)
                            .accountTransferInstruction(
                                PendingTransaction.Source.AccountTransferInstruction.builder()
                                    .amount(100L)
                                    .currency(
                                        PendingTransaction.Source.AccountTransferInstruction
                                            .Currency
                                            .USD
                                    )
                                    .transferId("account_transfer_7k9qe1ysdgqztnt63l7n")
                                    .build()
                            )
                            .achTransferInstruction(
                                PendingTransaction.Source.AchTransferInstruction.builder()
                                    .amount(100L)
                                    .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q")
                                    .build()
                            )
                            .blockchainOfframpTransfer(
                                PendingTransaction.Source.BlockchainOfframpTransfer.builder()
                                    .id("blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m")
                                    .token(
                                        PendingTransaction.Source.BlockchainOfframpTransfer.Token
                                            .USDC
                                    )
                                    .amount(10000L)
                                    .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                    .destinationAccountId("account_in71c4amph0vgo2qllky")
                                    .initiatingTransactionHash(
                                        "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a"
                                    )
                                    .sourceBlockchainAddressId(
                                        "blockchain_address_tijjpqp9t5d358ehydqi"
                                    )
                                    .status(
                                        PendingTransaction.Source.BlockchainOfframpTransfer.Status
                                            .SETTLED
                                    )
                                    .transactionId("transaction_uyrp7fld2ium70oa7oi")
                                    .type(
                                        PendingTransaction.Source.BlockchainOfframpTransfer.Type
                                            .BLOCKCHAIN_OFFRAMP_TRANSFER
                                    )
                                    .build()
                            )
                            .blockchainOnrampTransferInstruction(
                                PendingTransaction.Source.BlockchainOnrampTransferInstruction
                                    .builder()
                                    .amount(10000L)
                                    .destinationBlockchainAddress(
                                        "0x304a554a310C7e546dfe434669C62820b7D83490"
                                    )
                                    .transferId("blockchain_onramp_transfer_sg8nzy569rk0dnfk28bv")
                                    .build()
                            )
                            .cardAuthorization(
                                PendingTransaction.Source.CardAuthorization.builder()
                                    .id("card_authorization_6iqxap6ivd0fo5eu3i8x")
                                    .actioner(
                                        PendingTransaction.Source.CardAuthorization.Actioner
                                            .INCREASE
                                    )
                                    .additionalAmounts(
                                        PendingTransaction.Source.CardAuthorization
                                            .AdditionalAmounts
                                            .builder()
                                            .clinic(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Clinic
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .dental(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Dental
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .original(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Original
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .prescription(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Prescription
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .surcharge(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Surcharge
                                                    .builder()
                                                    .amount(10L)
                                                    .currency("USD")
                                                    .build()
                                            )
                                            .totalCumulative(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .TotalCumulative
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .totalHealthcare(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .TotalHealthcare
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .transit(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Transit
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .unknown(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Unknown
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .vision(
                                                PendingTransaction.Source.CardAuthorization
                                                    .AdditionalAmounts
                                                    .Vision
                                                    .builder()
                                                    .amount(0L)
                                                    .currency("currency")
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .amount(100L)
                                    .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                    .currency(
                                        PendingTransaction.Source.CardAuthorization.Currency.USD
                                    )
                                    .digitalWalletTokenId(null)
                                    .direction(
                                        PendingTransaction.Source.CardAuthorization.Direction
                                            .SETTLEMENT
                                    )
                                    .expiresAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                    .healthcare(
                                        PendingTransaction.Source.CardAuthorization.Healthcare
                                            .builder()
                                            .merchantNinetyPercentEligibility(
                                                PendingTransaction.Source.CardAuthorization
                                                    .Healthcare
                                                    .MerchantNinetyPercentEligibility
                                                    .ELIGIBLE
                                            )
                                            .build()
                                    )
                                    .merchantAcceptorId("5665270011000168")
                                    .merchantCategoryCode("5734")
                                    .merchantCity("New York")
                                    .merchantCountry("US")
                                    .merchantDescriptor("AMAZON.COM")
                                    .merchantPostalCode("10045")
                                    .merchantState("NY")
                                    .networkDetails(
                                        PendingTransaction.Source.CardAuthorization.NetworkDetails
                                            .builder()
                                            .category(
                                                PendingTransaction.Source.CardAuthorization
                                                    .NetworkDetails
                                                    .Category
                                                    .VISA
                                            )
                                            .pulse(
                                                PendingTransaction.Source.CardAuthorization
                                                    .NetworkDetails
                                                    .Pulse
                                                    .builder()
                                                    .build()
                                            )
                                            .visa(
                                                PendingTransaction.Source.CardAuthorization
                                                    .NetworkDetails
                                                    .Visa
                                                    .builder()
                                                    .electronicCommerceIndicator(
                                                        PendingTransaction.Source.CardAuthorization
                                                            .NetworkDetails
                                                            .Visa
                                                            .ElectronicCommerceIndicator
                                                            .SECURE_ELECTRONIC_COMMERCE
                                                    )
                                                    .pointOfServiceEntryMode(
                                                        PendingTransaction.Source.CardAuthorization
                                                            .NetworkDetails
                                                            .Visa
                                                            .PointOfServiceEntryMode
                                                            .MANUAL
                                                    )
                                                    .standInProcessingReason(null)
                                                    .terminalEntryCapability(
                                                        PendingTransaction.Source.CardAuthorization
                                                            .NetworkDetails
                                                            .Visa
                                                            .TerminalEntryCapability
                                                            .MAGNETIC_STRIPE
                                                    )
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .networkIdentifiers(
                                        PendingTransaction.Source.CardAuthorization
                                            .NetworkIdentifiers
                                            .builder()
                                            .authorizationIdentificationResponse(null)
                                            .retrievalReferenceNumber("785867080153")
                                            .traceNumber("487941")
                                            .transactionId("627199945183184")
                                            .build()
                                    )
                                    .networkRiskScore(10L)
                                    .pendingTransactionId(null)
                                    .physicalCardId(null)
                                    .presentmentAmount(100L)
                                    .presentmentCurrency("USD")
                                    .processingCategory(
                                        PendingTransaction.Source.CardAuthorization
                                            .ProcessingCategory
                                            .PURCHASE
                                    )
                                    .realTimeDecisionId(null)
                                    .addSchemeFee(
                                        PendingTransaction.Source.CardAuthorization.SchemeFee
                                            .builder()
                                            .amount("0.137465")
                                            .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                            .currency(
                                                PendingTransaction.Source.CardAuthorization
                                                    .SchemeFee
                                                    .Currency
                                                    .USD
                                            )
                                            .feeType(
                                                PendingTransaction.Source.CardAuthorization
                                                    .SchemeFee
                                                    .FeeType
                                                    .VISA_CORPORATE_ACCEPTANCE_FEE
                                            )
                                            .fixedComponent(null)
                                            .variableRate("0.0002")
                                            .build()
                                    )
                                    .terminalId("RCN5VNXS")
                                    .type(
                                        PendingTransaction.Source.CardAuthorization.Type
                                            .CARD_AUTHORIZATION
                                    )
                                    .verification(
                                        PendingTransaction.Source.CardAuthorization.Verification
                                            .builder()
                                            .cardVerificationCode(
                                                PendingTransaction.Source.CardAuthorization
                                                    .Verification
                                                    .CardVerificationCode
                                                    .builder()
                                                    .result(
                                                        PendingTransaction.Source.CardAuthorization
                                                            .Verification
                                                            .CardVerificationCode
                                                            .Result
                                                            .MATCH
                                                    )
                                                    .build()
                                            )
                                            .cardholderAddress(
                                                PendingTransaction.Source.CardAuthorization
                                                    .Verification
                                                    .CardholderAddress
                                                    .builder()
                                                    .actualLine1("33 Liberty Street")
                                                    .actualPostalCode("94131")
                                                    .providedLine1("33 Liberty Street")
                                                    .providedPostalCode("94132")
                                                    .result(
                                                        PendingTransaction.Source.CardAuthorization
                                                            .Verification
                                                            .CardholderAddress
                                                            .Result
                                                            .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                    )
                                                    .build()
                                            )
                                            .cardholderName(
                                                PendingTransaction.Source.CardAuthorization
                                                    .Verification
                                                    .CardholderName
                                                    .builder()
                                                    .providedFirstName("provided_first_name")
                                                    .providedLastName("provided_last_name")
                                                    .providedMiddleName("provided_middle_name")
                                                    .build()
                                            )
                                            .build()
                                    )
                                    .build()
                            )
                            .cardPushTransferInstruction(
                                PendingTransaction.Source.CardPushTransferInstruction.builder()
                                    .amount(100L)
                                    .transferId("outbound_card_push_transfer_e0z9rdpamraczh4tvwye")
                                    .build()
                            )
                            .checkDepositInstruction(
                                PendingTransaction.Source.CheckDepositInstruction.builder()
                                    .amount(100L)
                                    .backImageFileId("file_26khfk98mzfz90a11oqx")
                                    .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                    .currency(
                                        PendingTransaction.Source.CheckDepositInstruction.Currency
                                            .USD
                                    )
                                    .frontImageFileId("file_makxrc67oh9l6sg7w9yc")
                                    .build()
                            )
                            .checkTransferInstruction(
                                PendingTransaction.Source.CheckTransferInstruction.builder()
                                    .amount(100L)
                                    .currency(
                                        PendingTransaction.Source.CheckTransferInstruction.Currency
                                            .USD
                                    )
                                    .transferId("check_transfer_30b43acfu9vw8fyc4f5")
                                    .build()
                            )
                            .fednowTransferInstruction(
                                PendingTransaction.Source.FednowTransferInstruction.builder()
                                    .transferId("fednow_transfer_4i0mptrdu1mueg1196bg")
                                    .build()
                            )
                            .inboundFundsHold(
                                PendingTransaction.Source.InboundFundsHold.builder()
                                    .amount(100L)
                                    .automaticallyReleasesAt(
                                        OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                    )
                                    .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                    .currency(
                                        PendingTransaction.Source.InboundFundsHold.Currency.USD
                                    )
                                    .heldTransactionId("transaction_uyrp7fld2ium70oa7oi")
                                    .pendingTransactionId(
                                        "pending_transaction_k1sfetcau2qbvjbzgju4"
                                    )
                                    .releasedAt(null)
                                    .status(PendingTransaction.Source.InboundFundsHold.Status.HELD)
                                    .type(
                                        PendingTransaction.Source.InboundFundsHold.Type
                                            .INBOUND_FUNDS_HOLD
                                    )
                                    .build()
                            )
                            .inboundWireTransferReversal(
                                PendingTransaction.Source.InboundWireTransferReversal.builder()
                                    .inboundWireTransferId(
                                        "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                    )
                                    .build()
                            )
                            .other(PendingTransaction.Source.Other.builder().build())
                            .realTimePaymentsTransferInstruction(
                                PendingTransaction.Source.RealTimePaymentsTransferInstruction
                                    .builder()
                                    .amount(100L)
                                    .transferId("real_time_payments_transfer_iyuhl5kdn7ssmup83mvq")
                                    .build()
                            )
                            .swiftTransferInstruction(
                                PendingTransaction.Source.SwiftTransferInstruction.builder()
                                    .transferId("swift_transfer_29h21xkng03788zwd3fh")
                                    .build()
                            )
                            .userInitiatedHold(
                                PendingTransaction.Source.UserInitiatedHold.builder()
                                    .putAdditionalProperty("foo", JsonValue.from("bar"))
                                    .build()
                            )
                            .wireTransferInstruction(
                                PendingTransaction.Source.WireTransferInstruction.builder()
                                    .accountNumber("987654321")
                                    .amount(100L)
                                    .messageToRecipient("HELLO")
                                    .routingNumber("101050001")
                                    .transferId("wire_transfer_5akynk7dqsq25qwk9q2u")
                                    .build()
                            )
                            .build()
                    )
                    .status(PendingTransaction.Status.PENDING)
                    .type(PendingTransaction.Type.PENDING_TRANSACTION)
                    .build()
            )
        assertThat(cardAuthorizationCreateResponse.type())
            .isEqualTo(
                CardAuthorizationCreateResponse.Type.INBOUND_CARD_AUTHORIZATION_SIMULATION_RESULT
            )
    }

    @Test
    fun roundtrip() {
        val jsonMapper = jsonMapper()
        val cardAuthorizationCreateResponse =
            CardAuthorizationCreateResponse.builder()
                .declinedTransaction(
                    DeclinedTransaction.builder()
                        .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()
                                .category(DeclinedTransaction.Source.Category.ACH_DECLINE)
                                .achDecline(
                                    DeclinedTransaction.Source.AchDecline.builder()
                                        .id("ach_decline_72v1mcwxudctq56efipa")
                                        .amount(1750L)
                                        .inboundAchTransferId(
                                            "inbound_ach_transfer_tdrwqr3fq9gnnq49odev"
                                        )
                                        .originatorCompanyDescriptiveDate(null)
                                        .originatorCompanyDiscretionaryData(null)
                                        .originatorCompanyId("0987654321")
                                        .originatorCompanyName("BIG BANK")
                                        .reason(
                                            DeclinedTransaction.Source.AchDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .receiverIdNumber("12345678900")
                                        .receiverName("IAN CREASE")
                                        .traceNumber("021000038461022")
                                        .type(
                                            DeclinedTransaction.Source.AchDecline.Type.ACH_DECLINE
                                        )
                                        .build()
                                )
                                .cardDecline(
                                    DeclinedTransaction.Source.CardDecline.builder()
                                        .id("card_decline_bx3o8zd7glq8yvtwg25v")
                                        .actioner(
                                            DeclinedTransaction.Source.CardDecline.Actioner.INCREASE
                                        )
                                        .additionalAmounts(
                                            DeclinedTransaction.Source.CardDecline.AdditionalAmounts
                                                .builder()
                                                .clinic(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Clinic
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .dental(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Dental
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .original(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Original
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .prescription(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Prescription
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .surcharge(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Surcharge
                                                        .builder()
                                                        .amount(10L)
                                                        .currency("USD")
                                                        .build()
                                                )
                                                .totalCumulative(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .TotalCumulative
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .totalHealthcare(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .TotalHealthcare
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .transit(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Transit
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .unknown(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Unknown
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .vision(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .AdditionalAmounts
                                                        .Vision
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .amount(-1000L)
                                        .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                        .currency(
                                            DeclinedTransaction.Source.CardDecline.Currency.USD
                                        )
                                        .declinedTransactionId(
                                            "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                        )
                                        .digitalWalletTokenId(null)
                                        .direction(
                                            DeclinedTransaction.Source.CardDecline.Direction
                                                .SETTLEMENT
                                        )
                                        .incrementedCardAuthorizationId(null)
                                        .merchantAcceptorId("5665270011000168")
                                        .merchantCategoryCode("5734")
                                        .merchantCity("New York")
                                        .merchantCountry("US")
                                        .merchantDescriptor("AMAZON.COM")
                                        .merchantPostalCode("10045")
                                        .merchantState(null)
                                        .networkDetails(
                                            DeclinedTransaction.Source.CardDecline.NetworkDetails
                                                .builder()
                                                .category(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Category
                                                        .VISA
                                                )
                                                .pulse(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Pulse
                                                        .builder()
                                                        .build()
                                                )
                                                .visa(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .NetworkDetails
                                                        .Visa
                                                        .builder()
                                                        .electronicCommerceIndicator(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .ElectronicCommerceIndicator
                                                                .SECURE_ELECTRONIC_COMMERCE
                                                        )
                                                        .pointOfServiceEntryMode(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .PointOfServiceEntryMode
                                                                .MANUAL
                                                        )
                                                        .standInProcessingReason(null)
                                                        .terminalEntryCapability(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .NetworkDetails
                                                                .Visa
                                                                .TerminalEntryCapability
                                                                .MAGNETIC_STRIPE
                                                        )
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .networkIdentifiers(
                                            DeclinedTransaction.Source.CardDecline
                                                .NetworkIdentifiers
                                                .builder()
                                                .authorizationIdentificationResponse(null)
                                                .retrievalReferenceNumber("785867080153")
                                                .traceNumber("487941")
                                                .transactionId("627199945183184")
                                                .build()
                                        )
                                        .networkRiskScore(10L)
                                        .physicalCardId(null)
                                        .presentmentAmount(-1000L)
                                        .presentmentCurrency("USD")
                                        .processingCategory(
                                            DeclinedTransaction.Source.CardDecline
                                                .ProcessingCategory
                                                .PURCHASE
                                        )
                                        .realTimeDecisionId(null)
                                        .realTimeDecisionReason(null)
                                        .reason(
                                            DeclinedTransaction.Source.CardDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .addSchemeFee(
                                            DeclinedTransaction.Source.CardDecline.SchemeFee
                                                .builder()
                                                .amount("0.137465")
                                                .createdAt(
                                                    OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                                )
                                                .currency(
                                                    DeclinedTransaction.Source.CardDecline.SchemeFee
                                                        .Currency
                                                        .USD
                                                )
                                                .feeType(
                                                    DeclinedTransaction.Source.CardDecline.SchemeFee
                                                        .FeeType
                                                        .VISA_CORPORATE_ACCEPTANCE_FEE
                                                )
                                                .fixedComponent(null)
                                                .variableRate("0.0002")
                                                .build()
                                        )
                                        .terminalId("RCN5VNXS")
                                        .verification(
                                            DeclinedTransaction.Source.CardDecline.Verification
                                                .builder()
                                                .cardVerificationCode(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardVerificationCode
                                                        .builder()
                                                        .result(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .Verification
                                                                .CardVerificationCode
                                                                .Result
                                                                .MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderAddress(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardholderAddress
                                                        .builder()
                                                        .actualLine1("33 Liberty Street")
                                                        .actualPostalCode("94131")
                                                        .providedLine1("33 Liberty Street")
                                                        .providedPostalCode("94132")
                                                        .result(
                                                            DeclinedTransaction.Source.CardDecline
                                                                .Verification
                                                                .CardholderAddress
                                                                .Result
                                                                .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderName(
                                                    DeclinedTransaction.Source.CardDecline
                                                        .Verification
                                                        .CardholderName
                                                        .builder()
                                                        .providedFirstName("provided_first_name")
                                                        .providedLastName("provided_last_name")
                                                        .providedMiddleName("provided_middle_name")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .build()
                                )
                                .checkDecline(
                                    DeclinedTransaction.Source.CheckDecline.builder()
                                        .amount(-1000L)
                                        .auxiliaryOnUs("99999")
                                        .backImageFileId(null)
                                        .checkTransferId("check_transfer_30b43acfu9vw8fyc4f5")
                                        .frontImageFileId(null)
                                        .inboundCheckDepositId(
                                            "inbound_check_deposit_zoshvqybq0cjjm31mra"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.CheckDecline.Reason
                                                .INSUFFICIENT_FUNDS
                                        )
                                        .build()
                                )
                                .checkDepositRejection(
                                    DeclinedTransaction.Source.CheckDepositRejection.builder()
                                        .amount(1750L)
                                        .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                        .currency(
                                            DeclinedTransaction.Source.CheckDepositRejection
                                                .Currency
                                                .USD
                                        )
                                        .declinedTransactionId(
                                            "declined_transaction_17jbn0yyhvkt4v4ooym8"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.CheckDepositRejection.Reason
                                                .INCOMPLETE_IMAGE
                                        )
                                        .rejectedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .build()
                                )
                                .inboundFednowTransferDecline(
                                    DeclinedTransaction.Source.InboundFednowTransferDecline
                                        .builder()
                                        .reason(
                                            DeclinedTransaction.Source.InboundFednowTransferDecline
                                                .Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .transferId("inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20")
                                        .build()
                                )
                                .inboundRealTimePaymentsTransferDecline(
                                    DeclinedTransaction.Source
                                        .InboundRealTimePaymentsTransferDecline
                                        .builder()
                                        .amount(100L)
                                        .creditorName("Ian Crease")
                                        .currency(
                                            DeclinedTransaction.Source
                                                .InboundRealTimePaymentsTransferDecline
                                                .Currency
                                                .USD
                                        )
                                        .debtorAccountNumber("987654321")
                                        .debtorName("National Phonograph Company")
                                        .debtorRoutingNumber("101050001")
                                        .reason(
                                            DeclinedTransaction.Source
                                                .InboundRealTimePaymentsTransferDecline
                                                .Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .transactionIdentification(
                                            "20220501234567891T1BSLZO01745013025"
                                        )
                                        .transferId(
                                            "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr"
                                        )
                                        .unstructuredRemittanceInformation("Invoice 29582")
                                        .build()
                                )
                                .other(DeclinedTransaction.Source.Other.builder().build())
                                .wireDecline(
                                    DeclinedTransaction.Source.WireDecline.builder()
                                        .inboundWireTransferId(
                                            "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                        )
                                        .reason(
                                            DeclinedTransaction.Source.WireDecline.Reason
                                                .ACCOUNT_NUMBER_DISABLED
                                        )
                                        .build()
                                )
                                .build()
                        )
                        .type(DeclinedTransaction.Type.DECLINED_TRANSACTION)
                        .build()
                )
                .pendingTransaction(
                    PendingTransaction.builder()
                        .id("pending_transaction_k1sfetcau2qbvjbzgju4")
                        .accountId("account_in71c4amph0vgo2qllky")
                        .amount(100L)
                        .completedAt(null)
                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                        .currency(PendingTransaction.Currency.USD)
                        .description("INVOICE 2468")
                        .heldAmount(100L)
                        .routeId("card_oubs0hwk5rn6knuecxg2")
                        .routeType(PendingTransaction.RouteType.CARD)
                        .source(
                            PendingTransaction.Source.builder()
                                .category(PendingTransaction.Source.Category.CARD_AUTHORIZATION)
                                .accountTransferInstruction(
                                    PendingTransaction.Source.AccountTransferInstruction.builder()
                                        .amount(100L)
                                        .currency(
                                            PendingTransaction.Source.AccountTransferInstruction
                                                .Currency
                                                .USD
                                        )
                                        .transferId("account_transfer_7k9qe1ysdgqztnt63l7n")
                                        .build()
                                )
                                .achTransferInstruction(
                                    PendingTransaction.Source.AchTransferInstruction.builder()
                                        .amount(100L)
                                        .transferId("ach_transfer_uoxatyh3lt5evrsdvo7q")
                                        .build()
                                )
                                .blockchainOfframpTransfer(
                                    PendingTransaction.Source.BlockchainOfframpTransfer.builder()
                                        .id("blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m")
                                        .token(
                                            PendingTransaction.Source.BlockchainOfframpTransfer
                                                .Token
                                                .USDC
                                        )
                                        .amount(10000L)
                                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .destinationAccountId("account_in71c4amph0vgo2qllky")
                                        .initiatingTransactionHash(
                                            "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a"
                                        )
                                        .sourceBlockchainAddressId(
                                            "blockchain_address_tijjpqp9t5d358ehydqi"
                                        )
                                        .status(
                                            PendingTransaction.Source.BlockchainOfframpTransfer
                                                .Status
                                                .SETTLED
                                        )
                                        .transactionId("transaction_uyrp7fld2ium70oa7oi")
                                        .type(
                                            PendingTransaction.Source.BlockchainOfframpTransfer.Type
                                                .BLOCKCHAIN_OFFRAMP_TRANSFER
                                        )
                                        .build()
                                )
                                .blockchainOnrampTransferInstruction(
                                    PendingTransaction.Source.BlockchainOnrampTransferInstruction
                                        .builder()
                                        .amount(10000L)
                                        .destinationBlockchainAddress(
                                            "0x304a554a310C7e546dfe434669C62820b7D83490"
                                        )
                                        .transferId(
                                            "blockchain_onramp_transfer_sg8nzy569rk0dnfk28bv"
                                        )
                                        .build()
                                )
                                .cardAuthorization(
                                    PendingTransaction.Source.CardAuthorization.builder()
                                        .id("card_authorization_6iqxap6ivd0fo5eu3i8x")
                                        .actioner(
                                            PendingTransaction.Source.CardAuthorization.Actioner
                                                .INCREASE
                                        )
                                        .additionalAmounts(
                                            PendingTransaction.Source.CardAuthorization
                                                .AdditionalAmounts
                                                .builder()
                                                .clinic(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Clinic
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .dental(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Dental
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .original(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Original
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .prescription(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Prescription
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .surcharge(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Surcharge
                                                        .builder()
                                                        .amount(10L)
                                                        .currency("USD")
                                                        .build()
                                                )
                                                .totalCumulative(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .TotalCumulative
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .totalHealthcare(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .TotalHealthcare
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .transit(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Transit
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .unknown(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Unknown
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .vision(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .AdditionalAmounts
                                                        .Vision
                                                        .builder()
                                                        .amount(0L)
                                                        .currency("currency")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .amount(100L)
                                        .cardPaymentId("card_payment_nd3k2kacrqjli8482ave")
                                        .currency(
                                            PendingTransaction.Source.CardAuthorization.Currency.USD
                                        )
                                        .digitalWalletTokenId(null)
                                        .direction(
                                            PendingTransaction.Source.CardAuthorization.Direction
                                                .SETTLEMENT
                                        )
                                        .expiresAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .healthcare(
                                            PendingTransaction.Source.CardAuthorization.Healthcare
                                                .builder()
                                                .merchantNinetyPercentEligibility(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Healthcare
                                                        .MerchantNinetyPercentEligibility
                                                        .ELIGIBLE
                                                )
                                                .build()
                                        )
                                        .merchantAcceptorId("5665270011000168")
                                        .merchantCategoryCode("5734")
                                        .merchantCity("New York")
                                        .merchantCountry("US")
                                        .merchantDescriptor("AMAZON.COM")
                                        .merchantPostalCode("10045")
                                        .merchantState("NY")
                                        .networkDetails(
                                            PendingTransaction.Source.CardAuthorization
                                                .NetworkDetails
                                                .builder()
                                                .category(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Category
                                                        .VISA
                                                )
                                                .pulse(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Pulse
                                                        .builder()
                                                        .build()
                                                )
                                                .visa(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .NetworkDetails
                                                        .Visa
                                                        .builder()
                                                        .electronicCommerceIndicator(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .ElectronicCommerceIndicator
                                                                .SECURE_ELECTRONIC_COMMERCE
                                                        )
                                                        .pointOfServiceEntryMode(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .PointOfServiceEntryMode
                                                                .MANUAL
                                                        )
                                                        .standInProcessingReason(null)
                                                        .terminalEntryCapability(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .NetworkDetails
                                                                .Visa
                                                                .TerminalEntryCapability
                                                                .MAGNETIC_STRIPE
                                                        )
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .networkIdentifiers(
                                            PendingTransaction.Source.CardAuthorization
                                                .NetworkIdentifiers
                                                .builder()
                                                .authorizationIdentificationResponse(null)
                                                .retrievalReferenceNumber("785867080153")
                                                .traceNumber("487941")
                                                .transactionId("627199945183184")
                                                .build()
                                        )
                                        .networkRiskScore(10L)
                                        .pendingTransactionId(null)
                                        .physicalCardId(null)
                                        .presentmentAmount(100L)
                                        .presentmentCurrency("USD")
                                        .processingCategory(
                                            PendingTransaction.Source.CardAuthorization
                                                .ProcessingCategory
                                                .PURCHASE
                                        )
                                        .realTimeDecisionId(null)
                                        .addSchemeFee(
                                            PendingTransaction.Source.CardAuthorization.SchemeFee
                                                .builder()
                                                .amount("0.137465")
                                                .createdAt(
                                                    OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                                )
                                                .currency(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .SchemeFee
                                                        .Currency
                                                        .USD
                                                )
                                                .feeType(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .SchemeFee
                                                        .FeeType
                                                        .VISA_CORPORATE_ACCEPTANCE_FEE
                                                )
                                                .fixedComponent(null)
                                                .variableRate("0.0002")
                                                .build()
                                        )
                                        .terminalId("RCN5VNXS")
                                        .type(
                                            PendingTransaction.Source.CardAuthorization.Type
                                                .CARD_AUTHORIZATION
                                        )
                                        .verification(
                                            PendingTransaction.Source.CardAuthorization.Verification
                                                .builder()
                                                .cardVerificationCode(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardVerificationCode
                                                        .builder()
                                                        .result(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .Verification
                                                                .CardVerificationCode
                                                                .Result
                                                                .MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderAddress(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardholderAddress
                                                        .builder()
                                                        .actualLine1("33 Liberty Street")
                                                        .actualPostalCode("94131")
                                                        .providedLine1("33 Liberty Street")
                                                        .providedPostalCode("94132")
                                                        .result(
                                                            PendingTransaction.Source
                                                                .CardAuthorization
                                                                .Verification
                                                                .CardholderAddress
                                                                .Result
                                                                .POSTAL_CODE_NO_MATCH_ADDRESS_MATCH
                                                        )
                                                        .build()
                                                )
                                                .cardholderName(
                                                    PendingTransaction.Source.CardAuthorization
                                                        .Verification
                                                        .CardholderName
                                                        .builder()
                                                        .providedFirstName("provided_first_name")
                                                        .providedLastName("provided_last_name")
                                                        .providedMiddleName("provided_middle_name")
                                                        .build()
                                                )
                                                .build()
                                        )
                                        .build()
                                )
                                .cardPushTransferInstruction(
                                    PendingTransaction.Source.CardPushTransferInstruction.builder()
                                        .amount(100L)
                                        .transferId(
                                            "outbound_card_push_transfer_e0z9rdpamraczh4tvwye"
                                        )
                                        .build()
                                )
                                .checkDepositInstruction(
                                    PendingTransaction.Source.CheckDepositInstruction.builder()
                                        .amount(100L)
                                        .backImageFileId("file_26khfk98mzfz90a11oqx")
                                        .checkDepositId("check_deposit_f06n9gpg7sxn8t19lfc1")
                                        .currency(
                                            PendingTransaction.Source.CheckDepositInstruction
                                                .Currency
                                                .USD
                                        )
                                        .frontImageFileId("file_makxrc67oh9l6sg7w9yc")
                                        .build()
                                )
                                .checkTransferInstruction(
                                    PendingTransaction.Source.CheckTransferInstruction.builder()
                                        .amount(100L)
                                        .currency(
                                            PendingTransaction.Source.CheckTransferInstruction
                                                .Currency
                                                .USD
                                        )
                                        .transferId("check_transfer_30b43acfu9vw8fyc4f5")
                                        .build()
                                )
                                .fednowTransferInstruction(
                                    PendingTransaction.Source.FednowTransferInstruction.builder()
                                        .transferId("fednow_transfer_4i0mptrdu1mueg1196bg")
                                        .build()
                                )
                                .inboundFundsHold(
                                    PendingTransaction.Source.InboundFundsHold.builder()
                                        .amount(100L)
                                        .automaticallyReleasesAt(
                                            OffsetDateTime.parse("2020-01-31T23:59:59Z")
                                        )
                                        .createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
                                        .currency(
                                            PendingTransaction.Source.InboundFundsHold.Currency.USD
                                        )
                                        .heldTransactionId("transaction_uyrp7fld2ium70oa7oi")
                                        .pendingTransactionId(
                                            "pending_transaction_k1sfetcau2qbvjbzgju4"
                                        )
                                        .releasedAt(null)
                                        .status(
                                            PendingTransaction.Source.InboundFundsHold.Status.HELD
                                        )
                                        .type(
                                            PendingTransaction.Source.InboundFundsHold.Type
                                                .INBOUND_FUNDS_HOLD
                                        )
                                        .build()
                                )
                                .inboundWireTransferReversal(
                                    PendingTransaction.Source.InboundWireTransferReversal.builder()
                                        .inboundWireTransferId(
                                            "inbound_wire_transfer_f228m6bmhtcxjco9pwp0"
                                        )
                                        .build()
                                )
                                .other(PendingTransaction.Source.Other.builder().build())
                                .realTimePaymentsTransferInstruction(
                                    PendingTransaction.Source.RealTimePaymentsTransferInstruction
                                        .builder()
                                        .amount(100L)
                                        .transferId(
                                            "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq"
                                        )
                                        .build()
                                )
                                .swiftTransferInstruction(
                                    PendingTransaction.Source.SwiftTransferInstruction.builder()
                                        .transferId("swift_transfer_29h21xkng03788zwd3fh")
                                        .build()
                                )
                                .userInitiatedHold(
                                    PendingTransaction.Source.UserInitiatedHold.builder()
                                        .putAdditionalProperty("foo", JsonValue.from("bar"))
                                        .build()
                                )
                                .wireTransferInstruction(
                                    PendingTransaction.Source.WireTransferInstruction.builder()
                                        .accountNumber("987654321")
                                        .amount(100L)
                                        .messageToRecipient("HELLO")
                                        .routingNumber("101050001")
                                        .transferId("wire_transfer_5akynk7dqsq25qwk9q2u")
                                        .build()
                                )
                                .build()
                        )
                        .status(PendingTransaction.Status.PENDING)
                        .type(PendingTransaction.Type.PENDING_TRANSACTION)
                        .build()
                )
                .type(
                    CardAuthorizationCreateResponse.Type
                        .INBOUND_CARD_AUTHORIZATION_SIMULATION_RESULT
                )
                .build()

        val roundtrippedCardAuthorizationCreateResponse =
            jsonMapper.readValue(
                jsonMapper.writeValueAsString(cardAuthorizationCreateResponse),
                jacksonTypeRef<CardAuthorizationCreateResponse>(),
            )

        assertThat(roundtrippedCardAuthorizationCreateResponse)
            .isEqualTo(cardAuthorizationCreateResponse)
    }
}
