diff --git a/src/ApiException.php b/src/ApiException.php index 493bad0..fdebed9 100644 --- a/src/ApiException.php +++ b/src/ApiException.php @@ -4,8 +4,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,15 @@ namespace Cone\Billingo; -use \Exception; +use Exception; /** * ApiException Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class ApiException extends Exception @@ -64,12 +66,12 @@ class ApiException extends Exception /** * Constructor * - * @param string $message Error message - * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header - * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string + * @param string $message Error message + * @param int $code HTTP status code + * @param string[]|null $responseHeaders HTTP response header + * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string */ - public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) + public function __construct($message = '', $code = 0, $responseHeaders = [], $responseBody = null) { parent::__construct($message, $code); $this->responseHeaders = $responseHeaders; @@ -99,8 +101,7 @@ public function getResponseBody() /** * Sets the deserialized response object (during deserialization) * - * @param mixed $obj Deserialized response object - * + * @param mixed $obj Deserialized response object * @return void */ public function setResponseObject($obj) diff --git a/src/Billingo.php b/src/Billingo.php index 43d2daa..a62b6ec 100644 --- a/src/Billingo.php +++ b/src/Billingo.php @@ -22,47 +22,47 @@ class Billingo /** * The bank account service instance. */ - protected BankAccountApi $bankAccounts; + protected ?BankAccountApi $bankAccounts = null; /** * The currencies service instance. */ - protected CurrencyApi $currencies; + protected ?CurrencyApi $currencies = null; /** * The document service instance. */ - protected DocumentApi $documents; + protected ?DocumentApi $documents = null; /** * The document export service instance. */ - protected DocumentExportApi $documentExports; + protected ?DocumentExportApi $documentExports = null; /** * The organization service instance. */ - protected OrganizationApi $organizations; + protected ?OrganizationApi $organizations = null; /** * The partner service instance. */ - protected PartnerApi $partners; + protected ?PartnerApi $partners = null; /** * The product service instance. */ - protected ProductApi $products; + protected ?ProductApi $products = null; /** * The spending service instance. */ - protected SpendingApi $spendings; + protected ?SpendingApi $spendings = null; /** * The util service instance. */ - protected UtilApi $utils; + protected ?UtilApi $utils = null; /** * Create a new Billingo client. diff --git a/src/Configuration.php b/src/Configuration.php index f70dc35..86a1c61 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -4,8 +4,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -33,13 +34,15 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Configuration { public const BOOLEAN_FORMAT_INT = 'int'; + public const BOOLEAN_FORMAT_STRING = 'string'; /** @@ -135,22 +138,21 @@ public function __construct() /** * Sets API key * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $key API key or token - * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token * @return $this */ public function setApiKey($apiKeyIdentifier, $key) { $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; } /** * Gets API key * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @return null|string API key or token */ public function getApiKey($apiKeyIdentifier) @@ -161,22 +163,21 @@ public function getApiKey($apiKeyIdentifier) /** * Sets the prefix for API key (e.g. Bearer) * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * @param string $prefix API key prefix, e.g. Bearer - * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer * @return $this */ public function setApiKeyPrefix($apiKeyIdentifier, $prefix) { $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; } /** * Gets API key prefix * - * @param string $apiKeyIdentifier API key identifier (authentication scheme) - * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) * @return null|string */ public function getApiKeyPrefix($apiKeyIdentifier) @@ -187,13 +188,13 @@ public function getApiKeyPrefix($apiKeyIdentifier) /** * Sets the access token for OAuth * - * @param string $accessToken Token for OAuth - * + * @param string $accessToken Token for OAuth * @return $this */ public function setAccessToken($accessToken) { $this->accessToken = $accessToken; + return $this; } @@ -210,8 +211,7 @@ public function getAccessToken() /** * Sets boolean format for query string. * - * @param string $booleanFormat Boolean format for query string - * + * @param string $booleanFormatForQueryString Boolean format for query string * @return $this */ public function setBooleanFormatForQueryString(string $booleanFormat) @@ -234,13 +234,13 @@ public function getBooleanFormatForQueryString(): string /** * Sets the username for HTTP basic authentication * - * @param string $username Username for HTTP basic authentication - * + * @param string $username Username for HTTP basic authentication * @return $this */ public function setUsername($username) { $this->username = $username; + return $this; } @@ -257,13 +257,13 @@ public function getUsername() /** * Sets the password for HTTP basic authentication * - * @param string $password Password for HTTP basic authentication - * + * @param string $password Password for HTTP basic authentication * @return $this */ public function setPassword($password) { $this->password = $password; + return $this; } @@ -280,13 +280,13 @@ public function getPassword() /** * Sets the host * - * @param string $host Host - * + * @param string $host Host * @return $this */ public function setHost($host) { $this->host = $host; + return $this; } @@ -303,18 +303,19 @@ public function getHost() /** * Sets the user agent of the api client * - * @param string $userAgent the user agent of the api client + * @param string $userAgent the user agent of the api client + * @return $this * * @throws \InvalidArgumentException - * @return $this */ public function setUserAgent($userAgent) { - if (!is_string($userAgent)) { + if (! is_string($userAgent)) { throw new \InvalidArgumentException('User-agent must be a string.'); } $this->userAgent = $userAgent; + return $this; } @@ -331,13 +332,13 @@ public function getUserAgent() /** * Sets debug flag * - * @param bool $debug Debug flag - * + * @param bool $debug Debug flag * @return $this */ public function setDebug($debug) { $this->debug = $debug; + return $this; } @@ -354,13 +355,13 @@ public function getDebug() /** * Sets the debug file * - * @param string $debugFile Debug file - * + * @param string $debugFile Debug file * @return $this */ public function setDebugFile($debugFile) { $this->debugFile = $debugFile; + return $this; } @@ -377,13 +378,13 @@ public function getDebugFile() /** * Sets the temp folder path * - * @param string $tempFolderPath Temp folder path - * + * @param string $tempFolderPath Temp folder path * @return $this */ public function setTempFolderPath($tempFolderPath) { $this->tempFolderPath = $tempFolderPath; + return $this; } @@ -414,8 +415,7 @@ public static function getDefaultConfiguration() /** * Sets the default configuration instance * - * @param Configuration $config An instance of the Configuration Object - * + * @param Configuration $config An instance of the Configuration Object * @return void */ public static function setDefaultConfiguration(Configuration $config) @@ -430,11 +430,11 @@ public static function setDefaultConfiguration(Configuration $config) */ public static function toDebugReport() { - $report = 'PHP SDK (Cone\Billingo) Debug Report:' . PHP_EOL; - $report .= ' OS: ' . php_uname() . PHP_EOL; - $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: 3.0.14' . PHP_EOL; - $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + $report = 'PHP SDK (Cone\Billingo) Debug Report:'.PHP_EOL; + $report .= ' OS: '.php_uname().PHP_EOL; + $report .= ' PHP Version: '.PHP_VERSION.PHP_EOL; + $report .= ' The version of the OpenAPI document: 3.0.14'.PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL; return $report; } @@ -442,8 +442,7 @@ public static function toDebugReport() /** * Get API key (with prefix if set) * - * @param string $apiKeyIdentifier name of apikey - * + * @param string $apiKeyIdentifier name of apikey * @return null|string API key with the prefix */ public function getApiKeyWithPrefix($apiKeyIdentifier) @@ -458,7 +457,7 @@ public function getApiKeyWithPrefix($apiKeyIdentifier) if ($prefix === null) { $keyWithPrefix = $apiKey; } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; + $keyWithPrefix = $prefix.' '.$apiKey; } return $keyWithPrefix; @@ -473,23 +472,23 @@ public function getHostSettings() { return [ [ - "url" => "https://api.billingo.hu/v3", - "description" => "Billingo API", - ] + 'url' => 'https://api.billingo.hu/v3', + 'description' => 'Billingo API', + ], ]; } /** - * Returns URL based on host settings, index and variables - * - * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients - * @param int $hostIndex index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) - * @return string URL based on host settings - */ - public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostsSettings, $hostIndex, ?array $variables = null) { - if (null === $variables) { + if ($variables === null) { $variables = []; } @@ -499,19 +498,19 @@ public static function getHostString(array $hostSettings, $hostIndex, array $var } $host = $hostsSettings[$hostIndex]; - $url = $host["url"]; + $url = $host['url']; // go through variable and assign a value - foreach ($host["variables"] ?? [] as $name => $variable) { + foreach ($host['variables'] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user - if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum - $url = str_replace("{".$name."}", $variables[$name], $url); + if (! isset($variable['enum_values']) || in_array($variables[$name], $variable['enum_values'], true)) { // check to see if the value is in the enum + $url = str_replace('{'.$name.'}', $variables[$name], $url); } else { - throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); + throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].'. Must be '.implode(',', $variable['enum_values']).'.'); } } else { // use default value - $url = str_replace("{".$name."}", $variable["default_value"], $url); + $url = str_replace('{'.$name.'}', $variable['default_value'], $url); } } @@ -521,8 +520,8 @@ public static function getHostString(array $hostSettings, $hostIndex, array $var /** * Returns URL based on the index and variables * - * @param int $index index of the host settings - * @param array|null $variables hash of variable and the corresponding value (optional) + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ public function getHostFromSettings($index, $variables = null) diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index fa6aa4a..baa4dc1 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -4,8 +4,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -32,16 +33,15 @@ * HeaderSelector Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class HeaderSelector { /** - * @param string[] $accept - * @param string $contentType - * @param bool $isMultipart + * @param string[] $accept * @return string[] */ public function selectHeaders(array $accept, string $contentType, bool $isMultipart): array @@ -53,8 +53,8 @@ public function selectHeaders(array $accept, string $contentType, bool $isMultip $headers['Accept'] = $accept; } - if (!$isMultipart) { - if($contentType === '') { + if (! $isMultipart) { + if ($contentType === '') { $contentType = 'application/json'; } @@ -67,43 +67,41 @@ public function selectHeaders(array $accept, string $contentType, bool $isMultip /** * Return the header 'Accept' based on an array of Accept provided. * - * @param string[] $accept Array of header - * + * @param string[] $accept Array of header * @return null|string Accept (e.g. application/json) */ private function selectAcceptHeader(array $accept): ?string { - # filter out empty entries + // filter out empty entries $accept = array_filter($accept); if (count($accept) === 0) { return null; } - # If there's only one Accept header, just use it + // If there's only one Accept header, just use it if (count($accept) === 1) { return reset($accept); } - # If none of the available Accept headers is of type "json", then just use all them + // If none of the available Accept headers is of type "json", then just use all them $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); if (count($headersWithJson) === 0) { return implode(',', $accept); } - # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, - # to give the highest priority to json-like headers - recalculating the existing ones, if needed + // If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, + // to give the highest priority to json-like headers - recalculating the existing ones, if needed return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); } /** - * Create an Accept header string from the given "Accept" headers array, recalculating all weights - * - * @param string[] $accept Array of Accept Headers - * @param string[] $headersWithJson Array of Accept Headers of type "json" - * - * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") - */ + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string { $processedHeaders = [ @@ -130,7 +128,7 @@ private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headers $hasMoreThan28Headers = count($accept) > 28; - foreach($processedHeaders as $headers) { + foreach ($processedHeaders as $headers) { if (count($headers) > 0) { $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); } @@ -144,17 +142,16 @@ private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headers /** * Given an Accept header, returns an associative array splitting the header and its weight * - * @param string $header "Accept" Header - * + * @param string $header "Accept" Header * @return array with the header and its weight */ private function getHeaderAndWeight(string $header): array { - # matches headers with weight, splitting the header and the weight in $outputArray + // matches headers with weight, splitting the header and the weight in $outputArray if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { $headerData = [ 'header' => $outputArray[1], - 'weight' => (int)($outputArray[2] * 1000), + 'weight' => (int) ($outputArray[2] * 1000), ]; } else { $headerData = [ @@ -167,9 +164,7 @@ private function getHeaderAndWeight(string $header): array } /** - * @param array[] $headers - * @param float $currentWeight - * @param bool $hasMoreThan28Headers + * @param array[] $headers * @return string[] array of adjusted "Accept" headers */ private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array @@ -180,8 +175,7 @@ private function adjustWeight(array $headers, float &$currentWeight, bool $hasMo $acceptHeaders = []; foreach ($headers as $index => $header) { - if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) - { + if ($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) { $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); } @@ -195,18 +189,13 @@ private function adjustWeight(array $headers, float &$currentWeight, bool $hasMo return $acceptHeaders; } - /** - * @param string $header - * @param int $weight - * @return string - */ private function buildAcceptHeader(string $header, int $weight): string { - if($weight === 1000) { + if ($weight === 1000) { return $header; } - return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); + return trim($header, '; ').';q='.rtrim(sprintf('%0.3f', $weight / 1000), '0'); } /** @@ -227,9 +216,7 @@ private function buildAcceptHeader(string $header, int $weight): string * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. * - * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) - * @param bool $hasMoreThan28Headers - * @return int + * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) */ public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int { @@ -241,6 +228,6 @@ public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): i return $currentWeight - 1; } - return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); + return $currentWeight - 10 ** floor(log10($currentWeight - 1)); } } diff --git a/src/Model/Address.php b/src/Model/Address.php index 874f823..6607641 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,72 +30,76 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Address Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Address implements ModelInterface, ArrayAccess, \JsonSerializable +class Address implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Address'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'countryCode' => '\Cone\Billingo\Model\Country', 'postCode' => 'string', 'city' => 'string', - 'address' => 'string' + 'address' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'countryCode' => null, 'postCode' => null, 'city' => null, - 'address' => null + 'address' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'countryCode' => false, 'postCode' => false, 'city' => false, - 'address' => false + 'address' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -119,8 +124,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -130,7 +133,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -140,7 +143,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -149,9 +152,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -160,9 +160,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -179,7 +176,7 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'country_code', 'postCode' => 'post_code', 'city' => 'city', - 'address' => 'address' + 'address' => 'address', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'setCountryCode', 'postCode' => 'setPostCode', 'city' => 'setCity', - 'address' => 'setAddress' + 'address' => 'setAddress', ]; /** @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'countryCode' => 'getCountryCode', 'postCode' => 'getPostCode', 'city' => 'getCity', - 'address' => 'getAddress' + 'address' => 'getAddress', ]; /** @@ -247,7 +244,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -258,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('countryCode', $data ?? [], null); $this->setIfExists('postCode', $data ?? [], null); @@ -270,14 +266,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -308,6 +302,7 @@ public function listInvalidProperties() if ($this->container['address'] === null) { $invalidProperties[] = "'address' can't be null"; } + return $invalidProperties; } @@ -322,7 +317,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets countryCode * @@ -336,8 +330,7 @@ public function getCountryCode() /** * Sets countryCode * - * @param \Cone\Billingo\Model\Country $countryCode countryCode - * + * @param \Cone\Billingo\Model\Country $countryCode countryCode * @return self */ public function setCountryCode($countryCode) @@ -363,8 +356,7 @@ public function getPostCode() /** * Sets postCode * - * @param string $postCode postCode - * + * @param string $postCode postCode * @return self */ public function setPostCode($postCode) @@ -390,8 +382,7 @@ public function getCity() /** * Sets city * - * @param string $city city - * + * @param string $city city * @return self */ public function setCity($city) @@ -417,8 +408,7 @@ public function getAddress() /** * Sets address * - * @param string $address address - * + * @param string $address address * @return self */ public function setAddress($address) @@ -430,12 +420,11 @@ public function setAddress($address) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -445,8 +434,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -458,10 +446,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -475,9 +461,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -486,6 +470,7 @@ public function offsetUnset($offset): void /** * 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 @@ -494,7 +479,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -520,5 +505,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/BankAccountList.php b/src/Model/BankAccountList.php index 3befbb1..549596a 100644 --- a/src/Model/BankAccountList.php +++ b/src/Model/BankAccountList.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,35 +30,38 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * BankAccountList Class Doc Comment * * @category Class + * * @description A object with a data property that contains an array of up to limit bank accounts. Each entry in the array is a separate bank account object. If no more bank accounts are available, the resulting array will be empty. - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class BankAccountList implements ModelInterface, ArrayAccess, \JsonSerializable +class BankAccountList implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'BankAccountList'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'data' => '\Cone\Billingo\Model\BankAccount[]', 'total' => 'int', @@ -65,16 +69,18 @@ class BankAccountList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => 'int', 'lastPage' => 'int', 'prevPageUrl' => 'string', - 'nextPageUrl' => 'string' + 'nextPageUrl' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'data' => null, 'total' => null, @@ -82,14 +88,14 @@ class BankAccountList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => null, 'lastPage' => null, 'prevPageUrl' => null, - 'nextPageUrl' => null + 'nextPageUrl' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'data' => false, 'total' => false, @@ -97,14 +103,14 @@ class BankAccountList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => false, 'lastPage' => false, 'prevPageUrl' => false, - 'nextPageUrl' => false + 'nextPageUrl' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -129,8 +135,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -140,7 +144,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -150,7 +154,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -159,9 +163,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -170,9 +171,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -192,7 +190,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'current_page', 'lastPage' => 'last_page', 'prevPageUrl' => 'prev_page_url', - 'nextPageUrl' => 'next_page_url' + 'nextPageUrl' => 'next_page_url', ]; /** @@ -207,7 +205,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'setCurrentPage', 'lastPage' => 'setLastPage', 'prevPageUrl' => 'setPrevPageUrl', - 'nextPageUrl' => 'setNextPageUrl' + 'nextPageUrl' => 'setNextPageUrl', ]; /** @@ -222,7 +220,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'getCurrentPage', 'lastPage' => 'getLastPage', 'prevPageUrl' => 'getPrevPageUrl', - 'nextPageUrl' => 'getNextPageUrl' + 'nextPageUrl' => 'getNextPageUrl', ]; /** @@ -266,7 +264,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -277,10 +274,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('data', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); @@ -292,14 +289,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -332,7 +327,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets data * @@ -346,8 +340,7 @@ public function getData() /** * Sets data * - * @param \Cone\Billingo\Model\BankAccount[]|null $data data - * + * @param \Cone\Billingo\Model\BankAccount[]|null $data data * @return self */ public function setData($data) @@ -373,8 +366,7 @@ public function getTotal() /** * Sets total * - * @param int|null $total total - * + * @param int|null $total total * @return self */ public function setTotal($total) @@ -400,8 +392,7 @@ public function getPerPage() /** * Sets perPage * - * @param int|null $perPage perPage - * + * @param int|null $perPage perPage * @return self */ public function setPerPage($perPage) @@ -427,8 +418,7 @@ public function getCurrentPage() /** * Sets currentPage * - * @param int|null $currentPage currentPage - * + * @param int|null $currentPage currentPage * @return self */ public function setCurrentPage($currentPage) @@ -454,8 +444,7 @@ public function getLastPage() /** * Sets lastPage * - * @param int|null $lastPage lastPage - * + * @param int|null $lastPage lastPage * @return self */ public function setLastPage($lastPage) @@ -481,8 +470,7 @@ public function getPrevPageUrl() /** * Sets prevPageUrl * - * @param string|null $prevPageUrl prevPageUrl - * + * @param string|null $prevPageUrl prevPageUrl * @return self */ public function setPrevPageUrl($prevPageUrl) @@ -508,8 +496,7 @@ public function getNextPageUrl() /** * Sets nextPageUrl * - * @param string|null $nextPageUrl nextPageUrl - * + * @param string|null $nextPageUrl nextPageUrl * @return self */ public function setNextPageUrl($nextPageUrl) @@ -521,12 +508,11 @@ public function setNextPageUrl($nextPageUrl) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -536,8 +522,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -549,10 +534,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -566,9 +549,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -577,6 +558,7 @@ public function offsetUnset($offset): void /** * 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 @@ -585,7 +567,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -611,5 +593,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Category.php b/src/Model/Category.php index 8acbce4..3221bf3 100644 --- a/src/Model/Category.php +++ b/src/Model/Category.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * Category Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Category @@ -59,6 +60,7 @@ class Category /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -70,9 +72,7 @@ public static function getAllowableEnumValues() self::OVERHEADS, self::SERVICE, self::STOCK, - self::TANGIBLE_ASSETS + self::TANGIBLE_ASSETS, ]; } } - - diff --git a/src/Model/ClientError.php b/src/Model/ClientError.php index 3be2269..6bb7fca 100644 --- a/src/Model/ClientError.php +++ b/src/Model/ClientError.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,63 +30,67 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ClientError Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ClientError implements ModelInterface, ArrayAccess, \JsonSerializable +class ClientError implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ClientError'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ - 'message' => 'string' + 'message' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ - 'message' => null + 'message' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ - 'message' => false + 'message' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -110,8 +115,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -121,7 +124,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -131,7 +134,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -140,9 +143,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -151,9 +151,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -167,7 +164,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'message' => 'message' + 'message' => 'message', ]; /** @@ -176,7 +173,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'message' => 'setMessage' + 'message' => 'setMessage', ]; /** @@ -185,7 +182,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'message' => 'getMessage' + 'message' => 'getMessage', ]; /** @@ -229,7 +226,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -240,23 +236,21 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('message', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,7 +283,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets message * @@ -303,8 +296,7 @@ public function getMessage() /** * Sets message * - * @param string|null $message message - * + * @param string|null $message message * @return self */ public function setMessage($message) @@ -316,12 +308,11 @@ public function setMessage($message) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -331,8 +322,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -344,10 +334,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -361,9 +349,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -372,6 +358,7 @@ public function offsetUnset($offset): void /** * 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 @@ -380,7 +367,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -406,5 +393,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/ClientErrorResponse.php b/src/Model/ClientErrorResponse.php index 70610bf..f335eae 100644 --- a/src/Model/ClientErrorResponse.php +++ b/src/Model/ClientErrorResponse.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,63 +30,67 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ClientErrorResponse Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ClientErrorResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class ClientErrorResponse implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ClientErrorResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ - 'error' => '\Cone\Billingo\Model\ClientError' + 'error' => '\Cone\Billingo\Model\ClientError', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ - 'error' => null + 'error' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ - 'error' => false + 'error' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -110,8 +115,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -121,7 +124,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -131,7 +134,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -140,9 +143,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -151,9 +151,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -167,7 +164,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'error' => 'error' + 'error' => 'error', ]; /** @@ -176,7 +173,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'error' => 'setError' + 'error' => 'setError', ]; /** @@ -185,7 +182,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'error' => 'getError' + 'error' => 'getError', ]; /** @@ -229,7 +226,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -240,23 +236,21 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,7 +283,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets error * @@ -303,8 +296,7 @@ public function getError() /** * Sets error * - * @param \Cone\Billingo\Model\ClientError|null $error error - * + * @param \Cone\Billingo\Model\ClientError|null $error error * @return self */ public function setError($error) @@ -316,12 +308,11 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -331,8 +322,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -344,10 +334,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -361,9 +349,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -372,6 +358,7 @@ public function offsetUnset($offset): void /** * 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 @@ -380,7 +367,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -406,5 +393,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/CorrectionType.php b/src/Model/CorrectionType.php index adc5fa4..3538008 100644 --- a/src/Model/CorrectionType.php +++ b/src/Model/CorrectionType.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * CorrectionType Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class CorrectionType @@ -83,6 +84,7 @@ class CorrectionType /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -106,9 +108,7 @@ public static function getAllowableEnumValues() self::PROFORMA, self::RECEIPT, self::RECEIPT_CANCELLATION, - self::WAYBILL + self::WAYBILL, ]; } } - - diff --git a/src/Model/Country.php b/src/Model/Country.php index 0c4f8ae..9b85ab4 100644 --- a/src/Model/Country.php +++ b/src/Model/Country.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * Country Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Country @@ -557,6 +558,7 @@ class Country /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -817,9 +819,7 @@ public static function getAllowableEnumValues() self::YT, self::ZA, self::ZM, - self::ZW + self::ZW, ]; } } - - diff --git a/src/Model/CreateDocumentExport.php b/src/Model/CreateDocumentExport.php index 97afb8d..19cffe7 100644 --- a/src/Model/CreateDocumentExport.php +++ b/src/Model/CreateDocumentExport.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * CreateDocumentExport Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class CreateDocumentExport implements ModelInterface, ArrayAccess, \JsonSerializable +class CreateDocumentExport implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'CreateDocumentExport'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'queryType' => '\Cone\Billingo\Model\DocumentExportQueryType', 'startDate' => '\DateTime', @@ -70,16 +73,18 @@ class CreateDocumentExport implements ModelInterface, ArrayAccess, \JsonSerializ 'paymentMethod' => '\Cone\Billingo\Model\PaymentMethod', 'sortBy' => '\Cone\Billingo\Model\DocumentExportSortBy', 'otherOptions' => '\Cone\Billingo\Model\DocumentExportOtherOptions', - 'filterExtra' => '\Cone\Billingo\Model\DocumentExportFilterExtra' + 'filterExtra' => '\Cone\Billingo\Model\DocumentExportFilterExtra', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'queryType' => null, 'startDate' => 'date', @@ -93,14 +98,14 @@ class CreateDocumentExport implements ModelInterface, ArrayAccess, \JsonSerializ 'paymentMethod' => null, 'sortBy' => null, 'otherOptions' => null, - 'filterExtra' => null + 'filterExtra' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'queryType' => false, 'startDate' => false, @@ -114,14 +119,14 @@ class CreateDocumentExport implements ModelInterface, ArrayAccess, \JsonSerializ 'paymentMethod' => false, 'sortBy' => false, 'otherOptions' => false, - 'filterExtra' => false + 'filterExtra' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -146,8 +151,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -157,7 +160,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -167,7 +170,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -176,9 +179,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -187,9 +187,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -215,7 +212,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethod' => 'payment_method', 'sortBy' => 'sort_by', 'otherOptions' => 'other_options', - 'filterExtra' => 'filter_extra' + 'filterExtra' => 'filter_extra', ]; /** @@ -236,7 +233,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethod' => 'setPaymentMethod', 'sortBy' => 'setSortBy', 'otherOptions' => 'setOtherOptions', - 'filterExtra' => 'setFilterExtra' + 'filterExtra' => 'setFilterExtra', ]; /** @@ -257,7 +254,7 @@ public function isNullableSetToNull(string $property): bool 'paymentMethod' => 'getPaymentMethod', 'sortBy' => 'getSortBy', 'otherOptions' => 'getOtherOptions', - 'filterExtra' => 'getFilterExtra' + 'filterExtra' => 'getFilterExtra', ]; /** @@ -301,7 +298,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -312,10 +308,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('queryType', $data ?? [], null); $this->setIfExists('startDate', $data ?? [], null); @@ -333,14 +329,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -371,6 +365,7 @@ public function listInvalidProperties() if ($this->container['exportType'] === null) { $invalidProperties[] = "'exportType' can't be null"; } + return $invalidProperties; } @@ -385,7 +380,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets queryType * @@ -399,8 +393,7 @@ public function getQueryType() /** * Sets queryType * - * @param \Cone\Billingo\Model\DocumentExportQueryType $queryType queryType - * + * @param \Cone\Billingo\Model\DocumentExportQueryType $queryType queryType * @return self */ public function setQueryType($queryType) @@ -426,8 +419,7 @@ public function getStartDate() /** * Sets startDate * - * @param \DateTime $startDate startDate - * + * @param \DateTime $startDate startDate * @return self */ public function setStartDate($startDate) @@ -453,8 +445,7 @@ public function getEndDate() /** * Sets endDate * - * @param \DateTime $endDate endDate - * + * @param \DateTime $endDate endDate * @return self */ public function setEndDate($endDate) @@ -480,8 +471,7 @@ public function getDocumentBlockId() /** * Sets documentBlockId * - * @param int|null $documentBlockId documentBlockId - * + * @param int|null $documentBlockId documentBlockId * @return self */ public function setDocumentBlockId($documentBlockId) @@ -507,8 +497,7 @@ public function getExportType() /** * Sets exportType * - * @param \Cone\Billingo\Model\DocumentExportType $exportType exportType - * + * @param \Cone\Billingo\Model\DocumentExportType $exportType exportType * @return self */ public function setExportType($exportType) @@ -534,8 +523,7 @@ public function getNumberStartYear() /** * Sets numberStartYear * - * @param int|null $numberStartYear numberStartYear - * + * @param int|null $numberStartYear numberStartYear * @return self */ public function setNumberStartYear($numberStartYear) @@ -561,8 +549,7 @@ public function getNumberStartSequence() /** * Sets numberStartSequence * - * @param int|null $numberStartSequence numberStartSequence - * + * @param int|null $numberStartSequence numberStartSequence * @return self */ public function setNumberStartSequence($numberStartSequence) @@ -588,8 +575,7 @@ public function getNumberEndYear() /** * Sets numberEndYear * - * @param int|null $numberEndYear numberEndYear - * + * @param int|null $numberEndYear numberEndYear * @return self */ public function setNumberEndYear($numberEndYear) @@ -615,8 +601,7 @@ public function getNumberEndSequence() /** * Sets numberEndSequence * - * @param int|null $numberEndSequence numberEndSequence - * + * @param int|null $numberEndSequence numberEndSequence * @return self */ public function setNumberEndSequence($numberEndSequence) @@ -642,8 +627,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -669,8 +653,7 @@ public function getSortBy() /** * Sets sortBy * - * @param \Cone\Billingo\Model\DocumentExportSortBy|null $sortBy sortBy - * + * @param \Cone\Billingo\Model\DocumentExportSortBy|null $sortBy sortBy * @return self */ public function setSortBy($sortBy) @@ -696,8 +679,7 @@ public function getOtherOptions() /** * Sets otherOptions * - * @param \Cone\Billingo\Model\DocumentExportOtherOptions|null $otherOptions otherOptions - * + * @param \Cone\Billingo\Model\DocumentExportOtherOptions|null $otherOptions otherOptions * @return self */ public function setOtherOptions($otherOptions) @@ -723,8 +705,7 @@ public function getFilterExtra() /** * Sets filterExtra * - * @param \Cone\Billingo\Model\DocumentExportFilterExtra|null $filterExtra filterExtra - * + * @param \Cone\Billingo\Model\DocumentExportFilterExtra|null $filterExtra filterExtra * @return self */ public function setFilterExtra($filterExtra) @@ -736,12 +717,11 @@ public function setFilterExtra($filterExtra) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -751,8 +731,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -764,10 +743,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -781,9 +758,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -792,6 +767,7 @@ public function offsetUnset($offset): void /** * 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 @@ -800,7 +776,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -826,5 +802,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DateType.php b/src/Model/DateType.php index a644650..4123dfa 100644 --- a/src/Model/DateType.php +++ b/src/Model/DateType.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DateType Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DateType @@ -51,6 +52,7 @@ class DateType /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -58,9 +60,7 @@ public static function getAllowableEnumValues() return [ self::DUE_DATE, self::FULFILLMENT_DATE, - self::INVOICE_DATE + self::INVOICE_DATE, ]; } } - - diff --git a/src/Model/Discount.php b/src/Model/Discount.php index f7b9df5..580cab7 100644 --- a/src/Model/Discount.php +++ b/src/Model/Discount.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,66 +30,70 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Discount Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Discount implements ModelInterface, ArrayAccess, \JsonSerializable +class Discount implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Discount'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'type' => '\Cone\Billingo\Model\DiscountType', - 'value' => 'int' + 'value' => 'int', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'type' => null, - 'value' => null + 'value' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'type' => false, - 'value' => false + 'value' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -113,8 +118,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -124,7 +127,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -134,7 +137,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -143,9 +146,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -154,9 +154,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -171,7 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'type' => 'type', - 'value' => 'value' + 'value' => 'value', ]; /** @@ -181,7 +178,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'type' => 'setType', - 'value' => 'setValue' + 'value' => 'setValue', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'type' => 'getType', - 'value' => 'getValue' + 'value' => 'getValue', ]; /** @@ -235,7 +232,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -246,24 +242,22 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('type', $data ?? [], null); $this->setIfExists('value', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,7 +290,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets type * @@ -310,8 +303,7 @@ public function getType() /** * Sets type * - * @param \Cone\Billingo\Model\DiscountType|null $type type - * + * @param \Cone\Billingo\Model\DiscountType|null $type type * @return self */ public function setType($type) @@ -337,8 +329,7 @@ public function getValue() /** * Sets value * - * @param int|null $value value - * + * @param int|null $value value * @return self */ public function setValue($value) @@ -350,12 +341,11 @@ public function setValue($value) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -365,8 +355,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -378,10 +367,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -395,9 +382,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -406,6 +391,7 @@ public function offsetUnset($offset): void /** * 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 @@ -414,7 +400,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -440,5 +426,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DiscountType.php b/src/Model/DiscountType.php index 6eb30b4..a60cd68 100644 --- a/src/Model/DiscountType.php +++ b/src/Model/DiscountType.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DiscountType Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DiscountType @@ -47,14 +48,13 @@ class DiscountType /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() { return [ - self::PERCENT + self::PERCENT, ]; } } - - diff --git a/src/Model/Document.php b/src/Model/Document.php index c93a96c..1699f03 100644 --- a/src/Model/Document.php +++ b/src/Model/Document.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,35 +30,38 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Document Class Doc Comment * * @category Class + * * @description Document object representing your invoice. NOTE: partner property is deprecated. Please use document_partner instead. - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Document implements ModelInterface, ArrayAccess, \JsonSerializable +class Document implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Document'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'invoiceNumber' => 'string', @@ -87,16 +91,18 @@ class Document implements ModelInterface, ArrayAccess, \JsonSerializable 'onlineSzamlaStatus' => '\Cone\Billingo\Model\OnlineSzamlaStatusEnum', 'relatedDocuments' => '\Cone\Billingo\Model\DocumentAncestor[]', 'discount' => '\Cone\Billingo\Model\Discount', - 'correctionType' => '\Cone\Billingo\Model\CorrectionType' + 'correctionType' => '\Cone\Billingo\Model\CorrectionType', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'invoiceNumber' => null, @@ -126,14 +132,14 @@ class Document implements ModelInterface, ArrayAccess, \JsonSerializable 'onlineSzamlaStatus' => null, 'relatedDocuments' => null, 'discount' => null, - 'correctionType' => null + 'correctionType' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'invoiceNumber' => false, @@ -163,14 +169,14 @@ class Document implements ModelInterface, ArrayAccess, \JsonSerializable 'onlineSzamlaStatus' => false, 'relatedDocuments' => false, 'discount' => false, - 'correctionType' => false + 'correctionType' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -195,8 +201,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -206,7 +210,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -216,7 +220,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -225,9 +229,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -236,9 +237,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -280,7 +278,7 @@ public function isNullableSetToNull(string $property): bool 'onlineSzamlaStatus' => 'online_szamla_status', 'relatedDocuments' => 'related_documents', 'discount' => 'discount', - 'correctionType' => 'correction_type' + 'correctionType' => 'correction_type', ]; /** @@ -317,7 +315,7 @@ public function isNullableSetToNull(string $property): bool 'onlineSzamlaStatus' => 'setOnlineSzamlaStatus', 'relatedDocuments' => 'setRelatedDocuments', 'discount' => 'setDiscount', - 'correctionType' => 'setCorrectionType' + 'correctionType' => 'setCorrectionType', ]; /** @@ -354,7 +352,7 @@ public function isNullableSetToNull(string $property): bool 'onlineSzamlaStatus' => 'getOnlineSzamlaStatus', 'relatedDocuments' => 'getRelatedDocuments', 'discount' => 'getDiscount', - 'correctionType' => 'getCorrectionType' + 'correctionType' => 'getCorrectionType', ]; /** @@ -398,7 +396,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -409,10 +406,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('invoiceNumber', $data ?? [], null); @@ -446,14 +443,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -486,7 +481,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -500,8 +494,7 @@ public function getId() /** * Sets id * - * @param int|null $id The document's unique identifier. - * + * @param int|null $id The document's unique identifier. * @return self */ public function setId($id) @@ -527,8 +520,7 @@ public function getInvoiceNumber() /** * Sets invoiceNumber * - * @param string|null $invoiceNumber The document's invoice number. - * + * @param string|null $invoiceNumber The document's invoice number. * @return self */ public function setInvoiceNumber($invoiceNumber) @@ -554,8 +546,7 @@ public function getType() /** * Sets type * - * @param \Cone\Billingo\Model\DocumentType|null $type type - * + * @param \Cone\Billingo\Model\DocumentType|null $type type * @return self */ public function setType($type) @@ -581,8 +572,7 @@ public function getCancelled() /** * Sets cancelled * - * @param bool|null $cancelled cancelled - * + * @param bool|null $cancelled cancelled * @return self */ public function setCancelled($cancelled) @@ -608,8 +598,7 @@ public function getBlockId() /** * Sets blockId * - * @param int|null $blockId DocumentBlock's identifier. - * + * @param int|null $blockId DocumentBlock's identifier. * @return self */ public function setBlockId($blockId) @@ -635,8 +624,7 @@ public function getPaymentStatus() /** * Sets paymentStatus * - * @param \Cone\Billingo\Model\PaymentStatus|null $paymentStatus paymentStatus - * + * @param \Cone\Billingo\Model\PaymentStatus|null $paymentStatus paymentStatus * @return self */ public function setPaymentStatus($paymentStatus) @@ -662,8 +650,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -689,8 +676,7 @@ public function getGrossTotal() /** * Sets grossTotal * - * @param float|null $grossTotal The document's gross total price. - * + * @param float|null $grossTotal The document's gross total price. * @return self */ public function setGrossTotal($grossTotal) @@ -716,8 +702,7 @@ public function getCurrency() /** * Sets currency * - * @param \Cone\Billingo\Model\Currency|null $currency currency - * + * @param \Cone\Billingo\Model\Currency|null $currency currency * @return self */ public function setCurrency($currency) @@ -743,8 +728,7 @@ public function getConversionRate() /** * Sets conversionRate * - * @param float|null $conversionRate conversionRate - * + * @param float|null $conversionRate conversionRate * @return self */ public function setConversionRate($conversionRate) @@ -770,8 +754,7 @@ public function getInvoiceDate() /** * Sets invoiceDate * - * @param \DateTime|null $invoiceDate invoiceDate - * + * @param \DateTime|null $invoiceDate invoiceDate * @return self */ public function setInvoiceDate($invoiceDate) @@ -797,8 +780,7 @@ public function getFulfillmentDate() /** * Sets fulfillmentDate * - * @param \DateTime|null $fulfillmentDate fulfillmentDate - * + * @param \DateTime|null $fulfillmentDate fulfillmentDate * @return self */ public function setFulfillmentDate($fulfillmentDate) @@ -824,8 +806,7 @@ public function getDueDate() /** * Sets dueDate * - * @param \DateTime|null $dueDate dueDate - * + * @param \DateTime|null $dueDate dueDate * @return self */ public function setDueDate($dueDate) @@ -851,8 +832,7 @@ public function getPaidDate() /** * Sets paidDate * - * @param \DateTime|null $paidDate paidDate - * + * @param \DateTime|null $paidDate paidDate * @return self */ public function setPaidDate($paidDate) @@ -878,8 +858,7 @@ public function getOrganization() /** * Sets organization * - * @param \Cone\Billingo\Model\DocumentOrganization|null $organization organization - * + * @param \Cone\Billingo\Model\DocumentOrganization|null $organization organization * @return self */ public function setOrganization($organization) @@ -905,8 +884,7 @@ public function getPartner() /** * Sets partner * - * @param \Cone\Billingo\Model\Partner|null $partner partner - * + * @param \Cone\Billingo\Model\Partner|null $partner partner * @return self */ public function setPartner($partner) @@ -932,8 +910,7 @@ public function getDocumentPartner() /** * Sets documentPartner * - * @param \Cone\Billingo\Model\DocumentPartner|null $documentPartner documentPartner - * + * @param \Cone\Billingo\Model\DocumentPartner|null $documentPartner documentPartner * @return self */ public function setDocumentPartner($documentPartner) @@ -959,8 +936,7 @@ public function getElectronic() /** * Sets electronic * - * @param bool|null $electronic electronic - * + * @param bool|null $electronic electronic * @return self */ public function setElectronic($electronic) @@ -986,8 +962,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -1013,8 +988,7 @@ public function getTags() /** * Sets tags * - * @param string[]|null $tags tags - * + * @param string[]|null $tags tags * @return self */ public function setTags($tags) @@ -1040,8 +1014,7 @@ public function getNotificationStatus() /** * Sets notificationStatus * - * @param \Cone\Billingo\Model\DocumentNotificationStatus|null $notificationStatus notificationStatus - * + * @param \Cone\Billingo\Model\DocumentNotificationStatus|null $notificationStatus notificationStatus * @return self */ public function setNotificationStatus($notificationStatus) @@ -1067,8 +1040,7 @@ public function getLanguage() /** * Sets language * - * @param \Cone\Billingo\Model\DocumentLanguage|null $language language - * + * @param \Cone\Billingo\Model\DocumentLanguage|null $language language * @return self */ public function setLanguage($language) @@ -1094,8 +1066,7 @@ public function getItems() /** * Sets items * - * @param \Cone\Billingo\Model\DocumentItem[]|null $items items - * + * @param \Cone\Billingo\Model\DocumentItem[]|null $items items * @return self */ public function setItems($items) @@ -1121,8 +1092,7 @@ public function getSummary() /** * Sets summary * - * @param \Cone\Billingo\Model\DocumentSummary|null $summary summary - * + * @param \Cone\Billingo\Model\DocumentSummary|null $summary summary * @return self */ public function setSummary($summary) @@ -1148,8 +1118,7 @@ public function getSettings() /** * Sets settings * - * @param \Cone\Billingo\Model\DocumentSettings|null $settings settings - * + * @param \Cone\Billingo\Model\DocumentSettings|null $settings settings * @return self */ public function setSettings($settings) @@ -1175,8 +1144,7 @@ public function getOnlineSzamlaStatus() /** * Sets onlineSzamlaStatus * - * @param \Cone\Billingo\Model\OnlineSzamlaStatusEnum|null $onlineSzamlaStatus onlineSzamlaStatus - * + * @param \Cone\Billingo\Model\OnlineSzamlaStatusEnum|null $onlineSzamlaStatus onlineSzamlaStatus * @return self */ public function setOnlineSzamlaStatus($onlineSzamlaStatus) @@ -1202,8 +1170,7 @@ public function getRelatedDocuments() /** * Sets relatedDocuments * - * @param \Cone\Billingo\Model\DocumentAncestor[]|null $relatedDocuments relatedDocuments - * + * @param \Cone\Billingo\Model\DocumentAncestor[]|null $relatedDocuments relatedDocuments * @return self */ public function setRelatedDocuments($relatedDocuments) @@ -1229,8 +1196,7 @@ public function getDiscount() /** * Sets discount * - * @param \Cone\Billingo\Model\Discount|null $discount discount - * + * @param \Cone\Billingo\Model\Discount|null $discount discount * @return self */ public function setDiscount($discount) @@ -1256,8 +1222,7 @@ public function getCorrectionType() /** * Sets correctionType * - * @param \Cone\Billingo\Model\CorrectionType|null $correctionType correctionType - * + * @param \Cone\Billingo\Model\CorrectionType|null $correctionType correctionType * @return self */ public function setCorrectionType($correctionType) @@ -1269,12 +1234,11 @@ public function setCorrectionType($correctionType) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -1284,8 +1248,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -1297,10 +1260,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -1314,9 +1275,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -1325,6 +1284,7 @@ public function offsetUnset($offset): void /** * 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 @@ -1333,7 +1293,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -1359,5 +1319,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentAncestor.php b/src/Model/DocumentAncestor.php index 583702e..51bde1d 100644 --- a/src/Model/DocumentAncestor.php +++ b/src/Model/DocumentAncestor.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,67 +30,72 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentAncestor Class Doc Comment * * @category Class + * * @description An object representing related documents to another document. - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentAncestor implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentAncestor implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentAncestor'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', - 'invoiceNumber' => 'string' + 'invoiceNumber' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, - 'invoiceNumber' => null + 'invoiceNumber' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, - 'invoiceNumber' => false + 'invoiceNumber' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -114,8 +120,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -125,7 +129,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -135,7 +139,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -144,9 +148,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -155,9 +156,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -172,7 +170,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'id' => 'id', - 'invoiceNumber' => 'invoice_number' + 'invoiceNumber' => 'invoice_number', ]; /** @@ -182,7 +180,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'id' => 'setId', - 'invoiceNumber' => 'setInvoiceNumber' + 'invoiceNumber' => 'setInvoiceNumber', ]; /** @@ -192,7 +190,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'id' => 'getId', - 'invoiceNumber' => 'getInvoiceNumber' + 'invoiceNumber' => 'getInvoiceNumber', ]; /** @@ -236,7 +234,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -247,24 +244,22 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('invoiceNumber', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -297,7 +292,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -311,8 +305,7 @@ public function getId() /** * Sets id * - * @param int|null $id Unique identifier of the related document. - * + * @param int|null $id Unique identifier of the related document. * @return self */ public function setId($id) @@ -338,8 +331,7 @@ public function getInvoiceNumber() /** * Sets invoiceNumber * - * @param string|null $invoiceNumber Invoice number of the related document. - * + * @param string|null $invoiceNumber Invoice number of the related document. * @return self */ public function setInvoiceNumber($invoiceNumber) @@ -351,12 +343,11 @@ public function setInvoiceNumber($invoiceNumber) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -366,8 +357,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -379,10 +369,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -396,9 +384,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -407,6 +393,7 @@ public function offsetUnset($offset): void /** * 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 @@ -415,7 +402,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -441,5 +428,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentBankAccount.php b/src/Model/DocumentBankAccount.php index 7826b9e..5382593 100644 --- a/src/Model/DocumentBankAccount.php +++ b/src/Model/DocumentBankAccount.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,75 +30,79 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentBankAccount Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentBankAccount implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentBankAccount implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentBankAccount'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', 'accountNumber' => 'string', 'accountNumberIban' => 'string', - 'swift' => 'string' + 'swift' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, 'accountNumber' => null, 'accountNumberIban' => null, - 'swift' => null + 'swift' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => true, 'name' => false, 'accountNumber' => false, 'accountNumberIban' => false, - 'swift' => false + 'swift' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -122,8 +127,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -133,7 +136,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -143,7 +146,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -152,9 +155,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -163,9 +163,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -183,7 +180,7 @@ public function isNullableSetToNull(string $property): bool 'name' => 'name', 'accountNumber' => 'account_number', 'accountNumberIban' => 'account_number_iban', - 'swift' => 'swift' + 'swift' => 'swift', ]; /** @@ -196,7 +193,7 @@ public function isNullableSetToNull(string $property): bool 'name' => 'setName', 'accountNumber' => 'setAccountNumber', 'accountNumberIban' => 'setAccountNumberIban', - 'swift' => 'setSwift' + 'swift' => 'setSwift', ]; /** @@ -209,7 +206,7 @@ public function isNullableSetToNull(string $property): bool 'name' => 'getName', 'accountNumber' => 'getAccountNumber', 'accountNumberIban' => 'getAccountNumberIban', - 'swift' => 'getSwift' + 'swift' => 'getSwift', ]; /** @@ -253,7 +250,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -264,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -277,14 +273,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -309,6 +303,7 @@ public function listInvalidProperties() if ($this->container['accountNumber'] === null) { $invalidProperties[] = "'accountNumber' can't be null"; } + return $invalidProperties; } @@ -323,7 +318,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -337,8 +331,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -348,7 +341,7 @@ public function setId($id) } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('id', $nullablesSetToNull); - if ($index !== FALSE) { + if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } @@ -371,8 +364,7 @@ public function getName() /** * Sets name * - * @param string $name name - * + * @param string $name name * @return self */ public function setName($name) @@ -398,8 +390,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string $accountNumber accountNumber - * + * @param string $accountNumber accountNumber * @return self */ public function setAccountNumber($accountNumber) @@ -425,8 +416,7 @@ public function getAccountNumberIban() /** * Sets accountNumberIban * - * @param string|null $accountNumberIban accountNumberIban - * + * @param string|null $accountNumberIban accountNumberIban * @return self */ public function setAccountNumberIban($accountNumberIban) @@ -452,8 +442,7 @@ public function getSwift() /** * Sets swift * - * @param string|null $swift swift - * + * @param string|null $swift swift * @return self */ public function setSwift($swift) @@ -465,12 +454,11 @@ public function setSwift($swift) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -480,8 +468,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -493,10 +480,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -510,9 +495,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -521,6 +504,7 @@ public function offsetUnset($offset): void /** * 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 @@ -529,7 +513,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -555,5 +539,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentBlock.php b/src/Model/DocumentBlock.php index 3650c2c..7cabdcf 100644 --- a/src/Model/DocumentBlock.php +++ b/src/Model/DocumentBlock.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,78 +30,82 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentBlock Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentBlock implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentBlock implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentBlock'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', 'prefix' => 'string', 'customField1' => 'string', 'customField2' => 'string', - 'type' => '\Cone\Billingo\Model\DocumentBlockType' + 'type' => '\Cone\Billingo\Model\DocumentBlockType', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, 'prefix' => null, 'customField1' => null, 'customField2' => null, - 'type' => null + 'type' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, 'prefix' => false, 'customField1' => false, 'customField2' => false, - 'type' => false + 'type' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -125,8 +130,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -136,7 +139,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -146,7 +149,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -155,9 +158,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -166,9 +166,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -187,7 +184,7 @@ public function isNullableSetToNull(string $property): bool 'prefix' => 'prefix', 'customField1' => 'custom_field1', 'customField2' => 'custom_field2', - 'type' => 'type' + 'type' => 'type', ]; /** @@ -201,7 +198,7 @@ public function isNullableSetToNull(string $property): bool 'prefix' => 'setPrefix', 'customField1' => 'setCustomField1', 'customField2' => 'setCustomField2', - 'type' => 'setType' + 'type' => 'setType', ]; /** @@ -215,7 +212,7 @@ public function isNullableSetToNull(string $property): bool 'prefix' => 'getPrefix', 'customField1' => 'getCustomField1', 'customField2' => 'getCustomField2', - 'type' => 'getType' + 'type' => 'getType', ]; /** @@ -259,7 +256,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -270,10 +266,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -284,14 +280,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -324,7 +318,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -338,8 +331,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -365,8 +357,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -392,8 +383,7 @@ public function getPrefix() /** * Sets prefix * - * @param string|null $prefix prefix - * + * @param string|null $prefix prefix * @return self */ public function setPrefix($prefix) @@ -419,8 +409,7 @@ public function getCustomField1() /** * Sets customField1 * - * @param string|null $customField1 customField1 - * + * @param string|null $customField1 customField1 * @return self */ public function setCustomField1($customField1) @@ -446,8 +435,7 @@ public function getCustomField2() /** * Sets customField2 * - * @param string|null $customField2 customField2 - * + * @param string|null $customField2 customField2 * @return self */ public function setCustomField2($customField2) @@ -473,8 +461,7 @@ public function getType() /** * Sets type * - * @param \Cone\Billingo\Model\DocumentBlockType|null $type type - * + * @param \Cone\Billingo\Model\DocumentBlockType|null $type type * @return self */ public function setType($type) @@ -486,12 +473,11 @@ public function setType($type) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -501,8 +487,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -514,10 +499,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -531,9 +514,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -542,6 +523,7 @@ public function offsetUnset($offset): void /** * 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 @@ -550,7 +532,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -576,5 +558,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentCancellation.php b/src/Model/DocumentCancellation.php index 4877a1c..09729bf 100644 --- a/src/Model/DocumentCancellation.php +++ b/src/Model/DocumentCancellation.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,66 +30,70 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentCancellation Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentCancellation implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentCancellation implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentCancellation'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'cancellationReason' => 'string', - 'cancellationRecipients' => 'string' + 'cancellationRecipients' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'cancellationReason' => null, - 'cancellationRecipients' => null + 'cancellationRecipients' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'cancellationReason' => false, - 'cancellationRecipients' => false + 'cancellationRecipients' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -113,8 +118,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -124,7 +127,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -134,7 +137,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -143,9 +146,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -154,9 +154,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -171,7 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'cancellationReason' => 'cancellation_reason', - 'cancellationRecipients' => 'cancellation_recipients' + 'cancellationRecipients' => 'cancellation_recipients', ]; /** @@ -181,7 +178,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'cancellationReason' => 'setCancellationReason', - 'cancellationRecipients' => 'setCancellationRecipients' + 'cancellationRecipients' => 'setCancellationRecipients', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'cancellationReason' => 'getCancellationReason', - 'cancellationRecipients' => 'getCancellationRecipients' + 'cancellationRecipients' => 'getCancellationRecipients', ]; /** @@ -235,7 +232,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -246,24 +242,22 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('cancellationReason', $data ?? [], null); $this->setIfExists('cancellationRecipients', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,7 +290,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets cancellationReason * @@ -310,8 +303,7 @@ public function getCancellationReason() /** * Sets cancellationReason * - * @param string|null $cancellationReason cancellationReason - * + * @param string|null $cancellationReason cancellationReason * @return self */ public function setCancellationReason($cancellationReason) @@ -337,8 +329,7 @@ public function getCancellationRecipients() /** * Sets cancellationRecipients * - * @param string|null $cancellationRecipients cancellationRecipients - * + * @param string|null $cancellationRecipients cancellationRecipients * @return self */ public function setCancellationRecipients($cancellationRecipients) @@ -350,12 +341,11 @@ public function setCancellationRecipients($cancellationRecipients) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -365,8 +355,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -378,10 +367,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -395,9 +382,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -406,6 +391,7 @@ public function offsetUnset($offset): void /** * 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 @@ -414,7 +400,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -440,5 +426,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentForm.php b/src/Model/DocumentForm.php index 269fbec..8f3fd1c 100644 --- a/src/Model/DocumentForm.php +++ b/src/Model/DocumentForm.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DocumentForm Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DocumentForm @@ -49,15 +50,14 @@ class DocumentForm /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() { return [ self::ELECTRONIC, - self::PAPER + self::PAPER, ]; } } - - diff --git a/src/Model/DocumentFormat.php b/src/Model/DocumentFormat.php index 1c19661..c4f70cf 100644 --- a/src/Model/DocumentFormat.php +++ b/src/Model/DocumentFormat.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DocumentFormat Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DocumentFormat @@ -51,6 +52,7 @@ class DocumentFormat /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -58,9 +60,7 @@ public static function getAllowableEnumValues() return [ self::EMPTY, self::ELECTRONIC, - self::TRADITIONAL + self::TRADITIONAL, ]; } } - - diff --git a/src/Model/DocumentInsertItemsInner.php b/src/Model/DocumentInsertItemsInner.php index cbc8d2b..f17f562 100644 --- a/src/Model/DocumentInsertItemsInner.php +++ b/src/Model/DocumentInsertItemsInner.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentInsertItemsInner Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentInsertItemsInner implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentInsertItemsInner implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentInsert_items_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'productId' => 'int', 'quantity' => 'float', @@ -66,16 +69,18 @@ class DocumentInsertItemsInner implements ModelInterface, ArrayAccess, \JsonSeri 'unitPriceType' => '\Cone\Billingo\Model\UnitPriceType', 'unit' => 'string', 'vat' => '\Cone\Billingo\Model\Vat', - 'entitlement' => '\Cone\Billingo\Model\Entitlement' + 'entitlement' => '\Cone\Billingo\Model\Entitlement', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'productId' => null, 'quantity' => 'float', @@ -85,14 +90,14 @@ class DocumentInsertItemsInner implements ModelInterface, ArrayAccess, \JsonSeri 'unitPriceType' => null, 'unit' => null, 'vat' => null, - 'entitlement' => null + 'entitlement' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'productId' => false, 'quantity' => false, @@ -102,14 +107,14 @@ class DocumentInsertItemsInner implements ModelInterface, ArrayAccess, \JsonSeri 'unitPriceType' => false, 'unit' => false, 'vat' => false, - 'entitlement' => false + 'entitlement' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -134,8 +139,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -145,7 +148,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -155,7 +158,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -164,9 +167,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -175,9 +175,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -199,7 +196,7 @@ public function isNullableSetToNull(string $property): bool 'unitPriceType' => 'unit_price_type', 'unit' => 'unit', 'vat' => 'vat', - 'entitlement' => 'entitlement' + 'entitlement' => 'entitlement', ]; /** @@ -216,7 +213,7 @@ public function isNullableSetToNull(string $property): bool 'unitPriceType' => 'setUnitPriceType', 'unit' => 'setUnit', 'vat' => 'setVat', - 'entitlement' => 'setEntitlement' + 'entitlement' => 'setEntitlement', ]; /** @@ -233,7 +230,7 @@ public function isNullableSetToNull(string $property): bool 'unitPriceType' => 'getUnitPriceType', 'unit' => 'getUnit', 'vat' => 'getVat', - 'entitlement' => 'getEntitlement' + 'entitlement' => 'getEntitlement', ]; /** @@ -277,7 +274,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -288,10 +284,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('productId', $data ?? [], null); $this->setIfExists('quantity', $data ?? [], null); @@ -305,14 +301,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -352,6 +346,7 @@ public function listInvalidProperties() if ($this->container['vat'] === null) { $invalidProperties[] = "'vat' can't be null"; } + return $invalidProperties; } @@ -366,7 +361,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets productId * @@ -380,8 +374,7 @@ public function getProductId() /** * Sets productId * - * @param int $productId productId - * + * @param int $productId productId * @return self */ public function setProductId($productId) @@ -407,8 +400,7 @@ public function getQuantity() /** * Sets quantity * - * @param float $quantity quantity - * + * @param float $quantity quantity * @return self */ public function setQuantity($quantity) @@ -434,8 +426,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -461,8 +452,7 @@ public function getName() /** * Sets name * - * @param string $name name - * + * @param string $name name * @return self */ public function setName($name) @@ -488,8 +478,7 @@ public function getUnitPrice() /** * Sets unitPrice * - * @param float $unitPrice unitPrice - * + * @param float $unitPrice unitPrice * @return self */ public function setUnitPrice($unitPrice) @@ -515,8 +504,7 @@ public function getUnitPriceType() /** * Sets unitPriceType * - * @param \Cone\Billingo\Model\UnitPriceType $unitPriceType unitPriceType - * + * @param \Cone\Billingo\Model\UnitPriceType $unitPriceType unitPriceType * @return self */ public function setUnitPriceType($unitPriceType) @@ -542,8 +530,7 @@ public function getUnit() /** * Sets unit * - * @param string $unit unit - * + * @param string $unit unit * @return self */ public function setUnit($unit) @@ -569,8 +556,7 @@ public function getVat() /** * Sets vat * - * @param \Cone\Billingo\Model\Vat $vat vat - * + * @param \Cone\Billingo\Model\Vat $vat vat * @return self */ public function setVat($vat) @@ -596,8 +582,7 @@ public function getEntitlement() /** * Sets entitlement * - * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement - * + * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement * @return self */ public function setEntitlement($entitlement) @@ -609,12 +594,11 @@ public function setEntitlement($entitlement) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -624,8 +608,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -637,10 +620,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -654,9 +635,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -665,6 +644,7 @@ public function offsetUnset($offset): void /** * 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 @@ -673,7 +653,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -699,5 +679,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentInsertType.php b/src/Model/DocumentInsertType.php index b9752c4..75a9551 100644 --- a/src/Model/DocumentInsertType.php +++ b/src/Model/DocumentInsertType.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DocumentInsertType Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DocumentInsertType @@ -53,6 +54,7 @@ class DocumentInsertType /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -61,9 +63,7 @@ public static function getAllowableEnumValues() self::ADVANCE, self::DRAFT, self::INVOICE, - self::PROFORMA + self::PROFORMA, ]; } } - - diff --git a/src/Model/DocumentItem.php b/src/Model/DocumentItem.php index 54707e9..94d8af2 100644 --- a/src/Model/DocumentItem.php +++ b/src/Model/DocumentItem.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentItem Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentItem implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentItem implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentItem'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'productId' => 'int', 'name' => 'string', @@ -68,16 +71,18 @@ class DocumentItem implements ModelInterface, ArrayAccess, \JsonSerializable 'vat' => '\Cone\Billingo\Model\Vat', 'vatAmount' => 'float', 'entitlement' => '\Cone\Billingo\Model\Entitlement', - 'comment' => 'string' + 'comment' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'productId' => null, 'name' => null, @@ -89,14 +94,14 @@ class DocumentItem implements ModelInterface, ArrayAccess, \JsonSerializable 'vat' => null, 'vatAmount' => 'float', 'entitlement' => null, - 'comment' => null + 'comment' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'productId' => true, 'name' => false, @@ -108,14 +113,14 @@ class DocumentItem implements ModelInterface, ArrayAccess, \JsonSerializable 'vat' => false, 'vatAmount' => false, 'entitlement' => false, - 'comment' => false + 'comment' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -140,8 +145,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -151,7 +154,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -161,7 +164,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -170,9 +173,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -181,9 +181,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -207,7 +204,7 @@ public function isNullableSetToNull(string $property): bool 'vat' => 'vat', 'vatAmount' => 'vat_amount', 'entitlement' => 'entitlement', - 'comment' => 'comment' + 'comment' => 'comment', ]; /** @@ -226,7 +223,7 @@ public function isNullableSetToNull(string $property): bool 'vat' => 'setVat', 'vatAmount' => 'setVatAmount', 'entitlement' => 'setEntitlement', - 'comment' => 'setComment' + 'comment' => 'setComment', ]; /** @@ -245,7 +242,7 @@ public function isNullableSetToNull(string $property): bool 'vat' => 'getVat', 'vatAmount' => 'getVatAmount', 'entitlement' => 'getEntitlement', - 'comment' => 'getComment' + 'comment' => 'getComment', ]; /** @@ -289,7 +286,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -300,10 +296,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('productId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -319,14 +315,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -359,7 +353,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets productId * @@ -373,8 +366,7 @@ public function getProductId() /** * Sets productId * - * @param int|null $productId productId - * + * @param int|null $productId productId * @return self */ public function setProductId($productId) @@ -384,7 +376,7 @@ public function setProductId($productId) } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('productId', $nullablesSetToNull); - if ($index !== FALSE) { + if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } @@ -407,8 +399,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -434,8 +425,7 @@ public function getNetUnitAmount() /** * Sets netUnitAmount * - * @param float|null $netUnitAmount netUnitAmount - * + * @param float|null $netUnitAmount netUnitAmount * @return self */ public function setNetUnitAmount($netUnitAmount) @@ -461,8 +451,7 @@ public function getQuantity() /** * Sets quantity * - * @param float|null $quantity quantity - * + * @param float|null $quantity quantity * @return self */ public function setQuantity($quantity) @@ -488,8 +477,7 @@ public function getUnit() /** * Sets unit * - * @param string|null $unit unit - * + * @param string|null $unit unit * @return self */ public function setUnit($unit) @@ -515,8 +503,7 @@ public function getNetAmount() /** * Sets netAmount * - * @param float|null $netAmount netAmount - * + * @param float|null $netAmount netAmount * @return self */ public function setNetAmount($netAmount) @@ -542,8 +529,7 @@ public function getGrossAmount() /** * Sets grossAmount * - * @param float|null $grossAmount grossAmount - * + * @param float|null $grossAmount grossAmount * @return self */ public function setGrossAmount($grossAmount) @@ -569,8 +555,7 @@ public function getVat() /** * Sets vat * - * @param \Cone\Billingo\Model\Vat|null $vat vat - * + * @param \Cone\Billingo\Model\Vat|null $vat vat * @return self */ public function setVat($vat) @@ -596,8 +581,7 @@ public function getVatAmount() /** * Sets vatAmount * - * @param float|null $vatAmount vatAmount - * + * @param float|null $vatAmount vatAmount * @return self */ public function setVatAmount($vatAmount) @@ -623,8 +607,7 @@ public function getEntitlement() /** * Sets entitlement * - * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement - * + * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement * @return self */ public function setEntitlement($entitlement) @@ -650,8 +633,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -663,12 +645,11 @@ public function setComment($comment) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -678,8 +659,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -691,10 +671,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -708,9 +686,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -719,6 +695,7 @@ public function offsetUnset($offset): void /** * 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 @@ -727,7 +704,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -753,5 +730,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentItemData.php b/src/Model/DocumentItemData.php index 8a5b6f4..8985a2c 100644 --- a/src/Model/DocumentItemData.php +++ b/src/Model/DocumentItemData.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,69 +30,73 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentItemData Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentItemData implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentItemData implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentItemData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'productId' => 'int', 'quantity' => 'float', - 'comment' => 'string' + 'comment' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'productId' => null, 'quantity' => 'float', - 'comment' => null + 'comment' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'productId' => false, 'quantity' => false, - 'comment' => false + 'comment' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -116,8 +121,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -127,7 +130,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -137,7 +140,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -146,9 +149,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -157,9 +157,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -175,7 +172,7 @@ public function isNullableSetToNull(string $property): bool protected static $attributeMap = [ 'productId' => 'product_id', 'quantity' => 'quantity', - 'comment' => 'comment' + 'comment' => 'comment', ]; /** @@ -186,7 +183,7 @@ public function isNullableSetToNull(string $property): bool protected static $setters = [ 'productId' => 'setProductId', 'quantity' => 'setQuantity', - 'comment' => 'setComment' + 'comment' => 'setComment', ]; /** @@ -197,7 +194,7 @@ public function isNullableSetToNull(string $property): bool protected static $getters = [ 'productId' => 'getProductId', 'quantity' => 'getQuantity', - 'comment' => 'getComment' + 'comment' => 'getComment', ]; /** @@ -241,7 +238,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -252,10 +248,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('productId', $data ?? [], null); $this->setIfExists('quantity', $data ?? [], null); @@ -263,14 +259,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -295,6 +289,7 @@ public function listInvalidProperties() if ($this->container['quantity'] === null) { $invalidProperties[] = "'quantity' can't be null"; } + return $invalidProperties; } @@ -309,7 +304,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets productId * @@ -323,8 +317,7 @@ public function getProductId() /** * Sets productId * - * @param int $productId productId - * + * @param int $productId productId * @return self */ public function setProductId($productId) @@ -350,8 +343,7 @@ public function getQuantity() /** * Sets quantity * - * @param float $quantity quantity - * + * @param float $quantity quantity * @return self */ public function setQuantity($quantity) @@ -377,8 +369,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -390,12 +381,11 @@ public function setComment($comment) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -405,8 +395,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -418,10 +407,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -435,9 +422,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -446,6 +431,7 @@ public function offsetUnset($offset): void /** * 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 @@ -454,7 +440,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -480,5 +466,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentNotificationStatus.php b/src/Model/DocumentNotificationStatus.php index 5f4244d..81acdb7 100644 --- a/src/Model/DocumentNotificationStatus.php +++ b/src/Model/DocumentNotificationStatus.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * DocumentNotificationStatus Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class DocumentNotificationStatus @@ -57,6 +58,7 @@ class DocumentNotificationStatus /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -67,9 +69,7 @@ public static function getAllowableEnumValues() self::FAILED, self::NONE, self::OPENED, - self::READED + self::READED, ]; } } - - diff --git a/src/Model/DocumentOrganization.php b/src/Model/DocumentOrganization.php index d358aab..88473b5 100644 --- a/src/Model/DocumentOrganization.php +++ b/src/Model/DocumentOrganization.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentOrganization Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentOrganization implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentOrganization implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentOrganization'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'taxNumber' => 'string', @@ -65,16 +68,18 @@ class DocumentOrganization implements ModelInterface, ArrayAccess, \JsonSerializ 'smallTaxpayer' => 'bool', 'evNumber' => 'string', 'euTaxNumber' => 'string', - 'cashSettled' => 'bool' + 'cashSettled' => 'bool', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'taxNumber' => null, @@ -83,14 +88,14 @@ class DocumentOrganization implements ModelInterface, ArrayAccess, \JsonSerializ 'smallTaxpayer' => null, 'evNumber' => null, 'euTaxNumber' => null, - 'cashSettled' => null + 'cashSettled' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'name' => false, 'taxNumber' => false, @@ -99,14 +104,14 @@ class DocumentOrganization implements ModelInterface, ArrayAccess, \JsonSerializ 'smallTaxpayer' => false, 'evNumber' => false, 'euTaxNumber' => false, - 'cashSettled' => false + 'cashSettled' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -131,8 +136,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -142,7 +145,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -152,7 +155,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -161,9 +164,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -172,9 +172,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -195,7 +192,7 @@ public function isNullableSetToNull(string $property): bool 'smallTaxpayer' => 'small_taxpayer', 'evNumber' => 'ev_number', 'euTaxNumber' => 'eu_tax_number', - 'cashSettled' => 'cash_settled' + 'cashSettled' => 'cash_settled', ]; /** @@ -211,7 +208,7 @@ public function isNullableSetToNull(string $property): bool 'smallTaxpayer' => 'setSmallTaxpayer', 'evNumber' => 'setEvNumber', 'euTaxNumber' => 'setEuTaxNumber', - 'cashSettled' => 'setCashSettled' + 'cashSettled' => 'setCashSettled', ]; /** @@ -227,7 +224,7 @@ public function isNullableSetToNull(string $property): bool 'smallTaxpayer' => 'getSmallTaxpayer', 'evNumber' => 'getEvNumber', 'euTaxNumber' => 'getEuTaxNumber', - 'cashSettled' => 'getCashSettled' + 'cashSettled' => 'getCashSettled', ]; /** @@ -271,7 +268,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -282,10 +278,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('taxNumber', $data ?? [], null); @@ -298,14 +294,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -338,7 +332,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets name * @@ -352,8 +345,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -379,8 +371,7 @@ public function getTaxNumber() /** * Sets taxNumber * - * @param string|null $taxNumber taxNumber - * + * @param string|null $taxNumber taxNumber * @return self */ public function setTaxNumber($taxNumber) @@ -406,8 +397,7 @@ public function getBankAccount() /** * Sets bankAccount * - * @param \Cone\Billingo\Model\DocumentBankAccount|null $bankAccount bankAccount - * + * @param \Cone\Billingo\Model\DocumentBankAccount|null $bankAccount bankAccount * @return self */ public function setBankAccount($bankAccount) @@ -433,8 +423,7 @@ public function getAddress() /** * Sets address * - * @param \Cone\Billingo\Model\Address|null $address address - * + * @param \Cone\Billingo\Model\Address|null $address address * @return self */ public function setAddress($address) @@ -460,8 +449,7 @@ public function getSmallTaxpayer() /** * Sets smallTaxpayer * - * @param bool|null $smallTaxpayer smallTaxpayer - * + * @param bool|null $smallTaxpayer smallTaxpayer * @return self */ public function setSmallTaxpayer($smallTaxpayer) @@ -487,8 +475,7 @@ public function getEvNumber() /** * Sets evNumber * - * @param string|null $evNumber evNumber - * + * @param string|null $evNumber evNumber * @return self */ public function setEvNumber($evNumber) @@ -514,8 +501,7 @@ public function getEuTaxNumber() /** * Sets euTaxNumber * - * @param string|null $euTaxNumber euTaxNumber - * + * @param string|null $euTaxNumber euTaxNumber * @return self */ public function setEuTaxNumber($euTaxNumber) @@ -541,8 +527,7 @@ public function getCashSettled() /** * Sets cashSettled * - * @param bool|null $cashSettled cashSettled - * + * @param bool|null $cashSettled cashSettled * @return self */ public function setCashSettled($cashSettled) @@ -554,12 +539,11 @@ public function setCashSettled($cashSettled) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -569,8 +553,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -582,10 +565,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -599,9 +580,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -610,6 +589,7 @@ public function offsetUnset($offset): void /** * 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 @@ -618,7 +598,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -644,5 +624,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentPartner.php b/src/Model/DocumentPartner.php index 8f4303b..3fea62f 100644 --- a/src/Model/DocumentPartner.php +++ b/src/Model/DocumentPartner.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentPartner Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentPartner implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentPartner implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentPartner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -67,16 +70,18 @@ class DocumentPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'swift' => 'string', 'accountNumber' => 'string', 'phone' => 'string', - 'taxType' => '\Cone\Billingo\Model\PartnerTaxType' + 'taxType' => '\Cone\Billingo\Model\PartnerTaxType', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -87,14 +92,14 @@ class DocumentPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'swift' => null, 'accountNumber' => null, 'phone' => null, - 'taxType' => null + 'taxType' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -105,14 +110,14 @@ class DocumentPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'swift' => false, 'accountNumber' => false, 'phone' => false, - 'taxType' => false + 'taxType' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -137,8 +142,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -148,7 +151,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -158,7 +161,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -167,9 +170,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -178,9 +178,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'swift' => 'swift', 'accountNumber' => 'account_number', 'phone' => 'phone', - 'taxType' => 'tax_type' + 'taxType' => 'tax_type', ]; /** @@ -221,7 +218,7 @@ public function isNullableSetToNull(string $property): bool 'swift' => 'setSwift', 'accountNumber' => 'setAccountNumber', 'phone' => 'setPhone', - 'taxType' => 'setTaxType' + 'taxType' => 'setTaxType', ]; /** @@ -239,7 +236,7 @@ public function isNullableSetToNull(string $property): bool 'swift' => 'getSwift', 'accountNumber' => 'getAccountNumber', 'phone' => 'getPhone', - 'taxType' => 'getTaxType' + 'taxType' => 'getTaxType', ]; /** @@ -283,7 +280,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -294,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -312,14 +308,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -352,7 +346,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -366,8 +359,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -393,8 +385,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -420,8 +411,7 @@ public function getAddress() /** * Sets address * - * @param \Cone\Billingo\Model\Address|null $address address - * + * @param \Cone\Billingo\Model\Address|null $address address * @return self */ public function setAddress($address) @@ -447,8 +437,7 @@ public function getEmails() /** * Sets emails * - * @param string[]|null $emails emails - * + * @param string[]|null $emails emails * @return self */ public function setEmails($emails) @@ -474,8 +463,7 @@ public function getTaxcode() /** * Sets taxcode * - * @param string|null $taxcode taxcode - * + * @param string|null $taxcode taxcode * @return self */ public function setTaxcode($taxcode) @@ -501,8 +489,7 @@ public function getIban() /** * Sets iban * - * @param string|null $iban iban - * + * @param string|null $iban iban * @return self */ public function setIban($iban) @@ -528,8 +515,7 @@ public function getSwift() /** * Sets swift * - * @param string|null $swift swift - * + * @param string|null $swift swift * @return self */ public function setSwift($swift) @@ -555,8 +541,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string|null $accountNumber accountNumber - * + * @param string|null $accountNumber accountNumber * @return self */ public function setAccountNumber($accountNumber) @@ -582,8 +567,7 @@ public function getPhone() /** * Sets phone * - * @param string|null $phone phone - * + * @param string|null $phone phone * @return self */ public function setPhone($phone) @@ -609,8 +593,7 @@ public function getTaxType() /** * Sets taxType * - * @param \Cone\Billingo\Model\PartnerTaxType|null $taxType taxType - * + * @param \Cone\Billingo\Model\PartnerTaxType|null $taxType taxType * @return self */ public function setTaxType($taxType) @@ -622,12 +605,11 @@ public function setTaxType($taxType) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -637,8 +619,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -650,10 +631,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -667,9 +646,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -678,6 +655,7 @@ public function offsetUnset($offset): void /** * 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 @@ -686,7 +664,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -712,5 +690,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentProductData.php b/src/Model/DocumentProductData.php index 3c2828f..6772e4d 100644 --- a/src/Model/DocumentProductData.php +++ b/src/Model/DocumentProductData.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentProductData Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentProductData implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentProductData implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentProductData'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'name' => 'string', 'unitPrice' => 'float', @@ -65,16 +68,18 @@ class DocumentProductData implements ModelInterface, ArrayAccess, \JsonSerializa 'unit' => 'string', 'vat' => '\Cone\Billingo\Model\Vat', 'comment' => 'string', - 'entitlement' => '\Cone\Billingo\Model\Entitlement' + 'entitlement' => '\Cone\Billingo\Model\Entitlement', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'name' => null, 'unitPrice' => 'float', @@ -83,14 +88,14 @@ class DocumentProductData implements ModelInterface, ArrayAccess, \JsonSerializa 'unit' => null, 'vat' => null, 'comment' => null, - 'entitlement' => null + 'entitlement' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'name' => false, 'unitPrice' => false, @@ -99,14 +104,14 @@ class DocumentProductData implements ModelInterface, ArrayAccess, \JsonSerializa 'unit' => false, 'vat' => false, 'comment' => false, - 'entitlement' => false + 'entitlement' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -131,8 +136,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -142,7 +145,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -152,7 +155,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -161,9 +164,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -172,9 +172,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -195,7 +192,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'unit', 'vat' => 'vat', 'comment' => 'comment', - 'entitlement' => 'entitlement' + 'entitlement' => 'entitlement', ]; /** @@ -211,7 +208,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'setUnit', 'vat' => 'setVat', 'comment' => 'setComment', - 'entitlement' => 'setEntitlement' + 'entitlement' => 'setEntitlement', ]; /** @@ -227,7 +224,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'getUnit', 'vat' => 'getVat', 'comment' => 'getComment', - 'entitlement' => 'getEntitlement' + 'entitlement' => 'getEntitlement', ]; /** @@ -271,7 +268,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -282,10 +278,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('unitPrice', $data ?? [], null); @@ -298,14 +294,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -342,6 +336,7 @@ public function listInvalidProperties() if ($this->container['vat'] === null) { $invalidProperties[] = "'vat' can't be null"; } + return $invalidProperties; } @@ -356,7 +351,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets name * @@ -370,8 +364,7 @@ public function getName() /** * Sets name * - * @param string $name name - * + * @param string $name name * @return self */ public function setName($name) @@ -397,8 +390,7 @@ public function getUnitPrice() /** * Sets unitPrice * - * @param float $unitPrice unitPrice - * + * @param float $unitPrice unitPrice * @return self */ public function setUnitPrice($unitPrice) @@ -424,8 +416,7 @@ public function getUnitPriceType() /** * Sets unitPriceType * - * @param \Cone\Billingo\Model\UnitPriceType $unitPriceType unitPriceType - * + * @param \Cone\Billingo\Model\UnitPriceType $unitPriceType unitPriceType * @return self */ public function setUnitPriceType($unitPriceType) @@ -451,8 +442,7 @@ public function getQuantity() /** * Sets quantity * - * @param float $quantity quantity - * + * @param float $quantity quantity * @return self */ public function setQuantity($quantity) @@ -478,8 +468,7 @@ public function getUnit() /** * Sets unit * - * @param string $unit unit - * + * @param string $unit unit * @return self */ public function setUnit($unit) @@ -505,8 +494,7 @@ public function getVat() /** * Sets vat * - * @param \Cone\Billingo\Model\Vat $vat vat - * + * @param \Cone\Billingo\Model\Vat $vat vat * @return self */ public function setVat($vat) @@ -532,8 +520,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -559,8 +546,7 @@ public function getEntitlement() /** * Sets entitlement * - * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement - * + * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement * @return self */ public function setEntitlement($entitlement) @@ -572,12 +558,11 @@ public function setEntitlement($entitlement) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -587,8 +572,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -600,10 +584,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -617,9 +599,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -628,6 +608,7 @@ public function offsetUnset($offset): void /** * 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 @@ -636,7 +617,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -662,5 +643,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/DocumentSettings.php b/src/Model/DocumentSettings.php index f0328b0..38e5b1e 100644 --- a/src/Model/DocumentSettings.php +++ b/src/Model/DocumentSettings.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * DocumentSettings Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class DocumentSettings implements ModelInterface, ArrayAccess, \JsonSerializable +class DocumentSettings implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'DocumentSettings'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'mediatedService' => 'bool', 'withoutFinancialFulfillment' => 'bool', @@ -66,16 +69,18 @@ class DocumentSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'orderNumber' => 'string', 'placeId' => 'int', 'instantPayment' => 'bool', - 'selectedType' => '\Cone\Billingo\Model\DocumentType' + 'selectedType' => '\Cone\Billingo\Model\DocumentType', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'mediatedService' => null, 'withoutFinancialFulfillment' => null, @@ -85,14 +90,14 @@ class DocumentSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'orderNumber' => null, 'placeId' => null, 'instantPayment' => null, - 'selectedType' => null + 'selectedType' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'mediatedService' => false, 'withoutFinancialFulfillment' => false, @@ -102,14 +107,14 @@ class DocumentSettings implements ModelInterface, ArrayAccess, \JsonSerializable 'orderNumber' => false, 'placeId' => true, 'instantPayment' => false, - 'selectedType' => false + 'selectedType' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -134,8 +139,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -145,7 +148,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -155,7 +158,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -164,9 +167,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -175,9 +175,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -199,7 +196,7 @@ public function isNullableSetToNull(string $property): bool 'orderNumber' => 'order_number', 'placeId' => 'place_id', 'instantPayment' => 'instant_payment', - 'selectedType' => 'selected_type' + 'selectedType' => 'selected_type', ]; /** @@ -216,7 +213,7 @@ public function isNullableSetToNull(string $property): bool 'orderNumber' => 'setOrderNumber', 'placeId' => 'setPlaceId', 'instantPayment' => 'setInstantPayment', - 'selectedType' => 'setSelectedType' + 'selectedType' => 'setSelectedType', ]; /** @@ -233,7 +230,7 @@ public function isNullableSetToNull(string $property): bool 'orderNumber' => 'getOrderNumber', 'placeId' => 'getPlaceId', 'instantPayment' => 'getInstantPayment', - 'selectedType' => 'getSelectedType' + 'selectedType' => 'getSelectedType', ]; /** @@ -277,7 +274,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -288,10 +284,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('mediatedService', $data ?? [], false); $this->setIfExists('withoutFinancialFulfillment', $data ?? [], false); @@ -305,14 +301,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -345,7 +339,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets mediatedService * @@ -359,8 +352,7 @@ public function getMediatedService() /** * Sets mediatedService * - * @param bool|null $mediatedService mediatedService - * + * @param bool|null $mediatedService mediatedService * @return self */ public function setMediatedService($mediatedService) @@ -386,8 +378,7 @@ public function getWithoutFinancialFulfillment() /** * Sets withoutFinancialFulfillment * - * @param bool|null $withoutFinancialFulfillment withoutFinancialFulfillment - * + * @param bool|null $withoutFinancialFulfillment withoutFinancialFulfillment * @return self */ public function setWithoutFinancialFulfillment($withoutFinancialFulfillment) @@ -413,8 +404,7 @@ public function getOnlinePayment() /** * Sets onlinePayment * - * @param \Cone\Billingo\Model\OnlinePayment|null $onlinePayment onlinePayment - * + * @param \Cone\Billingo\Model\OnlinePayment|null $onlinePayment onlinePayment * @return self */ public function setOnlinePayment($onlinePayment) @@ -440,8 +430,7 @@ public function getRound() /** * Sets round * - * @param \Cone\Billingo\Model\Round|null $round round - * + * @param \Cone\Billingo\Model\Round|null $round round * @return self */ public function setRound($round) @@ -467,8 +456,7 @@ public function getNoSendOnlineszamlaByUser() /** * Sets noSendOnlineszamlaByUser * - * @param bool|null $noSendOnlineszamlaByUser noSendOnlineszamlaByUser - * + * @param bool|null $noSendOnlineszamlaByUser noSendOnlineszamlaByUser * @return self */ public function setNoSendOnlineszamlaByUser($noSendOnlineszamlaByUser) @@ -494,8 +482,7 @@ public function getOrderNumber() /** * Sets orderNumber * - * @param string|null $orderNumber orderNumber - * + * @param string|null $orderNumber orderNumber * @return self */ public function setOrderNumber($orderNumber) @@ -521,8 +508,7 @@ public function getPlaceId() /** * Sets placeId * - * @param int|null $placeId placeId - * + * @param int|null $placeId placeId * @return self */ public function setPlaceId($placeId) @@ -532,7 +518,7 @@ public function setPlaceId($placeId) } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('placeId', $nullablesSetToNull); - if ($index !== FALSE) { + if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } @@ -555,8 +541,7 @@ public function getInstantPayment() /** * Sets instantPayment * - * @param bool|null $instantPayment instantPayment - * + * @param bool|null $instantPayment instantPayment * @return self */ public function setInstantPayment($instantPayment) @@ -582,8 +567,7 @@ public function getSelectedType() /** * Sets selectedType * - * @param \Cone\Billingo\Model\DocumentType|null $selectedType selectedType - * + * @param \Cone\Billingo\Model\DocumentType|null $selectedType selectedType * @return self */ public function setSelectedType($selectedType) @@ -595,12 +579,11 @@ public function setSelectedType($selectedType) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -610,8 +593,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -623,10 +605,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -640,9 +620,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -651,6 +629,7 @@ public function offsetUnset($offset): void /** * 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 @@ -659,7 +638,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -685,5 +664,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Feature.php b/src/Model/Feature.php index 21da497..0b78e09 100644 --- a/src/Model/Feature.php +++ b/src/Model/Feature.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * Feature Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Feature @@ -89,6 +90,7 @@ class Feature /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -115,9 +117,7 @@ public static function getAllowableEnumValues() self::SUBSCRIPTION_STANDARD, self::TENDERMONITOR_STANDARD, self::TENDERMONITOR_VIP, - self::WHITELABEL + self::WHITELABEL, ]; } } - - diff --git a/src/Model/InvoiceSettings.php b/src/Model/InvoiceSettings.php index d254d43..3647ff9 100644 --- a/src/Model/InvoiceSettings.php +++ b/src/Model/InvoiceSettings.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,75 +30,79 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * InvoiceSettings Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class InvoiceSettings implements ModelInterface, ArrayAccess, \JsonSerializable +class InvoiceSettings implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'InvoiceSettings'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'documentType' => '\Cone\Billingo\Model\DocumentType', 'fulfillmentDate' => '\DateTime', 'dueDate' => '\DateTime', 'documentFormat' => '\Cone\Billingo\Model\DocumentFormat', - 'comment' => 'string' + 'comment' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'documentType' => null, 'fulfillmentDate' => 'date', 'dueDate' => 'date', 'documentFormat' => null, - 'comment' => null + 'comment' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'documentType' => false, 'fulfillmentDate' => false, 'dueDate' => false, 'documentFormat' => false, - 'comment' => false + 'comment' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -122,8 +127,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -133,7 +136,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -143,7 +146,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -152,9 +155,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -163,9 +163,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -183,7 +180,7 @@ public function isNullableSetToNull(string $property): bool 'fulfillmentDate' => 'fulfillment_date', 'dueDate' => 'due_date', 'documentFormat' => 'document_format', - 'comment' => 'comment' + 'comment' => 'comment', ]; /** @@ -196,7 +193,7 @@ public function isNullableSetToNull(string $property): bool 'fulfillmentDate' => 'setFulfillmentDate', 'dueDate' => 'setDueDate', 'documentFormat' => 'setDocumentFormat', - 'comment' => 'setComment' + 'comment' => 'setComment', ]; /** @@ -209,7 +206,7 @@ public function isNullableSetToNull(string $property): bool 'fulfillmentDate' => 'getFulfillmentDate', 'dueDate' => 'getDueDate', 'documentFormat' => 'getDocumentFormat', - 'comment' => 'getComment' + 'comment' => 'getComment', ]; /** @@ -253,7 +250,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -264,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('documentType', $data ?? [], null); $this->setIfExists('fulfillmentDate', $data ?? [], null); @@ -277,14 +273,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -317,7 +311,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets documentType * @@ -331,8 +324,7 @@ public function getDocumentType() /** * Sets documentType * - * @param \Cone\Billingo\Model\DocumentType|null $documentType documentType - * + * @param \Cone\Billingo\Model\DocumentType|null $documentType documentType * @return self */ public function setDocumentType($documentType) @@ -358,8 +350,7 @@ public function getFulfillmentDate() /** * Sets fulfillmentDate * - * @param \DateTime|null $fulfillmentDate fulfillmentDate - * + * @param \DateTime|null $fulfillmentDate fulfillmentDate * @return self */ public function setFulfillmentDate($fulfillmentDate) @@ -385,8 +376,7 @@ public function getDueDate() /** * Sets dueDate * - * @param \DateTime|null $dueDate dueDate - * + * @param \DateTime|null $dueDate dueDate * @return self */ public function setDueDate($dueDate) @@ -412,8 +402,7 @@ public function getDocumentFormat() /** * Sets documentFormat * - * @param \Cone\Billingo\Model\DocumentFormat|null $documentFormat documentFormat - * + * @param \Cone\Billingo\Model\DocumentFormat|null $documentFormat documentFormat * @return self */ public function setDocumentFormat($documentFormat) @@ -439,8 +428,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -452,12 +440,11 @@ public function setComment($comment) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -467,8 +454,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -480,10 +466,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -497,9 +481,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -508,6 +490,7 @@ public function offsetUnset($offset): void /** * 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 @@ -516,7 +499,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -542,5 +525,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/LedgerNumberInformation.php b/src/Model/LedgerNumberInformation.php index 596267f..a293a65 100644 --- a/src/Model/LedgerNumberInformation.php +++ b/src/Model/LedgerNumberInformation.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,72 +30,76 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * LedgerNumberInformation Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class LedgerNumberInformation implements ModelInterface, ArrayAccess, \JsonSerializable +class LedgerNumberInformation implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'LedgerNumberInformation'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'bevetel' => 'string', 'vevo' => 'string', 'penztar' => 'string', - 'afa' => 'string' + 'afa' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'bevetel' => null, 'vevo' => null, 'penztar' => null, - 'afa' => null + 'afa' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'bevetel' => false, 'vevo' => false, 'penztar' => false, - 'afa' => false + 'afa' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -119,8 +124,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -130,7 +133,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -140,7 +143,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -149,9 +152,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -160,9 +160,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -179,7 +176,7 @@ public function isNullableSetToNull(string $property): bool 'bevetel' => 'bevetel', 'vevo' => 'vevo', 'penztar' => 'penztar', - 'afa' => 'afa' + 'afa' => 'afa', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool 'bevetel' => 'setBevetel', 'vevo' => 'setVevo', 'penztar' => 'setPenztar', - 'afa' => 'setAfa' + 'afa' => 'setAfa', ]; /** @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'bevetel' => 'getBevetel', 'vevo' => 'getVevo', 'penztar' => 'getPenztar', - 'afa' => 'getAfa' + 'afa' => 'getAfa', ]; /** @@ -247,7 +244,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -258,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bevetel', $data ?? [], null); $this->setIfExists('vevo', $data ?? [], null); @@ -270,14 +266,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -310,7 +304,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets bevetel * @@ -324,8 +317,7 @@ public function getBevetel() /** * Sets bevetel * - * @param string|null $bevetel bevetel - * + * @param string|null $bevetel bevetel * @return self */ public function setBevetel($bevetel) @@ -351,8 +343,7 @@ public function getVevo() /** * Sets vevo * - * @param string|null $vevo vevo - * + * @param string|null $vevo vevo * @return self */ public function setVevo($vevo) @@ -378,8 +369,7 @@ public function getPenztar() /** * Sets penztar * - * @param string|null $penztar penztar - * + * @param string|null $penztar penztar * @return self */ public function setPenztar($penztar) @@ -405,8 +395,7 @@ public function getAfa() /** * Sets afa * - * @param string|null $afa afa - * + * @param string|null $afa afa * @return self */ public function setAfa($afa) @@ -418,12 +407,11 @@ public function setAfa($afa) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -433,8 +421,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -446,10 +433,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -463,9 +448,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -474,6 +457,7 @@ public function offsetUnset($offset): void /** * 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 @@ -482,7 +466,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -508,5 +492,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/ModificationDocumentInsert.php b/src/Model/ModificationDocumentInsert.php index 5855542..8f94eb1 100644 --- a/src/Model/ModificationDocumentInsert.php +++ b/src/Model/ModificationDocumentInsert.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,75 +30,79 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ModificationDocumentInsert Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ModificationDocumentInsert implements ModelInterface, ArrayAccess, \JsonSerializable +class ModificationDocumentInsert implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ModificationDocumentInsert'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'dueDate' => '\DateTime', 'comment' => 'string', 'paymentMethod' => '\Cone\Billingo\Model\PaymentMethod', 'withoutFinancialFulfillment' => 'bool', - 'items' => '\Cone\Billingo\Model\DocumentInsertItemsInner[]' + 'items' => '\Cone\Billingo\Model\DocumentInsertItemsInner[]', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'dueDate' => 'date', 'comment' => null, 'paymentMethod' => null, 'withoutFinancialFulfillment' => null, - 'items' => null + 'items' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'dueDate' => false, 'comment' => false, 'paymentMethod' => false, 'withoutFinancialFulfillment' => false, - 'items' => false + 'items' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -122,8 +127,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -133,7 +136,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -143,7 +146,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -152,9 +155,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -163,9 +163,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -183,7 +180,7 @@ public function isNullableSetToNull(string $property): bool 'comment' => 'comment', 'paymentMethod' => 'payment_method', 'withoutFinancialFulfillment' => 'without_financial_fulfillment', - 'items' => 'items' + 'items' => 'items', ]; /** @@ -196,7 +193,7 @@ public function isNullableSetToNull(string $property): bool 'comment' => 'setComment', 'paymentMethod' => 'setPaymentMethod', 'withoutFinancialFulfillment' => 'setWithoutFinancialFulfillment', - 'items' => 'setItems' + 'items' => 'setItems', ]; /** @@ -209,7 +206,7 @@ public function isNullableSetToNull(string $property): bool 'comment' => 'getComment', 'paymentMethod' => 'getPaymentMethod', 'withoutFinancialFulfillment' => 'getWithoutFinancialFulfillment', - 'items' => 'getItems' + 'items' => 'getItems', ]; /** @@ -253,7 +250,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -264,10 +260,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('dueDate', $data ?? [], null); $this->setIfExists('comment', $data ?? [], null); @@ -277,14 +273,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -317,7 +311,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets dueDate * @@ -331,8 +324,7 @@ public function getDueDate() /** * Sets dueDate * - * @param \DateTime|null $dueDate dueDate - * + * @param \DateTime|null $dueDate dueDate * @return self */ public function setDueDate($dueDate) @@ -358,8 +350,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -385,8 +376,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -412,8 +402,7 @@ public function getWithoutFinancialFulfillment() /** * Sets withoutFinancialFulfillment * - * @param bool|null $withoutFinancialFulfillment withoutFinancialFulfillment - * + * @param bool|null $withoutFinancialFulfillment withoutFinancialFulfillment * @return self */ public function setWithoutFinancialFulfillment($withoutFinancialFulfillment) @@ -439,8 +428,7 @@ public function getItems() /** * Sets items * - * @param \Cone\Billingo\Model\DocumentInsertItemsInner[]|null $items items - * + * @param \Cone\Billingo\Model\DocumentInsertItemsInner[]|null $items items * @return self */ public function setItems($items) @@ -452,12 +440,11 @@ public function setItems($items) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -467,8 +454,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -480,10 +466,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -497,9 +481,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -508,6 +490,7 @@ public function offsetUnset($offset): void /** * 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 @@ -516,7 +499,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -542,5 +525,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Partner.php b/src/Model/Partner.php index 0f04d01..3903a8b 100644 --- a/src/Model/Partner.php +++ b/src/Model/Partner.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Partner Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Partner implements ModelInterface, ArrayAccess, \JsonSerializable +class Partner implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Partner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -70,16 +73,18 @@ class Partner implements ModelInterface, ArrayAccess, \JsonSerializable 'generalLedgerNumber' => 'string', 'taxType' => '\Cone\Billingo\Model\PartnerTaxType', 'customBillingSettings' => '\Cone\Billingo\Model\PartnerCustomBillingSettings', - 'groupMemberTaxNumber' => 'string' + 'groupMemberTaxNumber' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -93,14 +98,14 @@ class Partner implements ModelInterface, ArrayAccess, \JsonSerializable 'generalLedgerNumber' => null, 'taxType' => null, 'customBillingSettings' => null, - 'groupMemberTaxNumber' => null + 'groupMemberTaxNumber' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -114,14 +119,14 @@ class Partner implements ModelInterface, ArrayAccess, \JsonSerializable 'generalLedgerNumber' => false, 'taxType' => false, 'customBillingSettings' => false, - 'groupMemberTaxNumber' => false + 'groupMemberTaxNumber' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -146,8 +151,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -157,7 +160,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -167,7 +170,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -176,9 +179,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -187,9 +187,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -215,7 +212,7 @@ public function isNullableSetToNull(string $property): bool 'generalLedgerNumber' => 'general_ledger_number', 'taxType' => 'tax_type', 'customBillingSettings' => 'custom_billing_settings', - 'groupMemberTaxNumber' => 'group_member_tax_number' + 'groupMemberTaxNumber' => 'group_member_tax_number', ]; /** @@ -236,7 +233,7 @@ public function isNullableSetToNull(string $property): bool 'generalLedgerNumber' => 'setGeneralLedgerNumber', 'taxType' => 'setTaxType', 'customBillingSettings' => 'setCustomBillingSettings', - 'groupMemberTaxNumber' => 'setGroupMemberTaxNumber' + 'groupMemberTaxNumber' => 'setGroupMemberTaxNumber', ]; /** @@ -257,7 +254,7 @@ public function isNullableSetToNull(string $property): bool 'generalLedgerNumber' => 'getGeneralLedgerNumber', 'taxType' => 'getTaxType', 'customBillingSettings' => 'getCustomBillingSettings', - 'groupMemberTaxNumber' => 'getGroupMemberTaxNumber' + 'groupMemberTaxNumber' => 'getGroupMemberTaxNumber', ]; /** @@ -301,7 +298,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -312,10 +308,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -333,14 +329,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -373,7 +367,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -387,8 +380,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -414,8 +406,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -441,8 +432,7 @@ public function getAddress() /** * Sets address * - * @param \Cone\Billingo\Model\Address|null $address address - * + * @param \Cone\Billingo\Model\Address|null $address address * @return self */ public function setAddress($address) @@ -468,8 +458,7 @@ public function getEmails() /** * Sets emails * - * @param string[]|null $emails emails - * + * @param string[]|null $emails emails * @return self */ public function setEmails($emails) @@ -495,8 +484,7 @@ public function getTaxcode() /** * Sets taxcode * - * @param string|null $taxcode taxcode - * + * @param string|null $taxcode taxcode * @return self */ public function setTaxcode($taxcode) @@ -522,8 +510,7 @@ public function getIban() /** * Sets iban * - * @param string|null $iban iban - * + * @param string|null $iban iban * @return self */ public function setIban($iban) @@ -549,8 +536,7 @@ public function getSwift() /** * Sets swift * - * @param string|null $swift swift - * + * @param string|null $swift swift * @return self */ public function setSwift($swift) @@ -576,8 +562,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string|null $accountNumber accountNumber - * + * @param string|null $accountNumber accountNumber * @return self */ public function setAccountNumber($accountNumber) @@ -603,8 +588,7 @@ public function getPhone() /** * Sets phone * - * @param string|null $phone phone - * + * @param string|null $phone phone * @return self */ public function setPhone($phone) @@ -630,8 +614,7 @@ public function getGeneralLedgerNumber() /** * Sets generalLedgerNumber * - * @param string|null $generalLedgerNumber generalLedgerNumber - * + * @param string|null $generalLedgerNumber generalLedgerNumber * @return self */ public function setGeneralLedgerNumber($generalLedgerNumber) @@ -657,8 +640,7 @@ public function getTaxType() /** * Sets taxType * - * @param \Cone\Billingo\Model\PartnerTaxType|null $taxType taxType - * + * @param \Cone\Billingo\Model\PartnerTaxType|null $taxType taxType * @return self */ public function setTaxType($taxType) @@ -684,8 +666,7 @@ public function getCustomBillingSettings() /** * Sets customBillingSettings * - * @param \Cone\Billingo\Model\PartnerCustomBillingSettings|null $customBillingSettings customBillingSettings - * + * @param \Cone\Billingo\Model\PartnerCustomBillingSettings|null $customBillingSettings customBillingSettings * @return self */ public function setCustomBillingSettings($customBillingSettings) @@ -711,8 +692,7 @@ public function getGroupMemberTaxNumber() /** * Sets groupMemberTaxNumber * - * @param string|null $groupMemberTaxNumber The tax number of group member. Send tax number for update. Send empty string for delete. Ignored if omitted. - * + * @param string|null $groupMemberTaxNumber The tax number of group member. Send tax number for update. Send empty string for delete. Ignored if omitted. * @return self */ public function setGroupMemberTaxNumber($groupMemberTaxNumber) @@ -724,12 +704,11 @@ public function setGroupMemberTaxNumber($groupMemberTaxNumber) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -739,8 +718,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -752,10 +730,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -769,9 +745,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -780,6 +754,7 @@ public function offsetUnset($offset): void /** * 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 @@ -788,7 +763,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -814,5 +789,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/PartnerCustomBillingSettings.php b/src/Model/PartnerCustomBillingSettings.php index 735d7a3..4c030cc 100644 --- a/src/Model/PartnerCustomBillingSettings.php +++ b/src/Model/PartnerCustomBillingSettings.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,78 +30,82 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * PartnerCustomBillingSettings Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class PartnerCustomBillingSettings implements ModelInterface, ArrayAccess, \JsonSerializable +class PartnerCustomBillingSettings implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'PartnerCustomBillingSettings'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'paymentMethod' => '\Cone\Billingo\Model\PaymentMethod', 'documentForm' => '\Cone\Billingo\Model\DocumentForm', 'dueDays' => 'int', 'documentCurrency' => '\Cone\Billingo\Model\Currency', 'templateLanguageCode' => '\Cone\Billingo\Model\DocumentLanguage', - 'discount' => '\Cone\Billingo\Model\Discount' + 'discount' => '\Cone\Billingo\Model\Discount', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'paymentMethod' => null, 'documentForm' => null, 'dueDays' => null, 'documentCurrency' => null, 'templateLanguageCode' => null, - 'discount' => null + 'discount' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'paymentMethod' => false, 'documentForm' => false, 'dueDays' => false, 'documentCurrency' => false, 'templateLanguageCode' => false, - 'discount' => false + 'discount' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -125,8 +130,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -136,7 +139,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -146,7 +149,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -155,9 +158,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -166,9 +166,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -187,7 +184,7 @@ public function isNullableSetToNull(string $property): bool 'dueDays' => 'due_days', 'documentCurrency' => 'document_currency', 'templateLanguageCode' => 'template_language_code', - 'discount' => 'discount' + 'discount' => 'discount', ]; /** @@ -201,7 +198,7 @@ public function isNullableSetToNull(string $property): bool 'dueDays' => 'setDueDays', 'documentCurrency' => 'setDocumentCurrency', 'templateLanguageCode' => 'setTemplateLanguageCode', - 'discount' => 'setDiscount' + 'discount' => 'setDiscount', ]; /** @@ -215,7 +212,7 @@ public function isNullableSetToNull(string $property): bool 'dueDays' => 'getDueDays', 'documentCurrency' => 'getDocumentCurrency', 'templateLanguageCode' => 'getTemplateLanguageCode', - 'discount' => 'getDiscount' + 'discount' => 'getDiscount', ]; /** @@ -259,7 +256,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -270,10 +266,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('paymentMethod', $data ?? [], null); $this->setIfExists('documentForm', $data ?? [], null); @@ -284,14 +280,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -324,7 +318,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets paymentMethod * @@ -338,8 +331,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\PaymentMethod|null $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -365,8 +357,7 @@ public function getDocumentForm() /** * Sets documentForm * - * @param \Cone\Billingo\Model\DocumentForm|null $documentForm documentForm - * + * @param \Cone\Billingo\Model\DocumentForm|null $documentForm documentForm * @return self */ public function setDocumentForm($documentForm) @@ -392,8 +383,7 @@ public function getDueDays() /** * Sets dueDays * - * @param int|null $dueDays dueDays - * + * @param int|null $dueDays dueDays * @return self */ public function setDueDays($dueDays) @@ -419,8 +409,7 @@ public function getDocumentCurrency() /** * Sets documentCurrency * - * @param \Cone\Billingo\Model\Currency|null $documentCurrency documentCurrency - * + * @param \Cone\Billingo\Model\Currency|null $documentCurrency documentCurrency * @return self */ public function setDocumentCurrency($documentCurrency) @@ -446,8 +435,7 @@ public function getTemplateLanguageCode() /** * Sets templateLanguageCode * - * @param \Cone\Billingo\Model\DocumentLanguage|null $templateLanguageCode templateLanguageCode - * + * @param \Cone\Billingo\Model\DocumentLanguage|null $templateLanguageCode templateLanguageCode * @return self */ public function setTemplateLanguageCode($templateLanguageCode) @@ -473,8 +461,7 @@ public function getDiscount() /** * Sets discount * - * @param \Cone\Billingo\Model\Discount|null $discount discount - * + * @param \Cone\Billingo\Model\Discount|null $discount discount * @return self */ public function setDiscount($discount) @@ -486,12 +473,11 @@ public function setDiscount($discount) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -501,8 +487,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -514,10 +499,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -531,9 +514,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -542,6 +523,7 @@ public function offsetUnset($offset): void /** * 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 @@ -550,7 +532,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -576,5 +558,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/PartnerList.php b/src/Model/PartnerList.php index c1993b4..4f54462 100644 --- a/src/Model/PartnerList.php +++ b/src/Model/PartnerList.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,35 +30,38 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * PartnerList Class Doc Comment * * @category Class + * * @description A object with a data property that contains an array of up to limit partners. Each entry in the array is a separate partner object. If no more partners are available, the resulting array will be empty. - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class PartnerList implements ModelInterface, ArrayAccess, \JsonSerializable +class PartnerList implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'PartnerList'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'data' => '\Cone\Billingo\Model\Partner[]', 'total' => 'int', @@ -65,16 +69,18 @@ class PartnerList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => 'int', 'lastPage' => 'int', 'prevPageUrl' => 'string', - 'nextPageUrl' => 'string' + 'nextPageUrl' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'data' => null, 'total' => null, @@ -82,14 +88,14 @@ class PartnerList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => null, 'lastPage' => null, 'prevPageUrl' => null, - 'nextPageUrl' => null + 'nextPageUrl' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'data' => false, 'total' => false, @@ -97,14 +103,14 @@ class PartnerList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => false, 'lastPage' => false, 'prevPageUrl' => false, - 'nextPageUrl' => false + 'nextPageUrl' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -129,8 +135,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -140,7 +144,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -150,7 +154,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -159,9 +163,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -170,9 +171,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -192,7 +190,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'current_page', 'lastPage' => 'last_page', 'prevPageUrl' => 'prev_page_url', - 'nextPageUrl' => 'next_page_url' + 'nextPageUrl' => 'next_page_url', ]; /** @@ -207,7 +205,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'setCurrentPage', 'lastPage' => 'setLastPage', 'prevPageUrl' => 'setPrevPageUrl', - 'nextPageUrl' => 'setNextPageUrl' + 'nextPageUrl' => 'setNextPageUrl', ]; /** @@ -222,7 +220,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'getCurrentPage', 'lastPage' => 'getLastPage', 'prevPageUrl' => 'getPrevPageUrl', - 'nextPageUrl' => 'getNextPageUrl' + 'nextPageUrl' => 'getNextPageUrl', ]; /** @@ -266,7 +264,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -277,10 +274,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('data', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); @@ -292,14 +289,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -332,7 +327,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets data * @@ -346,8 +340,7 @@ public function getData() /** * Sets data * - * @param \Cone\Billingo\Model\Partner[]|null $data data - * + * @param \Cone\Billingo\Model\Partner[]|null $data data * @return self */ public function setData($data) @@ -373,8 +366,7 @@ public function getTotal() /** * Sets total * - * @param int|null $total total - * + * @param int|null $total total * @return self */ public function setTotal($total) @@ -400,8 +392,7 @@ public function getPerPage() /** * Sets perPage * - * @param int|null $perPage perPage - * + * @param int|null $perPage perPage * @return self */ public function setPerPage($perPage) @@ -427,8 +418,7 @@ public function getCurrentPage() /** * Sets currentPage * - * @param int|null $currentPage currentPage - * + * @param int|null $currentPage currentPage * @return self */ public function setCurrentPage($currentPage) @@ -454,8 +444,7 @@ public function getLastPage() /** * Sets lastPage * - * @param int|null $lastPage lastPage - * + * @param int|null $lastPage lastPage * @return self */ public function setLastPage($lastPage) @@ -481,8 +470,7 @@ public function getPrevPageUrl() /** * Sets prevPageUrl * - * @param string|null $prevPageUrl prevPageUrl - * + * @param string|null $prevPageUrl prevPageUrl * @return self */ public function setPrevPageUrl($prevPageUrl) @@ -508,8 +496,7 @@ public function getNextPageUrl() /** * Sets nextPageUrl * - * @param string|null $nextPageUrl nextPageUrl - * + * @param string|null $nextPageUrl nextPageUrl * @return self */ public function setNextPageUrl($nextPageUrl) @@ -521,12 +508,11 @@ public function setNextPageUrl($nextPageUrl) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -536,8 +522,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -549,10 +534,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -566,9 +549,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -577,6 +558,7 @@ public function offsetUnset($offset): void /** * 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 @@ -585,7 +567,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -611,5 +593,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/PaymentMethod.php b/src/Model/PaymentMethod.php index 017b935..444b8c8 100644 --- a/src/Model/PaymentMethod.php +++ b/src/Model/PaymentMethod.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * PaymentMethod Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class PaymentMethod @@ -101,6 +102,7 @@ class PaymentMethod /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -133,9 +135,7 @@ public static function getAllowableEnumValues() self::UPWORK, self::UTALVANY, self::VALTO, - self::WIRE_TRANSFER + self::WIRE_TRANSFER, ]; } } - - diff --git a/src/Model/PaymentStatusSpending.php b/src/Model/PaymentStatusSpending.php index 30ae59e..870abcd 100644 --- a/src/Model/PaymentStatusSpending.php +++ b/src/Model/PaymentStatusSpending.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * PaymentStatusSpending Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class PaymentStatusSpending @@ -51,6 +52,7 @@ class PaymentStatusSpending /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -58,9 +60,7 @@ public static function getAllowableEnumValues() return [ self::ALL, self::PAID, - self::UNPAID + self::UNPAID, ]; } } - - diff --git a/src/Model/Product.php b/src/Model/Product.php index b917502..7e8340d 100644 --- a/src/Model/Product.php +++ b/src/Model/Product.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Product Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Product implements ModelInterface, ArrayAccess, \JsonSerializable +class Product implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Product'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -67,16 +70,18 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable 'unit' => 'string', 'generalLedgerNumber' => 'string', 'generalLedgerTaxcode' => 'string', - 'entitlement' => '\Cone\Billingo\Model\Entitlement' + 'entitlement' => '\Cone\Billingo\Model\Entitlement', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -87,14 +92,14 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable 'unit' => null, 'generalLedgerNumber' => null, 'generalLedgerTaxcode' => null, - 'entitlement' => null + 'entitlement' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -105,14 +110,14 @@ class Product implements ModelInterface, ArrayAccess, \JsonSerializable 'unit' => false, 'generalLedgerNumber' => false, 'generalLedgerTaxcode' => false, - 'entitlement' => false + 'entitlement' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -137,8 +142,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -148,7 +151,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -158,7 +161,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -167,9 +170,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -178,9 +178,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'unit', 'generalLedgerNumber' => 'general_ledger_number', 'generalLedgerTaxcode' => 'general_ledger_taxcode', - 'entitlement' => 'entitlement' + 'entitlement' => 'entitlement', ]; /** @@ -221,7 +218,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'setUnit', 'generalLedgerNumber' => 'setGeneralLedgerNumber', 'generalLedgerTaxcode' => 'setGeneralLedgerTaxcode', - 'entitlement' => 'setEntitlement' + 'entitlement' => 'setEntitlement', ]; /** @@ -239,7 +236,7 @@ public function isNullableSetToNull(string $property): bool 'unit' => 'getUnit', 'generalLedgerNumber' => 'getGeneralLedgerNumber', 'generalLedgerTaxcode' => 'getGeneralLedgerTaxcode', - 'entitlement' => 'getEntitlement' + 'entitlement' => 'getEntitlement', ]; /** @@ -283,7 +280,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -294,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -312,14 +308,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -350,6 +344,7 @@ public function listInvalidProperties() if ($this->container['unit'] === null) { $invalidProperties[] = "'unit' can't be null"; } + return $invalidProperties; } @@ -364,7 +359,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -378,8 +372,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -405,8 +398,7 @@ public function getName() /** * Sets name * - * @param string $name name - * + * @param string $name name * @return self */ public function setName($name) @@ -432,8 +424,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -459,8 +450,7 @@ public function getCurrency() /** * Sets currency * - * @param \Cone\Billingo\Model\Currency $currency currency - * + * @param \Cone\Billingo\Model\Currency $currency currency * @return self */ public function setCurrency($currency) @@ -486,8 +476,7 @@ public function getVat() /** * Sets vat * - * @param \Cone\Billingo\Model\Vat $vat vat - * + * @param \Cone\Billingo\Model\Vat $vat vat * @return self */ public function setVat($vat) @@ -513,8 +502,7 @@ public function getNetUnitPrice() /** * Sets netUnitPrice * - * @param float|null $netUnitPrice netUnitPrice - * + * @param float|null $netUnitPrice netUnitPrice * @return self */ public function setNetUnitPrice($netUnitPrice) @@ -540,8 +528,7 @@ public function getUnit() /** * Sets unit * - * @param string $unit unit - * + * @param string $unit unit * @return self */ public function setUnit($unit) @@ -567,8 +554,7 @@ public function getGeneralLedgerNumber() /** * Sets generalLedgerNumber * - * @param string|null $generalLedgerNumber generalLedgerNumber - * + * @param string|null $generalLedgerNumber generalLedgerNumber * @return self */ public function setGeneralLedgerNumber($generalLedgerNumber) @@ -594,8 +580,7 @@ public function getGeneralLedgerTaxcode() /** * Sets generalLedgerTaxcode * - * @param string|null $generalLedgerTaxcode generalLedgerTaxcode - * + * @param string|null $generalLedgerTaxcode generalLedgerTaxcode * @return self */ public function setGeneralLedgerTaxcode($generalLedgerTaxcode) @@ -621,8 +606,7 @@ public function getEntitlement() /** * Sets entitlement * - * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement - * + * @param \Cone\Billingo\Model\Entitlement|null $entitlement entitlement * @return self */ public function setEntitlement($entitlement) @@ -634,12 +618,11 @@ public function setEntitlement($entitlement) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -649,8 +632,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -662,10 +644,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -679,9 +659,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -690,6 +668,7 @@ public function offsetUnset($offset): void /** * 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 @@ -698,7 +677,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -724,5 +703,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/ProductList.php b/src/Model/ProductList.php index 6d74620..70a6fe3 100644 --- a/src/Model/ProductList.php +++ b/src/Model/ProductList.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,35 +30,38 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ProductList Class Doc Comment * * @category Class + * * @description A object with a data property that contains an array of up to limit products. Each entry in the array is a separate product object. If no more products are available, the resulting array will be empty. - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ProductList implements ModelInterface, ArrayAccess, \JsonSerializable +class ProductList implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ProductList'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'data' => '\Cone\Billingo\Model\Product[]', 'total' => 'int', @@ -65,16 +69,18 @@ class ProductList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => 'int', 'lastPage' => 'int', 'prevPageUrl' => 'string', - 'nextPageUrl' => 'string' + 'nextPageUrl' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'data' => null, 'total' => null, @@ -82,14 +88,14 @@ class ProductList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => null, 'lastPage' => null, 'prevPageUrl' => null, - 'nextPageUrl' => null + 'nextPageUrl' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'data' => false, 'total' => false, @@ -97,14 +103,14 @@ class ProductList implements ModelInterface, ArrayAccess, \JsonSerializable 'currentPage' => false, 'lastPage' => false, 'prevPageUrl' => false, - 'nextPageUrl' => false + 'nextPageUrl' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -129,8 +135,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -140,7 +144,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -150,7 +154,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -159,9 +163,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -170,9 +171,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -192,7 +190,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'current_page', 'lastPage' => 'last_page', 'prevPageUrl' => 'prev_page_url', - 'nextPageUrl' => 'next_page_url' + 'nextPageUrl' => 'next_page_url', ]; /** @@ -207,7 +205,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'setCurrentPage', 'lastPage' => 'setLastPage', 'prevPageUrl' => 'setPrevPageUrl', - 'nextPageUrl' => 'setNextPageUrl' + 'nextPageUrl' => 'setNextPageUrl', ]; /** @@ -222,7 +220,7 @@ public function isNullableSetToNull(string $property): bool 'currentPage' => 'getCurrentPage', 'lastPage' => 'getLastPage', 'prevPageUrl' => 'getPrevPageUrl', - 'nextPageUrl' => 'getNextPageUrl' + 'nextPageUrl' => 'getNextPageUrl', ]; /** @@ -266,7 +264,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -277,10 +274,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('data', $data ?? [], null); $this->setIfExists('total', $data ?? [], null); @@ -292,14 +289,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -332,7 +327,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets data * @@ -346,8 +340,7 @@ public function getData() /** * Sets data * - * @param \Cone\Billingo\Model\Product[]|null $data data - * + * @param \Cone\Billingo\Model\Product[]|null $data data * @return self */ public function setData($data) @@ -373,8 +366,7 @@ public function getTotal() /** * Sets total * - * @param int|null $total total - * + * @param int|null $total total * @return self */ public function setTotal($total) @@ -400,8 +392,7 @@ public function getPerPage() /** * Sets perPage * - * @param int|null $perPage perPage - * + * @param int|null $perPage perPage * @return self */ public function setPerPage($perPage) @@ -427,8 +418,7 @@ public function getCurrentPage() /** * Sets currentPage * - * @param int|null $currentPage currentPage - * + * @param int|null $currentPage currentPage * @return self */ public function setCurrentPage($currentPage) @@ -454,8 +444,7 @@ public function getLastPage() /** * Sets lastPage * - * @param int|null $lastPage lastPage - * + * @param int|null $lastPage lastPage * @return self */ public function setLastPage($lastPage) @@ -481,8 +470,7 @@ public function getPrevPageUrl() /** * Sets prevPageUrl * - * @param string|null $prevPageUrl prevPageUrl - * + * @param string|null $prevPageUrl prevPageUrl * @return self */ public function setPrevPageUrl($prevPageUrl) @@ -508,8 +496,7 @@ public function getNextPageUrl() /** * Sets nextPageUrl * - * @param string|null $nextPageUrl nextPageUrl - * + * @param string|null $nextPageUrl nextPageUrl * @return self */ public function setNextPageUrl($nextPageUrl) @@ -521,12 +508,11 @@ public function setNextPageUrl($nextPageUrl) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -536,8 +522,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -549,10 +534,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -566,9 +549,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -577,6 +558,7 @@ public function offsetUnset($offset): void /** * 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 @@ -585,7 +567,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -611,5 +593,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/ReceiptInsertItemsInner.php b/src/Model/ReceiptInsertItemsInner.php index 6cfd63a..d50bb98 100644 --- a/src/Model/ReceiptInsertItemsInner.php +++ b/src/Model/ReceiptInsertItemsInner.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,72 +30,76 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ReceiptInsertItemsInner Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ReceiptInsertItemsInner implements ModelInterface, ArrayAccess, \JsonSerializable +class ReceiptInsertItemsInner implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ReceiptInsert_items_inner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'productId' => 'int', 'name' => 'string', 'unitPrice' => 'float', - 'vat' => '\Cone\Billingo\Model\Vat' + 'vat' => '\Cone\Billingo\Model\Vat', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'productId' => null, 'name' => null, 'unitPrice' => 'float', - 'vat' => null + 'vat' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'productId' => false, 'name' => false, 'unitPrice' => false, - 'vat' => false + 'vat' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -119,8 +124,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -130,7 +133,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -140,7 +143,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -149,9 +152,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -160,9 +160,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -179,7 +176,7 @@ public function isNullableSetToNull(string $property): bool 'productId' => 'product_id', 'name' => 'name', 'unitPrice' => 'unit_price', - 'vat' => 'vat' + 'vat' => 'vat', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool 'productId' => 'setProductId', 'name' => 'setName', 'unitPrice' => 'setUnitPrice', - 'vat' => 'setVat' + 'vat' => 'setVat', ]; /** @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'productId' => 'getProductId', 'name' => 'getName', 'unitPrice' => 'getUnitPrice', - 'vat' => 'getVat' + 'vat' => 'getVat', ]; /** @@ -247,7 +244,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -258,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('productId', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -270,14 +266,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -305,6 +299,7 @@ public function listInvalidProperties() if ($this->container['vat'] === null) { $invalidProperties[] = "'vat' can't be null"; } + return $invalidProperties; } @@ -319,7 +314,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets productId * @@ -333,8 +327,7 @@ public function getProductId() /** * Sets productId * - * @param int $productId productId - * + * @param int $productId productId * @return self */ public function setProductId($productId) @@ -360,8 +353,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -387,8 +379,7 @@ public function getUnitPrice() /** * Sets unitPrice * - * @param float $unitPrice unitPrice - * + * @param float $unitPrice unitPrice * @return self */ public function setUnitPrice($unitPrice) @@ -414,8 +405,7 @@ public function getVat() /** * Sets vat * - * @param \Cone\Billingo\Model\Vat $vat vat - * + * @param \Cone\Billingo\Model\Vat $vat vat * @return self */ public function setVat($vat) @@ -427,12 +417,11 @@ public function setVat($vat) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -442,8 +431,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -455,10 +443,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -472,9 +458,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -483,6 +467,7 @@ public function offsetUnset($offset): void /** * 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 @@ -491,7 +476,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -517,5 +502,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Round.php b/src/Model/Round.php index a297930..dd183e5 100644 --- a/src/Model/Round.php +++ b/src/Model/Round.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * Round Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Round @@ -53,6 +54,7 @@ class Round /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -61,9 +63,7 @@ public static function getAllowableEnumValues() self::FIVE, self::NONE, self::ONE, - self::TEN + self::TEN, ]; } } - - diff --git a/src/Model/ServerTime.php b/src/Model/ServerTime.php index 0c7f568..b1b9f90 100644 --- a/src/Model/ServerTime.php +++ b/src/Model/ServerTime.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,72 +30,76 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * ServerTime Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class ServerTime implements ModelInterface, ArrayAccess, \JsonSerializable +class ServerTime implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'ServerTime'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'epoch' => 'int', 'formatted' => 'string', 'w3c' => 'string', - 'timezone' => 'string' + 'timezone' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'epoch' => null, 'formatted' => null, 'w3c' => null, - 'timezone' => null + 'timezone' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'epoch' => false, 'formatted' => false, 'w3c' => false, - 'timezone' => false + 'timezone' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -119,8 +124,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -130,7 +133,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -140,7 +143,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -149,9 +152,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -160,9 +160,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -179,7 +176,7 @@ public function isNullableSetToNull(string $property): bool 'epoch' => 'epoch', 'formatted' => 'formatted', 'w3c' => 'w3c', - 'timezone' => 'timezone' + 'timezone' => 'timezone', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool 'epoch' => 'setEpoch', 'formatted' => 'setFormatted', 'w3c' => 'setW3c', - 'timezone' => 'setTimezone' + 'timezone' => 'setTimezone', ]; /** @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'epoch' => 'getEpoch', 'formatted' => 'getFormatted', 'w3c' => 'getW3c', - 'timezone' => 'getTimezone' + 'timezone' => 'getTimezone', ]; /** @@ -247,7 +244,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -258,10 +254,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('epoch', $data ?? [], null); $this->setIfExists('formatted', $data ?? [], null); @@ -270,14 +266,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -310,7 +304,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets epoch * @@ -324,8 +317,7 @@ public function getEpoch() /** * Sets epoch * - * @param int|null $epoch epoch - * + * @param int|null $epoch epoch * @return self */ public function setEpoch($epoch) @@ -351,8 +343,7 @@ public function getFormatted() /** * Sets formatted * - * @param string|null $formatted formatted - * + * @param string|null $formatted formatted * @return self */ public function setFormatted($formatted) @@ -378,8 +369,7 @@ public function getW3c() /** * Sets w3c * - * @param string|null $w3c w3c - * + * @param string|null $w3c w3c * @return self */ public function setW3c($w3c) @@ -405,8 +395,7 @@ public function getTimezone() /** * Sets timezone * - * @param string|null $timezone timezone - * + * @param string|null $timezone timezone * @return self */ public function setTimezone($timezone) @@ -418,12 +407,11 @@ public function setTimezone($timezone) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -433,8 +421,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -446,10 +433,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -463,9 +448,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -474,6 +457,7 @@ public function offsetUnset($offset): void /** * 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 @@ -482,7 +466,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -508,5 +492,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Spending.php b/src/Model/Spending.php index a76b0a5..5bba714 100644 --- a/src/Model/Spending.php +++ b/src/Model/Spending.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Spending Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Spending implements ModelInterface, ArrayAccess, \JsonSerializable +class Spending implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Spending'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'organizationId' => 'int', @@ -74,16 +77,18 @@ class Spending implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => '\DateTime', 'dueDate' => '\DateTime', 'paymentMethod' => '\Cone\Billingo\Model\SpendingPaymentMethod', - 'comment' => 'string' + 'comment' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'organizationId' => null, @@ -101,14 +106,14 @@ class Spending implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => 'date', 'dueDate' => 'date', 'paymentMethod' => null, - 'comment' => null + 'comment' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'organizationId' => false, @@ -126,14 +131,14 @@ class Spending implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => false, 'dueDate' => false, 'paymentMethod' => false, - 'comment' => true + 'comment' => true, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -158,8 +163,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -169,7 +172,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -179,7 +182,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -188,9 +191,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -199,9 +199,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -231,7 +228,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'invoice_date', 'dueDate' => 'due_date', 'paymentMethod' => 'payment_method', - 'comment' => 'comment' + 'comment' => 'comment', ]; /** @@ -256,7 +253,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'setInvoiceDate', 'dueDate' => 'setDueDate', 'paymentMethod' => 'setPaymentMethod', - 'comment' => 'setComment' + 'comment' => 'setComment', ]; /** @@ -281,7 +278,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'getInvoiceDate', 'dueDate' => 'getDueDate', 'paymentMethod' => 'getPaymentMethod', - 'comment' => 'getComment' + 'comment' => 'getComment', ]; /** @@ -325,7 +322,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -336,10 +332,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('organizationId', $data ?? [], null); @@ -361,14 +357,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -401,7 +395,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -415,8 +408,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -442,8 +434,7 @@ public function getOrganizationId() /** * Sets organizationId * - * @param int|null $organizationId organizationId - * + * @param int|null $organizationId organizationId * @return self */ public function setOrganizationId($organizationId) @@ -469,8 +460,7 @@ public function getCategory() /** * Sets category * - * @param \Cone\Billingo\Model\Category|null $category category - * + * @param \Cone\Billingo\Model\Category|null $category category * @return self */ public function setCategory($category) @@ -496,8 +486,7 @@ public function getPaidAt() /** * Sets paidAt * - * @param \DateTime|null $paidAt paidAt - * + * @param \DateTime|null $paidAt paidAt * @return self */ public function setPaidAt($paidAt) @@ -507,7 +496,7 @@ public function setPaidAt($paidAt) } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('paidAt', $nullablesSetToNull); - if ($index !== FALSE) { + if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } @@ -530,8 +519,7 @@ public function getFulfillmentDate() /** * Sets fulfillmentDate * - * @param \DateTime|null $fulfillmentDate fulfillmentDate - * + * @param \DateTime|null $fulfillmentDate fulfillmentDate * @return self */ public function setFulfillmentDate($fulfillmentDate) @@ -557,8 +545,7 @@ public function getPartner() /** * Sets partner * - * @param \Cone\Billingo\Model\SpendingPartner|null $partner partner - * + * @param \Cone\Billingo\Model\SpendingPartner|null $partner partner * @return self */ public function setPartner($partner) @@ -584,8 +571,7 @@ public function getInvoiceNumber() /** * Sets invoiceNumber * - * @param string|null $invoiceNumber invoiceNumber - * + * @param string|null $invoiceNumber invoiceNumber * @return self */ public function setInvoiceNumber($invoiceNumber) @@ -611,8 +597,7 @@ public function getCurrency() /** * Sets currency * - * @param \Cone\Billingo\Model\Currency|null $currency currency - * + * @param \Cone\Billingo\Model\Currency|null $currency currency * @return self */ public function setCurrency($currency) @@ -638,8 +623,7 @@ public function getConversionRate() /** * Sets conversionRate * - * @param float|null $conversionRate conversionRate - * + * @param float|null $conversionRate conversionRate * @return self */ public function setConversionRate($conversionRate) @@ -665,8 +649,7 @@ public function getTotalGross() /** * Sets totalGross * - * @param float|null $totalGross totalGross - * + * @param float|null $totalGross totalGross * @return self */ public function setTotalGross($totalGross) @@ -692,8 +675,7 @@ public function getTotalGrossLocal() /** * Sets totalGrossLocal * - * @param float|null $totalGrossLocal totalGrossLocal - * + * @param float|null $totalGrossLocal totalGrossLocal * @return self */ public function setTotalGrossLocal($totalGrossLocal) @@ -719,8 +701,7 @@ public function getTotalVatAmount() /** * Sets totalVatAmount * - * @param float|null $totalVatAmount totalVatAmount - * + * @param float|null $totalVatAmount totalVatAmount * @return self */ public function setTotalVatAmount($totalVatAmount) @@ -746,8 +727,7 @@ public function getTotalVatAmountLocal() /** * Sets totalVatAmountLocal * - * @param float|null $totalVatAmountLocal totalVatAmountLocal - * + * @param float|null $totalVatAmountLocal totalVatAmountLocal * @return self */ public function setTotalVatAmountLocal($totalVatAmountLocal) @@ -773,8 +753,7 @@ public function getInvoiceDate() /** * Sets invoiceDate * - * @param \DateTime|null $invoiceDate invoiceDate - * + * @param \DateTime|null $invoiceDate invoiceDate * @return self */ public function setInvoiceDate($invoiceDate) @@ -800,8 +779,7 @@ public function getDueDate() /** * Sets dueDate * - * @param \DateTime|null $dueDate dueDate - * + * @param \DateTime|null $dueDate dueDate * @return self */ public function setDueDate($dueDate) @@ -827,8 +805,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\SpendingPaymentMethod|null $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\SpendingPaymentMethod|null $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -854,8 +831,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -865,7 +841,7 @@ public function setComment($comment) } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('comment', $nullablesSetToNull); - if ($index !== FALSE) { + if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } @@ -874,12 +850,11 @@ public function setComment($comment) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -889,8 +864,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -902,10 +876,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -919,9 +891,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -930,6 +900,7 @@ public function offsetUnset($offset): void /** * 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 @@ -938,7 +909,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -964,5 +935,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/SpendingPartner.php b/src/Model/SpendingPartner.php index dbefaa3..2f45b3e 100644 --- a/src/Model/SpendingPartner.php +++ b/src/Model/SpendingPartner.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * SpendingPartner Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class SpendingPartner implements ModelInterface, ArrayAccess, \JsonSerializable +class SpendingPartner implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'SpendingPartner'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'id' => 'int', 'name' => 'string', @@ -67,16 +70,18 @@ class SpendingPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'accountNumber' => 'string', 'phone' => 'string', 'internalComment' => 'string', - 'groupMemberTaxNumber' => 'string' + 'groupMemberTaxNumber' => 'string', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'id' => null, 'name' => null, @@ -87,14 +92,14 @@ class SpendingPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'accountNumber' => null, 'phone' => null, 'internalComment' => null, - 'groupMemberTaxNumber' => null + 'groupMemberTaxNumber' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'id' => false, 'name' => false, @@ -105,14 +110,14 @@ class SpendingPartner implements ModelInterface, ArrayAccess, \JsonSerializable 'accountNumber' => false, 'phone' => false, 'internalComment' => false, - 'groupMemberTaxNumber' => false + 'groupMemberTaxNumber' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -137,8 +142,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -148,7 +151,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -158,7 +161,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -167,9 +170,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -178,9 +178,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -203,7 +200,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'account_number', 'phone' => 'phone', 'internalComment' => 'internal_comment', - 'groupMemberTaxNumber' => 'group_member_tax_number' + 'groupMemberTaxNumber' => 'group_member_tax_number', ]; /** @@ -221,7 +218,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'setAccountNumber', 'phone' => 'setPhone', 'internalComment' => 'setInternalComment', - 'groupMemberTaxNumber' => 'setGroupMemberTaxNumber' + 'groupMemberTaxNumber' => 'setGroupMemberTaxNumber', ]; /** @@ -239,7 +236,7 @@ public function isNullableSetToNull(string $property): bool 'accountNumber' => 'getAccountNumber', 'phone' => 'getPhone', 'internalComment' => 'getInternalComment', - 'groupMemberTaxNumber' => 'getGroupMemberTaxNumber' + 'groupMemberTaxNumber' => 'getGroupMemberTaxNumber', ]; /** @@ -283,7 +280,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -294,10 +290,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); @@ -312,14 +308,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -352,7 +346,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets id * @@ -366,8 +359,7 @@ public function getId() /** * Sets id * - * @param int|null $id id - * + * @param int|null $id id * @return self */ public function setId($id) @@ -393,8 +385,7 @@ public function getName() /** * Sets name * - * @param string|null $name name - * + * @param string|null $name name * @return self */ public function setName($name) @@ -420,8 +411,7 @@ public function getTaxCode() /** * Sets taxCode * - * @param string|null $taxCode taxCode - * + * @param string|null $taxCode taxCode * @return self */ public function setTaxCode($taxCode) @@ -447,8 +437,7 @@ public function getAddress() /** * Sets address * - * @param \Cone\Billingo\Model\Address|null $address address - * + * @param \Cone\Billingo\Model\Address|null $address address * @return self */ public function setAddress($address) @@ -474,8 +463,7 @@ public function getIban() /** * Sets iban * - * @param string|null $iban iban - * + * @param string|null $iban iban * @return self */ public function setIban($iban) @@ -501,8 +489,7 @@ public function getSwift() /** * Sets swift * - * @param string|null $swift swift - * + * @param string|null $swift swift * @return self */ public function setSwift($swift) @@ -528,8 +515,7 @@ public function getAccountNumber() /** * Sets accountNumber * - * @param string|null $accountNumber accountNumber - * + * @param string|null $accountNumber accountNumber * @return self */ public function setAccountNumber($accountNumber) @@ -555,8 +541,7 @@ public function getPhone() /** * Sets phone * - * @param string|null $phone phone - * + * @param string|null $phone phone * @return self */ public function setPhone($phone) @@ -582,8 +567,7 @@ public function getInternalComment() /** * Sets internalComment * - * @param string|null $internalComment internalComment - * + * @param string|null $internalComment internalComment * @return self */ public function setInternalComment($internalComment) @@ -609,8 +593,7 @@ public function getGroupMemberTaxNumber() /** * Sets groupMemberTaxNumber * - * @param string|null $groupMemberTaxNumber groupMemberTaxNumber - * + * @param string|null $groupMemberTaxNumber groupMemberTaxNumber * @return self */ public function setGroupMemberTaxNumber($groupMemberTaxNumber) @@ -622,12 +605,11 @@ public function setGroupMemberTaxNumber($groupMemberTaxNumber) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -637,8 +619,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -650,10 +631,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -667,9 +646,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -678,6 +655,7 @@ public function offsetUnset($offset): void /** * 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 @@ -686,7 +664,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -712,5 +690,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/SpendingPaymentMethod.php b/src/Model/SpendingPaymentMethod.php index 3811e06..fe32240 100644 --- a/src/Model/SpendingPaymentMethod.php +++ b/src/Model/SpendingPaymentMethod.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * SpendingPaymentMethod Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class SpendingPaymentMethod @@ -101,6 +102,7 @@ class SpendingPaymentMethod /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -133,9 +135,7 @@ public static function getAllowableEnumValues() self::UPWORK, self::UTALVANY, self::VALTO, - self::WIRE_TRANSFER + self::WIRE_TRANSFER, ]; } } - - diff --git a/src/Model/SpendingSave.php b/src/Model/SpendingSave.php index 3313490..ae28ec6 100644 --- a/src/Model/SpendingSave.php +++ b/src/Model/SpendingSave.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,34 +30,36 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * SpendingSave Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class SpendingSave implements ModelInterface, ArrayAccess, \JsonSerializable +class SpendingSave implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'SpendingSave'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'currency' => '\Cone\Billingo\Model\Currency', 'conversionRate' => 'float', @@ -72,16 +75,18 @@ class SpendingSave implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => '\DateTime', 'dueDate' => '\DateTime', 'paymentMethod' => '\Cone\Billingo\Model\SpendingPaymentMethod', - 'partnerId' => 'int' + 'partnerId' => 'int', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'currency' => null, 'conversionRate' => 'float', @@ -97,14 +102,14 @@ class SpendingSave implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => 'date', 'dueDate' => 'date', 'paymentMethod' => null, - 'partnerId' => null + 'partnerId' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'currency' => false, 'conversionRate' => false, @@ -120,14 +125,14 @@ class SpendingSave implements ModelInterface, ArrayAccess, \JsonSerializable 'invoiceDate' => false, 'dueDate' => false, 'paymentMethod' => false, - 'partnerId' => false + 'partnerId' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -152,8 +157,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -163,7 +166,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -173,7 +176,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -182,9 +185,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -193,9 +193,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -223,7 +220,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'invoice_date', 'dueDate' => 'due_date', 'paymentMethod' => 'payment_method', - 'partnerId' => 'partner_id' + 'partnerId' => 'partner_id', ]; /** @@ -246,7 +243,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'setInvoiceDate', 'dueDate' => 'setDueDate', 'paymentMethod' => 'setPaymentMethod', - 'partnerId' => 'setPartnerId' + 'partnerId' => 'setPartnerId', ]; /** @@ -269,7 +266,7 @@ public function isNullableSetToNull(string $property): bool 'invoiceDate' => 'getInvoiceDate', 'dueDate' => 'getDueDate', 'paymentMethod' => 'getPaymentMethod', - 'partnerId' => 'getPartnerId' + 'partnerId' => 'getPartnerId', ]; /** @@ -313,7 +310,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -324,10 +320,10 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('currency', $data ?? [], null); $this->setIfExists('conversionRate', $data ?? [], null); @@ -347,14 +343,12 @@ public function __construct(array $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -397,6 +391,7 @@ public function listInvalidProperties() if ($this->container['paymentMethod'] === null) { $invalidProperties[] = "'paymentMethod' can't be null"; } + return $invalidProperties; } @@ -411,7 +406,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets currency * @@ -425,8 +419,7 @@ public function getCurrency() /** * Sets currency * - * @param \Cone\Billingo\Model\Currency $currency currency - * + * @param \Cone\Billingo\Model\Currency $currency currency * @return self */ public function setCurrency($currency) @@ -452,8 +445,7 @@ public function getConversionRate() /** * Sets conversionRate * - * @param float|null $conversionRate conversionRate - * + * @param float|null $conversionRate conversionRate * @return self */ public function setConversionRate($conversionRate) @@ -479,8 +471,7 @@ public function getTotalGross() /** * Sets totalGross * - * @param float $totalGross totalGross - * + * @param float $totalGross totalGross * @return self */ public function setTotalGross($totalGross) @@ -506,8 +497,7 @@ public function getTotalGrossHuf() /** * Sets totalGrossHuf * - * @param float $totalGrossHuf totalGrossHuf - * + * @param float $totalGrossHuf totalGrossHuf * @return self */ public function setTotalGrossHuf($totalGrossHuf) @@ -533,8 +523,7 @@ public function getTotalVatAmount() /** * Sets totalVatAmount * - * @param float $totalVatAmount totalVatAmount - * + * @param float $totalVatAmount totalVatAmount * @return self */ public function setTotalVatAmount($totalVatAmount) @@ -560,8 +549,7 @@ public function getTotalVatAmountHuf() /** * Sets totalVatAmountHuf * - * @param float $totalVatAmountHuf totalVatAmountHuf - * + * @param float $totalVatAmountHuf totalVatAmountHuf * @return self */ public function setTotalVatAmountHuf($totalVatAmountHuf) @@ -587,8 +575,7 @@ public function getFulfillmentDate() /** * Sets fulfillmentDate * - * @param \DateTime $fulfillmentDate fulfillmentDate - * + * @param \DateTime $fulfillmentDate fulfillmentDate * @return self */ public function setFulfillmentDate($fulfillmentDate) @@ -614,8 +601,7 @@ public function getPaidAt() /** * Sets paidAt * - * @param \DateTime|null $paidAt paidAt - * + * @param \DateTime|null $paidAt paidAt * @return self */ public function setPaidAt($paidAt) @@ -641,8 +627,7 @@ public function getCategory() /** * Sets category * - * @param \Cone\Billingo\Model\Category $category category - * + * @param \Cone\Billingo\Model\Category $category category * @return self */ public function setCategory($category) @@ -668,8 +653,7 @@ public function getComment() /** * Sets comment * - * @param string|null $comment comment - * + * @param string|null $comment comment * @return self */ public function setComment($comment) @@ -695,8 +679,7 @@ public function getInvoiceNumber() /** * Sets invoiceNumber * - * @param string|null $invoiceNumber invoiceNumber - * + * @param string|null $invoiceNumber invoiceNumber * @return self */ public function setInvoiceNumber($invoiceNumber) @@ -722,8 +705,7 @@ public function getInvoiceDate() /** * Sets invoiceDate * - * @param \DateTime|null $invoiceDate invoiceDate - * + * @param \DateTime|null $invoiceDate invoiceDate * @return self */ public function setInvoiceDate($invoiceDate) @@ -749,8 +731,7 @@ public function getDueDate() /** * Sets dueDate * - * @param \DateTime|null $dueDate dueDate - * + * @param \DateTime|null $dueDate dueDate * @return self */ public function setDueDate($dueDate) @@ -776,8 +757,7 @@ public function getPaymentMethod() /** * Sets paymentMethod * - * @param \Cone\Billingo\Model\SpendingPaymentMethod $paymentMethod paymentMethod - * + * @param \Cone\Billingo\Model\SpendingPaymentMethod $paymentMethod paymentMethod * @return self */ public function setPaymentMethod($paymentMethod) @@ -803,8 +783,7 @@ public function getPartnerId() /** * Sets partnerId * - * @param int|null $partnerId partnerId - * + * @param int|null $partnerId partnerId * @return self */ public function setPartnerId($partnerId) @@ -816,12 +795,11 @@ public function setPartnerId($partnerId) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -831,8 +809,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -844,10 +821,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -861,9 +836,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -872,6 +845,7 @@ public function offsetUnset($offset): void /** * 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 @@ -880,7 +854,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -906,5 +880,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 896b0e4..dc07db1 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,66 +30,70 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * Subscription Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class Subscription implements ModelInterface, ArrayAccess, \JsonSerializable +class Subscription implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'Subscription'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ 'expirationDate' => '\DateTime', - 'features' => '\Cone\Billingo\Model\Feature[]' + 'features' => '\Cone\Billingo\Model\Feature[]', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ 'expirationDate' => 'date', - 'features' => null + 'features' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ 'expirationDate' => false, - 'features' => false + 'features' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -113,8 +118,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -124,7 +127,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -134,7 +137,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -143,9 +146,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -154,9 +154,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -171,7 +168,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'expirationDate' => 'expiration_date', - 'features' => 'features' + 'features' => 'features', ]; /** @@ -181,7 +178,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'expirationDate' => 'setExpirationDate', - 'features' => 'setFeatures' + 'features' => 'setFeatures', ]; /** @@ -191,7 +188,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'expirationDate' => 'getExpirationDate', - 'features' => 'getFeatures' + 'features' => 'getFeatures', ]; /** @@ -235,7 +232,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -246,24 +242,22 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('expirationDate', $data ?? [], null); $this->setIfExists('features', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -296,7 +290,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets expirationDate * @@ -310,8 +303,7 @@ public function getExpirationDate() /** * Sets expirationDate * - * @param \DateTime|null $expirationDate expirationDate - * + * @param \DateTime|null $expirationDate expirationDate * @return self */ public function setExpirationDate($expirationDate) @@ -337,8 +329,7 @@ public function getFeatures() /** * Sets features * - * @param \Cone\Billingo\Model\Feature[]|null $features features - * + * @param \Cone\Billingo\Model\Feature[]|null $features features * @return self */ public function setFeatures($features) @@ -350,12 +341,11 @@ public function setFeatures($features) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -365,8 +355,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -378,10 +367,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -395,9 +382,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -406,6 +391,7 @@ public function offsetUnset($offset): void /** * 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 @@ -414,7 +400,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -440,5 +426,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/TooManyRequestsResponse.php b/src/Model/TooManyRequestsResponse.php index 19f61be..bc628d9 100644 --- a/src/Model/TooManyRequestsResponse.php +++ b/src/Model/TooManyRequestsResponse.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,63 +30,67 @@ namespace Cone\Billingo\Model; -use \ArrayAccess; -use \Cone\Billingo\ObjectSerializer; +use ArrayAccess; +use Cone\Billingo\ObjectSerializer; /** * TooManyRequestsResponse Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech + * * @implements \ArrayAccess */ -class TooManyRequestsResponse implements ModelInterface, ArrayAccess, \JsonSerializable +class TooManyRequestsResponse implements \JsonSerializable, ArrayAccess, ModelInterface { public const DISCRIMINATOR = null; /** - * The original name of the model. - * - * @var string - */ + * The original name of the model. + * + * @var string + */ protected static $openAPIModelName = 'TooManyRequestsResponse'; /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ protected static $openAPITypes = [ - 'error' => '\Cone\Billingo\Model\ClientError' + 'error' => '\Cone\Billingo\Model\ClientError', ]; /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * + * @phpstan-var array + * + * @psalm-var array + */ protected static $openAPIFormats = [ - 'error' => null + 'error' => null, ]; /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ + * Array of nullable properties. Used for (de)serialization + * + * @var bool[] + */ protected static array $openAPINullables = [ - 'error' => false + 'error' => false, ]; /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ + * If a nullable field gets set to null, insert it here + * + * @var bool[] + */ protected array $openAPINullablesSetToNull = []; /** @@ -110,8 +115,6 @@ public static function openAPIFormats() /** * Array of nullable properties - * - * @return array */ protected static function openAPINullables(): array { @@ -121,7 +124,7 @@ protected static function openAPINullables(): array /** * Array of nullable field names deliberately set to null * - * @return boolean[] + * @return bool[] */ private function getOpenAPINullablesSetToNull(): array { @@ -131,7 +134,7 @@ private function getOpenAPINullablesSetToNull(): array /** * Setter - Array of nullable field names deliberately set to null * - * @param boolean[] $openAPINullablesSetToNull + * @param bool[] $openAPINullablesSetToNull */ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void { @@ -140,9 +143,6 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): /** * Checks if a property is nullable - * - * @param string $property - * @return bool */ public static function isNullable(string $property): bool { @@ -151,9 +151,6 @@ public static function isNullable(string $property): bool /** * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool */ public function isNullableSetToNull(string $property): bool { @@ -167,7 +164,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'error' => 'error' + 'error' => 'error', ]; /** @@ -176,7 +173,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'error' => 'setError' + 'error' => 'setError', ]; /** @@ -185,7 +182,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'error' => 'getError' + 'error' => 'getError', ]; /** @@ -229,7 +226,6 @@ public function getModelName() return self::$openAPIModelName; } - /** * Associative array for storing property values * @@ -240,23 +236,21 @@ public function getModelName() /** * Constructor * - * @param mixed[] $data Associated array of property values + * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('error', $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 - */ + * 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 mixed $defaultValue + */ private function setIfExists(string $variableName, array $fields, $defaultValue): void { if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { @@ -289,7 +283,6 @@ public function valid() return count($this->listInvalidProperties()) === 0; } - /** * Gets error * @@ -303,8 +296,7 @@ public function getError() /** * Sets error * - * @param \Cone\Billingo\Model\ClientError|null $error error - * + * @param \Cone\Billingo\Model\ClientError|null $error error * @return self */ public function setError($error) @@ -316,12 +308,11 @@ public function setError($error) return $this; } + /** * Returns true if offset exists. False otherwise. * - * @param integer $offset Offset - * - * @return boolean + * @param int $offset Offset */ public function offsetExists($offset): bool { @@ -331,8 +322,7 @@ public function offsetExists($offset): bool /** * Gets offset. * - * @param integer $offset Offset - * + * @param int $offset Offset * @return mixed|null */ #[\ReturnTypeWillChange] @@ -344,10 +334,8 @@ public function offsetGet($offset) /** * Sets value based on offset. * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void + * @param int|null $offset Offset + * @param mixed $value Value to be set */ public function offsetSet($offset, $value): void { @@ -361,9 +349,7 @@ public function offsetSet($offset, $value): void /** * Unsets offset. * - * @param integer $offset Offset - * - * @return void + * @param int $offset Offset */ public function offsetUnset($offset): void { @@ -372,6 +358,7 @@ public function offsetUnset($offset): void /** * 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 @@ -380,7 +367,7 @@ public function offsetUnset($offset): void #[\ReturnTypeWillChange] public function jsonSerialize() { - return ObjectSerializer::sanitizeForSerialization($this); + return ObjectSerializer::sanitizeForSerialization($this); } /** @@ -406,5 +393,3 @@ public function toHeaderValue() return json_encode(ObjectSerializer::sanitizeForSerialization($this)); } } - - diff --git a/src/Model/Vat.php b/src/Model/Vat.php index 4970cc6..3318561 100644 --- a/src/Model/Vat.php +++ b/src/Model/Vat.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -28,14 +29,14 @@ */ namespace Cone\Billingo\Model; -use \Cone\Billingo\ObjectSerializer; /** * Vat Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class Vat @@ -129,6 +130,7 @@ class Vat /** * Gets allowable values of the enum + * * @return string[] */ public static function getAllowableEnumValues() @@ -175,9 +177,7 @@ public static function getAllowableEnumValues() self::MAA, self::TAM, self::KK, - self::THK + self::THK, ]; } } - - diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index a0ae92a..b61854d 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -5,8 +5,9 @@ * PHP version 7.4 * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ @@ -29,15 +30,16 @@ namespace Cone\Billingo; -use GuzzleHttp\Psr7\Utils; use Cone\Billingo\Model\ModelInterface; +use GuzzleHttp\Psr7\Utils; /** * ObjectSerializer Class Doc Comment * * @category Class - * @package Cone\Billingo + * * @author OpenAPI Generator team + * * @link https://openapi-generator.tech */ class ObjectSerializer @@ -48,7 +50,7 @@ class ObjectSerializer /** * Change the date format * - * @param string $format the new date format to use + * @param string $format the new date format to use */ public static function setDateTimeFormat($format) { @@ -58,15 +60,14 @@ public static function setDateTimeFormat($format) /** * Serialize data * - * @param mixed $data the data to serialize - * @param string $type the OpenAPIToolsType of the data - * @param string $format the format of the OpenAPITools type of the data - * + * @param mixed $data the data to serialize + * @param string $type the OpenAPIToolsType of the data + * @param string $format the format of the OpenAPITools type of the data * @return scalar|object|array|null serialized form of $data */ public static function sanitizeForSerialization($data, $type = null, $format = null) { - if (is_scalar($data) || null === $data) { + if (is_scalar($data) || $data === null) { return $data; } @@ -78,6 +79,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data as $property => $value) { $data[$property] = self::sanitizeForSerialization($value); } + return $data; } @@ -88,12 +90,12 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::openAPITypes() as $property => $openAPIType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if ($value !== null && ! in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { $callable = [$openAPIType, 'getAllowableEnumValues']; if (is_callable($callable)) { /** array $callable */ $allowedEnumTypes = $callable(); - if (!in_array($value, $allowedEnumTypes, true)) { + if (! in_array($value, $allowedEnumTypes, true)) { $imploded = implode("', '", $allowedEnumTypes); throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); } @@ -104,13 +106,14 @@ public static function sanitizeForSerialization($data, $type = null, $format = n } } } else { - foreach($data as $property => $value) { + foreach ($data as $property => $value) { $values[$property] = self::sanitizeForSerialization($value); } } - return (object)$values; + + return (object) $values; } else { - return (string)$data; + return (string) $data; } } @@ -118,8 +121,7 @@ public static function sanitizeForSerialization($data, $type = null, $format = n * Sanitize filename by removing path. * e.g. ../../sun.gif becomes sun.gif * - * @param string $filename filename to be sanitized - * + * @param string $filename filename to be sanitized * @return string the sanitized filename */ public static function sanitizeFilename($filename) @@ -134,13 +136,14 @@ public static function sanitizeFilename($filename) /** * Shorter timestamp microseconds to 6 digits length. * - * @param string $timestamp Original timestamp - * + * @param string $timestamp Original timestamp * @return string the shorten timestamp */ public static function sanitizeTimestamp($timestamp) { - if (!is_string($timestamp)) return $timestamp; + if (! is_string($timestamp)) { + return $timestamp; + } return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); } @@ -149,8 +152,7 @@ public static function sanitizeTimestamp($timestamp) * Take value and turn it into a string suitable for inclusion in * the path, by url-encoding. * - * @param string $value a string which will be part of the path - * + * @param string $value a string which will be part of the path * @return string the serialized object */ public static function toPathValue($value) @@ -161,27 +163,25 @@ public static function toPathValue($value) /** * Checks if a value is empty, based on its OpenAPI type. * - * @param mixed $value - * @param string $openApiType - * + * @param mixed $value * @return bool true if $value is empty */ private static function isEmptyValue($value, string $openApiType): bool { - # If empty() returns false, it is not empty regardless of its type. - if (!empty($value)) { + // If empty() returns false, it is not empty regardless of its type. + if (! empty($value)) { return false; } - # Null is always empty, as we cannot send a real "null" value in a query parameter. + // Null is always empty, as we cannot send a real "null" value in a query parameter. if ($value === null) { return true; } switch ($openApiType) { - # For numeric values, false and '' are considered empty. - # This comparison is safe for floating point values, since the previous call to empty() will - # filter out values that don't match 0. + // For numeric values, false and '' are considered empty. + // This comparison is safe for floating point values, since the previous call to empty() will + // filter out values that don't match 0. case 'int': case 'integer': return $value !== 0; @@ -190,12 +190,12 @@ private static function isEmptyValue($value, string $openApiType): bool case 'float': return $value !== 0 && $value !== 0.0; - # For boolean values, '' is considered empty + // For boolean values, '' is considered empty case 'bool': case 'boolean': - return !in_array($value, [false, 0], true); + return ! in_array($value, [false, 0], true); - # For all the other types, any value at this point can be considered empty. + // For all the other types, any value at this point can be considered empty. default: return true; } @@ -205,14 +205,12 @@ private static function isEmptyValue($value, string $openApiType): bool * Take query parameter properties and turn it into an array suitable for * native http_build_query or GuzzleHttp\Psr7\Query::build. * - * @param mixed $value Parameter value - * @param string $paramName Parameter name - * @param string $openApiType OpenAPIType eg. array or object - * @param string $style Parameter serialization style - * @param bool $explode Parameter explode option - * @param bool $required Whether query param is required or not - * - * @return array + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType eg. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option + * @param bool $required Whether query param is required or not */ public static function toQueryValue( $value, @@ -223,10 +221,10 @@ public static function toQueryValue( bool $required = true ): array { - # Check if we should omit this parameter from the query. This should only happen when: - # - Parameter is NOT required; AND - # - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For - # example, 0 as "int" or "boolean" is NOT an empty value. + // Check if we should omit this parameter from the query. This should only happen when: + // - Parameter is NOT required; AND + // - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + // example, 0 as "int" or "boolean" is NOT an empty value. if (self::isEmptyValue($value, $openApiType)) { if ($required) { return ["{$paramName}" => '']; @@ -235,18 +233,20 @@ public static function toQueryValue( } } - # Handle DateTime objects in query - if($openApiType === "\\DateTime" && $value instanceof \DateTime) { + // Handle DateTime objects in query + if ($openApiType === '\\DateTime' && $value instanceof \DateTime) { return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; } $query = []; - $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array) $value : $value; // since \GuzzleHttp\Psr7\Query::build fails with nested arrays // need to flatten array first $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { - if (!is_array($arr)) return $arr; + if (! is_array($arr)) { + return $arr; + } foreach ($arr as $k => $v) { $prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k; @@ -254,13 +254,14 @@ public static function toQueryValue( if (is_array($v)) { $flattenArray($v, $prop, $result); } else { - if ($style !== 'deepObject' && !$explode) { + if ($style !== 'deepObject' && ! $explode) { // push key itself $result[] = $prop; } $result[$prop] = $v; } } + return $result; }; @@ -270,12 +271,12 @@ public static function toQueryValue( return $value; } - if ('boolean' === $openApiType && is_bool($value)) { + if ($openApiType === 'boolean' && is_bool($value)) { $value = self::convertBoolToQueryStringFormat($value); } // handle style in serializeCollection - $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array) $value, $style); return $query; } @@ -283,13 +284,12 @@ public static function toQueryValue( /** * Convert boolean value to format for query string. * - * @param bool $value Boolean value - * + * @param bool $value Boolean value * @return int|string Boolean value in format */ public static function convertBoolToQueryStringFormat(bool $value) { - if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + if (Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() == Configuration::BOOLEAN_FORMAT_STRING) { return $value ? 'true' : 'false'; } @@ -301,8 +301,7 @@ public static function convertBoolToQueryStringFormat(bool $value) * the header. If it's a string, pass through unchanged * If it's a datetime object, format it in ISO8601 * - * @param string $value a string which will be part of the header - * + * @param string $value a string which will be part of the header * @return string the header string */ public static function toHeaderValue($value) @@ -320,8 +319,7 @@ public static function toHeaderValue($value) * the http body (form parameter). If it's a string, pass through unchanged * If it's a datetime object, format it in ISO8601 * - * @param string|\SplFileObject $value the value of the form parameter - * + * @param string|\SplFileObject $value the value of the form parameter * @return string the form string */ public static function toFormValue($value) @@ -339,8 +337,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter - * + * @param string|bool|\DateTime $value the value of the parameter * @return string the header string */ public static function toString($value) @@ -357,16 +354,15 @@ public static function toString($value) /** * Serialize an array to a string. * - * @param array $collection collection to serialize to a string - * @param string $style the format use for serialization (csv, + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, * ssv, tsv, pipes, multi) - * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array - * + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array * @return string */ public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) { - if ($allowCollectionFormatMulti && ('multi' === $style)) { + if ($allowCollectionFormatMulti && ($style === 'multi')) { // http_build_query() almost does the job for us. We just // need to fix the result of multidimensional arrays. return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); @@ -394,23 +390,22 @@ public static function serializeCollection(array $collection, $style, $allowColl /** * Deserialize a JSON string into an object * - * @param mixed $data object or primitive to be deserialized - * @param string $class class name is passed as a string - * @param string[] $httpHeaders HTTP headers - * @param string $discriminator discriminator if polymorphism is used - * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * @param string $discriminator discriminator if polymorphism is used * @return object|array|null a single or an array of $class instances */ public static function deserialize($data, $class, $httpHeaders = null) { - if (null === $data) { + if ($data === null) { return null; } if (strcasecmp(substr($class, -2), '[]') === 0) { $data = is_string($data) ? json_decode($data) : $data; - if (!is_array($data)) { + if (! is_array($data)) { throw new \InvalidArgumentException("Invalid array '$class'"); } @@ -419,6 +414,7 @@ public static function deserialize($data, $class, $httpHeaders = null) foreach ($data as $key => $value) { $values[] = self::deserialize($value, $subClass, null); } + return $values; } @@ -427,21 +423,24 @@ public static function deserialize($data, $class, $httpHeaders = null) settype($data, 'array'); $inner = substr($class, 4, -1); $deserialized = []; - if (strrpos($inner, ",") !== false) { + if (strrpos($inner, ',') !== false) { $subClass_array = explode(',', $inner, 2); $subClass = $subClass_array[1]; foreach ($data as $key => $value) { $deserialized[$key] = self::deserialize($value, $subClass, null); } } + return $deserialized; } if ($class === 'object') { settype($data, 'array'); + return $data; } elseif ($class === 'mixed') { settype($data, gettype($data)); + return $data; } @@ -452,7 +451,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // what is meant. The invalid empty string is probably to // be interpreted as a missing field/value. Let's handle // this graceful. - if (!empty($data)) { + if (! empty($data)) { try { return new \DateTime($data); } catch (\Exception $exception) { @@ -474,10 +473,10 @@ public static function deserialize($data, $class, $httpHeaders = null) // determine file name if ( is_array($httpHeaders) - && array_key_exists('Content-Disposition', $httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath().DIRECTORY_SEPARATOR.self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } @@ -494,27 +493,28 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @psalm-suppress ParadoxicalCondition */ if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { settype($data, $class); + return $data; } - if (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues(), true)) { + if (! in_array($data, $class::getAllowableEnumValues(), true)) { $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } + return $data; } else { $data = is_string($data) ? json_decode($data) : $data; if (is_array($data)) { - $data = (object)$data; + $data = (object) $data; } // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; - if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '\Cone\Billingo\Model\\' . $data->{$discriminator}; + if (! empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\Cone\Billingo\Model\\'.$data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; } @@ -525,11 +525,11 @@ public static function deserialize($data, $class, $httpHeaders = null) foreach ($instance::openAPITypes() as $property => $type) { $propertySetter = $instance::setters()[$property]; - if (!isset($propertySetter)) { + if (! isset($propertySetter)) { continue; } - if (!isset($data->{$instance::attributeMap()[$property]})) { + if (! isset($data->{$instance::attributeMap()[$property]})) { if ($instance::isNullable($property)) { $instance->$propertySetter(null); } @@ -542,20 +542,20 @@ public static function deserialize($data, $class, $httpHeaders = null) $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); } } + return $instance; } } /** * Native `http_build_query` wrapper. - * @see https://www.php.net/manual/en/function.http-build-query * - * @param array|object $data May be an array or object containing properties. - * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. - * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. - * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. + * @see https://www.php.net/manual/en/function.http-build-query * - * @return string + * @param array|object $data May be an array or object containing properties. + * @param string $numeric_prefix If numeric indices are used in the base array and this parameter is provided, it will be prepended to the numeric index for elements in the base array only. + * @param string|null $arg_separator arg_separator.output is used to separate arguments but may be overridden by specifying this parameter. + * @param int $encoding_type Encoding type. By default, PHP_QUERY_RFC1738. */ public static function buildQuery( $data,