1258 lines
32 KiB
PHP
1258 lines
32 KiB
PHP
<?php
|
||
/**
|
||
* Customer
|
||
*
|
||
* PHP version 8.1
|
||
*
|
||
* @category Class
|
||
* @package Europharmacy\EuromedicaClient
|
||
* @author OpenAPI Generator team
|
||
* @link https://openapi-generator.tech
|
||
*/
|
||
|
||
/**
|
||
* Euromedica Two Web Api
|
||
*
|
||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||
*
|
||
* The version of the OpenAPI document: v1
|
||
* Contact: development@europharmacy.gr
|
||
* Generated by: https://openapi-generator.tech
|
||
* Generator version: 7.20.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 Europharmacy\EuromedicaClient\Model;
|
||
|
||
use \ArrayAccess;
|
||
use \Europharmacy\EuromedicaClient\ObjectSerializer;
|
||
|
||
/**
|
||
* Customer Class Doc Comment
|
||
*
|
||
* @category Class
|
||
* @package Europharmacy\EuromedicaClient
|
||
* @author OpenAPI Generator team
|
||
* @link https://openapi-generator.tech
|
||
* @implements \ArrayAccess<string, mixed>
|
||
*/
|
||
class Customer implements ModelInterface, ArrayAccess, \JsonSerializable
|
||
{
|
||
public const DISCRIMINATOR = null;
|
||
|
||
/**
|
||
* The original name of the model.
|
||
*
|
||
* @var string
|
||
*/
|
||
protected static $openAPIModelName = 'Customer';
|
||
|
||
/**
|
||
* Array of property to type mappings. Used for (de)serialization
|
||
*
|
||
* @var string[]
|
||
*/
|
||
protected static $openAPITypes = [
|
||
'id' => 'int',
|
||
'last_name' => 'string',
|
||
'first_name' => 'string',
|
||
'nikcname' => 'string',
|
||
'phone' => 'string',
|
||
'mobile' => 'string',
|
||
'family_name' => 'string',
|
||
'amka' => 'string',
|
||
'bonus_card' => 'string',
|
||
'address' => 'string',
|
||
'post_code' => 'string',
|
||
'city' => 'string',
|
||
'country_code' => 'string',
|
||
'country_name' => 'string',
|
||
'birth_day' => '\DateTime',
|
||
'tax_number' => 'string',
|
||
'tax_office' => 'string',
|
||
'profession' => 'string',
|
||
'brand_id' => 'int',
|
||
'email' => 'string',
|
||
'notes' => 'string',
|
||
'eshop_id' => 'int'
|
||
];
|
||
|
||
/**
|
||
* 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 = [
|
||
'id' => 'int32',
|
||
'last_name' => null,
|
||
'first_name' => null,
|
||
'nikcname' => null,
|
||
'phone' => null,
|
||
'mobile' => null,
|
||
'family_name' => null,
|
||
'amka' => null,
|
||
'bonus_card' => null,
|
||
'address' => null,
|
||
'post_code' => null,
|
||
'city' => null,
|
||
'country_code' => null,
|
||
'country_name' => null,
|
||
'birth_day' => 'date-time',
|
||
'tax_number' => null,
|
||
'tax_office' => null,
|
||
'profession' => null,
|
||
'brand_id' => 'int32',
|
||
'email' => null,
|
||
'notes' => null,
|
||
'eshop_id' => 'int32'
|
||
];
|
||
|
||
/**
|
||
* Array of nullable properties. Used for (de)serialization
|
||
*
|
||
* @var boolean[]
|
||
*/
|
||
protected static array $openAPINullables = [
|
||
'id' => false,
|
||
'last_name' => true,
|
||
'first_name' => true,
|
||
'nikcname' => true,
|
||
'phone' => true,
|
||
'mobile' => true,
|
||
'family_name' => true,
|
||
'amka' => true,
|
||
'bonus_card' => true,
|
||
'address' => true,
|
||
'post_code' => true,
|
||
'city' => true,
|
||
'country_code' => true,
|
||
'country_name' => true,
|
||
'birth_day' => true,
|
||
'tax_number' => true,
|
||
'tax_office' => true,
|
||
'profession' => true,
|
||
'brand_id' => false,
|
||
'email' => true,
|
||
'notes' => true,
|
||
'eshop_id' => false
|
||
];
|
||
|
||
/**
|
||
* 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 = [
|
||
'id' => 'id',
|
||
'last_name' => 'lastName',
|
||
'first_name' => 'firstName',
|
||
'nikcname' => 'nikcname',
|
||
'phone' => 'phone',
|
||
'mobile' => 'mobile',
|
||
'family_name' => 'familyName',
|
||
'amka' => 'amka',
|
||
'bonus_card' => 'bonusCard',
|
||
'address' => 'address',
|
||
'post_code' => 'postCode',
|
||
'city' => 'city',
|
||
'country_code' => 'countryCode',
|
||
'country_name' => 'countryName',
|
||
'birth_day' => 'birthDay',
|
||
'tax_number' => 'taxNumber',
|
||
'tax_office' => 'taxOffice',
|
||
'profession' => 'profession',
|
||
'brand_id' => 'brandId',
|
||
'email' => 'email',
|
||
'notes' => 'notes',
|
||
'eshop_id' => 'eshopId'
|
||
];
|
||
|
||
/**
|
||
* Array of attributes to setter functions (for deserialization of responses)
|
||
*
|
||
* @var string[]
|
||
*/
|
||
protected static $setters = [
|
||
'id' => 'setId',
|
||
'last_name' => 'setLastName',
|
||
'first_name' => 'setFirstName',
|
||
'nikcname' => 'setNikcname',
|
||
'phone' => 'setPhone',
|
||
'mobile' => 'setMobile',
|
||
'family_name' => 'setFamilyName',
|
||
'amka' => 'setAmka',
|
||
'bonus_card' => 'setBonusCard',
|
||
'address' => 'setAddress',
|
||
'post_code' => 'setPostCode',
|
||
'city' => 'setCity',
|
||
'country_code' => 'setCountryCode',
|
||
'country_name' => 'setCountryName',
|
||
'birth_day' => 'setBirthDay',
|
||
'tax_number' => 'setTaxNumber',
|
||
'tax_office' => 'setTaxOffice',
|
||
'profession' => 'setProfession',
|
||
'brand_id' => 'setBrandId',
|
||
'email' => 'setEmail',
|
||
'notes' => 'setNotes',
|
||
'eshop_id' => 'setEshopId'
|
||
];
|
||
|
||
/**
|
||
* Array of attributes to getter functions (for serialization of requests)
|
||
*
|
||
* @var string[]
|
||
*/
|
||
protected static $getters = [
|
||
'id' => 'getId',
|
||
'last_name' => 'getLastName',
|
||
'first_name' => 'getFirstName',
|
||
'nikcname' => 'getNikcname',
|
||
'phone' => 'getPhone',
|
||
'mobile' => 'getMobile',
|
||
'family_name' => 'getFamilyName',
|
||
'amka' => 'getAmka',
|
||
'bonus_card' => 'getBonusCard',
|
||
'address' => 'getAddress',
|
||
'post_code' => 'getPostCode',
|
||
'city' => 'getCity',
|
||
'country_code' => 'getCountryCode',
|
||
'country_name' => 'getCountryName',
|
||
'birth_day' => 'getBirthDay',
|
||
'tax_number' => 'getTaxNumber',
|
||
'tax_office' => 'getTaxOffice',
|
||
'profession' => 'getProfession',
|
||
'brand_id' => 'getBrandId',
|
||
'email' => 'getEmail',
|
||
'notes' => 'getNotes',
|
||
'eshop_id' => 'getEshopId'
|
||
];
|
||
|
||
/**
|
||
* 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[]|null $data Associated array of property values
|
||
* initializing the model
|
||
*/
|
||
public function __construct(?array $data = null)
|
||
{
|
||
$this->setIfExists('id', $data ?? [], null);
|
||
$this->setIfExists('last_name', $data ?? [], null);
|
||
$this->setIfExists('first_name', $data ?? [], null);
|
||
$this->setIfExists('nikcname', $data ?? [], null);
|
||
$this->setIfExists('phone', $data ?? [], null);
|
||
$this->setIfExists('mobile', $data ?? [], null);
|
||
$this->setIfExists('family_name', $data ?? [], null);
|
||
$this->setIfExists('amka', $data ?? [], null);
|
||
$this->setIfExists('bonus_card', $data ?? [], null);
|
||
$this->setIfExists('address', $data ?? [], null);
|
||
$this->setIfExists('post_code', $data ?? [], null);
|
||
$this->setIfExists('city', $data ?? [], null);
|
||
$this->setIfExists('country_code', $data ?? [], null);
|
||
$this->setIfExists('country_name', $data ?? [], null);
|
||
$this->setIfExists('birth_day', $data ?? [], null);
|
||
$this->setIfExists('tax_number', $data ?? [], null);
|
||
$this->setIfExists('tax_office', $data ?? [], null);
|
||
$this->setIfExists('profession', $data ?? [], null);
|
||
$this->setIfExists('brand_id', $data ?? [], null);
|
||
$this->setIfExists('email', $data ?? [], null);
|
||
$this->setIfExists('notes', $data ?? [], null);
|
||
$this->setIfExists('eshop_id', $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 = [];
|
||
|
||
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 id
|
||
*
|
||
* @return int|null
|
||
*/
|
||
public function getId()
|
||
{
|
||
return $this->container['id'];
|
||
}
|
||
|
||
/**
|
||
* Sets id
|
||
*
|
||
* @param int|null $id id
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setId($id)
|
||
{
|
||
if (is_null($id)) {
|
||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||
}
|
||
$this->container['id'] = $id;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets last_name
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getLastName()
|
||
{
|
||
return $this->container['last_name'];
|
||
}
|
||
|
||
/**
|
||
* Sets last_name
|
||
*
|
||
* @param string|null $last_name last_name
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setLastName($last_name)
|
||
{
|
||
if (is_null($last_name)) {
|
||
array_push($this->openAPINullablesSetToNull, 'last_name');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('last_name', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['last_name'] = $last_name;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets first_name
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getFirstName()
|
||
{
|
||
return $this->container['first_name'];
|
||
}
|
||
|
||
/**
|
||
* Sets first_name
|
||
*
|
||
* @param string|null $first_name first_name
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setFirstName($first_name)
|
||
{
|
||
if (is_null($first_name)) {
|
||
array_push($this->openAPINullablesSetToNull, 'first_name');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('first_name', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['first_name'] = $first_name;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets nikcname
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getNikcname()
|
||
{
|
||
return $this->container['nikcname'];
|
||
}
|
||
|
||
/**
|
||
* Sets nikcname
|
||
*
|
||
* @param string|null $nikcname nikcname
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setNikcname($nikcname)
|
||
{
|
||
if (is_null($nikcname)) {
|
||
array_push($this->openAPINullablesSetToNull, 'nikcname');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('nikcname', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['nikcname'] = $nikcname;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets phone
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getPhone()
|
||
{
|
||
return $this->container['phone'];
|
||
}
|
||
|
||
/**
|
||
* Sets phone
|
||
*
|
||
* @param string|null $phone ΣΤΑΘΕΡΟ ΤΗΛΕΦΩΝΟ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setPhone($phone)
|
||
{
|
||
if (is_null($phone)) {
|
||
array_push($this->openAPINullablesSetToNull, 'phone');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('phone', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['phone'] = $phone;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets mobile
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getMobile()
|
||
{
|
||
return $this->container['mobile'];
|
||
}
|
||
|
||
/**
|
||
* Sets mobile
|
||
*
|
||
* @param string|null $mobile ΚΙΝΗΤΟ ΤΗΛΕΦΩΝΟ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setMobile($mobile)
|
||
{
|
||
if (is_null($mobile)) {
|
||
array_push($this->openAPINullablesSetToNull, 'mobile');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('mobile', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['mobile'] = $mobile;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets family_name
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getFamilyName()
|
||
{
|
||
return $this->container['family_name'];
|
||
}
|
||
|
||
/**
|
||
* Sets family_name
|
||
*
|
||
* @param string|null $family_name ΟΝΟΜΑ ΟΙΚΟΓΕΝΕΙΑΣ ΕΦΟΣΟΝ ΑΝΗΚΕΙ ΣΕ ΚΑΠΟΙΑ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setFamilyName($family_name)
|
||
{
|
||
if (is_null($family_name)) {
|
||
array_push($this->openAPINullablesSetToNull, 'family_name');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('family_name', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['family_name'] = $family_name;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets amka
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getAmka()
|
||
{
|
||
return $this->container['amka'];
|
||
}
|
||
|
||
/**
|
||
* Sets amka
|
||
*
|
||
* @param string|null $amka ΑΜΚΑ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setAmka($amka)
|
||
{
|
||
if (is_null($amka)) {
|
||
array_push($this->openAPINullablesSetToNull, 'amka');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('amka', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['amka'] = $amka;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets bonus_card
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getBonusCard()
|
||
{
|
||
return $this->container['bonus_card'];
|
||
}
|
||
|
||
/**
|
||
* Sets bonus_card
|
||
*
|
||
* @param string|null $bonus_card bonus_card
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setBonusCard($bonus_card)
|
||
{
|
||
if (is_null($bonus_card)) {
|
||
array_push($this->openAPINullablesSetToNull, 'bonus_card');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('bonus_card', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['bonus_card'] = $bonus_card;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets address
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getAddress()
|
||
{
|
||
return $this->container['address'];
|
||
}
|
||
|
||
/**
|
||
* Sets address
|
||
*
|
||
* @param string|null $address ΔΙΕΥΘΥΝΣΗ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setAddress($address)
|
||
{
|
||
if (is_null($address)) {
|
||
array_push($this->openAPINullablesSetToNull, 'address');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('address', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['address'] = $address;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets post_code
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getPostCode()
|
||
{
|
||
return $this->container['post_code'];
|
||
}
|
||
|
||
/**
|
||
* Sets post_code
|
||
*
|
||
* @param string|null $post_code ΤΑΧΥΔΡΟΜΙΚΟΣ ΚΩΔΙΚΑΣ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setPostCode($post_code)
|
||
{
|
||
if (is_null($post_code)) {
|
||
array_push($this->openAPINullablesSetToNull, 'post_code');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('post_code', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['post_code'] = $post_code;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets city
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getCity()
|
||
{
|
||
return $this->container['city'];
|
||
}
|
||
|
||
/**
|
||
* Sets city
|
||
*
|
||
* @param string|null $city city
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setCity($city)
|
||
{
|
||
if (is_null($city)) {
|
||
array_push($this->openAPINullablesSetToNull, 'city');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('city', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['city'] = $city;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets country_code
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getCountryCode()
|
||
{
|
||
return $this->container['country_code'];
|
||
}
|
||
|
||
/**
|
||
* Sets country_code
|
||
*
|
||
* @param string|null $country_code ΚΩΔΙΚΟΣ ΧΩΡΑΣ ISO 3166 ALPHA-2
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setCountryCode($country_code)
|
||
{
|
||
if (is_null($country_code)) {
|
||
array_push($this->openAPINullablesSetToNull, 'country_code');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('country_code', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['country_code'] = $country_code;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets country_name
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getCountryName()
|
||
{
|
||
return $this->container['country_name'];
|
||
}
|
||
|
||
/**
|
||
* Sets country_name
|
||
*
|
||
* @param string|null $country_name country_name
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setCountryName($country_name)
|
||
{
|
||
if (is_null($country_name)) {
|
||
array_push($this->openAPINullablesSetToNull, 'country_name');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('country_name', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['country_name'] = $country_name;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets birth_day
|
||
*
|
||
* @return \DateTime|null
|
||
*/
|
||
public function getBirthDay()
|
||
{
|
||
return $this->container['birth_day'];
|
||
}
|
||
|
||
/**
|
||
* Sets birth_day
|
||
*
|
||
* @param \DateTime|null $birth_day birth_day
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setBirthDay($birth_day)
|
||
{
|
||
if (is_null($birth_day)) {
|
||
array_push($this->openAPINullablesSetToNull, 'birth_day');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('birth_day', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['birth_day'] = $birth_day;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets tax_number
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getTaxNumber()
|
||
{
|
||
return $this->container['tax_number'];
|
||
}
|
||
|
||
/**
|
||
* Sets tax_number
|
||
*
|
||
* @param string|null $tax_number ΑΦΜ ΠΕΛΑΤΗ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setTaxNumber($tax_number)
|
||
{
|
||
if (is_null($tax_number)) {
|
||
array_push($this->openAPINullablesSetToNull, 'tax_number');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('tax_number', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['tax_number'] = $tax_number;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets tax_office
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getTaxOffice()
|
||
{
|
||
return $this->container['tax_office'];
|
||
}
|
||
|
||
/**
|
||
* Sets tax_office
|
||
*
|
||
* @param string|null $tax_office ΔΟΥ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setTaxOffice($tax_office)
|
||
{
|
||
if (is_null($tax_office)) {
|
||
array_push($this->openAPINullablesSetToNull, 'tax_office');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('tax_office', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['tax_office'] = $tax_office;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets profession
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getProfession()
|
||
{
|
||
return $this->container['profession'];
|
||
}
|
||
|
||
/**
|
||
* Sets profession
|
||
*
|
||
* @param string|null $profession ΕΠΑΓΓΕΛΜΑ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setProfession($profession)
|
||
{
|
||
if (is_null($profession)) {
|
||
array_push($this->openAPINullablesSetToNull, 'profession');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('profession', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['profession'] = $profession;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets brand_id
|
||
*
|
||
* @return int|null
|
||
*/
|
||
public function getBrandId()
|
||
{
|
||
return $this->container['brand_id'];
|
||
}
|
||
|
||
/**
|
||
* Sets brand_id
|
||
*
|
||
* @param int|null $brand_id ΚΩΔΙΚΟΣ ΕΓΚΑΤΑΣΤΑΣΗΣ
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setBrandId($brand_id)
|
||
{
|
||
if (is_null($brand_id)) {
|
||
throw new \InvalidArgumentException('non-nullable brand_id cannot be null');
|
||
}
|
||
$this->container['brand_id'] = $brand_id;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets email
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getEmail()
|
||
{
|
||
return $this->container['email'];
|
||
}
|
||
|
||
/**
|
||
* Sets email
|
||
*
|
||
* @param string|null $email email
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setEmail($email)
|
||
{
|
||
if (is_null($email)) {
|
||
array_push($this->openAPINullablesSetToNull, 'email');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('email', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['email'] = $email;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets notes
|
||
*
|
||
* @return string|null
|
||
*/
|
||
public function getNotes()
|
||
{
|
||
return $this->container['notes'];
|
||
}
|
||
|
||
/**
|
||
* Sets notes
|
||
*
|
||
* @param string|null $notes notes
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setNotes($notes)
|
||
{
|
||
if (is_null($notes)) {
|
||
array_push($this->openAPINullablesSetToNull, 'notes');
|
||
} else {
|
||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||
$index = array_search('notes', $nullablesSetToNull);
|
||
if ($index !== FALSE) {
|
||
unset($nullablesSetToNull[$index]);
|
||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||
}
|
||
}
|
||
$this->container['notes'] = $notes;
|
||
|
||
return $this;
|
||
}
|
||
|
||
/**
|
||
* Gets eshop_id
|
||
*
|
||
* @return int|null
|
||
*/
|
||
public function getEshopId()
|
||
{
|
||
return $this->container['eshop_id'];
|
||
}
|
||
|
||
/**
|
||
* Sets eshop_id
|
||
*
|
||
* @param int|null $eshop_id eshop_id
|
||
*
|
||
* @return self
|
||
*/
|
||
public function setEshopId($eshop_id)
|
||
{
|
||
if (is_null($eshop_id)) {
|
||
throw new \InvalidArgumentException('non-nullable eshop_id cannot be null');
|
||
}
|
||
$this->container['eshop_id'] = $eshop_id;
|
||
|
||
return $this;
|
||
}
|
||
/**
|
||
* Returns true if offset exists. False otherwise.
|
||
*
|
||
* @param integer|string $offset Offset
|
||
*
|
||
* @return boolean
|
||
*/
|
||
public function offsetExists(mixed $offset): bool
|
||
{
|
||
return isset($this->container[$offset]);
|
||
}
|
||
|
||
/**
|
||
* Gets offset.
|
||
*
|
||
* @param integer|string $offset Offset
|
||
*
|
||
* @return mixed|null
|
||
*/
|
||
#[\ReturnTypeWillChange]
|
||
public function offsetGet(mixed $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|string $offset Offset
|
||
*
|
||
* @return void
|
||
*/
|
||
public function offsetUnset(mixed $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));
|
||
}
|
||
}
|
||
|
||
|