<?php 
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fwrite
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fclose
// phpcs:ignoreFile WordPress.WP.AlternativeFunctions.file_system_operations_fopen
// phpcs:ignoreFile WordPress.Security.EscapeOutput.ExceptionNotEscaped            

/**
 * EpsApiMyApi2WebModelsShipmentShipmentModelPaymentInfo
 *
 * PHP version 7.4
 *
 * @category Class
 * @package  PPLCZCPL
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * CPL
 *
 * **Changelog**    * 2024-08-22 - SPRJ-13791 - validace PRTE / PRBC externích čísel - nelze použít najednou    - /shipment/batch    * 2024-07-01 - SPRJ-13838 - přidání    - /customer/address    * 2023-11-23 - SPRJ-12703 - CPL - /shipment - timestamp    - /shipment - Rozšíření výstupu o LastUpdateDate.    * 2023-07-13 - SPRJ-11888 - přidání    - /codelist/status - číselník statusů    * 2023-07-13 - SPRJ-11953 - přidání    - /order/cancel - storno objednávky
 *
 * The version of the OpenAPI document: v1
 * 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 PPLCZCPL\Model;

use \ArrayAccess;
use \PPLCZCPL\ObjectSerializer;

/**
 * EpsApiMyApi2WebModelsShipmentShipmentModelPaymentInfo Class Doc Comment
 *
 * @category Class
 * @package  PPLCZCPL
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 * @implements \ArrayAccess<string, mixed>
 */
class EpsApiMyApi2WebModelsShipmentShipmentModelPaymentInfo implements ModelInterface, ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

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

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $openAPITypes = [
        'paid_by_card' => 'bool',
        'cod_paid_date' => '\DateTime',
        'invoice_number' => 'string',
        'bank_account' => 'string',
        'bank_code' => 'string',
        'cod_bank_statement_date' => '\DateTime',
        'cod_currency' => 'string',
        'cod_payment_acc_date' => '\DateTime',
        'cod_price' => 'double',
        'cod_variable_symbol' => 'string',
        'specific_symbol' => 'string'
    ];

    /**
      * 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 = [
        'paid_by_card' => null,
        'cod_paid_date' => 'date-time',
        'invoice_number' => null,
        'bank_account' => null,
        'bank_code' => null,
        'cod_bank_statement_date' => 'date-time',
        'cod_currency' => null,
        'cod_payment_acc_date' => 'date-time',
        'cod_price' => 'double',
        'cod_variable_symbol' => null,
        'specific_symbol' => null
    ];

    /**
     * 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 attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'paid_by_card' => 'paidByCard',
        'cod_paid_date' => 'codPaidDate',
        'invoice_number' => 'invoiceNumber',
        'bank_account' => 'bankAccount',
        'bank_code' => 'bankCode',
        'cod_bank_statement_date' => 'codBankStatementDate',
        'cod_currency' => 'codCurrency',
        'cod_payment_acc_date' => 'codPaymentAccDate',
        'cod_price' => 'codPrice',
        'cod_variable_symbol' => 'codVariableSymbol',
        'specific_symbol' => 'specificSymbol'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'paid_by_card' => 'setPaidByCard',
        'cod_paid_date' => 'setCodPaidDate',
        'invoice_number' => 'setInvoiceNumber',
        'bank_account' => 'setBankAccount',
        'bank_code' => 'setBankCode',
        'cod_bank_statement_date' => 'setCodBankStatementDate',
        'cod_currency' => 'setCodCurrency',
        'cod_payment_acc_date' => 'setCodPaymentAccDate',
        'cod_price' => 'setCodPrice',
        'cod_variable_symbol' => 'setCodVariableSymbol',
        'specific_symbol' => 'setSpecificSymbol'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'paid_by_card' => 'getPaidByCard',
        'cod_paid_date' => 'getCodPaidDate',
        'invoice_number' => 'getInvoiceNumber',
        'bank_account' => 'getBankAccount',
        'bank_code' => 'getBankCode',
        'cod_bank_statement_date' => 'getCodBankStatementDate',
        'cod_currency' => 'getCodCurrency',
        'cod_payment_acc_date' => 'getCodPaymentAccDate',
        'cod_price' => 'getCodPrice',
        'cod_variable_symbol' => 'getCodVariableSymbol',
        'specific_symbol' => 'getSpecificSymbol'
    ];

    /**
     * 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;
    }


    /**
     * 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->container['paid_by_card'] = $data['paid_by_card'] ?? null;
        $this->container['cod_paid_date'] = $data['cod_paid_date'] ?? null;
        $this->container['invoice_number'] = $data['invoice_number'] ?? null;
        $this->container['bank_account'] = $data['bank_account'] ?? null;
        $this->container['bank_code'] = $data['bank_code'] ?? null;
        $this->container['cod_bank_statement_date'] = $data['cod_bank_statement_date'] ?? null;
        $this->container['cod_currency'] = $data['cod_currency'] ?? null;
        $this->container['cod_payment_acc_date'] = $data['cod_payment_acc_date'] ?? null;
        $this->container['cod_price'] = $data['cod_price'] ?? null;
        $this->container['cod_variable_symbol'] = $data['cod_variable_symbol'] ?? null;
        $this->container['specific_symbol'] = $data['specific_symbol'] ?? null;
    }

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

        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 paid_by_card
     *
     * @return bool|null
     */
    public function getPaidByCard()
    {
        return $this->container['paid_by_card'];
    }

    /**
     * Sets paid_by_card
     *
     * @param bool|null $paid_by_card paid_by_card
     *
     * @return self
     */
    public function setPaidByCard($paid_by_card)
    {
        $this->container['paid_by_card'] = $paid_by_card;

        return $this;
    }

    /**
     * Gets cod_paid_date
     *
     * @return \DateTime|null
     */
    public function getCodPaidDate()
    {
        return $this->container['cod_paid_date'];
    }

    /**
     * Sets cod_paid_date
     *
     * @param \DateTime|null $cod_paid_date cod_paid_date
     *
     * @return self
     */
    public function setCodPaidDate($cod_paid_date)
    {
        $this->container['cod_paid_date'] = $cod_paid_date;

        return $this;
    }

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

    /**
     * Sets invoice_number
     *
     * @param string|null $invoice_number invoice_number
     *
     * @return self
     */
    public function setInvoiceNumber($invoice_number)
    {
        $this->container['invoice_number'] = $invoice_number;

        return $this;
    }

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

    /**
     * Sets bank_account
     *
     * @param string|null $bank_account bank_account
     *
     * @return self
     */
    public function setBankAccount($bank_account)
    {
        $this->container['bank_account'] = $bank_account;

        return $this;
    }

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

    /**
     * Sets bank_code
     *
     * @param string|null $bank_code bank_code
     *
     * @return self
     */
    public function setBankCode($bank_code)
    {
        $this->container['bank_code'] = $bank_code;

        return $this;
    }

    /**
     * Gets cod_bank_statement_date
     *
     * @return \DateTime|null
     */
    public function getCodBankStatementDate()
    {
        return $this->container['cod_bank_statement_date'];
    }

    /**
     * Sets cod_bank_statement_date
     *
     * @param \DateTime|null $cod_bank_statement_date cod_bank_statement_date
     *
     * @return self
     */
    public function setCodBankStatementDate($cod_bank_statement_date)
    {
        $this->container['cod_bank_statement_date'] = $cod_bank_statement_date;

        return $this;
    }

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

    /**
     * Sets cod_currency
     *
     * @param string|null $cod_currency cod_currency
     *
     * @return self
     */
    public function setCodCurrency($cod_currency)
    {
        $this->container['cod_currency'] = $cod_currency;

        return $this;
    }

    /**
     * Gets cod_payment_acc_date
     *
     * @return \DateTime|null
     */
    public function getCodPaymentAccDate()
    {
        return $this->container['cod_payment_acc_date'];
    }

    /**
     * Sets cod_payment_acc_date
     *
     * @param \DateTime|null $cod_payment_acc_date cod_payment_acc_date
     *
     * @return self
     */
    public function setCodPaymentAccDate($cod_payment_acc_date)
    {
        $this->container['cod_payment_acc_date'] = $cod_payment_acc_date;

        return $this;
    }

    /**
     * Gets cod_price
     *
     * @return double|null
     */
    public function getCodPrice()
    {
        return $this->container['cod_price'];
    }

    /**
     * Sets cod_price
     *
     * @param double|null $cod_price cod_price
     *
     * @return self
     */
    public function setCodPrice($cod_price)
    {
        $this->container['cod_price'] = $cod_price;

        return $this;
    }

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

    /**
     * Sets cod_variable_symbol
     *
     * @param string|null $cod_variable_symbol cod_variable_symbol
     *
     * @return self
     */
    public function setCodVariableSymbol($cod_variable_symbol)
    {
        $this->container['cod_variable_symbol'] = $cod_variable_symbol;

        return $this;
    }

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

    /**
     * Sets specific_symbol
     *
     * @param string|null $specific_symbol specific_symbol
     *
     * @return self
     */
    public function setSpecificSymbol($specific_symbol)
    {
        $this->container['specific_symbol'] = $specific_symbol;

        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 ObjectSerializerPpl::sanitizeForSerialization($this);
    }

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

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


