diff --git a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php index 755ed1ce8..e14421342 100644 --- a/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/AcsWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalanceControl/ObjectSerializer.php b/src/Adyen/Model/BalanceControl/ObjectSerializer.php index b5ae3313d..2ed0eb3a0 100644 --- a/src/Adyen/Model/BalanceControl/ObjectSerializer.php +++ b/src/Adyen/Model/BalanceControl/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php index 67e88b5f9..ada0db0b3 100644 --- a/src/Adyen/Model/BalancePlatform/CapabilitySettings.php +++ b/src/Adyen/Model/BalancePlatform/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php index 141ec623e..fa9af7e82 100644 --- a/src/Adyen/Model/BalancePlatform/ObjectSerializer.php +++ b/src/Adyen/Model/BalancePlatform/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/BinLookup/ObjectSerializer.php b/src/Adyen/Model/BinLookup/ObjectSerializer.php index 4bdfceeda..09437b7d8 100644 --- a/src/Adyen/Model/BinLookup/ObjectSerializer.php +++ b/src/Adyen/Model/BinLookup/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php index b9f3892ed..802da8947 100644 --- a/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php +++ b/src/Adyen/Model/Checkout/CheckoutPaymentMethod.php @@ -1915,7 +1915,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -1939,7 +1939,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/MbwayDetails.php b/src/Adyen/Model/Checkout/MbwayDetails.php index dc73d3c30..becc716f0 100644 --- a/src/Adyen/Model/Checkout/MbwayDetails.php +++ b/src/Adyen/Model/Checkout/MbwayDetails.php @@ -361,7 +361,7 @@ public function getShopperEmail() /** * Sets shopperEmail * - * @param string $shopperEmail + * @param string $shopperEmail * * @return self */ @@ -385,7 +385,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/Checkout/ObjectSerializer.php b/src/Adyen/Model/Checkout/ObjectSerializer.php index 2b682c18f..628f63adc 100644 --- a/src/Adyen/Model/Checkout/ObjectSerializer.php +++ b/src/Adyen/Model/Checkout/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Checkout/VippsDetails.php b/src/Adyen/Model/Checkout/VippsDetails.php index 6787fd034..a5087a929 100644 --- a/src/Adyen/Model/Checkout/VippsDetails.php +++ b/src/Adyen/Model/Checkout/VippsDetails.php @@ -415,7 +415,7 @@ public function getTelephoneNumber() /** * Sets telephoneNumber * - * @param string $telephoneNumber + * @param string $telephoneNumber * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php index 77bba385d..478ff8914 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php +++ b/src/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.php @@ -358,7 +358,7 @@ public function getAmountPerIndustry() /** * Sets amountPerIndustry * - * @param array|null $amountPerIndustry + * @param array|null $amountPerIndustry * * @return self */ @@ -382,7 +382,7 @@ public function getAuthorizedCardUsers() /** * Sets authorizedCardUsers * - * @param bool|null $authorizedCardUsers + * @param bool|null $authorizedCardUsers * * @return self */ @@ -406,7 +406,7 @@ public function getFundingSource() /** * Sets fundingSource * - * @param string[]|null $fundingSource + * @param string[]|null $fundingSource * * @return self */ @@ -439,7 +439,7 @@ public function getInterval() /** * Sets interval * - * @param string|null $interval + * @param string|null $interval * * @return self */ diff --git a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php index 6629bee4b..2d912cd58 100644 --- a/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ConfigurationWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/DataProtection/ObjectSerializer.php b/src/Adyen/Model/DataProtection/ObjectSerializer.php index 1b86733ae..fe8491817 100644 --- a/src/Adyen/Model/DataProtection/ObjectSerializer.php +++ b/src/Adyen/Model/DataProtection/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Disputes/ObjectSerializer.php b/src/Adyen/Model/Disputes/ObjectSerializer.php index 5ef9f66af..d363f9e2a 100644 --- a/src/Adyen/Model/Disputes/ObjectSerializer.php +++ b/src/Adyen/Model/Disputes/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php index 7dcaee0df..28bb60f48 100644 --- a/src/Adyen/Model/LegalEntityManagement/IdentificationData.php +++ b/src/Adyen/Model/LegalEntityManagement/IdentificationData.php @@ -507,7 +507,7 @@ public function getType() /** * Sets type * - * @param string $type Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber + * @param string $type Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php index d25ad19d7..66642b915 100644 --- a/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php +++ b/src/Adyen/Model/LegalEntityManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationError.php b/src/Adyen/Model/LegalEntityManagement/VerificationError.php index 2cd9e2d12..64dbe9944 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationError.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationError.php @@ -592,7 +592,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of error. + * @param string|null $type The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** * * @return self */ diff --git a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php index a4e602012..fa5cad0f8 100644 --- a/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php +++ b/src/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.php @@ -537,7 +537,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of error. + * @param string|null $type The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** * * @return self */ diff --git a/src/Adyen/Model/Management/AccelInfo.php b/src/Adyen/Model/Management/AccelInfo.php new file mode 100644 index 000000000..d056973ce --- /dev/null +++ b/src/Adyen/Model/Management/AccelInfo.php @@ -0,0 +1,476 @@ + + */ +class AccelInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'AccelInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/Connectivity.php b/src/Adyen/Model/Management/Connectivity.php index 0ab0df53d..d07b02bf3 100644 --- a/src/Adyen/Model/Management/Connectivity.php +++ b/src/Adyen/Model/Management/Connectivity.php @@ -44,7 +44,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'simcardStatus' => 'string' + 'simcardStatus' => 'string', + 'terminalIPAddressURL' => '\Adyen\Model\Management\EventUrl' ]; /** @@ -55,7 +56,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'simcardStatus' => null + 'simcardStatus' => null, + 'terminalIPAddressURL' => null ]; /** @@ -64,7 +66,8 @@ class Connectivity implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ - 'simcardStatus' => false + 'simcardStatus' => false, + 'terminalIPAddressURL' => false ]; /** @@ -153,7 +156,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'simcardStatus' => 'simcardStatus' + 'simcardStatus' => 'simcardStatus', + 'terminalIPAddressURL' => 'terminalIPAddressURL' ]; /** @@ -162,7 +166,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'simcardStatus' => 'setSimcardStatus' + 'simcardStatus' => 'setSimcardStatus', + 'terminalIPAddressURL' => 'setTerminalIPAddressURL' ]; /** @@ -171,7 +176,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'simcardStatus' => 'getSimcardStatus' + 'simcardStatus' => 'getSimcardStatus', + 'terminalIPAddressURL' => 'getTerminalIPAddressURL' ]; /** @@ -246,6 +252,7 @@ public function getSimcardStatusAllowableValues() public function __construct(array $data = null) { $this->setIfExists('simcardStatus', $data ?? [], null); + $this->setIfExists('terminalIPAddressURL', $data ?? [], null); } /** @@ -332,6 +339,30 @@ public function setSimcardStatus($simcardStatus) return $this; } + + /** + * Gets terminalIPAddressURL + * + * @return \Adyen\Model\Management\EventUrl|null + */ + public function getTerminalIPAddressURL() + { + return $this->container['terminalIPAddressURL']; + } + + /** + * Sets terminalIPAddressURL + * + * @param \Adyen\Model\Management\EventUrl|null $terminalIPAddressURL terminalIPAddressURL + * + * @return self + */ + public function setTerminalIPAddressURL($terminalIPAddressURL) + { + $this->container['terminalIPAddressURL'] = $terminalIPAddressURL; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Adyen/Model/Management/NyceInfo.php b/src/Adyen/Model/Management/NyceInfo.php new file mode 100644 index 000000000..a9850274a --- /dev/null +++ b/src/Adyen/Model/Management/NyceInfo.php @@ -0,0 +1,476 @@ + + */ +class NyceInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'NyceInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/ObjectSerializer.php b/src/Adyen/Model/Management/ObjectSerializer.php index cc5272bf9..2ff0b7ef6 100644 --- a/src/Adyen/Model/Management/ObjectSerializer.php +++ b/src/Adyen/Model/Management/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Management/PayMeInfo.php b/src/Adyen/Model/Management/PayMeInfo.php new file mode 100644 index 000000000..f12ac0134 --- /dev/null +++ b/src/Adyen/Model/Management/PayMeInfo.php @@ -0,0 +1,478 @@ + + */ +class PayMeInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PayMeInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'displayName' => 'string', + 'logo' => 'string', + 'supportEmail' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'displayName' => null, + 'logo' => null, + 'supportEmail' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'displayName' => false, + 'logo' => false, + 'supportEmail' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'displayName' => 'displayName', + 'logo' => 'logo', + 'supportEmail' => 'supportEmail' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'displayName' => 'setDisplayName', + 'logo' => 'setLogo', + 'supportEmail' => 'setSupportEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'displayName' => 'getDisplayName', + 'logo' => 'getLogo', + 'supportEmail' => 'getSupportEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('displayName', $data ?? [], null); + $this->setIfExists('logo', $data ?? [], null); + $this->setIfExists('supportEmail', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['displayName'] === null) { + $invalidProperties[] = "'displayName' can't be null"; + } + if ($this->container['logo'] === null) { + $invalidProperties[] = "'logo' can't be null"; + } + if ($this->container['supportEmail'] === null) { + $invalidProperties[] = "'supportEmail' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets displayName + * + * @return string + */ + public function getDisplayName() + { + return $this->container['displayName']; + } + + /** + * Sets displayName + * + * @param string $displayName Merchant display name + * + * @return self + */ + public function setDisplayName($displayName) + { + $this->container['displayName'] = $displayName; + + return $this; + } + + /** + * Gets logo + * + * @return string + */ + public function getLogo() + { + return $this->container['logo']; + } + + /** + * Sets logo + * + * @param string $logo Merchant logo. Format: Base64-encoded string. + * + * @return self + */ + public function setLogo($logo) + { + $this->container['logo'] = $logo; + + return $this; + } + + /** + * Gets supportEmail + * + * @return string + */ + public function getSupportEmail() + { + return $this->container['supportEmail']; + } + + /** + * Sets supportEmail + * + * @param string $supportEmail The email address of merchant support. + * + * @return self + */ + public function setSupportEmail($supportEmail) + { + $this->container['supportEmail'] = $supportEmail; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/PaymentMethod.php b/src/Adyen/Model/Management/PaymentMethod.php index 3569f8867..c5ca5810b 100644 --- a/src/Adyen/Model/Management/PaymentMethod.php +++ b/src/Adyen/Model/Management/PaymentMethod.php @@ -44,6 +44,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'allowed' => 'bool', 'amex' => '\Adyen\Model\Management\AmexInfo', @@ -71,10 +72,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mealVoucherFR' => '\Adyen\Model\Management\MealVoucherFRInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', + 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'swish' => '\Adyen\Model\Management\SwishInfo', 'ticket' => '\Adyen\Model\Management\TicketInfo', @@ -95,6 +101,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'afterpayTouch' => null, 'allowed' => null, 'amex' => null, @@ -122,10 +129,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => null, 'mc' => null, 'mealVoucherFR' => null, + 'nyce' => null, + 'payme' => null, 'paypal' => null, + 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, + 'sodexo' => null, 'sofort' => null, + 'star' => null, 'storeIds' => null, 'swish' => null, 'ticket' => null, @@ -144,6 +156,7 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'afterpayTouch' => false, 'allowed' => false, 'amex' => false, @@ -171,10 +184,15 @@ class PaymentMethod implements ModelInterface, ArrayAccess, \JsonSerializable 'maestro' => false, 'mc' => false, 'mealVoucherFR' => false, + 'nyce' => false, + 'payme' => false, 'paypal' => false, + 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, + 'sodexo' => false, 'sofort' => false, + 'star' => false, 'storeIds' => false, 'swish' => false, 'ticket' => false, @@ -273,6 +291,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'afterpayTouch' => 'afterpayTouch', 'allowed' => 'allowed', 'amex' => 'amex', @@ -300,10 +319,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'maestro', 'mc' => 'mc', 'mealVoucherFR' => 'mealVoucher_FR', + 'nyce' => 'nyce', + 'payme' => 'payme', 'paypal' => 'paypal', + 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', + 'sodexo' => 'sodexo', 'sofort' => 'sofort', + 'star' => 'star', 'storeIds' => 'storeIds', 'swish' => 'swish', 'ticket' => 'ticket', @@ -322,6 +346,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'afterpayTouch' => 'setAfterpayTouch', 'allowed' => 'setAllowed', 'amex' => 'setAmex', @@ -349,10 +374,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'setMaestro', 'mc' => 'setMc', 'mealVoucherFR' => 'setMealVoucherFR', + 'nyce' => 'setNyce', + 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', + 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'swish' => 'setSwish', 'ticket' => 'setTicket', @@ -371,6 +401,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'afterpayTouch' => 'getAfterpayTouch', 'allowed' => 'getAllowed', 'amex' => 'getAmex', @@ -398,10 +429,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'getMaestro', 'mc' => 'getMc', 'mealVoucherFR' => 'getMealVoucherFR', + 'nyce' => 'getNyce', + 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', + 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'swish' => 'getSwish', 'ticket' => 'getTicket', @@ -489,6 +525,7 @@ public function getVerificationStatusAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('allowed', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); @@ -516,10 +553,15 @@ public function __construct(array $data = null) $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); $this->setIfExists('mealVoucherFR', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); $this->setIfExists('ticket', $data ?? [], null); @@ -586,6 +628,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets afterpayTouch * @@ -1234,6 +1300,54 @@ public function setMealVoucherFR($mealVoucherFR) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets payme + * + * @return \Adyen\Model\Management\PayMeInfo|null + */ + public function getPayme() + { + return $this->container['payme']; + } + + /** + * Sets payme + * + * @param \Adyen\Model\Management\PayMeInfo|null $payme payme + * + * @return self + */ + public function setPayme($payme) + { + $this->container['payme'] = $payme; + + return $this; + } + /** * Gets paypal * @@ -1258,6 +1372,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + /** * Gets reference * @@ -1306,6 +1444,30 @@ public function setShopperInteraction($shopperInteraction) return $this; } + /** + * Gets sodexo + * + * @return \Adyen\Model\Management\SodexoInfo|null + */ + public function getSodexo() + { + return $this->container['sodexo']; + } + + /** + * Sets sodexo + * + * @param \Adyen\Model\Management\SodexoInfo|null $sodexo sodexo + * + * @return self + */ + public function setSodexo($sodexo) + { + $this->container['sodexo'] = $sodexo; + + return $this; + } + /** * Gets sofort * @@ -1330,6 +1492,30 @@ public function setSofort($sofort) return $this; } + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/Management/PaymentMethodResponse.php b/src/Adyen/Model/Management/PaymentMethodResponse.php index 0ed843066..6811b47dd 100644 --- a/src/Adyen/Model/Management/PaymentMethodResponse.php +++ b/src/Adyen/Model/Management/PaymentMethodResponse.php @@ -239,16 +239,25 @@ public function getModelName() return self::$openAPIModelName; } + public const TYPES_WITH_ERRORS_ACCEL = 'accel'; public const TYPES_WITH_ERRORS_AFTERPAYTOUCH = 'afterpaytouch'; + public const TYPES_WITH_ERRORS_ALELO = 'alelo'; public const TYPES_WITH_ERRORS_ALIPAY = 'alipay'; public const TYPES_WITH_ERRORS_ALIPAY_HK = 'alipay_hk'; public const TYPES_WITH_ERRORS_AMEX = 'amex'; public const TYPES_WITH_ERRORS_APPLEPAY = 'applepay'; + public const TYPES_WITH_ERRORS_BANESE_CARD = 'banese_card'; + public const TYPES_WITH_ERRORS_BANESE_CARD_CREDIT = 'banese_card_credit'; + public const TYPES_WITH_ERRORS_BANESE_CARD_DEBIT = 'banese_card_debit'; + public const TYPES_WITH_ERRORS_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPES_WITH_ERRORS_BCMC = 'bcmc'; public const TYPES_WITH_ERRORS_BLIK = 'blik'; public const TYPES_WITH_ERRORS_CARTEBANCAIRE = 'cartebancaire'; public const TYPES_WITH_ERRORS_CLEARPAY = 'clearpay'; public const TYPES_WITH_ERRORS_CLICKTOPAY = 'clicktopay'; + public const TYPES_WITH_ERRORS_CREDTODOS = 'credtodos'; + public const TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_CREDIT = 'credtodos_private_credit'; + public const TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_DEBIT = 'credtodos_private_debit'; public const TYPES_WITH_ERRORS_CUP = 'cup'; public const TYPES_WITH_ERRORS_DINERS = 'diners'; public const TYPES_WITH_ERRORS_DIRECTDEBIT_GB = 'directdebit_GB'; @@ -275,17 +284,27 @@ public function getModelName() public const TYPES_WITH_ERRORS_MEAL_VOUCHER_FR = 'mealVoucher_FR'; public const TYPES_WITH_ERRORS_MOBILEPAY = 'mobilepay'; public const TYPES_WITH_ERRORS_MULTIBANCO = 'multibanco'; + public const TYPES_WITH_ERRORS_NYCE = 'nyce'; public const TYPES_WITH_ERRORS_ONLINE_BANKING_PL = 'onlineBanking_PL'; public const TYPES_WITH_ERRORS_PAYBYBANK = 'paybybank'; + public const TYPES_WITH_ERRORS_PAYME = 'payme'; + public const TYPES_WITH_ERRORS_PAYME_POS = 'payme_pos'; public const TYPES_WITH_ERRORS_PAYNOW = 'paynow'; public const TYPES_WITH_ERRORS_PAYNOW_POS = 'paynow_pos'; public const TYPES_WITH_ERRORS_PAYPAL = 'paypal'; public const TYPES_WITH_ERRORS_PAYSHOP = 'payshop'; + public const TYPES_WITH_ERRORS_PULSE = 'pulse'; + public const TYPES_WITH_ERRORS_SODEXO = 'sodexo'; + public const TYPES_WITH_ERRORS_STAR = 'star'; public const TYPES_WITH_ERRORS_SWISH = 'swish'; public const TYPES_WITH_ERRORS_TICKET = 'ticket'; + public const TYPES_WITH_ERRORS_TODO_GIFTCARD = 'todo_giftcard'; public const TYPES_WITH_ERRORS_TRUSTLY = 'trustly'; public const TYPES_WITH_ERRORS_TWINT = 'twint'; public const TYPES_WITH_ERRORS_TWINT_POS = 'twint_pos'; + public const TYPES_WITH_ERRORS_UP_BRAZIL_CREDIT = 'up_brazil_credit'; + public const TYPES_WITH_ERRORS_VALE_REFEICAO = 'vale_refeicao'; + public const TYPES_WITH_ERRORS_VALE_REFEICAO_PREPAID = 'vale_refeicao_prepaid'; public const TYPES_WITH_ERRORS_VIPPS = 'vipps'; public const TYPES_WITH_ERRORS_VISA = 'visa'; public const TYPES_WITH_ERRORS_VISADEBIT = 'visadebit'; @@ -301,16 +320,25 @@ public function getModelName() public function getTypesWithErrorsAllowableValues() { return [ + self::TYPES_WITH_ERRORS_ACCEL, self::TYPES_WITH_ERRORS_AFTERPAYTOUCH, + self::TYPES_WITH_ERRORS_ALELO, self::TYPES_WITH_ERRORS_ALIPAY, self::TYPES_WITH_ERRORS_ALIPAY_HK, self::TYPES_WITH_ERRORS_AMEX, self::TYPES_WITH_ERRORS_APPLEPAY, + self::TYPES_WITH_ERRORS_BANESE_CARD, + self::TYPES_WITH_ERRORS_BANESE_CARD_CREDIT, + self::TYPES_WITH_ERRORS_BANESE_CARD_DEBIT, + self::TYPES_WITH_ERRORS_BANESE_CARD_PREPAID, self::TYPES_WITH_ERRORS_BCMC, self::TYPES_WITH_ERRORS_BLIK, self::TYPES_WITH_ERRORS_CARTEBANCAIRE, self::TYPES_WITH_ERRORS_CLEARPAY, self::TYPES_WITH_ERRORS_CLICKTOPAY, + self::TYPES_WITH_ERRORS_CREDTODOS, + self::TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_CREDIT, + self::TYPES_WITH_ERRORS_CREDTODOS_PRIVATE_DEBIT, self::TYPES_WITH_ERRORS_CUP, self::TYPES_WITH_ERRORS_DINERS, self::TYPES_WITH_ERRORS_DIRECTDEBIT_GB, @@ -337,17 +365,27 @@ public function getTypesWithErrorsAllowableValues() self::TYPES_WITH_ERRORS_MEAL_VOUCHER_FR, self::TYPES_WITH_ERRORS_MOBILEPAY, self::TYPES_WITH_ERRORS_MULTIBANCO, + self::TYPES_WITH_ERRORS_NYCE, self::TYPES_WITH_ERRORS_ONLINE_BANKING_PL, self::TYPES_WITH_ERRORS_PAYBYBANK, + self::TYPES_WITH_ERRORS_PAYME, + self::TYPES_WITH_ERRORS_PAYME_POS, self::TYPES_WITH_ERRORS_PAYNOW, self::TYPES_WITH_ERRORS_PAYNOW_POS, self::TYPES_WITH_ERRORS_PAYPAL, self::TYPES_WITH_ERRORS_PAYSHOP, + self::TYPES_WITH_ERRORS_PULSE, + self::TYPES_WITH_ERRORS_SODEXO, + self::TYPES_WITH_ERRORS_STAR, self::TYPES_WITH_ERRORS_SWISH, self::TYPES_WITH_ERRORS_TICKET, + self::TYPES_WITH_ERRORS_TODO_GIFTCARD, self::TYPES_WITH_ERRORS_TRUSTLY, self::TYPES_WITH_ERRORS_TWINT, self::TYPES_WITH_ERRORS_TWINT_POS, + self::TYPES_WITH_ERRORS_UP_BRAZIL_CREDIT, + self::TYPES_WITH_ERRORS_VALE_REFEICAO, + self::TYPES_WITH_ERRORS_VALE_REFEICAO_PREPAID, self::TYPES_WITH_ERRORS_VIPPS, self::TYPES_WITH_ERRORS_VISA, self::TYPES_WITH_ERRORS_VISADEBIT, diff --git a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php index 84dfcb5a1..130cb4341 100644 --- a/src/Adyen/Model/Management/PaymentMethodSetupInfo.php +++ b/src/Adyen/Model/Management/PaymentMethodSetupInfo.php @@ -44,6 +44,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'afterpayTouch' => '\Adyen\Model\Management\AfterpayTouchInfo', 'amex' => '\Adyen\Model\Management\AmexInfo', 'applePay' => '\Adyen\Model\Management\ApplePayInfo', @@ -68,10 +69,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mealVoucherFR' => '\Adyen\Model\Management\MealVoucherFRInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'payme' => '\Adyen\Model\Management\PayMeInfo', 'paypal' => '\Adyen\Model\Management\PayPalInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', 'reference' => 'string', 'shopperInteraction' => 'string', + 'sodexo' => '\Adyen\Model\Management\SodexoInfo', 'sofort' => '\Adyen\Model\Management\SofortInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'swish' => '\Adyen\Model\Management\SwishInfo', 'ticket' => '\Adyen\Model\Management\TicketInfo', @@ -91,6 +97,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'afterpayTouch' => null, 'amex' => null, 'applePay' => null, @@ -115,10 +122,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => null, 'mc' => null, 'mealVoucherFR' => null, + 'nyce' => null, + 'payme' => null, 'paypal' => null, + 'pulse' => null, 'reference' => null, 'shopperInteraction' => null, + 'sodexo' => null, 'sofort' => null, + 'star' => null, 'storeIds' => null, 'swish' => null, 'ticket' => null, @@ -136,6 +148,7 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'afterpayTouch' => false, 'amex' => false, 'applePay' => false, @@ -160,10 +173,15 @@ class PaymentMethodSetupInfo implements ModelInterface, ArrayAccess, \JsonSerial 'maestro' => false, 'mc' => false, 'mealVoucherFR' => false, + 'nyce' => false, + 'payme' => false, 'paypal' => false, + 'pulse' => false, 'reference' => false, 'shopperInteraction' => false, + 'sodexo' => false, 'sofort' => false, + 'star' => false, 'storeIds' => false, 'swish' => false, 'ticket' => false, @@ -261,6 +279,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'afterpayTouch' => 'afterpayTouch', 'amex' => 'amex', 'applePay' => 'applePay', @@ -285,10 +304,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'maestro', 'mc' => 'mc', 'mealVoucherFR' => 'mealVoucher_FR', + 'nyce' => 'nyce', + 'payme' => 'payme', 'paypal' => 'paypal', + 'pulse' => 'pulse', 'reference' => 'reference', 'shopperInteraction' => 'shopperInteraction', + 'sodexo' => 'sodexo', 'sofort' => 'sofort', + 'star' => 'star', 'storeIds' => 'storeIds', 'swish' => 'swish', 'ticket' => 'ticket', @@ -306,6 +330,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'afterpayTouch' => 'setAfterpayTouch', 'amex' => 'setAmex', 'applePay' => 'setApplePay', @@ -330,10 +355,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'setMaestro', 'mc' => 'setMc', 'mealVoucherFR' => 'setMealVoucherFR', + 'nyce' => 'setNyce', + 'payme' => 'setPayme', 'paypal' => 'setPaypal', + 'pulse' => 'setPulse', 'reference' => 'setReference', 'shopperInteraction' => 'setShopperInteraction', + 'sodexo' => 'setSodexo', 'sofort' => 'setSofort', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'swish' => 'setSwish', 'ticket' => 'setTicket', @@ -351,6 +381,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'afterpayTouch' => 'getAfterpayTouch', 'amex' => 'getAmex', 'applePay' => 'getApplePay', @@ -375,10 +406,15 @@ public function isNullableSetToNull(string $property): bool 'maestro' => 'getMaestro', 'mc' => 'getMc', 'mealVoucherFR' => 'getMealVoucherFR', + 'nyce' => 'getNyce', + 'payme' => 'getPayme', 'paypal' => 'getPaypal', + 'pulse' => 'getPulse', 'reference' => 'getReference', 'shopperInteraction' => 'getShopperInteraction', + 'sodexo' => 'getSodexo', 'sofort' => 'getSofort', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'swish' => 'getSwish', 'ticket' => 'getTicket', @@ -435,16 +471,25 @@ public function getModelName() public const SHOPPER_INTERACTION_POS = 'pos'; public const SHOPPER_INTERACTION_MOTO = 'moto'; public const SHOPPER_INTERACTION_CONT_AUTH = 'contAuth'; + public const TYPE_ACCEL = 'accel'; public const TYPE_AFTERPAYTOUCH = 'afterpaytouch'; + public const TYPE_ALELO = 'alelo'; public const TYPE_ALIPAY = 'alipay'; public const TYPE_ALIPAY_HK = 'alipay_hk'; public const TYPE_AMEX = 'amex'; public const TYPE_APPLEPAY = 'applepay'; + public const TYPE_BANESE_CARD = 'banese_card'; + public const TYPE_BANESE_CARD_CREDIT = 'banese_card_credit'; + public const TYPE_BANESE_CARD_DEBIT = 'banese_card_debit'; + public const TYPE_BANESE_CARD_PREPAID = 'banese_card_prepaid'; public const TYPE_BCMC = 'bcmc'; public const TYPE_BLIK = 'blik'; public const TYPE_CARTEBANCAIRE = 'cartebancaire'; public const TYPE_CLEARPAY = 'clearpay'; public const TYPE_CLICKTOPAY = 'clicktopay'; + public const TYPE_CREDTODOS = 'credtodos'; + public const TYPE_CREDTODOS_PRIVATE_CREDIT = 'credtodos_private_credit'; + public const TYPE_CREDTODOS_PRIVATE_DEBIT = 'credtodos_private_debit'; public const TYPE_CUP = 'cup'; public const TYPE_DINERS = 'diners'; public const TYPE_DIRECTDEBIT_GB = 'directdebit_GB'; @@ -471,17 +516,27 @@ public function getModelName() public const TYPE_MEAL_VOUCHER_FR = 'mealVoucher_FR'; public const TYPE_MOBILEPAY = 'mobilepay'; public const TYPE_MULTIBANCO = 'multibanco'; + public const TYPE_NYCE = 'nyce'; public const TYPE_ONLINE_BANKING_PL = 'onlineBanking_PL'; public const TYPE_PAYBYBANK = 'paybybank'; + public const TYPE_PAYME = 'payme'; + public const TYPE_PAYME_POS = 'payme_pos'; public const TYPE_PAYNOW = 'paynow'; public const TYPE_PAYNOW_POS = 'paynow_pos'; public const TYPE_PAYPAL = 'paypal'; public const TYPE_PAYSHOP = 'payshop'; + public const TYPE_PULSE = 'pulse'; + public const TYPE_SODEXO = 'sodexo'; + public const TYPE_STAR = 'star'; public const TYPE_SWISH = 'swish'; public const TYPE_TICKET = 'ticket'; + public const TYPE_TODO_GIFTCARD = 'todo_giftcard'; public const TYPE_TRUSTLY = 'trustly'; public const TYPE_TWINT = 'twint'; public const TYPE_TWINT_POS = 'twint_pos'; + public const TYPE_UP_BRAZIL_CREDIT = 'up_brazil_credit'; + public const TYPE_VALE_REFEICAO = 'vale_refeicao'; + public const TYPE_VALE_REFEICAO_PREPAID = 'vale_refeicao_prepaid'; public const TYPE_VIPPS = 'vipps'; public const TYPE_VISA = 'visa'; public const TYPE_VISADEBIT = 'visadebit'; @@ -511,16 +566,25 @@ public function getShopperInteractionAllowableValues() public function getTypeAllowableValues() { return [ + self::TYPE_ACCEL, self::TYPE_AFTERPAYTOUCH, + self::TYPE_ALELO, self::TYPE_ALIPAY, self::TYPE_ALIPAY_HK, self::TYPE_AMEX, self::TYPE_APPLEPAY, + self::TYPE_BANESE_CARD, + self::TYPE_BANESE_CARD_CREDIT, + self::TYPE_BANESE_CARD_DEBIT, + self::TYPE_BANESE_CARD_PREPAID, self::TYPE_BCMC, self::TYPE_BLIK, self::TYPE_CARTEBANCAIRE, self::TYPE_CLEARPAY, self::TYPE_CLICKTOPAY, + self::TYPE_CREDTODOS, + self::TYPE_CREDTODOS_PRIVATE_CREDIT, + self::TYPE_CREDTODOS_PRIVATE_DEBIT, self::TYPE_CUP, self::TYPE_DINERS, self::TYPE_DIRECTDEBIT_GB, @@ -547,17 +611,27 @@ public function getTypeAllowableValues() self::TYPE_MEAL_VOUCHER_FR, self::TYPE_MOBILEPAY, self::TYPE_MULTIBANCO, + self::TYPE_NYCE, self::TYPE_ONLINE_BANKING_PL, self::TYPE_PAYBYBANK, + self::TYPE_PAYME, + self::TYPE_PAYME_POS, self::TYPE_PAYNOW, self::TYPE_PAYNOW_POS, self::TYPE_PAYPAL, self::TYPE_PAYSHOP, + self::TYPE_PULSE, + self::TYPE_SODEXO, + self::TYPE_STAR, self::TYPE_SWISH, self::TYPE_TICKET, + self::TYPE_TODO_GIFTCARD, self::TYPE_TRUSTLY, self::TYPE_TWINT, self::TYPE_TWINT_POS, + self::TYPE_UP_BRAZIL_CREDIT, + self::TYPE_VALE_REFEICAO, + self::TYPE_VALE_REFEICAO_PREPAID, self::TYPE_VIPPS, self::TYPE_VISA, self::TYPE_VISADEBIT, @@ -581,6 +655,7 @@ public function getTypeAllowableValues() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('afterpayTouch', $data ?? [], null); $this->setIfExists('amex', $data ?? [], null); $this->setIfExists('applePay', $data ?? [], null); @@ -605,10 +680,15 @@ public function __construct(array $data = null) $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); $this->setIfExists('mealVoucherFR', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('payme', $data ?? [], null); $this->setIfExists('paypal', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); $this->setIfExists('reference', $data ?? [], null); $this->setIfExists('shopperInteraction', $data ?? [], null); + $this->setIfExists('sodexo', $data ?? [], null); $this->setIfExists('sofort', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('swish', $data ?? [], null); $this->setIfExists('ticket', $data ?? [], null); @@ -683,6 +763,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets afterpayTouch * @@ -1259,6 +1363,54 @@ public function setMealVoucherFR($mealVoucherFR) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets payme + * + * @return \Adyen\Model\Management\PayMeInfo|null + */ + public function getPayme() + { + return $this->container['payme']; + } + + /** + * Sets payme + * + * @param \Adyen\Model\Management\PayMeInfo|null $payme payme + * + * @return self + */ + public function setPayme($payme) + { + $this->container['payme'] = $payme; + + return $this; + } + /** * Gets paypal * @@ -1283,6 +1435,30 @@ public function setPaypal($paypal) return $this; } + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + /** * Gets reference * @@ -1341,6 +1517,30 @@ public function setShopperInteraction($shopperInteraction) return $this; } + /** + * Gets sodexo + * + * @return \Adyen\Model\Management\SodexoInfo|null + */ + public function getSodexo() + { + return $this->container['sodexo']; + } + + /** + * Sets sodexo + * + * @param \Adyen\Model\Management\SodexoInfo|null $sodexo sodexo + * + * @return self + */ + public function setSodexo($sodexo) + { + $this->container['sodexo'] = $sodexo; + + return $this; + } + /** * Gets sofort * @@ -1365,6 +1565,30 @@ public function setSofort($sofort) return $this; } + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/Management/PulseInfo.php b/src/Adyen/Model/Management/PulseInfo.php new file mode 100644 index 000000000..11bd0288d --- /dev/null +++ b/src/Adyen/Model/Management/PulseInfo.php @@ -0,0 +1,476 @@ + + */ +class PulseInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PulseInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/SodexoInfo.php b/src/Adyen/Model/Management/SodexoInfo.php new file mode 100644 index 000000000..d8120edee --- /dev/null +++ b/src/Adyen/Model/Management/SodexoInfo.php @@ -0,0 +1,410 @@ + + */ +class SodexoInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SodexoInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'merchantContactPhone' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'merchantContactPhone' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'merchantContactPhone' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'merchantContactPhone' => 'merchantContactPhone' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'merchantContactPhone' => 'setMerchantContactPhone' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'merchantContactPhone' => 'getMerchantContactPhone' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('merchantContactPhone', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['merchantContactPhone'] === null) { + $invalidProperties[] = "'merchantContactPhone' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets merchantContactPhone + * + * @return string + */ + public function getMerchantContactPhone() + { + return $this->container['merchantContactPhone']; + } + + /** + * Sets merchantContactPhone + * + * @param string $merchantContactPhone Sodexo merchantContactPhone + * + * @return self + */ + public function setMerchantContactPhone($merchantContactPhone) + { + $this->container['merchantContactPhone'] = $merchantContactPhone; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/StarInfo.php b/src/Adyen/Model/Management/StarInfo.php new file mode 100644 index 000000000..493c2d3ca --- /dev/null +++ b/src/Adyen/Model/Management/StarInfo.php @@ -0,0 +1,476 @@ + + */ +class StarInfo implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'StarInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'processingType' => 'string', + 'transactionDescription' => '\Adyen\Model\Management\TransactionDescriptionInfo' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'processingType' => null, + 'transactionDescription' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static $openAPINullables = [ + 'processingType' => false, + 'transactionDescription' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'processingType' => 'processingType', + 'transactionDescription' => 'transactionDescription' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'processingType' => 'setProcessingType', + 'transactionDescription' => 'setTransactionDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'processingType' => 'getProcessingType', + 'transactionDescription' => 'getTransactionDescription' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const PROCESSING_TYPE_BILLPAY = 'billpay'; + public const PROCESSING_TYPE_ECOM = 'ecom'; + public const PROCESSING_TYPE_POS = 'pos'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getProcessingTypeAllowableValues() + { + return [ + self::PROCESSING_TYPE_BILLPAY, + self::PROCESSING_TYPE_ECOM, + self::PROCESSING_TYPE_POS, + ]; + } + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('processingType', $data ?? [], null); + $this->setIfExists('transactionDescription', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['processingType'] === null) { + $invalidProperties[] = "'processingType' can't be null"; + } + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!is_null($this->container['processingType']) && !in_array($this->container['processingType'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'processingType', must be one of '%s'", + $this->container['processingType'], + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets processingType + * + * @return string + */ + public function getProcessingType() + { + return $this->container['processingType']; + } + + /** + * Sets processingType + * + * @param string $processingType The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. + * + * @return self + */ + public function setProcessingType($processingType) + { + $allowedValues = $this->getProcessingTypeAllowableValues(); + if (!in_array($processingType, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'processingType', must be one of '%s'", + $processingType, + implode("', '", $allowedValues) + ) + ); + } + $this->container['processingType'] = $processingType; + + return $this; + } + + /** + * Gets transactionDescription + * + * @return \Adyen\Model\Management\TransactionDescriptionInfo|null + */ + public function getTransactionDescription() + { + return $this->container['transactionDescription']; + } + + /** + * Sets transactionDescription + * + * @param \Adyen\Model\Management\TransactionDescriptionInfo|null $transactionDescription transactionDescription + * + * @return self + */ + public function setTransactionDescription($transactionDescription) + { + $this->container['transactionDescription'] = $transactionDescription; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + public function toArray(): array + { + $array = []; + foreach (self::$openAPITypes as $propertyName => $propertyType) { + $propertyValue = $this[$propertyName]; + if ($propertyValue !== null) { + // Check if the property value is an object and has a toArray() method + if (is_object($propertyValue) && method_exists($propertyValue, 'toArray')) { + $array[$propertyName] = $propertyValue->toArray(); + // Check if it's type datetime + } elseif ($propertyValue instanceof \DateTime) { + $array[$propertyName] = $propertyValue->format(DATE_ATOM); + // If it's an array type we should check whether it contains objects and if so call toArray method + } elseif (is_array($propertyValue)) { + $array[$propertyName] = array_map(function ($item) { + return $item instanceof ModelInterface ? $item->toArray() : $item; + }, $propertyValue); + } else { + // Otherwise, directly assign the property value to the array + $array[$propertyName] = $propertyValue; + } + } + } + return $array; + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } +} diff --git a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php index 87212bf5b..6c6f2931e 100644 --- a/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php +++ b/src/Adyen/Model/Management/UpdatePaymentMethodInfo.php @@ -44,6 +44,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var string[] */ protected static $openAPITypes = [ + 'accel' => '\Adyen\Model\Management\AccelInfo', 'bcmc' => '\Adyen\Model\Management\BcmcInfo', 'cartesBancaires' => '\Adyen\Model\Management\CartesBancairesInfo', 'countries' => 'string[]', @@ -60,6 +61,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'maestro' => '\Adyen\Model\Management\GenericPmWithTdiInfo', 'mc' => '\Adyen\Model\Management\GenericPmWithTdiInfo', + 'nyce' => '\Adyen\Model\Management\NyceInfo', + 'pulse' => '\Adyen\Model\Management\PulseInfo', + 'star' => '\Adyen\Model\Management\StarInfo', 'storeIds' => 'string[]', 'visa' => '\Adyen\Model\Management\GenericPmWithTdiInfo' ]; @@ -72,6 +76,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'accel' => null, 'bcmc' => null, 'cartesBancaires' => null, 'countries' => null, @@ -88,6 +93,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => null, 'maestro' => null, 'mc' => null, + 'nyce' => null, + 'pulse' => null, + 'star' => null, 'storeIds' => null, 'visa' => null ]; @@ -98,6 +106,7 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static $openAPINullables = [ + 'accel' => false, 'bcmc' => false, 'cartesBancaires' => false, 'countries' => false, @@ -114,6 +123,9 @@ class UpdatePaymentMethodInfo implements ModelInterface, ArrayAccess, \JsonSeria 'jcb' => false, 'maestro' => false, 'mc' => false, + 'nyce' => false, + 'pulse' => false, + 'star' => false, 'storeIds' => false, 'visa' => false ]; @@ -204,6 +216,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'accel' => 'accel', 'bcmc' => 'bcmc', 'cartesBancaires' => 'cartesBancaires', 'countries' => 'countries', @@ -220,6 +233,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'jcb', 'maestro' => 'maestro', 'mc' => 'mc', + 'nyce' => 'nyce', + 'pulse' => 'pulse', + 'star' => 'star', 'storeIds' => 'storeIds', 'visa' => 'visa' ]; @@ -230,6 +246,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'accel' => 'setAccel', 'bcmc' => 'setBcmc', 'cartesBancaires' => 'setCartesBancaires', 'countries' => 'setCountries', @@ -246,6 +263,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'setJcb', 'maestro' => 'setMaestro', 'mc' => 'setMc', + 'nyce' => 'setNyce', + 'pulse' => 'setPulse', + 'star' => 'setStar', 'storeIds' => 'setStoreIds', 'visa' => 'setVisa' ]; @@ -256,6 +276,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'accel' => 'getAccel', 'bcmc' => 'getBcmc', 'cartesBancaires' => 'getCartesBancaires', 'countries' => 'getCountries', @@ -272,6 +293,9 @@ public function isNullableSetToNull(string $property): bool 'jcb' => 'getJcb', 'maestro' => 'getMaestro', 'mc' => 'getMc', + 'nyce' => 'getNyce', + 'pulse' => 'getPulse', + 'star' => 'getStar', 'storeIds' => 'getStoreIds', 'visa' => 'getVisa' ]; @@ -333,6 +357,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('accel', $data ?? [], null); $this->setIfExists('bcmc', $data ?? [], null); $this->setIfExists('cartesBancaires', $data ?? [], null); $this->setIfExists('countries', $data ?? [], null); @@ -349,6 +374,9 @@ public function __construct(array $data = null) $this->setIfExists('jcb', $data ?? [], null); $this->setIfExists('maestro', $data ?? [], null); $this->setIfExists('mc', $data ?? [], null); + $this->setIfExists('nyce', $data ?? [], null); + $this->setIfExists('pulse', $data ?? [], null); + $this->setIfExists('star', $data ?? [], null); $this->setIfExists('storeIds', $data ?? [], null); $this->setIfExists('visa', $data ?? [], null); } @@ -395,6 +423,30 @@ public function valid() } + /** + * Gets accel + * + * @return \Adyen\Model\Management\AccelInfo|null + */ + public function getAccel() + { + return $this->container['accel']; + } + + /** + * Sets accel + * + * @param \Adyen\Model\Management\AccelInfo|null $accel accel + * + * @return self + */ + public function setAccel($accel) + { + $this->container['accel'] = $accel; + + return $this; + } + /** * Gets bcmc * @@ -779,6 +831,78 @@ public function setMc($mc) return $this; } + /** + * Gets nyce + * + * @return \Adyen\Model\Management\NyceInfo|null + */ + public function getNyce() + { + return $this->container['nyce']; + } + + /** + * Sets nyce + * + * @param \Adyen\Model\Management\NyceInfo|null $nyce nyce + * + * @return self + */ + public function setNyce($nyce) + { + $this->container['nyce'] = $nyce; + + return $this; + } + + /** + * Gets pulse + * + * @return \Adyen\Model\Management\PulseInfo|null + */ + public function getPulse() + { + return $this->container['pulse']; + } + + /** + * Sets pulse + * + * @param \Adyen\Model\Management\PulseInfo|null $pulse pulse + * + * @return self + */ + public function setPulse($pulse) + { + $this->container['pulse'] = $pulse; + + return $this; + } + + /** + * Gets star + * + * @return \Adyen\Model\Management\StarInfo|null + */ + public function getStar() + { + return $this->container['star']; + } + + /** + * Sets star + * + * @param \Adyen\Model\Management\StarInfo|null $star star + * + * @return self + */ + public function setStar($star) + { + $this->container['star'] = $star; + + return $this; + } + /** * Gets storeIds * diff --git a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php index 9c73e94b9..a3626e45d 100644 --- a/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ManagementWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php index 8032f208b..b6a5027ee 100644 --- a/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php +++ b/src/Adyen/Model/POSTerminalManagement/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payments/ObjectSerializer.php b/src/Adyen/Model/Payments/ObjectSerializer.php index 4e217461d..ae7a870cb 100644 --- a/src/Adyen/Model/Payments/ObjectSerializer.php +++ b/src/Adyen/Model/Payments/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php index b900dc2bd..56c51256a 100644 --- a/src/Adyen/Model/PaymentsApp/ObjectSerializer.php +++ b/src/Adyen/Model/PaymentsApp/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Payout/ObjectSerializer.php b/src/Adyen/Model/Payout/ObjectSerializer.php index ad1c991ab..0d50f4363 100644 --- a/src/Adyen/Model/Payout/ObjectSerializer.php +++ b/src/Adyen/Model/Payout/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/PosMobile/ObjectSerializer.php b/src/Adyen/Model/PosMobile/ObjectSerializer.php index ae87baef9..ba0e91ceb 100644 --- a/src/Adyen/Model/PosMobile/ObjectSerializer.php +++ b/src/Adyen/Model/PosMobile/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Recurring/ObjectSerializer.php b/src/Adyen/Model/Recurring/ObjectSerializer.php index 7adbf8e59..3b2a857bf 100644 --- a/src/Adyen/Model/Recurring/ObjectSerializer.php +++ b/src/Adyen/Model/Recurring/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php index 97f670389..a8a265ce9 100644 --- a/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/ReportWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/StoredValue/ObjectSerializer.php b/src/Adyen/Model/StoredValue/ObjectSerializer.php index ed3372fb3..934975452 100644 --- a/src/Adyen/Model/StoredValue/ObjectSerializer.php +++ b/src/Adyen/Model/StoredValue/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php index 6592bf84d..9ccc67586 100644 --- a/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransactionWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php index 01b25bf23..d05b26906 100644 --- a/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php +++ b/src/Adyen/Model/TransferWebhooks/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Model/Transfers/ObjectSerializer.php b/src/Adyen/Model/Transfers/ObjectSerializer.php index b9cbe36bf..349b367b3 100644 --- a/src/Adyen/Model/Transfers/ObjectSerializer.php +++ b/src/Adyen/Model/Transfers/ObjectSerializer.php @@ -81,7 +81,7 @@ 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); } } @@ -117,9 +117,7 @@ public static function sanitizeFilename($filename) */ 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); } @@ -242,7 +240,8 @@ public static function deserialize($data, $class, $httpHeaders = null) /** @var \Psr\Http\Message\StreamInterface $data */ // determine file name - if (is_array($httpHeaders) + if ( + is_array($httpHeaders) && array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) ) { diff --git a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php index 980edd95b..bcb0276b3 100644 --- a/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php +++ b/src/Adyen/Service/BalancePlatform/BalanceAccountsApi.php @@ -76,13 +76,14 @@ public function createSweep(string $balanceAccountId, \Adyen\Model\BalancePlatfo * @param string $balanceAccountId * @param string $sweepId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteSweep(string $balanceAccountId, string $sweepId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{balanceAccountId}', '{sweepId}'], [$balanceAccountId, $sweepId], "/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php index c61143563..99bc3b6bd 100644 --- a/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php +++ b/src/Adyen/Service/BalancePlatform/BankAccountValidationApi.php @@ -44,12 +44,13 @@ public function __construct(Client $client) * * @param \Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function validateBankAccountIdentification(\Adyen\Model\BalancePlatform\BankAccountIdentificationValidationRequest $bankAccountIdentificationValidationRequest, array $requestOptions = null) { $endpoint = $this->baseURL . "/validateBankAccountIdentification"; $this->requestHttp($endpoint, strtolower('POST'), (array) $bankAccountIdentificationValidationRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php index df3b7a28a..50ba91f10 100644 --- a/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php +++ b/src/Adyen/Service/BalancePlatform/ManageSCADevicesApi.php @@ -60,13 +60,14 @@ public function completeRegistrationOfScaDevice(string $id, \Adyen\Model\Balance * * @param string $id * @param array|null $requestOptions ['queryParams' => ['paymentInstrumentId'=> string]] - + * @throws AdyenException */ public function deleteRegistrationOfScaDevice(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/registeredDevices/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php index ad86f1206..2e704599b 100644 --- a/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php +++ b/src/Adyen/Service/BalancePlatform/NetworkTokensApi.php @@ -60,12 +60,13 @@ public function getNetworkToken(string $networkTokenId, array $requestOptions = * @param string $networkTokenId * @param \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function updateNetworkToken(string $networkTokenId, \Adyen\Model\BalancePlatform\UpdateNetworkTokenRequest $updateNetworkTokenRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{networkTokenId}'], [$networkTokenId], "/networkTokens/{networkTokenId}"); $this->requestHttp($endpoint, strtolower('PATCH'), (array) $updateNetworkTokenRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Checkout/RecurringApi.php b/src/Adyen/Service/Checkout/RecurringApi.php index 233c09180..72b257fdc 100644 --- a/src/Adyen/Service/Checkout/RecurringApi.php +++ b/src/Adyen/Service/Checkout/RecurringApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $storedPaymentMethodId * @param array|null $requestOptions ['queryParams' => ['shopperReference'=> string, 'merchantAccount'=> string]] - + * @throws AdyenException */ public function deleteTokenForStoredPaymentDetails(string $storedPaymentMethodId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{storedPaymentMethodId}'], [$storedPaymentMethodId], "/storedPaymentMethods/{storedPaymentMethodId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php index f94b39ed9..2551bbc54 100644 --- a/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php +++ b/src/Adyen/Service/LegalEntityManagement/BusinessLinesApi.php @@ -59,13 +59,14 @@ public function createBusinessLine(\Adyen\Model\LegalEntityManagement\BusinessLi * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteBusinessLine(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/businessLines/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php index d834bf550..9a6ea1756 100644 --- a/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/DocumentsApi.php @@ -44,13 +44,14 @@ public function __construct(Client $client) * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteDocument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/documents/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php index 70c2e0769..3bf8aeaa4 100644 --- a/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php +++ b/src/Adyen/Service/LegalEntityManagement/TransferInstrumentsApi.php @@ -59,13 +59,14 @@ public function createTransferInstrument(\Adyen\Model\LegalEntityManagement\Tran * * @param string $id * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteTransferInstrument(string $id, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/transferInstruments/{id}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php index c2557d39d..608130253 100644 --- a/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsCompanyLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $companyId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $companyId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{apiCredentialId}', '{originId}'], [$companyId, $apiCredentialId, $originId], "/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php index 1b40d271f..ec0d042af 100644 --- a/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/AllowedOriginsMerchantLevelApi.php @@ -63,13 +63,14 @@ public function createAllowedOrigin(string $merchantId, string $apiCredentialId, * @param string $apiCredentialId * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function deleteAllowedOrigin(string $merchantId, string $apiCredentialId, string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{apiCredentialId}', '{originId}'], [$merchantId, $apiCredentialId, $originId], "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/MyAPICredentialApi.php b/src/Adyen/Service/Management/MyAPICredentialApi.php index 54005b35b..65cdadc59 100644 --- a/src/Adyen/Service/Management/MyAPICredentialApi.php +++ b/src/Adyen/Service/Management/MyAPICredentialApi.php @@ -116,12 +116,13 @@ public function getApiCredentialDetails(array $requestOptions = null): \Adyen\Mo * * @param string $originId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeAllowedOrigin(string $originId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{originId}'], [$originId], "/me/allowedOrigins/{originId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } } diff --git a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php index f8b7cc0b0..4f955b8ba 100644 --- a/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PaymentMethodsMerchantLevelApi.php @@ -46,13 +46,14 @@ public function __construct(Client $client) * @param string $paymentMethodId * @param \Adyen\Model\Management\ApplePayInfo $applePayInfo * @param array|null $requestOptions - + * @throws AdyenException */ public function addApplePayDomain(string $merchantId, string $paymentMethodId, \Adyen\Model\Management\ApplePayInfo $applePayInfo, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{paymentMethodId}'], [$merchantId, $paymentMethodId], "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"); $this->requestHttp($endpoint, strtolower('POST'), (array) $applePayInfo->jsonSerialize(), $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php index efff80b67..499e78957 100644 --- a/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php +++ b/src/Adyen/Service/Management/PayoutSettingsMerchantLevelApi.php @@ -61,13 +61,14 @@ public function addPayoutSetting(string $merchantId, \Adyen\Model\Management\Pay * @param string $merchantId * @param string $payoutSettingsId * @param array|null $requestOptions - + * @throws AdyenException */ public function deletePayoutSetting(string $merchantId, string $payoutSettingsId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{payoutSettingsId}'], [$merchantId, $payoutSettingsId], "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php index 8a7c5e731..8b6d78c7f 100644 --- a/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php +++ b/src/Adyen/Service/Management/TerminalsTerminalLevelApi.php @@ -59,12 +59,13 @@ public function listTerminals(array $requestOptions = null): \Adyen\Model\Manage * @param string $terminalId * @param \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest * @param array|null $requestOptions - + * @throws AdyenException */ public function reassignTerminal(string $terminalId, \Adyen\Model\Management\TerminalReassignmentRequest $terminalReassignmentRequest, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{terminalId}'], [$terminalId], "/terminals/{terminalId}/reassign"); $this->requestHttp($endpoint, strtolower('POST'), (array) $terminalReassignmentRequest->jsonSerialize(), $requestOptions); + } } diff --git a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php index cfe85a383..6caa292a6 100644 --- a/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksCompanyLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $companyId, array $requestOptions = null) * @param string $companyId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $companyId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{companyId}', '{webhookId}'], [$companyId, $webhookId], "/companies/{companyId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /** diff --git a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php index 968e9c614..7113c9c39 100644 --- a/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php +++ b/src/Adyen/Service/Management/WebhooksMerchantLevelApi.php @@ -92,13 +92,14 @@ public function listAllWebhooks(string $merchantId, array $requestOptions = null * @param string $merchantId * @param string $webhookId * @param array|null $requestOptions - + * @throws AdyenException */ public function removeWebhook(string $merchantId, string $webhookId, array $requestOptions = null) { $endpoint = $this->baseURL . str_replace(['{merchantId}', '{webhookId}'], [$merchantId, $webhookId], "/merchants/{merchantId}/webhooks/{webhookId}"); $this->requestHttp($endpoint, strtolower('DELETE'), null, $requestOptions); + } /**