<?php

/**
 * Management API
 *
 * The version of the OpenAPI document: 3
 * Generated by: https://openapi-generator.tech
 * OpenAPI Generator version: 6.0.1
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


namespace Adyen\Model\Management;

use ArrayAccess;
use Adyen\Model\Management\ObjectSerializer;

/**
 * PaymentMethod Class Doc Comment
 *
 * @package  Adyen
 * @implements ArrayAccess<string, mixed>
 */
class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $openAPIModelName = 'PaymentMethod';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'accel' => '\Adyen\Model\Management\AccelResponseInfo',
        'affirm' => '\Adyen\Model\Management\AffirmResponseInfo',
        'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchResponseInfo',
        'alipayPlus' => '\Adyen\Model\Management\AlipayPlusResponseInfo',
        'allowed' => 'bool',
        'amex' => '\Adyen\Model\Management\AmexResponseInfo',
        'applePay' => '\Adyen\Model\Management\ApplePayResponseInfo',
        'bcmc' => '\Adyen\Model\Management\BcmcResponseInfo',
        'businessLineId' => 'string',
        'carnet' => '\Adyen\Model\Management\CarnetResponseInfo',
        'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesResponseInfo',
        'clearpay' => '\Adyen\Model\Management\ClearpayResponseInfo',
        'countries' => 'string[]',
        'cup' => '\Adyen\Model\Management\CupResponseInfo',
        'currencies' => 'string[]',
        'customRoutingFlags' => 'string[]',
        'diners' => '\Adyen\Model\Management\DinersResponseInfo',
        'discover' => '\Adyen\Model\Management\DiscoverResponseInfo',
        'eftDirectdebitCA' => '\Adyen\Model\Management\EFTDirectDebitCAResponseInfo',
        'eftposAustralia' => '\Adyen\Model\Management\EftPosAustraliaResponseInfo',
        'enabled' => 'bool',
        'girocard' => '\Adyen\Model\Management\GirocardResponseInfo',
        'givex' => '\Adyen\Model\Management\GivexResponseInfo',
        'googlePay' => '\Adyen\Model\Management\GooglePayResponseInfo',
        'id' => 'string',
        'ideal' => '\Adyen\Model\Management\IdealResponseInfo',
        'interacCard' => '\Adyen\Model\Management\InteracCardResponseInfo',
        'jcb' => '\Adyen\Model\Management\JCBResponseInfo',
        'klarna' => '\Adyen\Model\Management\KlarnaResponseInfo',
        'maestro' => '\Adyen\Model\Management\MaestroResponseInfo',
        'maestroUsa' => '\Adyen\Model\Management\MaestroUSAResponseInfo',
        'mc' => '\Adyen\Model\Management\MCResponseInfo',
        'mealVoucherFR' => '\Adyen\Model\Management\MealVoucherFRResponseInfo',
        'nyce' => '\Adyen\Model\Management\NyceResponseInfo',
        'paybybankPlaid' => '\Adyen\Model\Management\PayByBankPlaidResponseInfo',
        'payme' => '\Adyen\Model\Management\PayMeResponseInfo',
        'paypal' => '\Adyen\Model\Management\PayPalResponseInfo',
        'payto' => '\Adyen\Model\Management\PayToResponseInfo',
        'pulse' => '\Adyen\Model\Management\PulseResponseInfo',
        'reference' => 'string',
        'sepadirectdebit' => '\Adyen\Model\Management\SepaDirectDebitResponseInfo',
        'shopperInteraction' => 'string',
        'sodexo' => '\Adyen\Model\Management\SodexoResponseInfo',
        'sofort' => '\Adyen\Model\Management\SofortResponseInfo',
        'star' => '\Adyen\Model\Management\StarResponseInfo',
        'storeIds' => 'string[]',
        'svs' => '\Adyen\Model\Management\SvsResponseInfo',
        'swish' => '\Adyen\Model\Management\SwishResponseInfo',
        'ticket' => '\Adyen\Model\Management\TicketResponseInfo',
        'twint' => '\Adyen\Model\Management\TwintResponseInfo',
        'type' => 'string',
        'valuelink' => '\Adyen\Model\Management\ValuelinkResponseInfo',
        'verificationStatus' => 'string',
        'vipps' => '\Adyen\Model\Management\VippsResponseInfo',
        'visa' => '\Adyen\Model\Management\VisaResponseInfo',
        'wechatpay' => '\Adyen\Model\Management\WeChatPayResponseInfo',
        'wechatpayPos' => '\Adyen\Model\Management\WeChatPayPosResponseInfo'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      * @phpstan-var array<string, string|null>
      * @psalm-var array<string, string|null>
      */
    protected static $openAPIFormats = [
        'accel' => null,
        'affirm' => null,
        'afterpayTouch' => null,
        'alipayPlus' => null,
        'allowed' => null,
        'amex' => null,
        'applePay' => null,
        'bcmc' => null,
        'businessLineId' => null,
        'carnet' => null,
        'cartesBancaires' => null,
        'clearpay' => null,
        'countries' => null,
        'cup' => null,
        'currencies' => null,
        'customRoutingFlags' => null,
        'diners' => null,
        'discover' => null,
        'eftDirectdebitCA' => null,
        'eftposAustralia' => null,
        'enabled' => null,
        'girocard' => null,
        'givex' => null,
        'googlePay' => null,
        'id' => null,
        'ideal' => null,
        'interacCard' => null,
        'jcb' => null,
        'klarna' => null,
        'maestro' => null,
        'maestroUsa' => null,
        'mc' => null,
        'mealVoucherFR' => null,
        'nyce' => null,
        'paybybankPlaid' => null,
        'payme' => null,
        'paypal' => null,
        'payto' => null,
        'pulse' => null,
        'reference' => null,
        'sepadirectdebit' => null,
        'shopperInteraction' => null,
        'sodexo' => null,
        'sofort' => null,
        'star' => null,
        'storeIds' => null,
        'svs' => null,
        'swish' => null,
        'ticket' => null,
        'twint' => null,
        'type' => null,
        'valuelink' => null,
        'verificationStatus' => null,
        'vipps' => null,
        'visa' => null,
        'wechatpay' => null,
        'wechatpayPos' => null
    ];

    /**
      * Array of nullable properties. Used for (de)serialization
      *
      * @var boolean[]
      */
    protected static $openAPINullables = [
        'accel' => false,
        'affirm' => false,
        'afterpayTouch' => false,
        'alipayPlus' => false,
        'allowed' => false,
        'amex' => false,
        'applePay' => false,
        'bcmc' => false,
        'businessLineId' => false,
        'carnet' => false,
        'cartesBancaires' => false,
        'clearpay' => false,
        'countries' => false,
        'cup' => false,
        'currencies' => false,
        'customRoutingFlags' => false,
        'diners' => false,
        'discover' => false,
        'eftDirectdebitCA' => false,
        'eftposAustralia' => false,
        'enabled' => false,
        'girocard' => false,
        'givex' => false,
        'googlePay' => false,
        'id' => false,
        'ideal' => false,
        'interacCard' => false,
        'jcb' => false,
        'klarna' => false,
        'maestro' => false,
        'maestroUsa' => false,
        'mc' => false,
        'mealVoucherFR' => false,
        'nyce' => false,
        'paybybankPlaid' => false,
        'payme' => false,
        'paypal' => false,
        'payto' => false,
        'pulse' => false,
        'reference' => false,
        'sepadirectdebit' => false,
        'shopperInteraction' => false,
        'sodexo' => false,
        'sofort' => false,
        'star' => false,
        'storeIds' => false,
        'svs' => false,
        'swish' => false,
        'ticket' => false,
        'twint' => false,
        'type' => false,
        'valuelink' => false,
        'verificationStatus' => false,
        'vipps' => false,
        'visa' => false,
        'wechatpay' => false,
        'wechatpayPos' => false
    ];

    /**
      * If a nullable field gets set to null, insert it here
      *
      * @var boolean[]
      */
    protected $openAPINullablesSetToNull = [];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPITypes()
    {
        return self::$openAPITypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function openAPIFormats()
    {
        return self::$openAPIFormats;
    }

    /**
     * Array of nullable properties
     *
     * @return array
     */
    protected static function openAPINullables(): array
    {
        return self::$openAPINullables;
    }

    /**
     * Array of nullable field names deliberately set to null
     *
     * @return boolean[]
     */
    private function getOpenAPINullablesSetToNull(): array
    {
        return $this->openAPINullablesSetToNull;
    }

    /**
     * Setter - Array of nullable field names deliberately set to null
     *
     * @param boolean[] $openAPINullablesSetToNull
     */
    private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
    {
        $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
    }

    /**
     * Checks if a property is nullable
     *
     * @param string $property
     * @return bool
     */
    public static function isNullable(string $property): bool
    {
        return self::openAPINullables()[$property] ?? false;
    }

    /**
     * Checks if a nullable property is set to null.
     *
     * @param string $property
     * @return bool
     */
    public function isNullableSetToNull(string $property): bool
    {
        return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'accel' => 'accel',
        'affirm' => 'affirm',
        'afterpayTouch' => 'afterpayTouch',
        'alipayPlus' => 'alipayPlus',
        'allowed' => 'allowed',
        'amex' => 'amex',
        'applePay' => 'applePay',
        'bcmc' => 'bcmc',
        'businessLineId' => 'businessLineId',
        'carnet' => 'carnet',
        'cartesBancaires' => 'cartesBancaires',
        'clearpay' => 'clearpay',
        'countries' => 'countries',
        'cup' => 'cup',
        'currencies' => 'currencies',
        'customRoutingFlags' => 'customRoutingFlags',
        'diners' => 'diners',
        'discover' => 'discover',
        'eftDirectdebitCA' => 'eft_directdebit_CA',
        'eftposAustralia' => 'eftpos_australia',
        'enabled' => 'enabled',
        'girocard' => 'girocard',
        'givex' => 'givex',
        'googlePay' => 'googlePay',
        'id' => 'id',
        'ideal' => 'ideal',
        'interacCard' => 'interac_card',
        'jcb' => 'jcb',
        'klarna' => 'klarna',
        'maestro' => 'maestro',
        'maestroUsa' => 'maestro_usa',
        'mc' => 'mc',
        'mealVoucherFR' => 'mealVoucher_FR',
        'nyce' => 'nyce',
        'paybybankPlaid' => 'paybybank_plaid',
        'payme' => 'payme',
        'paypal' => 'paypal',
        'payto' => 'payto',
        'pulse' => 'pulse',
        'reference' => 'reference',
        'sepadirectdebit' => 'sepadirectdebit',
        'shopperInteraction' => 'shopperInteraction',
        'sodexo' => 'sodexo',
        'sofort' => 'sofort',
        'star' => 'star',
        'storeIds' => 'storeIds',
        'svs' => 'svs',
        'swish' => 'swish',
        'ticket' => 'ticket',
        'twint' => 'twint',
        'type' => 'type',
        'valuelink' => 'valuelink',
        'verificationStatus' => 'verificationStatus',
        'vipps' => 'vipps',
        'visa' => 'visa',
        'wechatpay' => 'wechatpay',
        'wechatpayPos' => 'wechatpay_pos'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'accel' => 'setAccel',
        'affirm' => 'setAffirm',
        'afterpayTouch' => 'setAfterpayTouch',
        'alipayPlus' => 'setAlipayPlus',
        'allowed' => 'setAllowed',
        'amex' => 'setAmex',
        'applePay' => 'setApplePay',
        'bcmc' => 'setBcmc',
        'businessLineId' => 'setBusinessLineId',
        'carnet' => 'setCarnet',
        'cartesBancaires' => 'setCartesBancaires',
        'clearpay' => 'setClearpay',
        'countries' => 'setCountries',
        'cup' => 'setCup',
        'currencies' => 'setCurrencies',
        'customRoutingFlags' => 'setCustomRoutingFlags',
        'diners' => 'setDiners',
        'discover' => 'setDiscover',
        'eftDirectdebitCA' => 'setEftDirectdebitCA',
        'eftposAustralia' => 'setEftposAustralia',
        'enabled' => 'setEnabled',
        'girocard' => 'setGirocard',
        'givex' => 'setGivex',
        'googlePay' => 'setGooglePay',
        'id' => 'setId',
        'ideal' => 'setIdeal',
        'interacCard' => 'setInteracCard',
        'jcb' => 'setJcb',
        'klarna' => 'setKlarna',
        'maestro' => 'setMaestro',
        'maestroUsa' => 'setMaestroUsa',
        'mc' => 'setMc',
        'mealVoucherFR' => 'setMealVoucherFR',
        'nyce' => 'setNyce',
        'paybybankPlaid' => 'setPaybybankPlaid',
        'payme' => 'setPayme',
        'paypal' => 'setPaypal',
        'payto' => 'setPayto',
        'pulse' => 'setPulse',
        'reference' => 'setReference',
        'sepadirectdebit' => 'setSepadirectdebit',
        'shopperInteraction' => 'setShopperInteraction',
        'sodexo' => 'setSodexo',
        'sofort' => 'setSofort',
        'star' => 'setStar',
        'storeIds' => 'setStoreIds',
        'svs' => 'setSvs',
        'swish' => 'setSwish',
        'ticket' => 'setTicket',
        'twint' => 'setTwint',
        'type' => 'setType',
        'valuelink' => 'setValuelink',
        'verificationStatus' => 'setVerificationStatus',
        'vipps' => 'setVipps',
        'visa' => 'setVisa',
        'wechatpay' => 'setWechatpay',
        'wechatpayPos' => 'setWechatpayPos'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'accel' => 'getAccel',
        'affirm' => 'getAffirm',
        'afterpayTouch' => 'getAfterpayTouch',
        'alipayPlus' => 'getAlipayPlus',
        'allowed' => 'getAllowed',
        'amex' => 'getAmex',
        'applePay' => 'getApplePay',
        'bcmc' => 'getBcmc',
        'businessLineId' => 'getBusinessLineId',
        'carnet' => 'getCarnet',
        'cartesBancaires' => 'getCartesBancaires',
        'clearpay' => 'getClearpay',
        'countries' => 'getCountries',
        'cup' => 'getCup',
        'currencies' => 'getCurrencies',
        'customRoutingFlags' => 'getCustomRoutingFlags',
        'diners' => 'getDiners',
        'discover' => 'getDiscover',
        'eftDirectdebitCA' => 'getEftDirectdebitCA',
        'eftposAustralia' => 'getEftposAustralia',
        'enabled' => 'getEnabled',
        'girocard' => 'getGirocard',
        'givex' => 'getGivex',
        'googlePay' => 'getGooglePay',
        'id' => 'getId',
        'ideal' => 'getIdeal',
        'interacCard' => 'getInteracCard',
        'jcb' => 'getJcb',
        'klarna' => 'getKlarna',
        'maestro' => 'getMaestro',
        'maestroUsa' => 'getMaestroUsa',
        'mc' => 'getMc',
        'mealVoucherFR' => 'getMealVoucherFR',
        'nyce' => 'getNyce',
        'paybybankPlaid' => 'getPaybybankPlaid',
        'payme' => 'getPayme',
        'paypal' => 'getPaypal',
        'payto' => 'getPayto',
        'pulse' => 'getPulse',
        'reference' => 'getReference',
        'sepadirectdebit' => 'getSepadirectdebit',
        'shopperInteraction' => 'getShopperInteraction',
        'sodexo' => 'getSodexo',
        'sofort' => 'getSofort',
        'star' => 'getStar',
        'storeIds' => 'getStoreIds',
        'svs' => 'getSvs',
        'swish' => 'getSwish',
        'ticket' => 'getTicket',
        'twint' => 'getTwint',
        'type' => 'getType',
        'valuelink' => 'getValuelink',
        'verificationStatus' => 'getVerificationStatus',
        'vipps' => 'getVipps',
        'visa' => 'getVisa',
        'wechatpay' => 'getWechatpay',
        'wechatpayPos' => 'getWechatpayPos'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$openAPIModelName;
    }

    public const VERIFICATION_STATUS_VALID = 'valid';
    public const VERIFICATION_STATUS_PENDING = 'pending';
    public const VERIFICATION_STATUS_INVALID = 'invalid';
    public const VERIFICATION_STATUS_REJECTED = 'rejected';

    /**
     * Gets allowable values of the enum
     *
     * @return string[]
     */
    public function getVerificationStatusAllowableValues()
    {
        return [
            self::VERIFICATION_STATUS_VALID,
            self::VERIFICATION_STATUS_PENDING,
            self::VERIFICATION_STATUS_INVALID,
            self::VERIFICATION_STATUS_REJECTED,
        ];
    }
    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(?array $data = null)
    {
        $this->setIfExists('accel', $data ?? [], null);
        $this->setIfExists('affirm', $data ?? [], null);
        $this->setIfExists('afterpayTouch', $data ?? [], null);
        $this->setIfExists('alipayPlus', $data ?? [], null);
        $this->setIfExists('allowed', $data ?? [], null);
        $this->setIfExists('amex', $data ?? [], null);
        $this->setIfExists('applePay', $data ?? [], null);
        $this->setIfExists('bcmc', $data ?? [], null);
        $this->setIfExists('businessLineId', $data ?? [], null);
        $this->setIfExists('carnet', $data ?? [], null);
        $this->setIfExists('cartesBancaires', $data ?? [], null);
        $this->setIfExists('clearpay', $data ?? [], null);
        $this->setIfExists('countries', $data ?? [], null);
        $this->setIfExists('cup', $data ?? [], null);
        $this->setIfExists('currencies', $data ?? [], null);
        $this->setIfExists('customRoutingFlags', $data ?? [], null);
        $this->setIfExists('diners', $data ?? [], null);
        $this->setIfExists('discover', $data ?? [], null);
        $this->setIfExists('eftDirectdebitCA', $data ?? [], null);
        $this->setIfExists('eftposAustralia', $data ?? [], null);
        $this->setIfExists('enabled', $data ?? [], null);
        $this->setIfExists('girocard', $data ?? [], null);
        $this->setIfExists('givex', $data ?? [], null);
        $this->setIfExists('googlePay', $data ?? [], null);
        $this->setIfExists('id', $data ?? [], null);
        $this->setIfExists('ideal', $data ?? [], null);
        $this->setIfExists('interacCard', $data ?? [], null);
        $this->setIfExists('jcb', $data ?? [], null);
        $this->setIfExists('klarna', $data ?? [], null);
        $this->setIfExists('maestro', $data ?? [], null);
        $this->setIfExists('maestroUsa', $data ?? [], null);
        $this->setIfExists('mc', $data ?? [], null);
        $this->setIfExists('mealVoucherFR', $data ?? [], null);
        $this->setIfExists('nyce', $data ?? [], null);
        $this->setIfExists('paybybankPlaid', $data ?? [], null);
        $this->setIfExists('payme', $data ?? [], null);
        $this->setIfExists('paypal', $data ?? [], null);
        $this->setIfExists('payto', $data ?? [], null);
        $this->setIfExists('pulse', $data ?? [], null);
        $this->setIfExists('reference', $data ?? [], null);
        $this->setIfExists('sepadirectdebit', $data ?? [], null);
        $this->setIfExists('shopperInteraction', $data ?? [], null);
        $this->setIfExists('sodexo', $data ?? [], null);
        $this->setIfExists('sofort', $data ?? [], null);
        $this->setIfExists('star', $data ?? [], null);
        $this->setIfExists('storeIds', $data ?? [], null);
        $this->setIfExists('svs', $data ?? [], null);
        $this->setIfExists('swish', $data ?? [], null);
        $this->setIfExists('ticket', $data ?? [], null);
        $this->setIfExists('twint', $data ?? [], null);
        $this->setIfExists('type', $data ?? [], null);
        $this->setIfExists('valuelink', $data ?? [], null);
        $this->setIfExists('verificationStatus', $data ?? [], null);
        $this->setIfExists('vipps', $data ?? [], null);
        $this->setIfExists('visa', $data ?? [], null);
        $this->setIfExists('wechatpay', $data ?? [], null);
        $this->setIfExists('wechatpayPos', $data ?? [], null);
    }

    /**
    * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
    * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
    * $this->openAPINullablesSetToNull array
    *
    * @param string $variableName
    * @param array  $fields
    * @param mixed  $defaultValue
    */
    private function setIfExists(string $variableName, array $fields, $defaultValue): void
    {
        if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
            $this->openAPINullablesSetToNull[] = $variableName;
        }

        $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        if ($this->container['id'] === null) {
            $invalidProperties[] = "'id' can't be null";
        }
        $allowedValues = $this->getVerificationStatusAllowableValues();
        if (!is_null($this->container['verificationStatus']) && !in_array($this->container['verificationStatus'], $allowedValues, true)) {
            $invalidProperties[] = sprintf(
                "invalid value '%s' for 'verificationStatus', must be one of '%s'",
                $this->container['verificationStatus'],
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets accel
     *
     * @return \Adyen\Model\Management\AccelResponseInfo|null
     */
    public function getAccel()
    {
        return $this->container['accel'];
    }

    /**
     * Sets accel
     *
     * @param \Adyen\Model\Management\AccelResponseInfo|null $accel accel
     *
     * @return self
     */
    public function setAccel($accel)
    {
        $this->container['accel'] = $accel;

        return $this;
    }

    /**
     * Gets affirm
     *
     * @return \Adyen\Model\Management\AffirmResponseInfo|null
     */
    public function getAffirm()
    {
        return $this->container['affirm'];
    }

    /**
     * Sets affirm
     *
     * @param \Adyen\Model\Management\AffirmResponseInfo|null $affirm affirm
     *
     * @return self
     */
    public function setAffirm($affirm)
    {
        $this->container['affirm'] = $affirm;

        return $this;
    }

    /**
     * Gets afterpayTouch
     *
     * @return \Adyen\Model\Management\AfterpayTouchResponseInfo|null
     */
    public function getAfterpayTouch()
    {
        return $this->container['afterpayTouch'];
    }

    /**
     * Sets afterpayTouch
     *
     * @param \Adyen\Model\Management\AfterpayTouchResponseInfo|null $afterpayTouch afterpayTouch
     *
     * @return self
     */
    public function setAfterpayTouch($afterpayTouch)
    {
        $this->container['afterpayTouch'] = $afterpayTouch;

        return $this;
    }

    /**
     * Gets alipayPlus
     *
     * @return \Adyen\Model\Management\AlipayPlusResponseInfo|null
     */
    public function getAlipayPlus()
    {
        return $this->container['alipayPlus'];
    }

    /**
     * Sets alipayPlus
     *
     * @param \Adyen\Model\Management\AlipayPlusResponseInfo|null $alipayPlus alipayPlus
     *
     * @return self
     */
    public function setAlipayPlus($alipayPlus)
    {
        $this->container['alipayPlus'] = $alipayPlus;

        return $this;
    }

    /**
     * Gets allowed
     *
     * @return bool|null
     */
    public function getAllowed()
    {
        return $this->container['allowed'];
    }

    /**
     * Sets allowed
     *
     * @param bool|null $allowed Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account.
     *
     * @return self
     */
    public function setAllowed($allowed)
    {
        $this->container['allowed'] = $allowed;

        return $this;
    }

    /**
     * Gets amex
     *
     * @return \Adyen\Model\Management\AmexResponseInfo|null
     */
    public function getAmex()
    {
        return $this->container['amex'];
    }

    /**
     * Sets amex
     *
     * @param \Adyen\Model\Management\AmexResponseInfo|null $amex amex
     *
     * @return self
     */
    public function setAmex($amex)
    {
        $this->container['amex'] = $amex;

        return $this;
    }

    /**
     * Gets applePay
     *
     * @return \Adyen\Model\Management\ApplePayResponseInfo|null
     */
    public function getApplePay()
    {
        return $this->container['applePay'];
    }

    /**
     * Sets applePay
     *
     * @param \Adyen\Model\Management\ApplePayResponseInfo|null $applePay applePay
     *
     * @return self
     */
    public function setApplePay($applePay)
    {
        $this->container['applePay'] = $applePay;

        return $this;
    }

    /**
     * Gets bcmc
     *
     * @return \Adyen\Model\Management\BcmcResponseInfo|null
     */
    public function getBcmc()
    {
        return $this->container['bcmc'];
    }

    /**
     * Sets bcmc
     *
     * @param \Adyen\Model\Management\BcmcResponseInfo|null $bcmc bcmc
     *
     * @return self
     */
    public function setBcmc($bcmc)
    {
        $this->container['bcmc'] = $bcmc;

        return $this;
    }

    /**
     * Gets businessLineId
     *
     * @return string|null
     */
    public function getBusinessLineId()
    {
        return $this->container['businessLineId'];
    }

    /**
     * Sets businessLineId
     *
     * @param string|null $businessLineId The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms).
     *
     * @return self
     */
    public function setBusinessLineId($businessLineId)
    {
        $this->container['businessLineId'] = $businessLineId;

        return $this;
    }

    /**
     * Gets carnet
     *
     * @return \Adyen\Model\Management\CarnetResponseInfo|null
     */
    public function getCarnet()
    {
        return $this->container['carnet'];
    }

    /**
     * Sets carnet
     *
     * @param \Adyen\Model\Management\CarnetResponseInfo|null $carnet carnet
     *
     * @return self
     */
    public function setCarnet($carnet)
    {
        $this->container['carnet'] = $carnet;

        return $this;
    }

    /**
     * Gets cartesBancaires
     *
     * @return \Adyen\Model\Management\CartesBancairesResponseInfo|null
     */
    public function getCartesBancaires()
    {
        return $this->container['cartesBancaires'];
    }

    /**
     * Sets cartesBancaires
     *
     * @param \Adyen\Model\Management\CartesBancairesResponseInfo|null $cartesBancaires cartesBancaires
     *
     * @return self
     */
    public function setCartesBancaires($cartesBancaires)
    {
        $this->container['cartesBancaires'] = $cartesBancaires;

        return $this;
    }

    /**
     * Gets clearpay
     *
     * @return \Adyen\Model\Management\ClearpayResponseInfo|null
     */
    public function getClearpay()
    {
        return $this->container['clearpay'];
    }

    /**
     * Sets clearpay
     *
     * @param \Adyen\Model\Management\ClearpayResponseInfo|null $clearpay clearpay
     *
     * @return self
     */
    public function setClearpay($clearpay)
    {
        $this->container['clearpay'] = $clearpay;

        return $this;
    }

    /**
     * Gets countries
     *
     * @return string[]|null
     */
    public function getCountries()
    {
        return $this->container['countries'];
    }

    /**
     * Sets countries
     *
     * @param string[]|null $countries The list of countries where a payment method is available. By default, all countries supported by the payment method.
     *
     * @return self
     */
    public function setCountries($countries)
    {
        $this->container['countries'] = $countries;

        return $this;
    }

    /**
     * Gets cup
     *
     * @return \Adyen\Model\Management\CupResponseInfo|null
     */
    public function getCup()
    {
        return $this->container['cup'];
    }

    /**
     * Sets cup
     *
     * @param \Adyen\Model\Management\CupResponseInfo|null $cup cup
     *
     * @return self
     */
    public function setCup($cup)
    {
        $this->container['cup'] = $cup;

        return $this;
    }

    /**
     * Gets currencies
     *
     * @return string[]|null
     */
    public function getCurrencies()
    {
        return $this->container['currencies'];
    }

    /**
     * Sets currencies
     *
     * @param string[]|null $currencies The list of currencies that a payment method supports. By default, all currencies supported by the payment method.
     *
     * @return self
     */
    public function setCurrencies($currencies)
    {
        $this->container['currencies'] = $currencies;

        return $this;
    }

    /**
     * Gets customRoutingFlags
     *
     * @return string[]|null
     */
    public function getCustomRoutingFlags()
    {
        return $this->container['customRoutingFlags'];
    }

    /**
     * Sets customRoutingFlags
     *
     * @param string[]|null $customRoutingFlags The list of custom routing flags to route payment to the intended acquirer.
     *
     * @return self
     */
    public function setCustomRoutingFlags($customRoutingFlags)
    {
        $this->container['customRoutingFlags'] = $customRoutingFlags;

        return $this;
    }

    /**
     * Gets diners
     *
     * @return \Adyen\Model\Management\DinersResponseInfo|null
     */
    public function getDiners()
    {
        return $this->container['diners'];
    }

    /**
     * Sets diners
     *
     * @param \Adyen\Model\Management\DinersResponseInfo|null $diners diners
     *
     * @return self
     */
    public function setDiners($diners)
    {
        $this->container['diners'] = $diners;

        return $this;
    }

    /**
     * Gets discover
     *
     * @return \Adyen\Model\Management\DiscoverResponseInfo|null
     */
    public function getDiscover()
    {
        return $this->container['discover'];
    }

    /**
     * Sets discover
     *
     * @param \Adyen\Model\Management\DiscoverResponseInfo|null $discover discover
     *
     * @return self
     */
    public function setDiscover($discover)
    {
        $this->container['discover'] = $discover;

        return $this;
    }

    /**
     * Gets eftDirectdebitCA
     *
     * @return \Adyen\Model\Management\EFTDirectDebitCAResponseInfo|null
     */
    public function getEftDirectdebitCA()
    {
        return $this->container['eftDirectdebitCA'];
    }

    /**
     * Sets eftDirectdebitCA
     *
     * @param \Adyen\Model\Management\EFTDirectDebitCAResponseInfo|null $eftDirectdebitCA eftDirectdebitCA
     *
     * @return self
     */
    public function setEftDirectdebitCA($eftDirectdebitCA)
    {
        $this->container['eftDirectdebitCA'] = $eftDirectdebitCA;

        return $this;
    }

    /**
     * Gets eftposAustralia
     *
     * @return \Adyen\Model\Management\EftPosAustraliaResponseInfo|null
     */
    public function getEftposAustralia()
    {
        return $this->container['eftposAustralia'];
    }

    /**
     * Sets eftposAustralia
     *
     * @param \Adyen\Model\Management\EftPosAustraliaResponseInfo|null $eftposAustralia eftposAustralia
     *
     * @return self
     */
    public function setEftposAustralia($eftposAustralia)
    {
        $this->container['eftposAustralia'] = $eftposAustralia;

        return $this;
    }

    /**
     * Gets enabled
     *
     * @return bool|null
     */
    public function getEnabled()
    {
        return $this->container['enabled'];
    }

    /**
     * Sets enabled
     *
     * @param bool|null $enabled Indicates whether the payment method is enabled (**true**) or disabled (**false**).
     *
     * @return self
     */
    public function setEnabled($enabled)
    {
        $this->container['enabled'] = $enabled;

        return $this;
    }

    /**
     * Gets girocard
     *
     * @return \Adyen\Model\Management\GirocardResponseInfo|null
     */
    public function getGirocard()
    {
        return $this->container['girocard'];
    }

    /**
     * Sets girocard
     *
     * @param \Adyen\Model\Management\GirocardResponseInfo|null $girocard girocard
     *
     * @return self
     */
    public function setGirocard($girocard)
    {
        $this->container['girocard'] = $girocard;

        return $this;
    }

    /**
     * Gets givex
     *
     * @return \Adyen\Model\Management\GivexResponseInfo|null
     */
    public function getGivex()
    {
        return $this->container['givex'];
    }

    /**
     * Sets givex
     *
     * @param \Adyen\Model\Management\GivexResponseInfo|null $givex givex
     *
     * @return self
     */
    public function setGivex($givex)
    {
        $this->container['givex'] = $givex;

        return $this;
    }

    /**
     * Gets googlePay
     *
     * @return \Adyen\Model\Management\GooglePayResponseInfo|null
     */
    public function getGooglePay()
    {
        return $this->container['googlePay'];
    }

    /**
     * Sets googlePay
     *
     * @param \Adyen\Model\Management\GooglePayResponseInfo|null $googlePay googlePay
     *
     * @return self
     */
    public function setGooglePay($googlePay)
    {
        $this->container['googlePay'] = $googlePay;

        return $this;
    }

    /**
     * Gets id
     *
     * @return string
     */
    public function getId()
    {
        return $this->container['id'];
    }

    /**
     * Sets id
     *
     * @param string $id The identifier of the resource.
     *
     * @return self
     */
    public function setId($id)
    {
        $this->container['id'] = $id;

        return $this;
    }

    /**
     * Gets ideal
     *
     * @return \Adyen\Model\Management\IdealResponseInfo|null
     */
    public function getIdeal()
    {
        return $this->container['ideal'];
    }

    /**
     * Sets ideal
     *
     * @param \Adyen\Model\Management\IdealResponseInfo|null $ideal ideal
     *
     * @return self
     */
    public function setIdeal($ideal)
    {
        $this->container['ideal'] = $ideal;

        return $this;
    }

    /**
     * Gets interacCard
     *
     * @return \Adyen\Model\Management\InteracCardResponseInfo|null
     */
    public function getInteracCard()
    {
        return $this->container['interacCard'];
    }

    /**
     * Sets interacCard
     *
     * @param \Adyen\Model\Management\InteracCardResponseInfo|null $interacCard interacCard
     *
     * @return self
     */
    public function setInteracCard($interacCard)
    {
        $this->container['interacCard'] = $interacCard;

        return $this;
    }

    /**
     * Gets jcb
     *
     * @return \Adyen\Model\Management\JCBResponseInfo|null
     */
    public function getJcb()
    {
        return $this->container['jcb'];
    }

    /**
     * Sets jcb
     *
     * @param \Adyen\Model\Management\JCBResponseInfo|null $jcb jcb
     *
     * @return self
     */
    public function setJcb($jcb)
    {
        $this->container['jcb'] = $jcb;

        return $this;
    }

    /**
     * Gets klarna
     *
     * @return \Adyen\Model\Management\KlarnaResponseInfo|null
     */
    public function getKlarna()
    {
        return $this->container['klarna'];
    }

    /**
     * Sets klarna
     *
     * @param \Adyen\Model\Management\KlarnaResponseInfo|null $klarna klarna
     *
     * @return self
     */
    public function setKlarna($klarna)
    {
        $this->container['klarna'] = $klarna;

        return $this;
    }

    /**
     * Gets maestro
     *
     * @return \Adyen\Model\Management\MaestroResponseInfo|null
     */
    public function getMaestro()
    {
        return $this->container['maestro'];
    }

    /**
     * Sets maestro
     *
     * @param \Adyen\Model\Management\MaestroResponseInfo|null $maestro maestro
     *
     * @return self
     */
    public function setMaestro($maestro)
    {
        $this->container['maestro'] = $maestro;

        return $this;
    }

    /**
     * Gets maestroUsa
     *
     * @return \Adyen\Model\Management\MaestroUSAResponseInfo|null
     */
    public function getMaestroUsa()
    {
        return $this->container['maestroUsa'];
    }

    /**
     * Sets maestroUsa
     *
     * @param \Adyen\Model\Management\MaestroUSAResponseInfo|null $maestroUsa maestroUsa
     *
     * @return self
     */
    public function setMaestroUsa($maestroUsa)
    {
        $this->container['maestroUsa'] = $maestroUsa;

        return $this;
    }

    /**
     * Gets mc
     *
     * @return \Adyen\Model\Management\MCResponseInfo|null
     */
    public function getMc()
    {
        return $this->container['mc'];
    }

    /**
     * Sets mc
     *
     * @param \Adyen\Model\Management\MCResponseInfo|null $mc mc
     *
     * @return self
     */
    public function setMc($mc)
    {
        $this->container['mc'] = $mc;

        return $this;
    }

    /**
     * Gets mealVoucherFR
     *
     * @return \Adyen\Model\Management\MealVoucherFRResponseInfo|null
     */
    public function getMealVoucherFR()
    {
        return $this->container['mealVoucherFR'];
    }

    /**
     * Sets mealVoucherFR
     *
     * @param \Adyen\Model\Management\MealVoucherFRResponseInfo|null $mealVoucherFR mealVoucherFR
     *
     * @return self
     */
    public function setMealVoucherFR($mealVoucherFR)
    {
        $this->container['mealVoucherFR'] = $mealVoucherFR;

        return $this;
    }

    /**
     * Gets nyce
     *
     * @return \Adyen\Model\Management\NyceResponseInfo|null
     */
    public function getNyce()
    {
        return $this->container['nyce'];
    }

    /**
     * Sets nyce
     *
     * @param \Adyen\Model\Management\NyceResponseInfo|null $nyce nyce
     *
     * @return self
     */
    public function setNyce($nyce)
    {
        $this->container['nyce'] = $nyce;

        return $this;
    }

    /**
     * Gets paybybankPlaid
     *
     * @return \Adyen\Model\Management\PayByBankPlaidResponseInfo|null
     */
    public function getPaybybankPlaid()
    {
        return $this->container['paybybankPlaid'];
    }

    /**
     * Sets paybybankPlaid
     *
     * @param \Adyen\Model\Management\PayByBankPlaidResponseInfo|null $paybybankPlaid paybybankPlaid
     *
     * @return self
     */
    public function setPaybybankPlaid($paybybankPlaid)
    {
        $this->container['paybybankPlaid'] = $paybybankPlaid;

        return $this;
    }

    /**
     * Gets payme
     *
     * @return \Adyen\Model\Management\PayMeResponseInfo|null
     */
    public function getPayme()
    {
        return $this->container['payme'];
    }

    /**
     * Sets payme
     *
     * @param \Adyen\Model\Management\PayMeResponseInfo|null $payme payme
     *
     * @return self
     */
    public function setPayme($payme)
    {
        $this->container['payme'] = $payme;

        return $this;
    }

    /**
     * Gets paypal
     *
     * @return \Adyen\Model\Management\PayPalResponseInfo|null
     */
    public function getPaypal()
    {
        return $this->container['paypal'];
    }

    /**
     * Sets paypal
     *
     * @param \Adyen\Model\Management\PayPalResponseInfo|null $paypal paypal
     *
     * @return self
     */
    public function setPaypal($paypal)
    {
        $this->container['paypal'] = $paypal;

        return $this;
    }

    /**
     * Gets payto
     *
     * @return \Adyen\Model\Management\PayToResponseInfo|null
     */
    public function getPayto()
    {
        return $this->container['payto'];
    }

    /**
     * Sets payto
     *
     * @param \Adyen\Model\Management\PayToResponseInfo|null $payto payto
     *
     * @return self
     */
    public function setPayto($payto)
    {
        $this->container['payto'] = $payto;

        return $this;
    }

    /**
     * Gets pulse
     *
     * @return \Adyen\Model\Management\PulseResponseInfo|null
     */
    public function getPulse()
    {
        return $this->container['pulse'];
    }

    /**
     * Sets pulse
     *
     * @param \Adyen\Model\Management\PulseResponseInfo|null $pulse pulse
     *
     * @return self
     */
    public function setPulse($pulse)
    {
        $this->container['pulse'] = $pulse;

        return $this;
    }

    /**
     * Gets reference
     *
     * @return string|null
     */
    public function getReference()
    {
        return $this->container['reference'];
    }

    /**
     * Sets reference
     *
     * @param string|null $reference Your reference for the payment method. Supported characters a-z, A-Z, 0-9.
     *
     * @return self
     */
    public function setReference($reference)
    {
        $this->container['reference'] = $reference;

        return $this;
    }

    /**
     * Gets sepadirectdebit
     *
     * @return \Adyen\Model\Management\SepaDirectDebitResponseInfo|null
     */
    public function getSepadirectdebit()
    {
        return $this->container['sepadirectdebit'];
    }

    /**
     * Sets sepadirectdebit
     *
     * @param \Adyen\Model\Management\SepaDirectDebitResponseInfo|null $sepadirectdebit sepadirectdebit
     *
     * @return self
     */
    public function setSepadirectdebit($sepadirectdebit)
    {
        $this->container['sepadirectdebit'] = $sepadirectdebit;

        return $this;
    }

    /**
     * Gets shopperInteraction
     *
     * @return string|null
     */
    public function getShopperInteraction()
    {
        return $this->container['shopperInteraction'];
    }

    /**
     * Sets shopperInteraction
     *
     * @param string|null $shopperInteraction The sales channel.
     *
     * @return self
     */
    public function setShopperInteraction($shopperInteraction)
    {
        $this->container['shopperInteraction'] = $shopperInteraction;

        return $this;
    }

    /**
     * Gets sodexo
     *
     * @return \Adyen\Model\Management\SodexoResponseInfo|null
     */
    public function getSodexo()
    {
        return $this->container['sodexo'];
    }

    /**
     * Sets sodexo
     *
     * @param \Adyen\Model\Management\SodexoResponseInfo|null $sodexo sodexo
     *
     * @return self
     */
    public function setSodexo($sodexo)
    {
        $this->container['sodexo'] = $sodexo;

        return $this;
    }

    /**
     * Gets sofort
     *
     * @return \Adyen\Model\Management\SofortResponseInfo|null
     */
    public function getSofort()
    {
        return $this->container['sofort'];
    }

    /**
     * Sets sofort
     *
     * @param \Adyen\Model\Management\SofortResponseInfo|null $sofort sofort
     *
     * @return self
     */
    public function setSofort($sofort)
    {
        $this->container['sofort'] = $sofort;

        return $this;
    }

    /**
     * Gets star
     *
     * @return \Adyen\Model\Management\StarResponseInfo|null
     */
    public function getStar()
    {
        return $this->container['star'];
    }

    /**
     * Sets star
     *
     * @param \Adyen\Model\Management\StarResponseInfo|null $star star
     *
     * @return self
     */
    public function setStar($star)
    {
        $this->container['star'] = $star;

        return $this;
    }

    /**
     * Gets storeIds
     *
     * @return string[]|null
     */
    public function getStoreIds()
    {
        return $this->container['storeIds'];
    }

    /**
     * Sets storeIds
     *
     * @param string[]|null $storeIds The unique identifier of the store for which to configure the payment method, if any.
     *
     * @return self
     */
    public function setStoreIds($storeIds)
    {
        $this->container['storeIds'] = $storeIds;

        return $this;
    }

    /**
     * Gets svs
     *
     * @return \Adyen\Model\Management\SvsResponseInfo|null
     */
    public function getSvs()
    {
        return $this->container['svs'];
    }

    /**
     * Sets svs
     *
     * @param \Adyen\Model\Management\SvsResponseInfo|null $svs svs
     *
     * @return self
     */
    public function setSvs($svs)
    {
        $this->container['svs'] = $svs;

        return $this;
    }

    /**
     * Gets swish
     *
     * @return \Adyen\Model\Management\SwishResponseInfo|null
     */
    public function getSwish()
    {
        return $this->container['swish'];
    }

    /**
     * Sets swish
     *
     * @param \Adyen\Model\Management\SwishResponseInfo|null $swish swish
     *
     * @return self
     */
    public function setSwish($swish)
    {
        $this->container['swish'] = $swish;

        return $this;
    }

    /**
     * Gets ticket
     *
     * @return \Adyen\Model\Management\TicketResponseInfo|null
     */
    public function getTicket()
    {
        return $this->container['ticket'];
    }

    /**
     * Sets ticket
     *
     * @param \Adyen\Model\Management\TicketResponseInfo|null $ticket ticket
     *
     * @return self
     */
    public function setTicket($ticket)
    {
        $this->container['ticket'] = $ticket;

        return $this;
    }

    /**
     * Gets twint
     *
     * @return \Adyen\Model\Management\TwintResponseInfo|null
     */
    public function getTwint()
    {
        return $this->container['twint'];
    }

    /**
     * Sets twint
     *
     * @param \Adyen\Model\Management\TwintResponseInfo|null $twint twint
     *
     * @return self
     */
    public function setTwint($twint)
    {
        $this->container['twint'] = $twint;

        return $this;
    }

    /**
     * Gets type
     *
     * @return string|null
     */
    public function getType()
    {
        return $this->container['type'];
    }

    /**
     * Sets type
     *
     * @param string|null $type Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).
     *
     * @return self
     */
    public function setType($type)
    {
        $this->container['type'] = $type;

        return $this;
    }

    /**
     * Gets valuelink
     *
     * @return \Adyen\Model\Management\ValuelinkResponseInfo|null
     */
    public function getValuelink()
    {
        return $this->container['valuelink'];
    }

    /**
     * Sets valuelink
     *
     * @param \Adyen\Model\Management\ValuelinkResponseInfo|null $valuelink valuelink
     *
     * @return self
     */
    public function setValuelink($valuelink)
    {
        $this->container['valuelink'] = $valuelink;

        return $this;
    }

    /**
     * Gets verificationStatus
     *
     * @return string|null
     */
    public function getVerificationStatus()
    {
        return $this->container['verificationStatus'];
    }

    /**
     * Sets verificationStatus
     *
     * @param string|null $verificationStatus Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected**
     *
     * @return self
     */
    public function setVerificationStatus($verificationStatus)
    {
        $allowedValues = $this->getVerificationStatusAllowableValues();
        if (!in_array($verificationStatus, $allowedValues, true)) {
            error_log(
                sprintf(
                    "verificationStatus: unexpected enum value '%s' - Supported values are [%s]",
                    $verificationStatus,
                    implode(', ', $allowedValues)
                )
            );
        }
        $this->container['verificationStatus'] = $verificationStatus;

        return $this;
    }

    /**
     * Gets vipps
     *
     * @return \Adyen\Model\Management\VippsResponseInfo|null
     */
    public function getVipps()
    {
        return $this->container['vipps'];
    }

    /**
     * Sets vipps
     *
     * @param \Adyen\Model\Management\VippsResponseInfo|null $vipps vipps
     *
     * @return self
     */
    public function setVipps($vipps)
    {
        $this->container['vipps'] = $vipps;

        return $this;
    }

    /**
     * Gets visa
     *
     * @return \Adyen\Model\Management\VisaResponseInfo|null
     */
    public function getVisa()
    {
        return $this->container['visa'];
    }

    /**
     * Sets visa
     *
     * @param \Adyen\Model\Management\VisaResponseInfo|null $visa visa
     *
     * @return self
     */
    public function setVisa($visa)
    {
        $this->container['visa'] = $visa;

        return $this;
    }

    /**
     * Gets wechatpay
     *
     * @return \Adyen\Model\Management\WeChatPayResponseInfo|null
     */
    public function getWechatpay()
    {
        return $this->container['wechatpay'];
    }

    /**
     * Sets wechatpay
     *
     * @param \Adyen\Model\Management\WeChatPayResponseInfo|null $wechatpay wechatpay
     *
     * @return self
     */
    public function setWechatpay($wechatpay)
    {
        $this->container['wechatpay'] = $wechatpay;

        return $this;
    }

    /**
     * Gets wechatpayPos
     *
     * @return \Adyen\Model\Management\WeChatPayPosResponseInfo|null
     */
    public function getWechatpayPos()
    {
        return $this->container['wechatpayPos'];
    }

    /**
     * Sets wechatpayPos
     *
     * @param \Adyen\Model\Management\WeChatPayPosResponseInfo|null $wechatpayPos wechatpayPos
     *
     * @return self
     */
    public function setWechatpayPos($wechatpayPos)
    {
        $this->container['wechatpayPos'] = $wechatpayPos;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    public function offsetExists($offset): bool
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed|null
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return $this->container[$offset] ?? null;
    }

    /**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value): void
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    public function offsetUnset($offset): void
    {
        unset($this->container[$offset]);
    }

    /**
     * Serializes the object to a value that can be serialized natively by json_encode().
     * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
     *
     * @return mixed Returns data which can be serialized by json_encode(), which is a value
     * of any type other than a resource.
     */
    #[\ReturnTypeWillChange]
    public function jsonSerialize()
    {
        return ObjectSerializer::sanitizeForSerialization($this);
    }

    public function toArray(): array
    {
        $array = [];
        foreach (self::$openAPITypes as $propertyName => $propertyType) {
            $propertyValue = $this[$propertyName];
            if ($propertyValue !== null) {
                // Check if the property value is an object and has a toArray() method
                if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) {
                    $array[$propertyName] = $propertyValue->toArray();
                // Check if it's type datetime
                } elseif ($propertyValue instanceof \DateTime) {
                    $array[$propertyName] = $propertyValue->format(DATE_ATOM);
                // If it's an array type we should check whether it contains objects and if so call toArray method
                } elseif (is_array($propertyValue)) {
                    $array[$propertyName] = array_map(function ($item) {
                        return $item instanceof ModelInterface ? $item->toArray() : $item;
                    }, $propertyValue);
                } else {
                    // Otherwise, directly assign the property value to the array
                    $array[$propertyName] = $propertyValue;
                }
            }
        }
        return $array;
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        return json_encode(
            ObjectSerializer::sanitizeForSerialization($this),
            JSON_PRETTY_PRINT
        );
    }
}
