<?php
/**
 * PaymentsGetAvailablePaymentMethods200ResponseInner
 *
 * PHP version 8.1
 *
 * @category Class
 * @package  Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * Simply.in API
 *
 * Swagger documentation for SIMPLY.IN
 *
 * The version of the OpenAPI document: 1.99.21 (preprod)
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.14.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

namespace Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model;

use \ArrayAccess;
use \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\ObjectSerializer;

/**
 * PaymentsGetAvailablePaymentMethods200ResponseInner Class Doc Comment
 *
 * @category Class
 * @package  Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class PaymentsGetAvailablePaymentMethods200ResponseInner implements ModelInterface, ArrayAccess, \JsonSerializable {

	public const DISCRIMINATOR = null;

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

	/**
	 * Array of property to type mappings. Used for (de)serialization
	 *
	 * @var string[]
	 */
	protected static $openAPITypes = [
		'payment_method_id'  => 'string',
		'type'               => 'string',
		'type_name'          => 'string',
		'name'               => 'string',
		'slug'               => 'string',
		'logo_thumbnail_url' => 'string',
		'payment_provider'   => '\Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerPaymentProvider',
		'card'               => '\Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerCard',
		'add_card'           => '\Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerAddCard',
	];

	/**
	 * 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 = [
		'payment_method_id'  => 'uuid',
		'type'               => null,
		'type_name'          => null,
		'name'               => null,
		'slug'               => null,
		'logo_thumbnail_url' => 'uri',
		'payment_provider'   => null,
		'card'               => null,
		'add_card'           => null,
	];

	/**
	 * Array of nullable properties. Used for (de)serialization
	 *
	 * @var boolean[]
	 */
	protected static array $openAPINullables = [
		'payment_method_id'  => false,
		'type'               => false,
		'type_name'          => false,
		'name'               => false,
		'slug'               => false,
		'logo_thumbnail_url' => false,
		'payment_provider'   => false,
		'card'               => true,
		'add_card'           => true,
	];

	/**
	 * If a nullable field gets set to null, insert it here
	 *
	 * @var boolean[]
	 */
	protected array $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 = [
		'payment_method_id'  => 'paymentMethodId',
		'type'               => 'type',
		'type_name'          => 'typeName',
		'name'               => 'name',
		'slug'               => 'slug',
		'logo_thumbnail_url' => 'logoThumbnailUrl',
		'payment_provider'   => 'paymentProvider',
		'card'               => 'card',
		'add_card'           => 'addCard',
	];

	/**
	 * Array of attributes to setter functions (for deserialization of responses)
	 *
	 * @var string[]
	 */
	protected static $setters = [
		'payment_method_id'  => 'setPaymentMethodId',
		'type'               => 'setType',
		'type_name'          => 'setTypeName',
		'name'               => 'setName',
		'slug'               => 'setSlug',
		'logo_thumbnail_url' => 'setLogoThumbnailUrl',
		'payment_provider'   => 'setPaymentProvider',
		'card'               => 'setCard',
		'add_card'           => 'setAddCard',
	];

	/**
	 * Array of attributes to getter functions (for serialization of requests)
	 *
	 * @var string[]
	 */
	protected static $getters = [
		'payment_method_id'  => 'getPaymentMethodId',
		'type'               => 'getType',
		'type_name'          => 'getTypeName',
		'name'               => 'getName',
		'slug'               => 'getSlug',
		'logo_thumbnail_url' => 'getLogoThumbnailUrl',
		'payment_provider'   => 'getPaymentProvider',
		'card'               => 'getCard',
		'add_card'           => 'getAddCard',
	];

	/**
	 * 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 TYPE_CARD = 'card';

	public const TYPE_ADD_CARD = 'add_card';

	public const TYPE_BLIK = 'blik';

	public const TYPE_PAY_BY_LINK = 'pay_by_link';

	public const TYPE_APPLEPAY = 'applepay';

	public const TYPE_GOOGLEPAY = 'googlepay';

	public const TYPE_PAYWALL = 'paywall';

	public const TYPE_OTHER = 'other';

	public const SLUG_BLIK = 'blik';

	public const SLUG_CARD = 'card';

	public const SLUG_GOOGLEPAY = 'googlepay';

	public const SLUG_APPLEPAY = 'applepay';

	public const SLUG_PAYWALL = 'paywall';

	public const SLUG_DIRECT_CARRIER_BILLING = 'direct_carrier_billing';

	public const SLUG_VOUCHER = 'voucher';

	public const SLUG_BANK_TRANSFER = 'bank_transfer';

	public const SLUG_PAY_BY_LINK_ALIOR = 'pay_by_link_alior';

	public const SLUG_PAY_BY_LINK_ALIOR_INSTALLMENTS = 'pay_by_link_alior_installments';

	public const SLUG_PAY_BY_LINK_ALLIANZ = 'pay_by_link_allianz';

	public const SLUG_PAY_BY_LINK_APPLEPAY = 'pay_by_link_applepay';

	public const SLUG_PAY_BY_LINK_BANCONTACT = 'pay_by_link_bancontact';

	public const SLUG_PAY_BY_LINK_BLIK = 'pay_by_link_blik';

	public const SLUG_PAY_BY_LINK_BLIKPAYLATER = 'pay_by_link_blikpaylater';

	public const SLUG_PAY_BY_LINK_BNPPARIBAS = 'pay_by_link_bnpparibas';

	public const SLUG_PAY_BY_LINK_BOS = 'pay_by_link_bos';

	public const SLUG_PAY_BY_LINK_CARD = 'pay_by_link_card';

	public const SLUG_PAY_BY_LINK_CITY = 'pay_by_link_city';

	public const SLUG_PAY_BY_LINK_CREDITAGRICOLE = 'pay_by_link_creditagricole';

	public const SLUG_PAY_BY_LINK_CRYPTO = 'pay_by_link_crypto';

	public const SLUG_PAY_BY_LINK_GETINBANK = 'pay_by_link_getinbank';

	public const SLUG_PAY_BY_LINK_GOOGLEPAY = 'pay_by_link_googlepay';

	public const SLUG_PAY_BY_LINK_IDEA = 'pay_by_link_idea';

	public const SLUG_PAY_BY_LINK_IDEAL = 'pay_by_link_ideal';

	public const SLUG_PAY_BY_LINK_ING = 'pay_by_link_ing';

	public const SLUG_PAY_BY_LINK_INTELIGO = 'pay_by_link_inteligo';

	public const SLUG_PAY_BY_LINK_KLARNA = 'pay_by_link_klarna';

	public const SLUG_PAY_BY_LINK_MBANK = 'pay_by_link_mbank';

	public const SLUG_PAY_BY_LINK_MBANK_INSTALLMENTS = 'pay_by_link_mbank_installments';

	public const SLUG_PAY_BY_LINK_MILENIUM = 'pay_by_link_milenium';

	public const SLUG_PAY_BY_LINK_NEOSURF = 'pay_by_link_neosurf';

	public const SLUG_PAY_BY_LINK_NEST = 'pay_by_link_nest';

	public const SLUG_PAY_BY_LINK_NETELLER = 'pay_by_link_neteller';

	public const SLUG_PAY_BY_LINK_NOBLE = 'pay_by_link_noble';

	public const SLUG_PAY_BY_LINK_NOWY = 'pay_by_link_nowy';

	public const SLUG_PAY_BY_LINK_PAYPAL = 'pay_by_link_paypal';

	public const SLUG_PAY_BY_LINK_PAYPO = 'pay_by_link_paypo';

	public const SLUG_PAY_BY_LINK_PAYSAFECARD = 'pay_by_link_paysafecard';

	public const SLUG_PAY_BY_LINK_PAYSAFECASH = 'pay_by_link_paysafecash';

	public const SLUG_PAY_BY_LINK_PAYU_INSTALLMENTS = 'pay_by_link_payu_installments';

	public const SLUG_PAY_BY_LINK_PEKAO = 'pay_by_link_pekao';

	public const SLUG_PAY_BY_LINK_PKO = 'pay_by_link_pko';

	public const SLUG_PAY_BY_LINK_PLUS = 'pay_by_link_plus';

	public const SLUG_PAY_BY_LINK_POCZTOWY = 'pay_by_link_pocztowy';

	public const SLUG_PAY_BY_LINK_PRAGMAGO = 'pay_by_link_pragmago';

	public const SLUG_PAY_BY_LINK_PRZEKAZ = 'pay_by_link_przekaz';

	public const SLUG_PAY_BY_LINK_REVOLUT = 'pay_by_link_revolut';

	public const SLUG_PAY_BY_LINK_SANTANDER = 'pay_by_link_santander';

	public const SLUG_PAY_BY_LINK_SKRILL = 'pay_by_link_skrill';

	public const SLUG_PAY_BY_LINK_SKYCASH = 'pay_by_link_skycash';

	public const SLUG_PAY_BY_LINK_SPOLDZIELCZY = 'pay_by_link_spoldzielczy';

	public const SLUG_PAY_BY_LINK_TOYOTA = 'pay_by_link_toyota';

	public const SLUG_PAY_BY_LINK_TWISTO = 'pay_by_link_twisto';

	public const SLUG_PAY_BY_LINK_UNIONPAY = 'pay_by_link_unionpay';

	public const SLUG_PAY_BY_LINK_VELO = 'pay_by_link_velo';

	public const SLUG_PAY_BY_LINK_VOLKSWAGEN = 'pay_by_link_volkswagen';

	public const SLUG_PAY_BY_LINK_WEBMONEY = 'pay_by_link_webmoney';

	public const SLUG_PAY_BY_LINK_WECHAT = 'pay_by_link_wechat';

	public const SLUG_PAY_BY_LINK_ZABKA = 'pay_by_link_zabka';

	public const SLUG_PAY_BY_LINK_ZEN = 'pay_by_link_zen';

	/**
	 * Gets allowable values of the enum
	 *
	 * @return string[]
	 */
	public function getTypeAllowableValues() {
		return [
			self::TYPE_CARD,
			self::TYPE_ADD_CARD,
			self::TYPE_BLIK,
			self::TYPE_PAY_BY_LINK,
			self::TYPE_APPLEPAY,
			self::TYPE_GOOGLEPAY,
			self::TYPE_PAYWALL,
			self::TYPE_OTHER,
		];
	}

	/**
	 * Gets allowable values of the enum
	 *
	 * @return string[]
	 */
	public function getSlugAllowableValues() {
		return [
			self::SLUG_BLIK,
			self::SLUG_CARD,
			self::SLUG_GOOGLEPAY,
			self::SLUG_APPLEPAY,
			self::SLUG_PAYWALL,
			self::SLUG_DIRECT_CARRIER_BILLING,
			self::SLUG_VOUCHER,
			self::SLUG_BANK_TRANSFER,
			self::SLUG_PAY_BY_LINK_ALIOR,
			self::SLUG_PAY_BY_LINK_ALIOR_INSTALLMENTS,
			self::SLUG_PAY_BY_LINK_ALLIANZ,
			self::SLUG_PAY_BY_LINK_APPLEPAY,
			self::SLUG_PAY_BY_LINK_BANCONTACT,
			self::SLUG_PAY_BY_LINK_BLIK,
			self::SLUG_PAY_BY_LINK_BLIKPAYLATER,
			self::SLUG_PAY_BY_LINK_BNPPARIBAS,
			self::SLUG_PAY_BY_LINK_BOS,
			self::SLUG_PAY_BY_LINK_CARD,
			self::SLUG_PAY_BY_LINK_CITY,
			self::SLUG_PAY_BY_LINK_CREDITAGRICOLE,
			self::SLUG_PAY_BY_LINK_CRYPTO,
			self::SLUG_PAY_BY_LINK_GETINBANK,
			self::SLUG_PAY_BY_LINK_GOOGLEPAY,
			self::SLUG_PAY_BY_LINK_IDEA,
			self::SLUG_PAY_BY_LINK_IDEAL,
			self::SLUG_PAY_BY_LINK_ING,
			self::SLUG_PAY_BY_LINK_INTELIGO,
			self::SLUG_PAY_BY_LINK_KLARNA,
			self::SLUG_PAY_BY_LINK_MBANK,
			self::SLUG_PAY_BY_LINK_MBANK_INSTALLMENTS,
			self::SLUG_PAY_BY_LINK_MILENIUM,
			self::SLUG_PAY_BY_LINK_NEOSURF,
			self::SLUG_PAY_BY_LINK_NEST,
			self::SLUG_PAY_BY_LINK_NETELLER,
			self::SLUG_PAY_BY_LINK_NOBLE,
			self::SLUG_PAY_BY_LINK_NOWY,
			self::SLUG_PAY_BY_LINK_PAYPAL,
			self::SLUG_PAY_BY_LINK_PAYPO,
			self::SLUG_PAY_BY_LINK_PAYSAFECARD,
			self::SLUG_PAY_BY_LINK_PAYSAFECASH,
			self::SLUG_PAY_BY_LINK_PAYU_INSTALLMENTS,
			self::SLUG_PAY_BY_LINK_PEKAO,
			self::SLUG_PAY_BY_LINK_PKO,
			self::SLUG_PAY_BY_LINK_PLUS,
			self::SLUG_PAY_BY_LINK_POCZTOWY,
			self::SLUG_PAY_BY_LINK_PRAGMAGO,
			self::SLUG_PAY_BY_LINK_PRZEKAZ,
			self::SLUG_PAY_BY_LINK_REVOLUT,
			self::SLUG_PAY_BY_LINK_SANTANDER,
			self::SLUG_PAY_BY_LINK_SKRILL,
			self::SLUG_PAY_BY_LINK_SKYCASH,
			self::SLUG_PAY_BY_LINK_SPOLDZIELCZY,
			self::SLUG_PAY_BY_LINK_TOYOTA,
			self::SLUG_PAY_BY_LINK_TWISTO,
			self::SLUG_PAY_BY_LINK_UNIONPAY,
			self::SLUG_PAY_BY_LINK_VELO,
			self::SLUG_PAY_BY_LINK_VOLKSWAGEN,
			self::SLUG_PAY_BY_LINK_WEBMONEY,
			self::SLUG_PAY_BY_LINK_WECHAT,
			self::SLUG_PAY_BY_LINK_ZABKA,
			self::SLUG_PAY_BY_LINK_ZEN,
		];
	}

	/**
	 * Associative array for storing property values
	 *
	 * @var mixed[]
	 */
	protected $container = [];

	/**
	 * Constructor
	 *
	 * @param mixed[]|null $data Associated array of property values
	 *                      initializing the model
	 */
	public function __construct( ?array $data = null ) {
		$this->setIfExists( 'payment_method_id', $data ?? [], null );
		$this->setIfExists( 'type', $data ?? [], null );
		$this->setIfExists( 'type_name', $data ?? [], null );
		$this->setIfExists( 'name', $data ?? [], null );
		$this->setIfExists( 'slug', $data ?? [], null );
		$this->setIfExists( 'logo_thumbnail_url', $data ?? [], null );
		$this->setIfExists( 'payment_provider', $data ?? [], null );
		$this->setIfExists( 'card', $data ?? [], null );
		$this->setIfExists( 'add_card', $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['payment_method_id'] === null ) {
			$invalidProperties[] = "'payment_method_id' can't be null";
		}
		if ( $this->container['type'] === null ) {
			$invalidProperties[] = "'type' can't be null";
		}
		$allowedValues = $this->getTypeAllowableValues();
		if ( ! is_null( $this->container['type'] ) && ! in_array( $this->container['type'],
				$allowedValues,
				true ) ) {
			$invalidProperties[] = sprintf(
				"invalid value '%s' for 'type', must be one of '%s'",
				$this->container['type'],
				implode( "', '", $allowedValues )
			);
		}

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

		if ( $this->container['payment_provider'] === null ) {
			$invalidProperties[] = "'payment_provider' can't be null";
		}

		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 payment_method_id
	 *
	 * @return string
	 */
	public function getPaymentMethodId() {
		return $this->container['payment_method_id'];
	}

	/**
	 * Sets payment_method_id
	 *
	 * @param string $payment_method_id payment_method_id
	 *
	 * @return self
	 */
	public function setPaymentMethodId( $payment_method_id ) {
		if ( is_null( $payment_method_id ) ) {
			throw new \InvalidArgumentException( 'non-nullable payment_method_id cannot be null' );
		}
		$this->container['payment_method_id'] = $payment_method_id;

		return $this;
	}

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

	/**
	 * Sets type
	 *
	 * @param string $type type
	 *
	 * @return self
	 */
	public function setType( $type ) {
		if ( is_null( $type ) ) {
			throw new \InvalidArgumentException( 'non-nullable type cannot be null' );
		}
		$allowedValues = $this->getTypeAllowableValues();
		if ( ! in_array( $type, $allowedValues, true ) ) {
			throw new \InvalidArgumentException(
				esc_html( sprintf(
						"Invalid value '%s' for 'type', must be one of '%s'",
						$type,
						implode( "', '", $allowedValues )
					)
				) );
		}
		$this->container['type'] = $type;

		return $this;
	}

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

	/**
	 * Sets type_name
	 *
	 * @param string $type_name type_name
	 *
	 * @return self
	 */
	public function setTypeName( $type_name ) {
		if ( is_null( $type_name ) ) {
			throw new \InvalidArgumentException( 'non-nullable type_name cannot be null' );
		}
		$this->container['type_name'] = $type_name;

		return $this;
	}

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

	/**
	 * Sets name
	 *
	 * @param string $name name
	 *
	 * @return self
	 */
	public function setName( $name ) {
		if ( is_null( $name ) ) {
			throw new \InvalidArgumentException( 'non-nullable name cannot be null' );
		}
		$this->container['name'] = $name;

		return $this;
	}

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

	/**
	 * Sets slug
	 *
	 * @param string $slug slug
	 *
	 * @return self
	 */
	public function setSlug( $slug ) {
		if ( is_null( $slug ) ) {
			throw new \InvalidArgumentException( 'non-nullable slug cannot be null' );
		}
		$allowedValues = $this->getSlugAllowableValues();
		if ( ! in_array( $slug, $allowedValues, true ) ) {
			throw new \InvalidArgumentException(
				esc_html( sprintf(
					"Invalid value '%s' for 'slug', must be one of '%s'",
					$slug,
					implode( "', '", $allowedValues )
				) )
			);
		}
		$this->container['slug'] = $slug;

		return $this;
	}

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

	/**
	 * Sets logo_thumbnail_url
	 *
	 * @param string|null $logo_thumbnail_url logo_thumbnail_url
	 *
	 * @return self
	 */
	public function setLogoThumbnailUrl( $logo_thumbnail_url ) {
		if ( is_null( $logo_thumbnail_url ) ) {
			throw new \InvalidArgumentException( 'non-nullable logo_thumbnail_url cannot be null' );
		}
		$this->container['logo_thumbnail_url'] = $logo_thumbnail_url;

		return $this;
	}

	/**
	 * Gets payment_provider
	 *
	 * @return \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerPaymentProvider
	 */
	public function getPaymentProvider() {
		return $this->container['payment_provider'];
	}

	/**
	 * Sets payment_provider
	 *
	 * @param \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerPaymentProvider $payment_provider payment_provider
	 *
	 * @return self
	 */
	public function setPaymentProvider( $payment_provider ) {
		if ( is_null( $payment_provider ) ) {
			throw new \InvalidArgumentException( 'non-nullable payment_provider cannot be null' );
		}
		$this->container['payment_provider'] = $payment_provider;

		return $this;
	}

	/**
	 * Gets card
	 *
	 * @return \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerCard|null
	 */
	public function getCard() {
		return $this->container['card'];
	}

	/**
	 * Sets card
	 *
	 * @param \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerCard|null $card card
	 *
	 * @return self
	 */
	public function setCard( $card ) {
		if ( is_null( $card ) ) {
			array_push( $this->openAPINullablesSetToNull, 'card' );
		} else {
			$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
			$index              = array_search( 'card', $nullablesSetToNull );
			if ( $index !== false ) {
				unset( $nullablesSetToNull[ $index ] );
				$this->setOpenAPINullablesSetToNull( $nullablesSetToNull );
			}
		}
		$this->container['card'] = $card;

		return $this;
	}

	/**
	 * Gets add_card
	 *
	 * @return \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerAddCard|null
	 */
	public function getAddCard() {
		return $this->container['add_card'];
	}

	/**
	 * Sets add_card
	 *
	 * @param \Simplyin\Simplyin_W_Plugin\Lib\Remote\SimplyInApi\Model\PaymentsGetAvailablePaymentMethods200ResponseInnerAddCard|null $add_card add_card
	 *
	 * @return self
	 */
	public function setAddCard( $add_card ) {
		if ( is_null( $add_card ) ) {
			array_push( $this->openAPINullablesSetToNull, 'add_card' );
		} else {
			$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
			$index              = array_search( 'add_card',
				$nullablesSetToNull );
			if ( $index !== false ) {
				unset( $nullablesSetToNull[ $index ] );
				$this->setOpenAPINullablesSetToNull( $nullablesSetToNull );
			}
		}
		$this->container['add_card'] = $add_card;

		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 );
	}

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

	/**
	 * Gets a header-safe presentation of the object
	 *
	 * @return string
	 */
	public function toHeaderValue() {
		return json_encode( ObjectSerializer::sanitizeForSerialization( $this ) );
	}
}
