<?php

declare(strict_types=1);

/*
 * PayPalRESTAPIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

namespace PayPalRESTAPIsLib\Models;

use stdClass;

/**
 * A Resource representing a response of vaulted a ACH Debit Account.
 */
class ACHDebitResponse implements \JsonSerializable
{
    /**
     * @var string|null
     */
    private $verificationStatus = 'NOT_VERIFIED';

    /**
     * Returns Verification Status.
     * The ach debit verification status.
     */
    public function getVerificationStatus(): ?string
    {
        return $this->verificationStatus;
    }

    /**
     * Sets Verification Status.
     * The ach debit verification status.
     *
     * @maps verification_status
     */
    public function setVerificationStatus(?string $verificationStatus): void
    {
        $this->verificationStatus = $verificationStatus;
    }

    /**
     * Encode this object to JSON
     *
     * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
     *        are set. (default: false)
     *
     * @return array|stdClass
     */
    #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
    public function jsonSerialize(bool $asArrayWhenEmpty = false)
    {
        $json = [];
        if (isset($this->verificationStatus)) {
            $json['verification_status'] = $this->verificationStatus;
        }

        return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
    }
}
