// File generated from our OpenAPI spec by Stainless.

package com.increase.api.models.carddisputes

import java.time.LocalDate
import kotlin.jvm.optionals.getOrNull
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

internal class CardDisputeCreateParamsTest {

    @Test
    fun create() {
        CardDisputeCreateParams.builder()
            .disputedTransactionId("transaction_uyrp7fld2ium70oa7oi")
            .network(CardDisputeCreateParams.Network.VISA)
            .amount(100L)
            .addAttachmentFile(
                CardDisputeCreateParams.AttachmentFile.builder().fileId("file_id").build()
            )
            .explanation("x")
            .visa(
                CardDisputeCreateParams.Visa.builder()
                    .category(CardDisputeCreateParams.Visa.Category.FRAUD)
                    .authorization(
                        CardDisputeCreateParams.Visa.Authorization.builder()
                            .accountStatus(
                                CardDisputeCreateParams.Visa.Authorization.AccountStatus
                                    .ACCOUNT_CLOSED
                            )
                            .build()
                    )
                    .consumerCanceledMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseExplanation("x")
                            .receivedOrExpectedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .CardholderCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .canceledPriorToShipDate(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .CardholderCancellation
                                            .CanceledPriorToShipDate
                                            .CANCELED_PRIOR_TO_SHIP_DATE
                                    )
                                    .cancellationPolicyProvided(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .CardholderCancellation
                                            .CancellationPolicyProvided
                                            .NOT_PROVIDED
                                    )
                                    .reason("x")
                                    .build()
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerCanceledRecurringTransaction(
                        CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction.builder()
                            .cancellationTarget(
                                CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction
                                    .CancellationTarget
                                    .ACCOUNT
                            )
                            .merchantContactMethods(
                                CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction
                                    .MerchantContactMethods
                                    .builder()
                                    .applicationName("x")
                                    .callCenterPhoneNumber("x")
                                    .emailAddress("x")
                                    .inPersonAddress("x")
                                    .mailingAddress("x")
                                    .textPhoneNumber("x")
                                    .build()
                            )
                            .transactionOrAccountCanceledAt(LocalDate.parse("2019-12-27"))
                            .otherFormOfPaymentExplanation("x")
                            .build()
                    )
                    .consumerCanceledServices(
                        CardDisputeCreateParams.Visa.ConsumerCanceledServices.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .CardholderCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .cancellationPolicyProvided(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                            .CardholderCancellation
                                            .CancellationPolicyProvided
                                            .NOT_PROVIDED
                                    )
                                    .reason("x")
                                    .build()
                            )
                            .contractedAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseExplanation("x")
                            .serviceType(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.ServiceType
                                    .GUARANTEED_RESERVATION
                            )
                            .guaranteedReservation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .GuaranteedReservation
                                    .builder()
                                    .explanation(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                            .GuaranteedReservation
                                            .Explanation
                                            .CARDHOLDER_CANCELED_PRIOR_TO_SERVICE
                                    )
                                    .build()
                            )
                            .other(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.Other
                                    .builder()
                                    .build()
                            )
                            .timeshare(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.Timeshare
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .consumerCounterfeitMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerCounterfeitMerchandise.builder()
                            .counterfeitExplanation("x")
                            .dispositionExplanation("x")
                            .orderExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerCreditNotProcessed(
                        CardDisputeCreateParams.Visa.ConsumerCreditNotProcessed.builder()
                            .canceledOrReturnedAt(LocalDate.parse("2019-12-27"))
                            .creditExpectedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerDamagedOrDefectiveMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .orderAndIssueExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerDamagedOrDefectiveMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerDamagedOrDefectiveMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseMisrepresentation(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .misrepresentationExplanation("x")
                            .purchaseExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseMisrepresentation
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseMisrepresentation
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseNotAsDescribed(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .ReturnOutcome
                                    .RETURNED
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseNotAsDescribed
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseNotAsDescribed
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseNotReceived(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived.builder()
                            .cancellationOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .CancellationOutcome
                                    .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                            )
                            .deliveryIssue(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .DeliveryIssue
                                    .DELAYED
                            )
                            .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndExplanation("x")
                            .cardholderCancellationPriorToExpectedReceipt(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .CardholderCancellationPriorToExpectedReceipt
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .delayed(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived.Delayed
                                    .builder()
                                    .explanation("x")
                                    .returnOutcome(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .ReturnOutcome
                                            .NOT_RETURNED
                                    )
                                    .notReturned(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .NotReturned
                                            .builder()
                                            .build()
                                    )
                                    .returnAttempted(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .ReturnAttempted
                                            .builder()
                                            .attemptedAt(LocalDate.parse("2019-12-27"))
                                            .build()
                                    )
                                    .returned(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .Returned
                                            .builder()
                                            .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                            .returnedAt(LocalDate.parse("2019-12-27"))
                                            .build()
                                    )
                                    .build()
                            )
                            .deliveredToWrongLocation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .DeliveredToWrongLocation
                                    .builder()
                                    .agreedLocation("x")
                                    .build()
                            )
                            .merchantCancellation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .MerchantCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .noCancellation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .NoCancellation
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .consumerNonReceiptOfCash(
                        CardDisputeCreateParams.Visa.ConsumerNonReceiptOfCash.builder().build()
                    )
                    .consumerOriginalCreditTransactionNotAccepted(
                        CardDisputeCreateParams.Visa.ConsumerOriginalCreditTransactionNotAccepted
                            .builder()
                            .explanation("x")
                            .reason(
                                CardDisputeCreateParams.Visa
                                    .ConsumerOriginalCreditTransactionNotAccepted
                                    .Reason
                                    .PROHIBITED_BY_LOCAL_LAWS_OR_REGULATION
                            )
                            .build()
                    )
                    .consumerQualityMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.builder()
                            .expectedAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndQualityIssue("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.NotReturned
                                    .builder()
                                    .build()
                            )
                            .ongoingNegotiations(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .OngoingNegotiations
                                    .builder()
                                    .explanation("x")
                                    .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                    .startedAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerQualityServices(
                        CardDisputeCreateParams.Visa.ConsumerQualityServices.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa.ConsumerQualityServices
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .nonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .NonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription
                                    .NOT_RELATED
                            )
                            .purchaseInfoAndQualityIssue("x")
                            .servicesReceivedAt(LocalDate.parse("2019-12-27"))
                            .cardholderPaidToHaveWorkRedone(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .CardholderPaidToHaveWorkRedone
                                    .DID_NOT_PAY_TO_HAVE_WORK_REDONE
                            )
                            .ongoingNegotiations(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .OngoingNegotiations
                                    .builder()
                                    .explanation("x")
                                    .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                    .startedAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .restaurantFoodRelated(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .RestaurantFoodRelated
                                    .NOT_RELATED
                            )
                            .build()
                    )
                    .consumerServicesMisrepresentation(
                        CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerServicesMisrepresentation
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .misrepresentationExplanation("x")
                            .purchaseExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerServicesNotAsDescribed(
                        CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .explanation("x")
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerServicesNotReceived(
                        CardDisputeCreateParams.Visa.ConsumerServicesNotReceived.builder()
                            .cancellationOutcome(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .CancellationOutcome
                                    .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                            )
                            .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndExplanation("x")
                            .cardholderCancellationPriorToExpectedReceipt(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .CardholderCancellationPriorToExpectedReceipt
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .merchantCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .MerchantCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .noCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .NoCancellation
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .fraud(
                        CardDisputeCreateParams.Visa.Fraud.builder()
                            .fraudType(
                                CardDisputeCreateParams.Visa.Fraud.FraudType
                                    .ACCOUNT_OR_CREDENTIALS_TAKEOVER
                            )
                            .build()
                    )
                    .processingError(
                        CardDisputeCreateParams.Visa.ProcessingError.builder()
                            .errorReason(
                                CardDisputeCreateParams.Visa.ProcessingError.ErrorReason
                                    .DUPLICATE_TRANSACTION
                            )
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ProcessingError
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .duplicateTransaction(
                                CardDisputeCreateParams.Visa.ProcessingError.DuplicateTransaction
                                    .builder()
                                    .otherTransactionId("x")
                                    .build()
                            )
                            .incorrectAmount(
                                CardDisputeCreateParams.Visa.ProcessingError.IncorrectAmount
                                    .builder()
                                    .expectedAmount(0L)
                                    .build()
                            )
                            .paidByOtherMeans(
                                CardDisputeCreateParams.Visa.ProcessingError.PaidByOtherMeans
                                    .builder()
                                    .otherFormOfPaymentEvidence(
                                        CardDisputeCreateParams.Visa.ProcessingError
                                            .PaidByOtherMeans
                                            .OtherFormOfPaymentEvidence
                                            .CANCELED_CHECK
                                    )
                                    .otherTransactionId("x")
                                    .build()
                            )
                            .build()
                    )
                    .build()
            )
            .build()
    }

    @Test
    fun body() {
        val params =
            CardDisputeCreateParams.builder()
                .disputedTransactionId("transaction_uyrp7fld2ium70oa7oi")
                .network(CardDisputeCreateParams.Network.VISA)
                .amount(100L)
                .addAttachmentFile(
                    CardDisputeCreateParams.AttachmentFile.builder().fileId("file_id").build()
                )
                .explanation("x")
                .visa(
                    CardDisputeCreateParams.Visa.builder()
                        .category(CardDisputeCreateParams.Visa.Category.FRAUD)
                        .authorization(
                            CardDisputeCreateParams.Visa.Authorization.builder()
                                .accountStatus(
                                    CardDisputeCreateParams.Visa.Authorization.AccountStatus
                                        .ACCOUNT_CLOSED
                                )
                                .build()
                        )
                        .consumerCanceledMerchandise(
                            CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.builder()
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .purchaseExplanation("x")
                                .receivedOrExpectedAt(LocalDate.parse("2019-12-27"))
                                .returnOutcome(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .ReturnOutcome
                                        .NOT_RETURNED
                                )
                                .cardholderCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .CardholderCancellation
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .canceledPriorToShipDate(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                                .CardholderCancellation
                                                .CanceledPriorToShipDate
                                                .CANCELED_PRIOR_TO_SHIP_DATE
                                        )
                                        .cancellationPolicyProvided(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                                .CardholderCancellation
                                                .CancellationPolicyProvided
                                                .NOT_PROVIDED
                                        )
                                        .reason("x")
                                        .build()
                                )
                                .notReturned(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .NotReturned
                                        .builder()
                                        .build()
                                )
                                .returnAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .ReturnAttempted
                                        .builder()
                                        .attemptExplanation("x")
                                        .attemptReason(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                                .ReturnAttempted
                                                .AttemptReason
                                                .MERCHANT_NOT_RESPONDING
                                        )
                                        .attemptedAt(LocalDate.parse("2019-12-27"))
                                        .merchandiseDisposition("x")
                                        .build()
                                )
                                .returned(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                        .Returned
                                        .builder()
                                        .returnMethod(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                                .Returned
                                                .ReturnMethod
                                                .DHL
                                        )
                                        .returnedAt(LocalDate.parse("2019-12-27"))
                                        .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                        .otherExplanation("x")
                                        .trackingNumber("x")
                                        .build()
                                )
                                .build()
                        )
                        .consumerCanceledRecurringTransaction(
                            CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction
                                .builder()
                                .cancellationTarget(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerCanceledRecurringTransaction
                                        .CancellationTarget
                                        .ACCOUNT
                                )
                                .merchantContactMethods(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerCanceledRecurringTransaction
                                        .MerchantContactMethods
                                        .builder()
                                        .applicationName("x")
                                        .callCenterPhoneNumber("x")
                                        .emailAddress("x")
                                        .inPersonAddress("x")
                                        .mailingAddress("x")
                                        .textPhoneNumber("x")
                                        .build()
                                )
                                .transactionOrAccountCanceledAt(LocalDate.parse("2019-12-27"))
                                .otherFormOfPaymentExplanation("x")
                                .build()
                        )
                        .consumerCanceledServices(
                            CardDisputeCreateParams.Visa.ConsumerCanceledServices.builder()
                                .cardholderCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                        .CardholderCancellation
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .cancellationPolicyProvided(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                                .CardholderCancellation
                                                .CancellationPolicyProvided
                                                .NOT_PROVIDED
                                        )
                                        .reason("x")
                                        .build()
                                )
                                .contractedAt(LocalDate.parse("2019-12-27"))
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .purchaseExplanation("x")
                                .serviceType(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                        .ServiceType
                                        .GUARANTEED_RESERVATION
                                )
                                .guaranteedReservation(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                        .GuaranteedReservation
                                        .builder()
                                        .explanation(
                                            CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                                .GuaranteedReservation
                                                .Explanation
                                                .CARDHOLDER_CANCELED_PRIOR_TO_SERVICE
                                        )
                                        .build()
                                )
                                .other(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices.Other
                                        .builder()
                                        .build()
                                )
                                .timeshare(
                                    CardDisputeCreateParams.Visa.ConsumerCanceledServices.Timeshare
                                        .builder()
                                        .build()
                                )
                                .build()
                        )
                        .consumerCounterfeitMerchandise(
                            CardDisputeCreateParams.Visa.ConsumerCounterfeitMerchandise.builder()
                                .counterfeitExplanation("x")
                                .dispositionExplanation("x")
                                .orderExplanation("x")
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .build()
                        )
                        .consumerCreditNotProcessed(
                            CardDisputeCreateParams.Visa.ConsumerCreditNotProcessed.builder()
                                .canceledOrReturnedAt(LocalDate.parse("2019-12-27"))
                                .creditExpectedAt(LocalDate.parse("2019-12-27"))
                                .build()
                        )
                        .consumerDamagedOrDefectiveMerchandise(
                            CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                .builder()
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerDamagedOrDefectiveMerchandise
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .orderAndIssueExplanation("x")
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .returnOutcome(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerDamagedOrDefectiveMerchandise
                                        .ReturnOutcome
                                        .NOT_RETURNED
                                )
                                .notReturned(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerDamagedOrDefectiveMerchandise
                                        .NotReturned
                                        .builder()
                                        .build()
                                )
                                .returnAttempted(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerDamagedOrDefectiveMerchandise
                                        .ReturnAttempted
                                        .builder()
                                        .attemptExplanation("x")
                                        .attemptReason(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerDamagedOrDefectiveMerchandise
                                                .ReturnAttempted
                                                .AttemptReason
                                                .MERCHANT_NOT_RESPONDING
                                        )
                                        .attemptedAt(LocalDate.parse("2019-12-27"))
                                        .merchandiseDisposition("x")
                                        .build()
                                )
                                .returned(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerDamagedOrDefectiveMerchandise
                                        .Returned
                                        .builder()
                                        .returnMethod(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerDamagedOrDefectiveMerchandise
                                                .Returned
                                                .ReturnMethod
                                                .DHL
                                        )
                                        .returnedAt(LocalDate.parse("2019-12-27"))
                                        .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                        .otherExplanation("x")
                                        .trackingNumber("x")
                                        .build()
                                )
                                .build()
                        )
                        .consumerMerchandiseMisrepresentation(
                            CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                .builder()
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerMerchandiseMisrepresentation
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .misrepresentationExplanation("x")
                                .purchaseExplanation("x")
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .returnOutcome(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerMerchandiseMisrepresentation
                                        .ReturnOutcome
                                        .NOT_RETURNED
                                )
                                .notReturned(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerMerchandiseMisrepresentation
                                        .NotReturned
                                        .builder()
                                        .build()
                                )
                                .returnAttempted(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerMerchandiseMisrepresentation
                                        .ReturnAttempted
                                        .builder()
                                        .attemptExplanation("x")
                                        .attemptReason(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseMisrepresentation
                                                .ReturnAttempted
                                                .AttemptReason
                                                .MERCHANT_NOT_RESPONDING
                                        )
                                        .attemptedAt(LocalDate.parse("2019-12-27"))
                                        .merchandiseDisposition("x")
                                        .build()
                                )
                                .returned(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerMerchandiseMisrepresentation
                                        .Returned
                                        .builder()
                                        .returnMethod(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseMisrepresentation
                                                .Returned
                                                .ReturnMethod
                                                .DHL
                                        )
                                        .returnedAt(LocalDate.parse("2019-12-27"))
                                        .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                        .otherExplanation("x")
                                        .trackingNumber("x")
                                        .build()
                                )
                                .build()
                        )
                        .consumerMerchandiseNotAsDescribed(
                            CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed.builder()
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .returnOutcome(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                        .ReturnOutcome
                                        .RETURNED
                                )
                                .returnAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                        .ReturnAttempted
                                        .builder()
                                        .attemptExplanation("x")
                                        .attemptReason(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotAsDescribed
                                                .ReturnAttempted
                                                .AttemptReason
                                                .MERCHANT_NOT_RESPONDING
                                        )
                                        .attemptedAt(LocalDate.parse("2019-12-27"))
                                        .merchandiseDisposition("x")
                                        .build()
                                )
                                .returned(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                        .Returned
                                        .builder()
                                        .returnMethod(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotAsDescribed
                                                .Returned
                                                .ReturnMethod
                                                .DHL
                                        )
                                        .returnedAt(LocalDate.parse("2019-12-27"))
                                        .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                        .otherExplanation("x")
                                        .trackingNumber("x")
                                        .build()
                                )
                                .build()
                        )
                        .consumerMerchandiseNotReceived(
                            CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived.builder()
                                .cancellationOutcome(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .CancellationOutcome
                                        .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                                )
                                .deliveryIssue(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .DeliveryIssue
                                        .DELAYED
                                )
                                .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .purchaseInfoAndExplanation("x")
                                .cardholderCancellationPriorToExpectedReceipt(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .CardholderCancellationPriorToExpectedReceipt
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .reason("x")
                                        .build()
                                )
                                .delayed(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .Delayed
                                        .builder()
                                        .explanation("x")
                                        .returnOutcome(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotReceived
                                                .Delayed
                                                .ReturnOutcome
                                                .NOT_RETURNED
                                        )
                                        .notReturned(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotReceived
                                                .Delayed
                                                .NotReturned
                                                .builder()
                                                .build()
                                        )
                                        .returnAttempted(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotReceived
                                                .Delayed
                                                .ReturnAttempted
                                                .builder()
                                                .attemptedAt(LocalDate.parse("2019-12-27"))
                                                .build()
                                        )
                                        .returned(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerMerchandiseNotReceived
                                                .Delayed
                                                .Returned
                                                .builder()
                                                .merchantReceivedReturnAt(
                                                    LocalDate.parse("2019-12-27")
                                                )
                                                .returnedAt(LocalDate.parse("2019-12-27"))
                                                .build()
                                        )
                                        .build()
                                )
                                .deliveredToWrongLocation(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .DeliveredToWrongLocation
                                        .builder()
                                        .agreedLocation("x")
                                        .build()
                                )
                                .merchantCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .MerchantCancellation
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .build()
                                )
                                .noCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                        .NoCancellation
                                        .builder()
                                        .build()
                                )
                                .build()
                        )
                        .consumerNonReceiptOfCash(
                            CardDisputeCreateParams.Visa.ConsumerNonReceiptOfCash.builder().build()
                        )
                        .consumerOriginalCreditTransactionNotAccepted(
                            CardDisputeCreateParams.Visa
                                .ConsumerOriginalCreditTransactionNotAccepted
                                .builder()
                                .explanation("x")
                                .reason(
                                    CardDisputeCreateParams.Visa
                                        .ConsumerOriginalCreditTransactionNotAccepted
                                        .Reason
                                        .PROHIBITED_BY_LOCAL_LAWS_OR_REGULATION
                                )
                                .build()
                        )
                        .consumerQualityMerchandise(
                            CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.builder()
                                .expectedAt(LocalDate.parse("2019-12-27"))
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .purchaseInfoAndQualityIssue("x")
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .returnOutcome(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                        .ReturnOutcome
                                        .NOT_RETURNED
                                )
                                .notReturned(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                        .NotReturned
                                        .builder()
                                        .build()
                                )
                                .ongoingNegotiations(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                        .OngoingNegotiations
                                        .builder()
                                        .explanation("x")
                                        .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                        .startedAt(LocalDate.parse("2019-12-27"))
                                        .build()
                                )
                                .returnAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                        .ReturnAttempted
                                        .builder()
                                        .attemptExplanation("x")
                                        .attemptReason(
                                            CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                                .ReturnAttempted
                                                .AttemptReason
                                                .MERCHANT_NOT_RESPONDING
                                        )
                                        .attemptedAt(LocalDate.parse("2019-12-27"))
                                        .merchandiseDisposition("x")
                                        .build()
                                )
                                .returned(
                                    CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.Returned
                                        .builder()
                                        .returnMethod(
                                            CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                                .Returned
                                                .ReturnMethod
                                                .DHL
                                        )
                                        .returnedAt(LocalDate.parse("2019-12-27"))
                                        .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                        .otherExplanation("x")
                                        .trackingNumber("x")
                                        .build()
                                )
                                .build()
                        )
                        .consumerQualityServices(
                            CardDisputeCreateParams.Visa.ConsumerQualityServices.builder()
                                .cardholderCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerQualityServices
                                        .CardholderCancellation
                                        .builder()
                                        .acceptedByMerchant(
                                            CardDisputeCreateParams.Visa.ConsumerQualityServices
                                                .CardholderCancellation
                                                .AcceptedByMerchant
                                                .ACCEPTED
                                        )
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .reason("x")
                                        .build()
                                )
                                .nonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription(
                                    CardDisputeCreateParams.Visa.ConsumerQualityServices
                                        .NonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription
                                        .NOT_RELATED
                                )
                                .purchaseInfoAndQualityIssue("x")
                                .servicesReceivedAt(LocalDate.parse("2019-12-27"))
                                .cardholderPaidToHaveWorkRedone(
                                    CardDisputeCreateParams.Visa.ConsumerQualityServices
                                        .CardholderPaidToHaveWorkRedone
                                        .DID_NOT_PAY_TO_HAVE_WORK_REDONE
                                )
                                .ongoingNegotiations(
                                    CardDisputeCreateParams.Visa.ConsumerQualityServices
                                        .OngoingNegotiations
                                        .builder()
                                        .explanation("x")
                                        .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                        .startedAt(LocalDate.parse("2019-12-27"))
                                        .build()
                                )
                                .restaurantFoodRelated(
                                    CardDisputeCreateParams.Visa.ConsumerQualityServices
                                        .RestaurantFoodRelated
                                        .NOT_RELATED
                                )
                                .build()
                        )
                        .consumerServicesMisrepresentation(
                            CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation.builder()
                                .cardholderCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                        .CardholderCancellation
                                        .builder()
                                        .acceptedByMerchant(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerServicesMisrepresentation
                                                .CardholderCancellation
                                                .AcceptedByMerchant
                                                .ACCEPTED
                                        )
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .reason("x")
                                        .build()
                                )
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .misrepresentationExplanation("x")
                                .purchaseExplanation("x")
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .build()
                        )
                        .consumerServicesNotAsDescribed(
                            CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed.builder()
                                .cardholderCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                        .CardholderCancellation
                                        .builder()
                                        .acceptedByMerchant(
                                            CardDisputeCreateParams.Visa
                                                .ConsumerServicesNotAsDescribed
                                                .CardholderCancellation
                                                .AcceptedByMerchant
                                                .ACCEPTED
                                        )
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .reason("x")
                                        .build()
                                )
                                .explanation("x")
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .receivedAt(LocalDate.parse("2019-12-27"))
                                .build()
                        )
                        .consumerServicesNotReceived(
                            CardDisputeCreateParams.Visa.ConsumerServicesNotReceived.builder()
                                .cancellationOutcome(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                        .CancellationOutcome
                                        .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                                )
                                .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .purchaseInfoAndExplanation("x")
                                .cardholderCancellationPriorToExpectedReceipt(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                        .CardholderCancellationPriorToExpectedReceipt
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .reason("x")
                                        .build()
                                )
                                .merchantCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                        .MerchantCancellation
                                        .builder()
                                        .canceledAt(LocalDate.parse("2019-12-27"))
                                        .build()
                                )
                                .noCancellation(
                                    CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                        .NoCancellation
                                        .builder()
                                        .build()
                                )
                                .build()
                        )
                        .fraud(
                            CardDisputeCreateParams.Visa.Fraud.builder()
                                .fraudType(
                                    CardDisputeCreateParams.Visa.Fraud.FraudType
                                        .ACCOUNT_OR_CREDENTIALS_TAKEOVER
                                )
                                .build()
                        )
                        .processingError(
                            CardDisputeCreateParams.Visa.ProcessingError.builder()
                                .errorReason(
                                    CardDisputeCreateParams.Visa.ProcessingError.ErrorReason
                                        .DUPLICATE_TRANSACTION
                                )
                                .merchantResolutionAttempted(
                                    CardDisputeCreateParams.Visa.ProcessingError
                                        .MerchantResolutionAttempted
                                        .ATTEMPTED
                                )
                                .duplicateTransaction(
                                    CardDisputeCreateParams.Visa.ProcessingError
                                        .DuplicateTransaction
                                        .builder()
                                        .otherTransactionId("x")
                                        .build()
                                )
                                .incorrectAmount(
                                    CardDisputeCreateParams.Visa.ProcessingError.IncorrectAmount
                                        .builder()
                                        .expectedAmount(0L)
                                        .build()
                                )
                                .paidByOtherMeans(
                                    CardDisputeCreateParams.Visa.ProcessingError.PaidByOtherMeans
                                        .builder()
                                        .otherFormOfPaymentEvidence(
                                            CardDisputeCreateParams.Visa.ProcessingError
                                                .PaidByOtherMeans
                                                .OtherFormOfPaymentEvidence
                                                .CANCELED_CHECK
                                        )
                                        .otherTransactionId("x")
                                        .build()
                                )
                                .build()
                        )
                        .build()
                )
                .build()

        val body = params._body()

        assertThat(body.disputedTransactionId()).isEqualTo("transaction_uyrp7fld2ium70oa7oi")
        assertThat(body.network()).isEqualTo(CardDisputeCreateParams.Network.VISA)
        assertThat(body.amount()).contains(100L)
        assertThat(body.attachmentFiles().getOrNull())
            .containsExactly(
                CardDisputeCreateParams.AttachmentFile.builder().fileId("file_id").build()
            )
        assertThat(body.explanation()).contains("x")
        assertThat(body.visa())
            .contains(
                CardDisputeCreateParams.Visa.builder()
                    .category(CardDisputeCreateParams.Visa.Category.FRAUD)
                    .authorization(
                        CardDisputeCreateParams.Visa.Authorization.builder()
                            .accountStatus(
                                CardDisputeCreateParams.Visa.Authorization.AccountStatus
                                    .ACCOUNT_CLOSED
                            )
                            .build()
                    )
                    .consumerCanceledMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseExplanation("x")
                            .receivedOrExpectedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .CardholderCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .canceledPriorToShipDate(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .CardholderCancellation
                                            .CanceledPriorToShipDate
                                            .CANCELED_PRIOR_TO_SHIP_DATE
                                    )
                                    .cancellationPolicyProvided(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .CardholderCancellation
                                            .CancellationPolicyProvided
                                            .NOT_PROVIDED
                                    )
                                    .reason("x")
                                    .build()
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise.Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerCanceledRecurringTransaction(
                        CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction.builder()
                            .cancellationTarget(
                                CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction
                                    .CancellationTarget
                                    .ACCOUNT
                            )
                            .merchantContactMethods(
                                CardDisputeCreateParams.Visa.ConsumerCanceledRecurringTransaction
                                    .MerchantContactMethods
                                    .builder()
                                    .applicationName("x")
                                    .callCenterPhoneNumber("x")
                                    .emailAddress("x")
                                    .inPersonAddress("x")
                                    .mailingAddress("x")
                                    .textPhoneNumber("x")
                                    .build()
                            )
                            .transactionOrAccountCanceledAt(LocalDate.parse("2019-12-27"))
                            .otherFormOfPaymentExplanation("x")
                            .build()
                    )
                    .consumerCanceledServices(
                        CardDisputeCreateParams.Visa.ConsumerCanceledServices.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .CardholderCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .cancellationPolicyProvided(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                            .CardholderCancellation
                                            .CancellationPolicyProvided
                                            .NOT_PROVIDED
                                    )
                                    .reason("x")
                                    .build()
                            )
                            .contractedAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseExplanation("x")
                            .serviceType(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.ServiceType
                                    .GUARANTEED_RESERVATION
                            )
                            .guaranteedReservation(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                    .GuaranteedReservation
                                    .builder()
                                    .explanation(
                                        CardDisputeCreateParams.Visa.ConsumerCanceledServices
                                            .GuaranteedReservation
                                            .Explanation
                                            .CARDHOLDER_CANCELED_PRIOR_TO_SERVICE
                                    )
                                    .build()
                            )
                            .other(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.Other
                                    .builder()
                                    .build()
                            )
                            .timeshare(
                                CardDisputeCreateParams.Visa.ConsumerCanceledServices.Timeshare
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .consumerCounterfeitMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerCounterfeitMerchandise.builder()
                            .counterfeitExplanation("x")
                            .dispositionExplanation("x")
                            .orderExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerCreditNotProcessed(
                        CardDisputeCreateParams.Visa.ConsumerCreditNotProcessed.builder()
                            .canceledOrReturnedAt(LocalDate.parse("2019-12-27"))
                            .creditExpectedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerDamagedOrDefectiveMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .orderAndIssueExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerDamagedOrDefectiveMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerDamagedOrDefectiveMerchandise
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerDamagedOrDefectiveMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseMisrepresentation(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .misrepresentationExplanation("x")
                            .purchaseExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .NotReturned
                                    .builder()
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseMisrepresentation
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseMisrepresentation
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseMisrepresentation
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseNotAsDescribed(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed.builder()
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .ReturnOutcome
                                    .RETURNED
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseNotAsDescribed
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotAsDescribed
                                    .Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerMerchandiseNotAsDescribed
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerMerchandiseNotReceived(
                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived.builder()
                            .cancellationOutcome(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .CancellationOutcome
                                    .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                            )
                            .deliveryIssue(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .DeliveryIssue
                                    .DELAYED
                            )
                            .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndExplanation("x")
                            .cardholderCancellationPriorToExpectedReceipt(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .CardholderCancellationPriorToExpectedReceipt
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .delayed(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived.Delayed
                                    .builder()
                                    .explanation("x")
                                    .returnOutcome(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .ReturnOutcome
                                            .NOT_RETURNED
                                    )
                                    .notReturned(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .NotReturned
                                            .builder()
                                            .build()
                                    )
                                    .returnAttempted(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .ReturnAttempted
                                            .builder()
                                            .attemptedAt(LocalDate.parse("2019-12-27"))
                                            .build()
                                    )
                                    .returned(
                                        CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                            .Delayed
                                            .Returned
                                            .builder()
                                            .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                            .returnedAt(LocalDate.parse("2019-12-27"))
                                            .build()
                                    )
                                    .build()
                            )
                            .deliveredToWrongLocation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .DeliveredToWrongLocation
                                    .builder()
                                    .agreedLocation("x")
                                    .build()
                            )
                            .merchantCancellation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .MerchantCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .noCancellation(
                                CardDisputeCreateParams.Visa.ConsumerMerchandiseNotReceived
                                    .NoCancellation
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .consumerNonReceiptOfCash(
                        CardDisputeCreateParams.Visa.ConsumerNonReceiptOfCash.builder().build()
                    )
                    .consumerOriginalCreditTransactionNotAccepted(
                        CardDisputeCreateParams.Visa.ConsumerOriginalCreditTransactionNotAccepted
                            .builder()
                            .explanation("x")
                            .reason(
                                CardDisputeCreateParams.Visa
                                    .ConsumerOriginalCreditTransactionNotAccepted
                                    .Reason
                                    .PROHIBITED_BY_LOCAL_LAWS_OR_REGULATION
                            )
                            .build()
                    )
                    .consumerQualityMerchandise(
                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.builder()
                            .expectedAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndQualityIssue("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .returnOutcome(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .ReturnOutcome
                                    .NOT_RETURNED
                            )
                            .notReturned(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.NotReturned
                                    .builder()
                                    .build()
                            )
                            .ongoingNegotiations(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .OngoingNegotiations
                                    .builder()
                                    .explanation("x")
                                    .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                    .startedAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .returnAttempted(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                    .ReturnAttempted
                                    .builder()
                                    .attemptExplanation("x")
                                    .attemptReason(
                                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                            .ReturnAttempted
                                            .AttemptReason
                                            .MERCHANT_NOT_RESPONDING
                                    )
                                    .attemptedAt(LocalDate.parse("2019-12-27"))
                                    .merchandiseDisposition("x")
                                    .build()
                            )
                            .returned(
                                CardDisputeCreateParams.Visa.ConsumerQualityMerchandise.Returned
                                    .builder()
                                    .returnMethod(
                                        CardDisputeCreateParams.Visa.ConsumerQualityMerchandise
                                            .Returned
                                            .ReturnMethod
                                            .DHL
                                    )
                                    .returnedAt(LocalDate.parse("2019-12-27"))
                                    .merchantReceivedReturnAt(LocalDate.parse("2019-12-27"))
                                    .otherExplanation("x")
                                    .trackingNumber("x")
                                    .build()
                            )
                            .build()
                    )
                    .consumerQualityServices(
                        CardDisputeCreateParams.Visa.ConsumerQualityServices.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa.ConsumerQualityServices
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .nonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .NonFiatCurrencyOrNonFungibleTokenRelatedAndNotMatchingDescription
                                    .NOT_RELATED
                            )
                            .purchaseInfoAndQualityIssue("x")
                            .servicesReceivedAt(LocalDate.parse("2019-12-27"))
                            .cardholderPaidToHaveWorkRedone(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .CardholderPaidToHaveWorkRedone
                                    .DID_NOT_PAY_TO_HAVE_WORK_REDONE
                            )
                            .ongoingNegotiations(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .OngoingNegotiations
                                    .builder()
                                    .explanation("x")
                                    .issuerFirstNotifiedAt(LocalDate.parse("2019-12-27"))
                                    .startedAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .restaurantFoodRelated(
                                CardDisputeCreateParams.Visa.ConsumerQualityServices
                                    .RestaurantFoodRelated
                                    .NOT_RELATED
                            )
                            .build()
                    )
                    .consumerServicesMisrepresentation(
                        CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa
                                            .ConsumerServicesMisrepresentation
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesMisrepresentation
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .misrepresentationExplanation("x")
                            .purchaseExplanation("x")
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerServicesNotAsDescribed(
                        CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed.builder()
                            .cardholderCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                    .CardholderCancellation
                                    .builder()
                                    .acceptedByMerchant(
                                        CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                            .CardholderCancellation
                                            .AcceptedByMerchant
                                            .ACCEPTED
                                    )
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .explanation("x")
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotAsDescribed
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .receivedAt(LocalDate.parse("2019-12-27"))
                            .build()
                    )
                    .consumerServicesNotReceived(
                        CardDisputeCreateParams.Visa.ConsumerServicesNotReceived.builder()
                            .cancellationOutcome(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .CancellationOutcome
                                    .CARDHOLDER_CANCELLATION_PRIOR_TO_EXPECTED_RECEIPT
                            )
                            .lastExpectedReceiptAt(LocalDate.parse("2019-12-27"))
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .purchaseInfoAndExplanation("x")
                            .cardholderCancellationPriorToExpectedReceipt(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .CardholderCancellationPriorToExpectedReceipt
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .reason("x")
                                    .build()
                            )
                            .merchantCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .MerchantCancellation
                                    .builder()
                                    .canceledAt(LocalDate.parse("2019-12-27"))
                                    .build()
                            )
                            .noCancellation(
                                CardDisputeCreateParams.Visa.ConsumerServicesNotReceived
                                    .NoCancellation
                                    .builder()
                                    .build()
                            )
                            .build()
                    )
                    .fraud(
                        CardDisputeCreateParams.Visa.Fraud.builder()
                            .fraudType(
                                CardDisputeCreateParams.Visa.Fraud.FraudType
                                    .ACCOUNT_OR_CREDENTIALS_TAKEOVER
                            )
                            .build()
                    )
                    .processingError(
                        CardDisputeCreateParams.Visa.ProcessingError.builder()
                            .errorReason(
                                CardDisputeCreateParams.Visa.ProcessingError.ErrorReason
                                    .DUPLICATE_TRANSACTION
                            )
                            .merchantResolutionAttempted(
                                CardDisputeCreateParams.Visa.ProcessingError
                                    .MerchantResolutionAttempted
                                    .ATTEMPTED
                            )
                            .duplicateTransaction(
                                CardDisputeCreateParams.Visa.ProcessingError.DuplicateTransaction
                                    .builder()
                                    .otherTransactionId("x")
                                    .build()
                            )
                            .incorrectAmount(
                                CardDisputeCreateParams.Visa.ProcessingError.IncorrectAmount
                                    .builder()
                                    .expectedAmount(0L)
                                    .build()
                            )
                            .paidByOtherMeans(
                                CardDisputeCreateParams.Visa.ProcessingError.PaidByOtherMeans
                                    .builder()
                                    .otherFormOfPaymentEvidence(
                                        CardDisputeCreateParams.Visa.ProcessingError
                                            .PaidByOtherMeans
                                            .OtherFormOfPaymentEvidence
                                            .CANCELED_CHECK
                                    )
                                    .otherTransactionId("x")
                                    .build()
                            )
                            .build()
                    )
                    .build()
            )
    }

    @Test
    fun bodyWithoutOptionalFields() {
        val params =
            CardDisputeCreateParams.builder()
                .disputedTransactionId("transaction_uyrp7fld2ium70oa7oi")
                .network(CardDisputeCreateParams.Network.VISA)
                .build()

        val body = params._body()

        assertThat(body.disputedTransactionId()).isEqualTo("transaction_uyrp7fld2ium70oa7oi")
        assertThat(body.network()).isEqualTo(CardDisputeCreateParams.Network.VISA)
    }
}
