관리-도구
편집 파일: Sdk.tar
CommunicatorInterface.php 0000604 00000014113 15224610353 0011533 0 ustar 00 <?php namespace App\Libs\Sdk; use App\Libs\Sdk\Communication\RequestObject; use App\Libs\Sdk\Communication\ResponseClassMap; use App\Libs\Sdk\Domain\DataObject; use App\Libs\Sdk\Logging\CommunicatorLogger; use Exception; use OnlinePayments\Sdk\MultipartDataObject; use OnlinePayments\Sdk\MultipartFormDataObject; /** * Interface CommunicatorInterface * * @package OnlinePayments\Sdk */ interface CommunicatorInterface { /** * @param CommunicatorLogger $communicatorLogger */ public function enableLogging(CommunicatorLogger $communicatorLogger); /** * */ public function disableLogging(); /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function get( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject; /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function getWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void; /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function delete( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject; /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function deleteWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void; /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function post( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject; /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function postWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void; /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function put( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject; /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function putWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void; } Communication/UuidGenerator.php 0000604 00000001246 15224610353 0012637 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class UuidGenerator * Generator class for v4 UUID's * * @package OnlinePayments\Sdk\Communication */ class UuidGenerator { private function __construct() { } /** @return string */ public static function generatedUuid(): string { return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); } } Communication/InvalidResponseException.php 0000604 00000001550 15224610353 0015044 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use RuntimeException; /** * Class InvalidResponseException * * @package OnlinePayments\Sdk\Communication */ class InvalidResponseException extends RuntimeException { /** * @var ConnectionResponseInterface */ private ConnectionResponse $response; /** * @param ConnectionResponseInterface $response * @param string|null $message */ public function __construct(ConnectionResponseInterface $response, ?string $message = null) { if (is_null($message)) { $message = 'The server returned an invalid response.'; } parent::__construct($message); $this->response = $response; } /** * @return ConnectionResponseInterface */ public function getResponse(): ConnectionResponse { return $this->response; } } Communication/HttpHeaderHelper.php 0000604 00000005244 15224610353 0013254 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class HttpHeaderHelper * * @package OnlinePayments\Sdk\Communication */ class HttpHeaderHelper { private function __construct() { } /** * Parses a raw array of HTTP headers into an associative array with the same structure as the output * of the get_headers method using the $format = 1 parameter * @param string[] $rawHeaders * @return array */ public static function parseRawHeaders(array $rawHeaders): array { $headers = array(); $key = ''; foreach ($rawHeaders as $rawHeader) { $rawHeaderLineParts = explode(':', $rawHeader, 2); if (isset($rawHeaderLineParts[1])) { $key = $rawHeaderLineParts[0]; $value = trim($rawHeaderLineParts[1]); if (!isset($headers[$key])) { $headers[$key] = $value; } elseif (is_array($headers[$key])) { $headers[$key][] = $value; } else { $headers[$key] = array($headers[$key], $value); } } elseif (strlen($rawHeaderLineParts[0]) > 0) { if (!$key) { $headers[0] = trim($rawHeaderLineParts[0]); } elseif (in_array(substr($rawHeaderLineParts[0], 0, 1), array(' ', "\t"))) { if (is_array($headers[$key])) { $lastValue = array_pop($headers[$key]); $headers[$key][] = $lastValue . "\r\n" . rtrim($rawHeaderLineParts[0]); } else { $headers[$key] .= "\r\n" . rtrim($rawHeaderLineParts[0]); } } } } return $headers; } /** * Generates an array of raw headers from an associative array of headers with the same structure as the output * of the get_headers method using the $format = 1 parameter * @param array $headers * @return string[] */ public static function generateRawHeaders(array $headers): array { $rawHeaders = array(); foreach ($headers as $key => $values) { if (!is_array($values)) { $values = array($values); } foreach ($values as $value) { if ($key !== 0) { $rawHeader = $key . ': ' . $value; } else { $rawHeader = $value; } foreach (explode("\r\n", $rawHeader) as $singleLineRawHeader) { $rawHeaders[] = $singleLineRawHeader; } } } return $rawHeaders; } } Communication/HttpObfuscator.php 0000604 00000005515 15224610353 0013034 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Logging\BodyObfuscator; use App\Libs\Sdk\Logging\HeaderObfuscator; /** * Class HttpObfuscator * * @package OnlinePayments\Sdk\Communication */ class HttpObfuscator { const HTTP_VERSION = 'HTTP/1.1'; /** @var HeaderObfuscator */ protected HeaderObfuscator $headerObfuscator; /** @var BodyObfuscator */ protected BodyObfuscator $bodyObfuscator; public function __construct() { $this->headerObfuscator = new HeaderObfuscator(); $this->bodyObfuscator = new BodyObfuscator(); } /** * @param BodyObfuscator $bodyObfuscator */ public function setBodyObfuscator(BodyObfuscator $bodyObfuscator): void { $this->bodyObfuscator = $bodyObfuscator; } /** * @param HeaderObfuscator $headerObfuscator */ public function setHeaderObfuscator(HeaderObfuscator $headerObfuscator): void { $this->headerObfuscator = $headerObfuscator; } /** * @param string $requestMethod * @param string $relativeRequestUri * @param array $requestHeaders * @param string $requestBody * @return string */ public function getRawObfuscatedRequest( string $requestMethod, string $relativeRequestUri, array $requestHeaders, string $requestBody = '' ) { $rawObfuscatedRequest = $requestMethod . ' ' . $relativeRequestUri . ' ' . static::HTTP_VERSION; if ($requestHeaders) { $rawObfuscatedRequest .= PHP_EOL . implode(PHP_EOL, HttpHeaderHelper::generateRawHeaders( $this->headerObfuscator->obfuscateHeaders($requestHeaders) )); } if (strlen($requestBody) > 0) { $rawObfuscatedRequest .= PHP_EOL . PHP_EOL . $this->bodyObfuscator->obfuscateBody( array_key_exists('Content-Type', $requestHeaders) ? $requestHeaders['Content-Type'] : '', $requestBody ); } return $rawObfuscatedRequest; } /** * @param ConnectionResponseInterface $response * @return string */ public function getRawObfuscatedResponse(ConnectionResponseInterface $response) { $rawObfuscatedResponse = ''; $responseHeaders = $response->getHeaders(); if ($responseHeaders) { $rawObfuscatedResponse .= implode(PHP_EOL, HttpHeaderHelper::generateRawHeaders( $this->headerObfuscator->obfuscateHeaders($responseHeaders) )); } $responseBody = $response->getBody(); if (strlen($responseBody) > 0) { $rawObfuscatedResponse .= PHP_EOL . PHP_EOL . $this->bodyObfuscator->obfuscateBody( $response->getHeaderValue('Content-Type'), $responseBody ); } return $rawObfuscatedResponse; } } Communication/MetadataProviderInterface.php 0000604 00000000410 15224610353 0015126 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Interface MetadataProviderInterface * * @package OnlinePayments\Sdk\Communication */ interface MetadataProviderInterface { /** * @return string */ public function getServerMetaInfoValue(); } Communication/MultipartFormDataObject.php 0000604 00000004416 15224610353 0014612 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Domain\UploadableFile; use UnexpectedValueException; /** * Class MultipartFormDataObject * * @package OnlinePayments\Sdk\Communication */ class MultipartFormDataObject { /** @var string */ private string $boundary; /** @var string */ private string $contentType; /** @var array */ private array $values; /** @var array */ private array $files; public function __construct() { $this->boundary = UuidGenerator::generatedUuid(); $this->contentType = 'multipart/form-data; boundary=' . $this->boundary; $this->values = []; $this->files = []; } /** * @return string */ public function getBoundary(): string { return $this->boundary; } /** * @return string */ public function getContentType(): string { return $this->contentType; } /** * @return array */ public function getValues(): array { return $this->values; } /** * @return array */ public function getFiles(): array { return $this->files; } /** * @param string $parameterName * @param string $value */ public function addValue(string $parameterName, string $value): void { if (strlen(trim($parameterName)) == 0) { throw new UnexpectedValueException("boundary is required"); } if (array_key_exists($parameterName, $this->values) || array_key_exists($parameterName, $this->files)) { throw new UnexpectedValueException('Duplicate parameter name: ' . $parameterName); } $this->values[$parameterName] = $value; } /** * @param string $parameterName * @param UploadableFile $file */ public function addFile(string $parameterName, UploadableFile $file): void { if (strlen(trim($parameterName)) == 0) { throw new UnexpectedValueException("boundary is required"); } if (array_key_exists($parameterName, $this->values) || array_key_exists($parameterName, $this->files)) { throw new UnexpectedValueException('Duplicate parameter name: ' . $parameterName); } $this->files[$parameterName] = $file; } } Communication/DefaultConnection.php 0000604 00000040446 15224610353 0013473 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\CommunicatorConfiguration; use App\Libs\Sdk\Logging\BodyObfuscator; use App\Libs\Sdk\Logging\CommunicatorLogger; use App\Libs\Sdk\Logging\HeaderObfuscator; use App\Libs\Sdk\ProxyConfiguration; use ErrorException; use Exception; use Robtimus\Multipart\MultipartFormData; use UnexpectedValueException; /** * Class ApiException * * @package OnlinePayments\Sdk\Communication */ class DefaultConnection implements Connection { /** @var resource|null */ protected $multiHandle = null; /** @var CommunicatorLogger|null */ protected ?CommunicatorLogger $communicatorLogger = null; /** @var CommunicatorLoggerHelper|null */ private ?CommunicatorLoggerHelper $communicatorLoggerHelper = null; /** @var int */ private int $connectTimeout = -1; /** @var int */ private int $readTimeout = -1; /** @var ProxyConfiguration|null */ private ?ProxyConfiguration $proxyConfiguration = null; /** * @param CommunicatorConfiguration|null $communicatorConfiguration */ public function __construct(?CommunicatorConfiguration $communicatorConfiguration = null) { if ($communicatorConfiguration) { $this->connectTimeout = $communicatorConfiguration->getConnectTimeout(); $this->readTimeout = $communicatorConfiguration->getReadTimeout(); $this->proxyConfiguration = $communicatorConfiguration->getProxyConfiguration(); } } /** * */ public function __destruct() { if (!is_null($this->multiHandle)) { curl_multi_close($this->multiHandle); $this->multiHandle = null; } } /** * @param string $requestUri * @param string[] $requestHeaders * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function get(string $requestUri, array $requestHeaders, callable $responseHandler): void { $requestId = UuidGenerator::generatedUuid(); $this->logRequest($requestId, 'GET', $requestUri, $requestHeaders); try { $response = $this->executeRequest('GET', $requestUri, $requestHeaders, '', $responseHandler); if ($response) { $this->logResponse($requestId, $requestUri, $response); } } catch (Exception $exception) { $this->logException($requestId, $requestUri, $exception); throw $exception; } } /** * @param string $requestUri * @param string[] $requestHeaders * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function delete(string $requestUri, array $requestHeaders, callable $responseHandler): void { $requestId = UuidGenerator::generatedUuid(); $this->logRequest($requestId, 'DELETE', $requestUri, $requestHeaders); try { $response = $this->executeRequest('DELETE', $requestUri, $requestHeaders, '', $responseHandler); if ($response) { $this->logResponse($requestId, $requestUri, $response); } } catch (Exception $exception) { $this->logException($requestId, $requestUri, $exception); throw $exception; } } /** * @param string $requestUri * @param string[] $requestHeaders * @param string|MultipartFormDataObject $body * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function post(string $requestUri, array $requestHeaders, $body, callable $responseHandler): void { $requestId = UuidGenerator::generatedUuid(); $bodyToLog = is_string($body) ? $body : '<binary content>'; $this->logRequest($requestId, 'POST', $requestUri, $requestHeaders, $bodyToLog); try { $response = $this->executeRequest('POST', $requestUri, $requestHeaders, $body, $responseHandler); if ($response) { $this->logResponse($requestId, $requestUri, $response); } } catch (Exception $exception) { $this->logException($requestId, $requestUri, $exception); throw $exception; } } /** * @param string $requestUri * @param string[] $requestHeaders * @param string $body * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function put(string $requestUri, array $requestHeaders, $body, callable $responseHandler): void { $requestId = UuidGenerator::generatedUuid(); $bodyToLog = is_string($body) ? $body : '<binary content>'; $this->logRequest($requestId, 'PUT', $requestUri, $requestHeaders, $bodyToLog); try { $response = $this->executeRequest('PUT', $requestUri, $requestHeaders, $body, $responseHandler); if ($response) { $this->logResponse($requestId, $requestUri, $response); } } catch (Exception $exception) { $this->logException($requestId, $requestUri, $exception); throw $exception; } } /** * @param CommunicatorLogger $communicatorLogger */ public function enableLogging(CommunicatorLogger $communicatorLogger): void { $this->communicatorLogger = $communicatorLogger; } /** * */ public function disableLogging(): void { $this->communicatorLogger = null; } /** * @param string $httpMethod * @param string $requestUri * @param string[] $requestHeaders * @param string|MultipartFormDataObject $body * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers * @return ConnectionResponseInterface|null * @throws ErrorException */ protected function executeRequest( string $httpMethod, string $requestUri, array $requestHeaders, $body, callable $responseHandler ): ?ConnectionResponse { if (!in_array($httpMethod, array('GET', 'DELETE', 'POST', 'PUT'))) { throw new UnexpectedValueException(sprintf('Http method \'%s\' is not supported', $httpMethod)); } $curlHandle = $this->getCurlHandle(); $this->setCurlOptions($curlHandle, $httpMethod, $requestUri, $requestHeaders, $body); return $this->executeCurlHandle($curlHandle, $responseHandler); } /** * @return resource * @throws ErrorException */ protected function getCurlHandle() { // @phpstan-ignore-next-line if (!$curlHandle = curl_init()) { throw new ErrorException('Cannot initialize cUrl curlHandle'); } return $curlHandle; } /** * @param resource $multiHandle * @param resource $curlHandle * @throws ErrorException */ private function executeCurlHandleShared($multiHandle, $curlHandle): void { $running = 0; do { $status = curl_multi_exec($multiHandle, $running); if ($status > CURLM_OK) { $errorMessage = 'cURL error ' . $status; if (function_exists('curl_multi_strerror')) { $errorMessage .= ' (' . curl_multi_strerror($status) . ')'; } throw new ErrorException($errorMessage); } $info = curl_multi_info_read($multiHandle); if ($info && isset($info['result']) && $info['result'] != CURLE_OK) { $errorMessage = 'cURL error ' . $info['result']; if (function_exists('curl_strerror')) { $errorMessage .= ' (' . curl_strerror($info['result']) . ')'; } throw new ErrorException($errorMessage); } curl_multi_select($multiHandle); } while ($running > 0); } /** * @param resource $curlHandle * @param callable $responseHandler * @return ConnectionResponseInterface|null * @throws Exception */ private function executeCurlHandle($curlHandle, callable $responseHandler): ?ConnectionResponse { $multiHandle = $this->getCurlMultiHandle(); curl_multi_add_handle($multiHandle, $curlHandle); $headerBuilder = new ResponseHeaderBuilder(); $headerFunction = function ($ch, $data) use ($headerBuilder) { $headerBuilder->append($data); return strlen($data); }; $responseBuilder = $this->communicatorLogger ? new ResponseBuilder() : null; $writeFunction = function ($ch, $data) use ($headerBuilder, $responseBuilder, $responseHandler) { $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $headers = $headerBuilder->getHeaders(); call_user_func($responseHandler, $httpStatusCode, $data, $headers); if ($responseBuilder) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); if ($this->isBinaryResponse($headerBuilder)) { $responseBuilder->setBody('<binary content>'); } else { $responseBuilder->appendBody($data); } } return strlen($data); }; curl_setopt($curlHandle, CURLOPT_HEADERFUNCTION, $headerFunction); curl_setopt($curlHandle, CURLOPT_WRITEFUNCTION, $writeFunction); try { $this->executeCurlHandleShared($multiHandle, $curlHandle); // always emit an empty chunk, to make sure that the status code and headers are sent, // even if there is no response body call_user_func($writeFunction, $curlHandle, ''); curl_multi_remove_handle($multiHandle, $curlHandle); return $responseBuilder ? $responseBuilder->getResponse() : null; } catch (Exception $e) { curl_multi_remove_handle($multiHandle, $curlHandle); throw $e; } } /** * @param resource $curlHandle * @param string $httpMethod * @param string $requestUri * @param string[] $requestHeaders * @param string|MultipartFormDataObject $body */ protected function setCurlOptions( $curlHandle, string $httpMethod, string $requestUri, array $requestHeaders, $body ): void { curl_setopt($curlHandle, CURLOPT_HEADER, false); curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true); curl_setopt($curlHandle, CURLOPT_CUSTOMREQUEST, $httpMethod); curl_setopt($curlHandle, CURLOPT_URL, $requestUri); if ($this->connectTimeout > 0) { curl_setopt($curlHandle, CURLOPT_CONNECTTIMEOUT, $this->connectTimeout); } if ($this->readTimeout > 0) { curl_setopt($curlHandle, CURLOPT_TIMEOUT, $this->readTimeout); } if (in_array($httpMethod, array('PUT', 'POST')) && $body) { if (is_string($body)) { curl_setopt($curlHandle, CURLOPT_POSTFIELDS, $body); } elseif ($body instanceof MultipartFormDataObject) { $multipart = new MultipartFormData($body->getBoundary()); foreach ($body->getValues() as $name => $value) { $multipart->addValue($name, $value); } foreach ($body->getFiles() as $name => $file) { $multipart->addFile($name, $file->getFileName(), $file->getContent(), $file->getContentType(), $file->getContentLength()); } $multipart->finish(); $contentLength = $multipart->getContentLength(); if ($contentLength >= 0) { $requestHeaders[] = 'Content-Length: ' . $contentLength; } curl_setopt($curlHandle, CURLOPT_READFUNCTION, array($multipart, 'curl_read')); curl_setopt($curlHandle, CURLOPT_UPLOAD, true); } else { $type = is_object($body) ? get_class($body) : gettype($body); throw new UnexpectedValueException('Unsupported body type: ' . $type); } } if (!empty($requestHeaders)) { curl_setopt($curlHandle, CURLOPT_HTTPHEADER, HttpHeaderHelper::generateRawHeaders($requestHeaders)); } if (!is_null($this->proxyConfiguration)) { $curlProxy = $this->proxyConfiguration->getCurlProxy(); if (!empty($curlProxy)) { curl_setopt($curlHandle, CURLOPT_PROXY, $curlProxy); } $curlProxyUserPwd = $this->proxyConfiguration->getCurlProxyUserPwd(); if (!empty($curlProxyUserPwd)) { curl_setopt($curlHandle, CURLOPT_PROXYUSERPWD, $curlProxyUserPwd); } } } /** * @return resource * @throws Exception */ private function getCurlMultiHandle() { if (is_null($this->multiHandle)) { $multiHandle = curl_multi_init(); if ($multiHandle === false) { throw new ErrorException('Failed to initialize cURL multi curlHandle'); } $this->multiHandle = $multiHandle; } return $this->multiHandle; } /** * @return bool */ private function isBinaryResponse(ResponseHeaderBuilder $headerBuilder): bool { $contentType = $headerBuilder->getContentType(); return $contentType // does not start with text/ && strrpos($contentType, 'text/', -strlen($contentType)) === false // does not contain json && strrpos($contentType, 'json') === false // does not contain xml && strrpos($contentType, 'xml') === false; } /** * @param string $requestId * @param string $requestMethod * @param string $requestUri * @param array $requestHeaders * @param string $requestBody */ protected function logRequest( string $requestId, string $requestMethod, string $requestUri, array $requestHeaders, $requestBody = '' ): void { if ($this->communicatorLogger) { $this->getCommunicatorLoggerHelper()->logRequest( $this->communicatorLogger, $requestId, $requestMethod, $requestUri, $requestHeaders, $requestBody ); } } /** * @param string $requestId * @param string $requestUri * @param ConnectionResponseInterface $response */ protected function logResponse(string $requestId, string $requestUri, ConnectionResponseInterface $response): void { if ($this->communicatorLogger) { $this->getCommunicatorLoggerHelper()->logResponse( $this->communicatorLogger, $requestId, $requestUri, $response ); } } /** * @param string $requestId * @param string $requestUri * @param Exception $exception */ protected function logException(string $requestId, string $requestUri, Exception $exception): void { if ($this->communicatorLogger) { $this->getCommunicatorLoggerHelper()->logException( $this->communicatorLogger, $requestId, $requestUri, $exception ); } } /** @return CommunicatorLoggerHelper */ protected function getCommunicatorLoggerHelper(): CommunicatorLoggerHelper { if (is_null($this->communicatorLoggerHelper)) { $this->communicatorLoggerHelper = new CommunicatorLoggerHelper; } return $this->communicatorLoggerHelper; } /** * @param BodyObfuscator $bodyObfuscator */ public function setBodyObfuscator(BodyObfuscator $bodyObfuscator): void { $this->getCommunicatorLoggerHelper()->setBodyObfuscator($bodyObfuscator); } /** * @param HeaderObfuscator $headerObfuscator */ public function setHeaderObfuscator(HeaderObfuscator $headerObfuscator): void { $this->getCommunicatorLoggerHelper()->setHeaderObfuscator($headerObfuscator); } } Communication/MultipartDataObject.php 0000604 00000000751 15224610353 0013764 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use Exception; /** * Class MultipartDataObject * * @package OnlinePayments\Sdk\Communication */ abstract class MultipartDataObject { /** * @return MultipartFormDataObject */ abstract public function toMultipartFormDataObject(): MultipartFormDataObject; public function __set($name, $value) { throw new Exception('Cannot add new property ' . $name . ' to instances of class ' . get_class($this)); } } Communication/ConnectionResponse.php 0000604 00000005642 15224610353 0013704 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class ConnectionResponse * * @package OnlinePayments\Sdk\Communication */ class ConnectionResponse implements ConnectionResponseInterface { /** @var int */ private int $httpStatusCode; /** @var array */ private array $headers; /** @var array */ private array $lowerCasedHeaderKeyMap; /** @var string */ private string $body; /** * @param int $httpStatusCode * @param array $headers * @param string $body */ public function __construct(int $httpStatusCode, array $headers, string $body) { $this->httpStatusCode = $httpStatusCode; $this->headers = $headers; $this->lowerCasedHeaderKeyMap = array(); foreach (array_keys($headers) as $headerKey) { $this->lowerCasedHeaderKeyMap[strtolower($headerKey)] = $headerKey; } $this->body = $body; } /** * @return int */ public function getHttpStatusCode(): int { return $this->httpStatusCode; } /** * @return array */ public function getHeaders(): array { return $this->headers; } /** * @param string $name * @return string|array */ public function getHeaderValue(string $name) { $lowerCasedName = strtolower($name); if (array_key_exists($lowerCasedName, $this->lowerCasedHeaderKeyMap)) { return $this->headers[$this->lowerCasedHeaderKeyMap[$lowerCasedName]]; } return ''; } /** * @return string */ public function getBody(): string { return $this->body; } /** * @param array $headers * @return string|null The value of the filename parameter of the Content-Disposition header from the given headers, * or null if there was no such header or parameter. */ public static function getDispositionFilename(array $headers): ?string { $headerValue = null; foreach ($headers as $key => $value) { if (strtolower($key) === 'content-disposition') { $headerValue = $value; break; } } if (!$headerValue) { return null; } if (preg_match('/(?i)(?:^|;)\s*fileName\s*=\s*(.*?)\s*(?:;|$)/', $headerValue, $matches)) { $filename = $matches[1]; return self::trimQuotes($filename); } return null; } private static function trimQuotes(string $filename): string { $len = strlen($filename); if ($len < 2) { return $filename; } if ((strrpos($filename, '"', -$len) === 0 && strpos($filename, '"', $len - 1) === $len - 1) || (strrpos($filename, "'", -$len) === 0 && strpos($filename, "'", $len - 1) === $len - 1)) { return substr($filename, 1, $len - 2); } return $filename; } } Communication/ResponseBuilder.php 0000604 00000002157 15224610353 0013171 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class ResponseBuilder * * @package OnlinePayments\Sdk\Communication */ class ResponseBuilder { /** @var int */ private int $httpStatusCode = 0; /** @var array */ private array $headers = array(); /** @var string */ private string $body = ''; /** * @param int $httpStatusCode */ public function setHttpStatusCode(int $httpStatusCode): void { $this->httpStatusCode = $httpStatusCode; } /** * @param array $headers */ public function setHeaders(array $headers): void { $this->headers = $headers; } /** * @param string $data */ public function appendBody(string $data): void { $this->body .= $data; } /** * @param string $body */ public function setBody(string $body): void { $this->body = $body; } /** * @return ConnectionResponseInterface */ public function getResponse(): ConnectionResponse { return new ConnectionResponse($this->httpStatusCode, $this->headers, $this->body); } } Communication/Connection.php 0000604 00000003436 15224610353 0012164 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Logging\CommunicatorLogger; /** * Interface Connection * * @package OnlinePayments\Sdk\Communication */ interface Connection { /** * @param string $requestUri * @param string[] $requestHeaders * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function get(string $requestUri, array $requestHeaders, callable $responseHandler): void; /** * @param string $requestUri * @param string[] $requestHeaders * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function delete(string $requestUri, array $requestHeaders, callable $responseHandler): void; /** * @param string $requestUri * @param string[] $requestHeaders * @param string|MultipartFormDataObject $body * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function post(string $requestUri, array $requestHeaders, $body, callable $responseHandler): void; /** * @param string $requestUri * @param string[] $requestHeaders * @param string|MultipartFormDataObject $body * @param callable $responseHandler Callable accepting the response status code, a response body chunk and the response headers */ public function put(string $requestUri, array $requestHeaders, $body, callable $responseHandler): void; /** * @param CommunicatorLogger $communicatorLogger */ public function enableLogging(CommunicatorLogger $communicatorLogger): void; /** * */ public function disableLogging(): void; } Communication/CommunicatorLoggerHelper.php 0000604 00000010601 15224610353 0015015 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Logging\BodyObfuscator; use App\Libs\Sdk\Logging\CommunicatorLogger; use App\Libs\Sdk\Logging\HeaderObfuscator; use Exception; /** * Class CommunicatorLoggerHelper * * @package OnlinePayments\Sdk\Communication */ class CommunicatorLoggerHelper { /** @var HttpObfuscator|null */ private ?HttpObfuscator $httpObfuscator = null; /** * @param CommunicatorLogger $communicatorLogger * @param string $requestId * @param string $requestMethod * @param string $requestUri * @param array $requestHeaders * @param string $requestBody */ public function logRequest( CommunicatorLogger $communicatorLogger, string $requestId, string $requestMethod, string $requestUri, array $requestHeaders, string $requestBody = '' ): void { $communicatorLogger->log(sprintf( "Outgoing request to %s (requestId='%s')\n%s", $this->getEndpoint($requestUri), $requestId, $this->getHttpObfuscator()->getRawObfuscatedRequest( $requestMethod, $this->getRelativeUriPathWithRequestParameters($requestUri), $requestHeaders, $requestBody ) )); } /** * @param CommunicatorLogger $communicatorLogger * @param string $requestId * @param string $requestUri * @param ConnectionResponseInterface $response */ public function logResponse( CommunicatorLogger $communicatorLogger, string $requestId, string $requestUri, ConnectionResponseInterface $response ): void { $communicatorLogger->log(sprintf( "Incoming response from %s (requestId='%s')\n%s", $this->getEndpoint($requestUri), $requestId, $this->getHttpObfuscator()->getRawObfuscatedResponse($response) )); } /** * @param CommunicatorLogger $communicatorLogger * @param string $requestId * @param string $requestUri * @param Exception $exception */ public function logException( CommunicatorLogger $communicatorLogger, string $requestId, string $requestUri, Exception $exception ): void { $communicatorLogger->logException(sprintf( "Error occurred while executing request to %s (requestId='%s')", $this->getEndpoint($requestUri), $requestId ), $exception); } /** @return HttpObfuscator */ protected function getHttpObfuscator(): HttpObfuscator { if (is_null($this->httpObfuscator)) { $this->httpObfuscator = new HttpObfuscator(); } return $this->httpObfuscator; } /** * @param BodyObfuscator $bodyObfuscator */ public function setBodyObfuscator(BodyObfuscator $bodyObfuscator): void { $this->getHttpObfuscator()->setBodyObfuscator($bodyObfuscator); } /** * @param HeaderObfuscator $headerObfuscator */ public function setHeaderObfuscator(HeaderObfuscator $headerObfuscator): void { $this->getHttpObfuscator()->setHeaderObfuscator($headerObfuscator); } /** * @param string $requestUri * @return string */ public function getEndpoint(string $requestUri): string { $index = strpos($requestUri, '://'); if ($index !== false) { $index = strpos($requestUri, '/', $index + 3); // $index === false means there's no / after the host; there is no relative URI return $index !== false ? substr($requestUri, 0, $index) : $requestUri; } else { // not an absolute URI return ''; } } /** * @param string $requestUri * @return string */ public function getRelativeUriPathWithRequestParameters(string $requestUri): string { $index = strpos($requestUri, '://'); if ($index !== false) { $index = strpos($requestUri, '/', $index + 3); // $index === false means there's no / after the host; there is no relative URI return $index !== false ? substr($requestUri, $index) : ''; } else { // not an absolute URI return $requestUri; } } } Communication/ResponseFactory.php 0000604 00000005775 15224610353 0013223 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * Class ResponseFactory * * @package OnlinePayments\Sdk\Communication */ class ResponseFactory { const MIME_APPLICATION_JSON = 'application/json'; const MIME_APPLICATION_PROBLEM_JSON = 'application/problem+json'; /** * @param ConnectionResponseInterface $response * @param ResponseClassMap $responseClassMap * @return DataObject|null */ public function createResponse(ConnectionResponseInterface $response, ResponseClassMap $responseClassMap): ?DataObject { try { return $this->getResponseObject($response, $responseClassMap); } catch (UnexpectedValueException $e) { throw new InvalidResponseException($response, $e->getMessage()); } } /** * @param ConnectionResponseInterface $response * @param ResponseClassMap $responseClassMap * @return DataObject|null */ protected function getResponseObject(ConnectionResponseInterface $response, ResponseClassMap $responseClassMap): ?DataObject { $httpStatusCode = $response->getHttpStatusCode(); if (!$httpStatusCode) { throw new UnexpectedValueException('HTTP status code is missing'); } $contentType = $response->getHeaderValue('Content-Type'); if (!$contentType && $httpStatusCode !== 204) { throw new UnexpectedValueException('Content type is missing or empty'); } if (!$this->isJsonContentType($contentType) && $httpStatusCode !== 204) { throw new UnexpectedValueException( "Invalid content type; got '$contentType', expected '" . static::MIME_APPLICATION_JSON . "' or '" . static::MIME_APPLICATION_PROBLEM_JSON . "'" ); } $responseClassName = $responseClassMap->getResponseClassName($httpStatusCode); if (empty($responseClassName)) { if ($httpStatusCode < 400) { return null; } throw new UnexpectedValueException('No default error response class name defined'); } if (!class_exists($responseClassName)) { throw new UnexpectedValueException("class '$responseClassName' does not exist"); } $responseObject = new $responseClassName(); if (!$responseObject instanceof DataObject) { throw new UnexpectedValueException("class '$responseClassName' is not a 'DataObject'"); } return $responseObject->fromJson($response->getBody()); } private function isJsonContentType(string $contentType): bool { return $contentType === static::MIME_APPLICATION_JSON || $contentType === static::MIME_APPLICATION_PROBLEM_JSON || substr($contentType, 0, strlen(static::MIME_APPLICATION_JSON)) === static::MIME_APPLICATION_JSON || substr($contentType, 0, strlen(static::MIME_APPLICATION_PROBLEM_JSON)) === static::MIME_APPLICATION_PROBLEM_JSON; } } Communication/ResponseClassMap.php 0000604 00000002332 15224610353 0013301 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class ResponseClassMap * * @package OnlinePayments\Sdk\Communication */ class ResponseClassMap { /** @var string */ public string $defaultSuccessResponseClassName = ''; /** @var string */ public string $defaultErrorResponseClassName = ''; /** @var string[] */ private array $responseClassNamesByHttpStatusCode = array(); /** * @param int $httpStatusCode * @param string $responseClassName * @return $this */ public function addResponseClassName(int $httpStatusCode, string $responseClassName): ResponseClassMap { $this->responseClassNamesByHttpStatusCode[$httpStatusCode] = $responseClassName; return $this; } /** * @param int $httpStatusCode * @return string */ public function getResponseClassName(int $httpStatusCode): string { if (array_key_exists($httpStatusCode, $this->responseClassNamesByHttpStatusCode)) { return $this->responseClassNamesByHttpStatusCode[$httpStatusCode]; } if ($httpStatusCode < 400) { return $this->defaultSuccessResponseClassName; } return $this->defaultErrorResponseClassName; } } Communication/ErrorResponseException.php 0000604 00000002155 15224610353 0014551 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\Domain\DataObject; use RuntimeException; /** * Class ErrorResponseException * * @package OnlinePayments\Sdk\Communication */ class ErrorResponseException extends RuntimeException { /** @var int */ private int $httpStatusCode; /** * @var DataObject */ private DataObject $errorResponse; /** * @param int $httpStatusCode * @param DataObject $errorResponse * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $errorResponse, ?string $message = null) { if (is_null($message)) { $message = 'The server returned an error.'; } parent::__construct($message); $this->httpStatusCode = $httpStatusCode; $this->errorResponse = $errorResponse; } /** * @return int */ public function getHttpStatusCode(): int { return $this->httpStatusCode; } /** * @return DataObject */ public function getErrorResponse(): DataObject { return $this->errorResponse; } } Communication/RequestObject.php 0000604 00000000522 15224610353 0012635 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use Exception; /** * Class RequestObject * * @package OnlinePayments\Sdk\Communication */ abstract class RequestObject { public function __set($name, $value) { throw new Exception('Cannot add new property ' . $name . ' to instances of class ' . get_class($this)); } } Communication/MetadataProvider.php 0000604 00000003263 15224610353 0013316 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; use App\Libs\Sdk\CommunicatorConfiguration; use App\Libs\Sdk\Domain\ShoppingCartExtension; use stdClass; /** * Class MetadataProvider * * @package OnlinePayments\Sdk\Communication */ class MetadataProvider implements MetadataProviderInterface { const SDK_VERSION = '7.5.0'; /** @var string */ private string $integrator; /** @var ShoppingCartExtension|null */ private ?ShoppingCartExtension $shoppingCartExtension; /** * @param CommunicatorConfiguration $communicatorConfiguration */ public function __construct(CommunicatorConfiguration $communicatorConfiguration) { $this->integrator = $communicatorConfiguration->getIntegrator(); $this->shoppingCartExtension = $communicatorConfiguration->getShoppingCartExtension(); } /** * @return string */ public function getServerMetaInfoValue(): string { // use a stdClass instead of specific class to keep out null properties $serverMetaInfo = new stdClass(); $serverMetaInfo->platformIdentifier = sprintf('%s; php version %s', php_uname(), phpversion()); $serverMetaInfo->sdkIdentifier = 'PHPServerSDK/v' . static::SDK_VERSION; $serverMetaInfo->sdkCreator = 'OnlinePayments'; $serverMetaInfo->integrator = $this->integrator; if (!is_null($this->shoppingCartExtension)) { $serverMetaInfo->shoppingCartExtension = $this->shoppingCartExtension->toObject(); } // the sdkIdentifier contains a /. Without the JSON_UNESCAPED_SLASHES, this is turned to \/ in JSON. return base64_encode(json_encode($serverMetaInfo, JSON_UNESCAPED_SLASHES)); } } Communication/ResponseHeaderBuilder.php 0000604 00000002400 15224610353 0014271 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Class ResponseHeaderBuilder * * @package OnlinePayments\Sdk\Communication */ class ResponseHeaderBuilder { /** @var string */ private string $headerString = ''; /** @var array|null */ private ?array $headers = null; /** @var string|null */ private ?string $contentType = null; /** * @param string $data */ public function append(string $data): void { $this->headerString .= $data; $this->headers = null; } /** * @return array */ public function getHeaders(): array { if (is_null($this->headers)) { $this->headers = HttpHeaderHelper::parseRawHeaders(explode("\r\n", $this->headerString)); } return $this->headers; } /** * @return string|null */ public function getContentType(): ?string { if (is_null($this->contentType)) { $headers = $this->getHeaders(); foreach ($headers as $headerKey => $headerValue) { if (strtolower($headerKey) === 'content-type') { $this->contentType = $headerValue; break; } } } return $this->contentType; } } Communication/ConnectionResponseInterface.php 0000604 00000001032 15224610353 0015512 0 ustar 00 <?php namespace App\Libs\Sdk\Communication; /** * Interface ConnectionResponseInterface * * @package OnlinePayments\Sdk\Communication */ interface ConnectionResponseInterface { /** * @return int */ public function getHttpStatusCode(): int; /** * @return array */ public function getHeaders(): array; /** * @param string $name * @return mixed */ public function getHeaderValue(string $name); /** * @return string */ public function getBody(): string; } JSON/JSONUtil.php 0000604 00000001115 15224610353 0007430 0 ustar 00 <?php namespace App\Libs\Sdk\JSON; use stdClass; use UnexpectedValueException; /** * Class JSONUtil * * @package OnlinePayments\Sdk */ class JSONUtil { private function __construct() { } /** * @param string $value * @return stdClass * @throws UnexpectedValueException */ public static function decode(string $value): stdClass { $object = json_decode($value); if (json_last_error()) { throw new UnexpectedValueException('Invalid JSON value: ' . json_last_error_msg()); } return $object; } } Webhooks/WebhooksHelper.php 0000604 00000003701 15224610353 0011755 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; use App\Libs\Sdk\Communication\ConnectionResponse; use App\Libs\Sdk\Communication\ResponseClassMap; use App\Libs\Sdk\Communication\ResponseFactory; use App\Libs\Sdk\Domain\WebhooksEvent; /** * Class WebhooksHelper * * @package OnlinePayments\Sdk\Webhooks */ class WebhooksHelper { /** @var SignatureValidator */ private $signatureValidator; /** @var ResponseFactory|null */ private $responseFactory = null; /** * @param SecretKeyStore $secretKeyStore */ public function __construct(SecretKeyStore $secretKeyStore) { $this->signatureValidator = new SignatureValidator($secretKeyStore); } /** @return ResponseFactory */ protected function getResponseFactory() { if (is_null($this->responseFactory)) { $this->responseFactory = new ResponseFactory(); } return $this->responseFactory; } /** * Unmarshals the given input stream that contains the body, * while also validating its contents using the given request headers. * @param string $body * @param array $requestHeaders * @return WebhooksEvent * @throws SignatureValidationException * @throws ApiVersionMismatchException */ public function unmarshal($body, $requestHeaders) { $this->signatureValidator->validate($body, $requestHeaders); $response = new ConnectionResponse(200, array('Content-Type' => 'application/json'), $body); $responseClassMap = new ResponseClassMap(); $responseClassMap->addResponseClassName(200, WebhooksEvent::class); $event = $this->getResponseFactory()->createResponse($response, $responseClassMap); $this->validateApiVersion($event); return $event; } private function validateApiVersion($event) { if ('v1' !== $event->apiVersion) { throw new ApiVersionMismatchException($event->apiVersion, 'v1'); } } } Webhooks/InMemorySecretKeyStore.php 0000604 00000003345 15224610353 0013433 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; use UnexpectedValueException; /** * Class InMemorySecretKeyStore * * @package OnlinePayments\Sdk\Webhooks */ class InMemorySecretKeyStore implements SecretKeyStore { /** @var array<string, string> */ private $secretKeys; /** * @param array<string, string> $secretKeys */ public function __construct($secretKeys = array()) { $this->secretKeys = $secretKeys; } /** * @param string $keyId * @return string * @throws SecretKeyNotAvailableException */ public function getSecretKey($keyId) { if (!isset($this->secretKeys[$keyId]) || is_null($this->secretKeys[$keyId])) { throw new SecretKeyNotAvailableException($keyId, "could not find secret key for key id $keyId"); } return $this->secretKeys[$keyId]; } /** * Stores the given secret key for the given key id. * @param string $keyId * @param string $secretKey */ public function storeSecretKey($keyId, $secretKey) { if (is_null($keyId) || strlen(trim($keyId)) == 0) { throw new UnexpectedValueException("keyId is required"); } if (is_null($secretKey) || strlen(trim($secretKey)) == 0) { throw new UnexpectedValueException("secretKey is required"); } $this->secretKeys[$keyId] = $secretKey; } /** * Removes the secret key for the given key id. * @param string $keyId */ public function removeSecretKey($keyId) { unset($this->secretKeys[$keyId]); } /** * Removes all stored secret keys. */ public function clear() { unset($this->secretKeys); $this->secretKeys = array(); } } Webhooks/ApiVersionMismatchException.php 0000604 00000001720 15224610353 0014457 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; use RuntimeException; /** * Class ApiVersionMismatchException * * @package OnlinePayments\Sdk\Webhooks */ class ApiVersionMismatchException extends RuntimeException { /** @var string */ private $eventApiVersion; /** @var string */ private $sdkApiVersion; /** * @param string $eventApiVersion * @param string $sdkApiVersion */ public function __construct($eventApiVersion, $sdkApiVersion) { parent::__construct('event API version ' . $eventApiVersion . ' is not compatible with SDK API version ' . $sdkApiVersion); $this->eventApiVersion = $eventApiVersion; $this->sdkApiVersion = $sdkApiVersion; } /** * @return string */ public function getEventApiVersion() { return $this->eventApiVersion; } /** * @return string */ public function getSdkApiVersion() { return $this->sdkApiVersion; } } Webhooks/SignatureValidator.php 0000604 00000003275 15224610353 0012651 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; /** * Class SignatureValidator * * @package OnlinePayments\Sdk\Webhooks */ class SignatureValidator { /** @var SecretKeyStore */ private $secretKeyStore; /** * @param SecretKeyStore $secretKeyStore */ public function __construct(SecretKeyStore $secretKeyStore) { $this->secretKeyStore = $secretKeyStore; } /** * Validates the given body using the given request headers. * @param string $body * @param array $requestHeaders * @throws SignatureValidationException */ public function validate($body, $requestHeaders) { $this->validateBody($body, $requestHeaders); } // utility methods private function validateBody($body, $requestHeaders) { $signature = $this->getHeaderValue($requestHeaders, 'X-GCS-Signature'); $keyId = $this->getHeaderValue($requestHeaders, 'X-GCS-KeyId'); $secretKey = $this->secretKeyStore->getSecretKey($keyId); $expectedSignature = base64_encode(hash_hmac("sha256", $body, $secretKey, true)); $isValid = hash_equals($signature, $expectedSignature); if (!$isValid) { throw new SignatureValidationException("failed to validate signature '$signature'"); } } // general utility methods private function getHeaderValue($requestHeaders, $headerName) { $lowerCaseHeaderName = strtolower($headerName); foreach ($requestHeaders as $name => $value) { if ($lowerCaseHeaderName === strtolower($name)) { return $value; } } throw new SignatureValidationException("could not find header '$headerName'"); } } Webhooks/SecretKeyStore.php 0000604 00000000750 15224610353 0011750 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; /** * Class SecretKeyStore * A store of secret keys. Implementations could store secret keys in a database, on disk, etc. * * @package OnlinePayments\Sdk\Webhooks */ interface SecretKeyStore { /** * @param string $keyId * @return string The secret key for the given key id. * @throws SecretKeyNotAvailableException If the secret key for the given key id is not available. */ public function getSecretKey($keyId); } Webhooks/SecretKeyNotAvailableException.php 0000604 00000001232 15224610353 0015070 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; use Exception; /** * Class SecretKeyNotAvailableException * * @package OnlinePayments\Sdk\Webhooks */ class SecretKeyNotAvailableException extends SignatureValidationException { /** @var string */ private $keyId; /** * @param string $keyId * @param string|null $message * @param Exception|null $previous */ public function __construct($keyId, $message = null, $previous = null) { parent::__construct($message, $previous); $this->keyId = $keyId; } /** * @return string */ public function getKeyId() { return $this->keyId; } } Webhooks/SignatureValidationException.php 0000604 00000000705 15224610353 0014670 0 ustar 00 <?php namespace App\Libs\Sdk\Webhooks; use Exception; use RuntimeException; /** * Class SignatureValidationException * * @package OnlinePayments\Sdk\Webhooks */ class SignatureValidationException extends RuntimeException { /** * @param string|null $message * @param Exception|null $previous */ public function __construct($message = null, $previous = null) { parent::__construct($message, 0, $previous); } } CallContext.php 0000604 00000002750 15224610353 0007476 0 ustar 00 <?php namespace App\Libs\Sdk; use DateTime; /** * Class CallContext * * @package OnlinePayments\Sdk */ class CallContext { /** @var string */ private string $idempotenceKey = ''; /** @var string */ private string $idempotenceRequestTimestamp = ''; /** @var DateTime|null */ private ?DateTime $idempotenceResponseDateTime; /** * @return string */ public function getIdempotenceKey(): string { return $this->idempotenceKey; } /** * @param string $idempotenceKey */ public function setIdempotenceKey(string $idempotenceKey): void { $this->idempotenceKey = $idempotenceKey; } /** * @return string */ public function getIdempotenceRequestTimestamp(): string { return $this->idempotenceRequestTimestamp; } /** * @param string $idempotenceRequestTimestamp */ public function setIdempotenceRequestTimestamp(string $idempotenceRequestTimestamp): void { $this->idempotenceRequestTimestamp = $idempotenceRequestTimestamp; } /** * @return DateTime|null */ public function getIdempotenceResponseDateTime(): ?DateTime { return $this->idempotenceResponseDateTime; } /** * @param DateTime $idempotenceResponseDateTime */ public function setIdempotenceResponseDateTime(DateTime $idempotenceResponseDateTime): void { $this->idempotenceResponseDateTime = $idempotenceResponseDateTime; } } ApiResource.php 0000604 00000003430 15224610353 0007473 0 ustar 00 <?php namespace App\Libs\Sdk; /** * Class ApiResource * * @package OnlinePayments\Sdk */ class ApiResource { /** * @var ApiResource|null */ private ?ApiResource $parent; /** * @var array */ protected array $context = array(); /** * Creates a new proxy object for an API resource. * * @param ApiResource|null $parent The parent resource. * @param array $context An associative array that maps URI parameters to values. */ public function __construct(?ApiResource $parent = null, array $context = array()) { $this->parent = $parent; $this->context = $context; } /** * Returns the connection associated with this resource. * * @return CommunicatorInterface */ protected function getCommunicator(): CommunicatorInterface { return $this->parent->getCommunicator(); } /** * Returns the client headers with this resource. * * @return string */ protected function getClientMetaInfo(): string { return $this->parent->getClientMetaInfo(); } /** * Converts a URI template to a fully qualified URI by replacing * URI parameters ('{...}') by their corresponding value in * $this->context. * * @param string $template The URL template to instantiate. * @return string The URL in which the URI parameters have been replaced. */ protected function instantiateUri(string $template): string { // We assume that API URLs follow the recommendations in // RFC 1738, and therefore do not use unencoded { and }. foreach ($this->context as $name => $value) { $template = str_replace('{' . $name . '}', $value, $template); } return $template; } } BodyHandler.php 0000604 00000003217 15224610354 0007451 0 ustar 00 <?php namespace App\Libs\Sdk; /** * Class BodyHandler * A utility class that can be used to support binary responses. Its handleBodyPart method can be used as * callback to methods that require a body handler callable. * * @package OnlinePayments\Sdk */ class BodyHandler { /** @var bool */ private bool $initialized = false; /** * Initializes this body handler if not done yet, then calls doHandleBodyPart. * @param string $bodyPart * @param array $headers */ final public function handleBodyPart(string $bodyPart, array $headers): void { if (!$this->initialized) { $this->initialize($headers); $this->initialized = true; } $this->doHandleBodyPart($bodyPart); } /** * Calls doCleanup, then marks this body handler as not initialized. * Afterwards this instance can be reused again. */ final public function close(): void { $this->doCleanup(); $this->initialized = false; } /** * Can be used to initialize this body handler based on the given headers. * The default implementation does nothing. * @param array $headers */ protected function initialize(array $headers): void { } /** * Can be used to handle a single body part. * The default implementation does nothing. * @param string $bodyPart */ protected function doHandleBodyPart(string $bodyPart): void { } /** * Can be used to do cleanup resources allocated by this body handler. * The default implementation does nothing. */ protected function doCleanup(): void { } } Authentication/V1HmacAuthenticator.php 0000604 00000005561 15224610354 0014053 0 ustar 00 <?php namespace App\Libs\Sdk\Authentication; use App\Libs\Sdk\CommunicatorConfiguration; class V1HmacAuthenticator implements Authenticator { const AUTHORIZATION_ID = 'GCS'; const AUTHORIZATION_TYPE = 'v1HMAC'; const HASH_ALGORITHM = 'sha256'; /** * API Key ID obtained in the merchant portal. * * @var string */ private string $apiKeyId; /** * API Secret obtained in the merchant portal. * * @var string */ private string $apiSecret; /** * @param CommunicatorConfiguration $communicatorConfiguration */ public function __construct(CommunicatorConfiguration $communicatorConfiguration) { $this->apiKeyId = $communicatorConfiguration->getApiKeyId(); $this->apiSecret = $communicatorConfiguration->getApiSecret(); } /** * @inheritDoc */ public function getAuthorization(string $httpMethod, string $uriPath, array $requestHeaders = []): string { return $this->getAuthorizationHeaderValue($httpMethod, $uriPath, $requestHeaders); } /** * Generates authorization header value. * * @param string $httpMethod * @param string $uriPath * @param array $requestHeaders * * @return string */ private function getAuthorizationHeaderValue(string $httpMethod, string $uriPath, array $requestHeaders): string { return static::AUTHORIZATION_ID . ' ' . static::AUTHORIZATION_TYPE . ':' . $this->apiKeyId . ':' . base64_encode(hash_hmac(static::HASH_ALGORITHM, $this->prepareDataForSignature($httpMethod, $uriPath, $requestHeaders), $this->apiSecret, true)); } /** * Prepares data to be signed. * * @param string $httpMethod * @param string $uriPath * @param array $requestHeaders * * @return string */ private function prepareDataForSignature(string $httpMethod, string $uriPath, array $requestHeaders) : string { $signData = $httpMethod . "\n"; if (isset($requestHeaders['Content-Type'])) { $signData .= $requestHeaders['Content-Type'] . "\n"; } else { $signData .= "\n"; } if (isset($requestHeaders['Date'])) { $signData .= $requestHeaders['Date'] . "\n"; } else { $signData .= "\n"; } $gcsHeaders = array(); foreach ($requestHeaders as $headerKey => $headerValue) { if (preg_match('/X-GCS/i', $headerKey)) { $gcsHeaders[$headerKey] = $headerValue; } } ksort($gcsHeaders); foreach ($gcsHeaders as $gcsHeaderKey => $gcsHeaderValue) { $gcsEncodedHeaderValue = trim(preg_replace('/\r?\n[\h]*/', ' ', $gcsHeaderValue)); $signData .= strtolower($gcsHeaderKey) . ':' . $gcsEncodedHeaderValue . "\n"; } $signData .= $uriPath . "\n"; return $signData; } } Authentication/Authenticator.php 0000604 00000001035 15224610354 0013043 0 ustar 00 <?php namespace App\Libs\Sdk\Authentication; /** * Class Authenticator * * @package OnlinePayments\Sdk\Authentication */ interface Authenticator { /** * Returns properly formated authentication header(s). * * * @param string $httpMethod * @param string $uriPath * @param array<string, string> $requestHeaders * * @return string The full value for the Authorization header */ public function getAuthorization(string $httpMethod, string $uriPath, array $requestHeaders = []): string; } CommunicatorConfiguration.php 0000604 00000012044 15224610354 0012444 0 ustar 00 <?php namespace App\Libs\Sdk; use App\Libs\Sdk\Domain\ShoppingCartExtension; use UnexpectedValueException; /** * Class CommunicatorConfiguration * * @package OnlinePayments\Sdk */ class CommunicatorConfiguration { /** * @var string */ private $apiKeyId; /** * @var string */ private $apiSecret; /** * @var string */ private $apiEndpoint; /** * @var int */ private $connectTimeout; /** * @var int */ private $readTimeout; /** * @var ProxyConfiguration|null */ private $proxyConfiguration; /** * @var string */ private $integrator; /** * @var ShoppingCartExtension|null */ private $shoppingCartExtension = null; /** * @param string $apiKeyId * @param string $apiSecret * @param string $apiEndpoint * @param string $integrator * @param ProxyConfiguration|null $proxyConfiguration * @param int $connectTimeout * @param int $readTimeout */ public function __construct( $apiKeyId, $apiSecret, $apiEndpoint, $integrator, ?ProxyConfiguration $proxyConfiguration = null, $connectTimeout = -1, $readTimeout = -1) { $apiEndpoint = rtrim($apiEndpoint, '/'); $this->validateApiEndpoint($apiEndpoint); $this->validateIntegrator($integrator); $this->apiKeyId = $apiKeyId; $this->apiSecret = $apiSecret; $this->apiEndpoint = $apiEndpoint; $this->integrator = $integrator; $this->proxyConfiguration = $proxyConfiguration; $this->connectTimeout = $connectTimeout; $this->readTimeout = $readTimeout; } private function validateApiEndpoint($apiEndpoint) { $url = parse_url($apiEndpoint); if ($url === false) { throw new UnexpectedValueException('apiEndpoint is not a valid URL'); } elseif (isset($url['path']) && $url['path'] !== '') { throw new UnexpectedValueException('apiEndpoint should not contain a path'); } elseif (isset($url['user']) || isset($url['query']) || isset($url['fragment'])) { throw new UnexpectedValueException('apiEndpoint should not contain user info, query or fragment'); } } private function validateIntegrator($integrator) { if (is_null($integrator) || strlen(trim($integrator)) == 0) { throw new UnexpectedValueException("integrator is required"); } } /** * @return string An API key used for authorization. */ public function getApiKeyId() { return $this->apiKeyId; } /** * @param string $apiKeyId */ public function setApiKeyId($apiKeyId) { $this->apiKeyId = $apiKeyId; } /** * @return string A API key secret used for authorization. */ public function getApiSecret() { return $this->apiSecret; } /** * @param string $apiSecret */ public function setApiSecret($apiSecret) { $this->apiSecret = $apiSecret; } /** * @return string */ public function getApiEndpoint() { return $this->apiEndpoint; } /** * @param string $apiEndpoint */ public function setApiEndpoint($apiEndpoint) { $this->validateApiEndpoint($apiEndpoint); $this->apiEndpoint = $apiEndpoint; } /** * @return ProxyConfiguration|null */ public function getProxyConfiguration() { return $this->proxyConfiguration; } /** * @param ProxyConfiguration|null $proxyConfiguration */ public function setProxyConfiguration(?ProxyConfiguration $proxyConfiguration = null) { $this->proxyConfiguration = $proxyConfiguration; } /** * @return int */ public function getConnectTimeout() { return $this->connectTimeout; } /** * @param int $connectTimeout */ public function setConnectTimeout($connectTimeout) { $this->connectTimeout = $connectTimeout; } /** * @return int */ public function getReadTimeout() { return $this->readTimeout; } /** * @param int $readTimeout */ public function setReadTimeout($readTimeout) { $this->readTimeout = $readTimeout; } /** * @return string */ public function getIntegrator() { return $this->integrator; } /** * @param string $integrator */ public function setIntegrator($integrator) { $this->validateIntegrator($integrator); $this->integrator = $integrator; } /** * @return ShoppingCartExtension|null */ public function getShoppingCartExtension() { return $this->shoppingCartExtension; } /** * @param ShoppingCartExtension|null $shoppingCartExtension */ public function setShoppingCartExtension(?ShoppingCartExtension $shoppingCartExtension = null) { $this->shoppingCartExtension = $shoppingCartExtension; } } ProxyConfiguration.php 0000604 00000002556 15224610354 0011134 0 ustar 00 <?php namespace App\Libs\Sdk; /** * Class ProxyConfiguration * * @package OnlinePayments\Sdk */ class ProxyConfiguration { /** * @var string|null */ private ?string $host = null; /** * @var string|int|null */ private $port = null; /** * @var string|null */ private ?string $username = null; /** * @var string|null */ private ?string $password = null; /** * @param string $host * @param string|int|null $port * @param string|null $username * @param string|null $password */ public function __construct(string $host, $port = null, ?string $username = null, ?string $password = null) { if ($host) { $this->host = $host; $this->port = $port; $this->username = $username; $this->password = $password; } } /** * @return string */ public function getCurlProxy(): string { if (!is_null($this->host)) { return $this->host . (is_null($this->port) ? '' : ':'. $this->port); } return ''; } /** * @return string */ public function getCurlProxyUserPwd(): string { if (!is_null($this->username)) { return $this->username . (is_null($this->password) ? '' : ':'. $this->password); } return ''; } } Domain/ShoppingCartExtension.php 0000604 00000004134 15224610354 0012762 0 ustar 00 <?php namespace App\Libs\Sdk\Domain; use UnexpectedValueException; /** * Class ShoppingCartExtension * * @package OnlinePayments\Sdk\Domain */ class ShoppingCartExtension extends DataObject { /** * @var string|null */ public ?string $creator = null; /** * @var string|null */ public ?string $name = null; /** * @var string|null */ public ?string $version = null; /** * @var string|null */ public ?string $extensionId = null; /** * @param string $creator * @param string $name * @param string $version * @param string|null $extensionId */ public function __construct(string $creator, string $name, string $version, ?string $extensionId = null) { $this->creator = $creator; $this->name = $name; $this->version = $version; $this->extensionId = $extensionId; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->creator)) { $object->creator = $this->creator; } if (!is_null($this->name)) { $object->name = $this->name; } if (!is_null($this->version)) { $object->version = $this->version; } if (!is_null($this->extensionId)) { $object->extensionId = $this->extensionId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ShoppingCartExtension { parent::fromObject($object); if (property_exists($object, 'creator')) { $this->creator = $object->creator; } if (property_exists($object, 'name')) { $this->name = $object->name; } if (property_exists($object, 'version')) { $this->version = $object->version; } if (property_exists($object, 'extensionId')) { $this->extensionId = $object->extensionId; } return $this; } } Domain/UploadableFile.php 0000604 00000004450 15224610354 0011335 0 ustar 00 <?php namespace App\Libs\Sdk\Domain; use UnexpectedValueException; /** * Class UploadableFile * * @package OnlinePayments\Sdk\Domain */ class UploadableFile { /** @var string */ private string $fileName; /** @var resource|string|callable */ private $content; /** @var string */ private string $contentType; /** @var int */ private int $contentLength; /** * @param string $fileName * @param resource|string|callable $content * If it's a callable it should take a length argument and return a string that is not larger than the input. * @param string $contentType * @param int $contentLength */ public function __construct(string $fileName, $content, string $contentType, int $contentLength = -1) { if (strlen(trim($fileName)) == 0) { throw new UnexpectedValueException("fileName is required"); } if (!is_resource($content) && !is_string($content) && !is_callable($content)) { throw new UnexpectedValueException('content is required as resource, string or callable'); } if (strlen(trim($contentType)) == 0) { throw new UnexpectedValueException("contentType is required"); } $this->fileName = $fileName; $this->content = $content; $this->contentType = $contentType; $this->contentLength = max($contentLength, -1); if ($this->contentLength == -1 && is_string($content)) { $this->contentLength = strlen($content); } } /** * @return string The name of the file. */ public function getFileName(): string { return $this->fileName; } /** * @return resource|string|callable A resource, string or callable with the file's content. * If it's a callable it should take a length argument and return a string that is not larger than the input. */ public function getContent() { return $this->content; } /** * @return string The file's content type. */ public function getContentType(): string { return $this->contentType; } /** * @return int The file's content length, or -1 if not known. */ public function getContentLength(): int { return $this->contentLength; } } Domain/WebhooksEvent.php 0000604 00000014055 15224610354 0011252 0 ustar 00 <?php namespace App\Libs\Sdk\Domain; use App\Libs\OnlinePayments\Sdk\Domain\PaymentLinkResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\PayoutResponse; use App\Libs\OnlinePayments\Sdk\Domain\RefundResponse; use App\Libs\OnlinePayments\Sdk\Domain\TokenResponse; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Webhooks */ class WebhooksEvent extends DataObject { /** * @var string */ public $apiVersion = null; /** * @var string */ public $created = null; /** * @var string */ public $id = null; /** * @var string */ public $merchantId = null; /** * @var string */ public $type = null; /** * @var PaymentLinkResponse */ public $paymentLink = null; /** * @var PaymentResponse */ public $payment = null; /** * @var PayoutResponse */ public $payout = null; /** * @var RefundResponse */ public $refund = null; /** * @var TokenResponse */ public $token = null; /** * @return PaymentLinkResponse */ public function getPaymentLink() { return $this->paymentLink; } /** * @param PaymentLinkResponse $paymentLink */ public function setPaymentLink($paymentLink) { $this->paymentLink = $paymentLink; } /** * @return PaymentResponse */ public function getPayment() { return $this->payment; } /** * @param PaymentResponse $payment */ public function setPayment($payment) { $this->payment = $payment; } /** * @return PayoutResponse */ public function getPayout() { return $this->payout; } /** * @param PayoutResponse $payout */ public function setPayout($payout) { $this->payout = $payout; } /** * @return RefundResponse */ public function getRefund() { return $this->refund; } /** * @param RefundResponse $refund */ public function setRefund($refund) { $this->refund = $refund; } /** * @return TokenResponse */ public function getToken() { return $this->token; } /** * @param TokenResponse $token */ public function setToken($token) { $this->token = $token; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->apiVersion)) { $object->apiVersion = $this->apiVersion; } if (!is_null($this->created)) { $object->created = $this->created; } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->merchantId)) { $object->merchantId = $this->merchantId; } if (!is_null($this->type)) { $object->type = $this->type; } if (!is_null($this->paymentLink)) { $object->paymentLink = $this->paymentLink->toObject(); } if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } if (!is_null($this->payout)) { $object->payout = $this->payout->toObject(); } if (!is_null($this->refund)) { $object->refund = $this->refund->toObject(); } if (!is_null($this->token)) { $object->token = $this->token->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DataObject { parent::fromObject($object); if (property_exists($object, 'apiVersion')) { $this->apiVersion = $object->apiVersion; } if (property_exists($object, 'created')) { $this->created = $object->created; } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'merchantId')) { $this->merchantId = $object->merchantId; } if (property_exists($object, 'type')) { $this->type = $object->type; } if (property_exists($object, 'paymentLink')) { if (!is_object($object->paymentLink)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentLink, true) . '\' is not an object'); } $value = new PaymentLinkResponse(); $this->paymentLink = $value->fromObject($object->paymentLink); } if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } if (property_exists($object, 'payout')) { if (!is_object($object->payout)) { throw new UnexpectedValueException('value \'' . print_r($object->payout, true) . '\' is not an object'); } $value = new PayoutResponse(); $this->payout = $value->fromObject($object->payout); } if (property_exists($object, 'refund')) { if (!is_object($object->refund)) { throw new UnexpectedValueException('value \'' . print_r($object->refund, true) . '\' is not an object'); } $value = new RefundResponse(); $this->refund = $value->fromObject($object->refund); } if (property_exists($object, 'token')) { if (!is_object($object->token)) { throw new UnexpectedValueException('value \'' . print_r($object->token, true) . '\' is not an object'); } $value = new TokenResponse(); $this->token = $value->fromObject($object->token); } return $this; } } Domain/DataObject.php 0000604 00000002340 15224610354 0010461 0 ustar 00 <?php namespace App\Libs\Sdk\Domain; use App\Libs\Sdk\JSON\JSONUtil; use Exception; use stdClass; use UnexpectedValueException; /** * Class DataObject * * @package OnlinePayments\Sdk\Domain */ abstract class DataObject { /** * @return string */ public function toJson(): string { return json_encode($this->toObject()); } /** * @param string $value * @return $this * @throws UnexpectedValueException */ public function fromJson(string $value): DataObject { $object = JSONUtil::decode($value); return $this->fromObject($object); } /** * @return object */ public function toObject(): object { return new stdClass(); } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DataObject { if (!is_object($object)) { throw new UnexpectedValueException('Expected object, got ' . gettype($object)); } return $this; } public function __set($name, $value) { throw new Exception('Cannot add new property ' . $name . ' to instances of class ' . get_class($this)); } } Communicator.php 0000604 00000062154 15224610354 0007723 0 ustar 00 <?php namespace App\Libs\Sdk; use App\Libs\Sdk\Authentication\Authenticator; use App\Libs\Sdk\Communication\Connection; use App\Libs\Sdk\Communication\ConnectionResponseInterface; use App\Libs\Sdk\Communication\DefaultConnection; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\MetadataProvider; use App\Libs\Sdk\Communication\MetadataProviderInterface; use App\Libs\Sdk\Communication\MultipartDataObject; use App\Libs\Sdk\Communication\MultipartFormDataObject; use App\Libs\Sdk\Communication\RequestObject; use App\Libs\Sdk\Communication\ResponseBuilder; use App\Libs\Sdk\Communication\ResponseClassMap; use App\Libs\Sdk\Communication\ResponseFactory; use App\Libs\Sdk\Domain\DataObject; use App\Libs\Sdk\Logging\CommunicatorLogger; use DateTime; use Exception; use UnexpectedValueException; /** * Class Communicator * * @package OnlinePayments\Sdk */ class Communicator implements CommunicatorInterface { const MIME_APPLICATION_JSON = 'application/json'; /** @var string */ private string $apiEndpoint; /** @var Authenticator */ private Authenticator$authenticator; /** @var Connection */ private Connection $connection; /** @var MetadataProvider */ private MetadataProvider $metadataProvider; /** @var ResponseFactory|null */ private ?ResponseFactory $responseFactory = null; /** * @param CommunicatorConfiguration $communicatorConfiguration * @param Authenticator $authenticator * @param Connection|null $connection * @param MetadataProviderInterface|null $metadataProvider */ public function __construct( CommunicatorConfiguration $communicatorConfiguration, Authenticator $authenticator, ?Connection $connection = null, ?MetadataProviderInterface $metadataProvider = null ) { $this->apiEndpoint = $communicatorConfiguration->getApiEndpoint(); $this->authenticator = $authenticator; $this->connection = $connection ?? new DefaultConnection($communicatorConfiguration); $this->metadataProvider = $metadataProvider ?? new MetadataProvider($communicatorConfiguration); } /** * @param CommunicatorLogger $communicatorLogger */ public function enableLogging(CommunicatorLogger $communicatorLogger): void { $this->connection->enableLogging($communicatorLogger); } /** * */ public function disableLogging(): void { $this->connection->disableLogging(); } /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function get( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); $requestHeaders = $this->getRequestHeaders('GET', $relativeUriPathWithRequestParameters, null, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); $responseBuilder->appendBody($data); }; $this->connection->get( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { throw new ErrorResponseException($httpStatusCode, $response); } return $response; } /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function getWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); $requestHeaders = $this->getRequestHeaders('GET', $relativeUriPathWithRequestParameters, null, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder, $bodyHandler) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); if ($httpStatusCode >= 400) { $responseBuilder->appendBody($data); } else { call_user_func($bodyHandler, $data, $headers); } }; $this->connection->get( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); throw new ErrorResponseException($httpStatusCode, $response); } } /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function delete( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); $requestHeaders = $this->getRequestHeaders('DELETE', $relativeUriPathWithRequestParameters, null, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); $responseBuilder->appendBody($data); }; $this->connection->delete( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { throw new ErrorResponseException($httpStatusCode, $response); } return $response; } /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function deleteWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); $requestHeaders = $this->getRequestHeaders('DELETE', $relativeUriPathWithRequestParameters, null, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder, $bodyHandler) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); if ($httpStatusCode >= 400) { $responseBuilder->appendBody($data); } else { call_user_func($bodyHandler, $data, $headers); } }; $this->connection->delete( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); throw new ErrorResponseException($httpStatusCode, $response); } } /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function post( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); if ($requestBodyObject instanceof MultipartFormDataObject) { $contentType = $requestBodyObject->getContentType(); $requestBody = $requestBodyObject; } elseif ($requestBodyObject instanceof MultipartDataObject) { $multipart = $requestBodyObject->toMultipartFormDataObject(); $contentType = $multipart->getContentType(); $requestBody = $multipart; } elseif ($requestBodyObject instanceof DataObject || is_null($requestBodyObject)) { $contentType = static::MIME_APPLICATION_JSON; $requestBody = $requestBodyObject ? $requestBodyObject->toJson() : ''; } else { throw new UnexpectedValueException('Unsupported request body'); } $requestHeaders = $this->getRequestHeaders('POST', $relativeUriPathWithRequestParameters, $contentType, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); $responseBuilder->appendBody($data); }; $this->connection->post( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $requestBody, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { throw new ErrorResponseException($httpStatusCode, $response); } return $response; } /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function postWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); if ($requestBodyObject instanceof MultipartFormDataObject) { $contentType = $requestBodyObject->getContentType(); $requestBody = $requestBodyObject; } elseif ($requestBodyObject instanceof MultipartDataObject) { $multipart = $requestBodyObject->toMultipartFormDataObject(); $contentType = $multipart->getContentType(); $requestBody = $multipart; } elseif ($requestBodyObject instanceof DataObject || is_null($requestBodyObject)) { $contentType = static::MIME_APPLICATION_JSON; $requestBody = $requestBodyObject ? $requestBodyObject->toJson() : ''; } else { throw new UnexpectedValueException('Unsupported request body'); } $requestHeaders = $this->getRequestHeaders('POST', $relativeUriPathWithRequestParameters, $contentType, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder, $bodyHandler) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); if ($httpStatusCode >= 400) { $responseBuilder->appendBody($data); } else { call_user_func($bodyHandler, $data, $headers); } }; $this->connection->post( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $requestBody, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); throw new ErrorResponseException($httpStatusCode, $response); } } /** * @param ResponseClassMap $responseClassMap * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @return DataObject * @throws Exception */ public function put( ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): ?DataObject { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); if ($requestBodyObject instanceof MultipartFormDataObject) { $contentType = $requestBodyObject->getContentType(); $requestBody = $requestBodyObject; } elseif ($requestBodyObject instanceof MultipartDataObject) { $multipart = $requestBodyObject->toMultipartFormDataObject(); $contentType = $multipart->getContentType(); $requestBody = $multipart; } elseif ($requestBodyObject instanceof DataObject || is_null($requestBodyObject)) { $contentType = static::MIME_APPLICATION_JSON; $requestBody = $requestBodyObject ? $requestBodyObject->toJson() : ''; } else { throw new UnexpectedValueException('Unsupported request body'); } $requestHeaders = $this->getRequestHeaders('PUT', $relativeUriPathWithRequestParameters, $contentType, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); $responseBuilder->appendBody($data); }; $this->connection->put( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $requestBody, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { throw new ErrorResponseException($httpStatusCode, $response); } return $response; } /** * @param callable $bodyHandler Callable accepting a response body chunk and the response headers * @param ResponseClassMap $responseClassMap Used for error handling * @param string $relativeUriPath * @param string $clientMetaInfo * @param DataObject|MultipartDataObject|MultipartFormDataObject|null $requestBodyObject * @param RequestObject|null $requestParameters * @param CallContext|null $callContext * @throws Exception */ public function putWithBinaryResponse( callable $bodyHandler, ResponseClassMap $responseClassMap, string $relativeUriPath, string $clientMetaInfo = '', $requestBodyObject = null, ?RequestObject $requestParameters = null, ?CallContext $callContext = null ): void { $relativeUriPathWithRequestParameters = $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); if ($requestBodyObject instanceof MultipartFormDataObject) { $contentType = $requestBodyObject->getContentType(); $requestBody = $requestBodyObject; } elseif ($requestBodyObject instanceof MultipartDataObject) { $multipart = $requestBodyObject->toMultipartFormDataObject(); $contentType = $multipart->getContentType(); $requestBody = $multipart; } elseif ($requestBodyObject instanceof DataObject || is_null($requestBodyObject)) { $contentType = static::MIME_APPLICATION_JSON; $requestBody = $requestBodyObject ? $requestBodyObject->toJson() : ''; } else { throw new UnexpectedValueException('Unsupported request body'); } $requestHeaders = $this->getRequestHeaders('PUT', $relativeUriPathWithRequestParameters, $contentType, $clientMetaInfo, $callContext); $responseBuilder = new ResponseBuilder(); $responseHandler = function ($httpStatusCode, $data, $headers) use ($responseBuilder, $bodyHandler) { $responseBuilder->setHttpStatusCode($httpStatusCode); $responseBuilder->setHeaders($headers); if ($httpStatusCode >= 400) { $responseBuilder->appendBody($data); } else { call_user_func($bodyHandler, $data, $headers); } }; $this->connection->put( $this->apiEndpoint . $relativeUriPathWithRequestParameters, $requestHeaders, $requestBody, $responseHandler ); $connectionResponse = $responseBuilder->getResponse(); $this->updateCallContext($connectionResponse, $callContext); $httpStatusCode = $connectionResponse->getHttpStatusCode(); if ($httpStatusCode >= 400) { $response = $this->getResponseFactory()->createResponse($connectionResponse, $responseClassMap); throw new ErrorResponseException($httpStatusCode, $response); } } /** * @param ConnectionResponseInterface $response * @param CallContext|null $callContext */ protected function updateCallContext(ConnectionResponseInterface $response, ?CallContext $callContext = null): void { if ($callContext) { $callContext->setIdempotenceRequestTimestamp( $response->getHeaderValue('X-GCS-Idempotence-Request-Timestamp') ); $callContext->setIdempotenceResponseDateTime( new DateTime($response->getHeaderValue('IdempotencyResponseDatetime')) ); } } /** * @param $relativeUriPath * @param RequestObject|null $requestParameters * @return string * @throws Exception */ protected function getRequestUri(string $relativeUriPath, ?RequestObject $requestParameters = null): string { return $this->apiEndpoint . $this->getRelativeUriPathWithRequestParameters($relativeUriPath, $requestParameters); } /** * @param string $httpMethod * @param string $relativeUriPathWithRequestParameters * @param string|null $contentType * @param string $clientMetaInfo * @param CallContext|null $callContext * @return string[] */ protected function getRequestHeaders( string $httpMethod, string $relativeUriPathWithRequestParameters, ?string $contentType = null, string $clientMetaInfo = '', ?CallContext $callContext = null ): array { $rfc2616Date = self::getRfc161Date(); $requestHeaders = array(); if (!empty($contentType)) { $requestHeaders['Content-Type'] = $contentType; } $requestHeaders['Date'] = $rfc2616Date; if ($clientMetaInfo) { $requestHeaders['X-GCS-ClientMetaInfo'] = $clientMetaInfo; } $requestHeaders['X-GCS-ServerMetaInfo'] = $this->metadataProvider->getServerMetaInfoValue(); if ($callContext && strlen($callContext->getIdempotenceKey()) > 0) { $requestHeaders['X-GCS-Idempotence-Key'] = $callContext->getIdempotenceKey(); } $requestHeaders['Authorization'] = $this->authenticator->getAuthorization($httpMethod, $relativeUriPathWithRequestParameters, $requestHeaders); return $requestHeaders; } /** * @return string */ protected static function getRfc161Date(): string { return gmdate('D, d M Y H:i:s T'); } /** * @param string $relativeUriPath * @param RequestObject|null $requestParameters * @return string */ protected function getRelativeUriPathWithRequestParameters( string $relativeUriPath, ?RequestObject $requestParameters = null ): string { if (is_null($requestParameters)) { return $relativeUriPath; } $requestParameterObjectVars = method_exists($requestParameters, 'toArray') ? $requestParameters->toArray() : get_object_vars($requestParameters); if (count($requestParameterObjectVars) == 0) { return $relativeUriPath; } $httpQuery = http_build_query($requestParameterObjectVars); // remove [0], [1] etc. that are added if properties are arrays $httpQuery = preg_replace('/%5B[0-9]+%5D/simU', '', $httpQuery); return $relativeUriPath . '?' . $httpQuery; } /** @return ResponseFactory */ protected function getResponseFactory(): ResponseFactory { if (is_null($this->responseFactory)) { $this->responseFactory = new ResponseFactory(); } return $this->responseFactory; } } Logging/ValueObfuscator.php 0000604 00000003643 15224610354 0011753 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; /** * Class ValueObfuscator * * @package OnlinePayments\Sdk\Logging */ class ValueObfuscator { /** */ const MASK_CHARACTER = '*'; /** * @param string $value * @param int $numberOfCharactersToKeep * @return string */ public function obfuscateAllKeepEnd(string $value, int $numberOfCharactersToKeep): string { if ($numberOfCharactersToKeep <= 0) { return $this->obfuscateAll($value); } if (mb_strlen($value, 'UTF-8') <= $numberOfCharactersToKeep) { return $value; } return str_repeat(static::MASK_CHARACTER, mb_strlen($value, 'UTF-8') - $numberOfCharactersToKeep) . mb_substr($value, mb_strlen($value, 'UTF-8') - $numberOfCharactersToKeep, null, 'UTF-8') ; } /** * @param string $value * @param int $numberOfCharactersToKeep * @return string */ public function obfuscateAllKeepStart(string $value, int $numberOfCharactersToKeep): string { if ($numberOfCharactersToKeep <= 0) { return $this->obfuscateAll($value); } if (mb_strlen($value, 'UTF-8') <= $numberOfCharactersToKeep) { return $value; } return mb_substr($value, 0, $numberOfCharactersToKeep, 'UTF-8') . str_repeat(static::MASK_CHARACTER, mb_strlen($value, 'UTF-8') - $numberOfCharactersToKeep) ; } /** * @param string $value * @return string */ public function obfuscateAll(string $value): string { return str_repeat(static::MASK_CHARACTER, mb_strlen($value, 'UTF-8')); } /** * @param int $length * @return string */ public function obfuscateFixedLength(int $length): string { if ($length <= 0) { return ''; } return str_repeat(static::MASK_CHARACTER, $length); } } Logging/ResourceLogger.php 0000604 00000002073 15224610354 0011572 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; use Exception; use UnexpectedValueException; /** * Class ResourceLogger * * @package OnlinePayments\Sdk\Logging */ class ResourceLogger implements CommunicatorLogger { /** */ const DATE_FORMAT_STRING = DATE_ATOM; /** @var resource */ protected $resource; /** @param resource $resource */ public function __construct($resource) { if (!is_resource($resource)) { throw new UnexpectedValueException('resource expected'); } $this->resource = $resource; } /** @inheritdoc */ public function log(string $message): void { fwrite($this->resource, $this->getDatePrefix() . $message . PHP_EOL); } /** @inheritdoc */ public function logException(string $message, Exception $exception): void { fwrite($this->resource, $this->getDatePrefix() . $message . PHP_EOL . $exception . PHP_EOL); } /** @return string */ protected function getDatePrefix(): string { return date(static::DATE_FORMAT_STRING) . ' '; } } Logging/BodyObfuscator.php 0000604 00000012670 15224610354 0011574 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; use UnexpectedValueException; /** * Class BodyObfuscator * * @package OnlinePayments\Sdk\Logging */ class BodyObfuscator { const MIME_APPLICATION_JSON = 'application/json'; const MIME_APPLICATION_PROBLEM_JSON = 'application/problem+json'; /** @var ValueObfuscator */ protected ValueObfuscator $valueObfuscator; /** @var array<string, callable> */ private array $customRules = array(); public function __construct() { $this->valueObfuscator = new ValueObfuscator(); } /** * @param string $contentType * @param string $body * @return string */ public function obfuscateBody(string $contentType, string $body): string { if (!$this->isJsonContentType($contentType)) { return $body; } $decodedJsonBody = json_decode($body); if (json_last_error() !== JSON_ERROR_NONE) { return $body; } return json_encode($this->obfuscateDecodedJsonPart($decodedJsonBody), JSON_PRETTY_PRINT); } private function isJsonContentType(string $contentType): bool { return $contentType === static::MIME_APPLICATION_JSON || $contentType === static::MIME_APPLICATION_PROBLEM_JSON || substr($contentType, 0, strlen(static::MIME_APPLICATION_JSON)) === static::MIME_APPLICATION_JSON || substr($contentType, 0, strlen(static::MIME_APPLICATION_PROBLEM_JSON)) === static::MIME_APPLICATION_PROBLEM_JSON; } /** * @param mixed $value * @return mixed */ protected function obfuscateDecodedJsonPart($value) { if (is_object($value)) { foreach ($value as $propertyName => $propertyValue) { if (is_scalar($propertyValue)) { $value->$propertyName = $this->obfuscateScalarValue($propertyName, $propertyValue); } else { $value->$propertyName = $this->obfuscateDecodedJsonPart($propertyValue); } } } if (is_array($value)) { foreach ($value as $elementKey => &$elementValue) { if (is_scalar($elementValue)) { $elementValue = $this->obfuscateScalarValue($elementKey, $elementValue); } else { $elementValue = $this->obfuscateDecodedJsonPart($elementValue); } } } return $value; } /** * @param string $key * @param scalar $value * @return string */ protected function obfuscateScalarValue(string $key, $value): string { if (!is_scalar($value)) { throw new UnexpectedValueException('scalar value expected'); } $lowerKey = mb_strtolower($key, 'UTF-8'); if (isset($this->customRules[$lowerKey])) { return call_user_func($this->customRules[$lowerKey], $value, $this->valueObfuscator); } switch ($lowerKey) { case 'additionalinfo': return $this->valueObfuscator->obfuscateAll($value); case 'cardholdername': return $this->valueObfuscator->obfuscateAll($value); case 'dateofbirth': return $this->valueObfuscator->obfuscateAll($value); case 'emailaddress': return $this->valueObfuscator->obfuscateAll($value); case 'faxnumber': return $this->valueObfuscator->obfuscateAll($value); case 'firstname': return $this->valueObfuscator->obfuscateAll($value); case 'housenumber': return $this->valueObfuscator->obfuscateAll($value); case 'mobilephonenumber': return $this->valueObfuscator->obfuscateAll($value); case 'passengername': return $this->valueObfuscator->obfuscateAll($value); case 'phonenumber': return $this->valueObfuscator->obfuscateAll($value); case 'street': return $this->valueObfuscator->obfuscateAll($value); case 'workphonenumber': return $this->valueObfuscator->obfuscateAll($value); case 'zip': return $this->valueObfuscator->obfuscateAll($value); case 'keyid': case 'secretkey': case 'publickey': case 'userauthenticationtoken': case 'encryptedpayload': case 'decryptedpayload': case 'encryptedcustomerinput': return $this->valueObfuscator->obfuscateFixedLength(8); case 'cvv': case 'value': return $this->valueObfuscator->obfuscateAll($value); case 'bin': return $this->valueObfuscator->obfuscateAllKeepStart($value, 6); case 'accountnumber': case 'cardnumber': case 'iban': case 'reformattedaccountnumber': return $this->valueObfuscator->obfuscateAllKeepEnd($value, 4); case 'expirydate': return $this->valueObfuscator->obfuscateAllKeepEnd($value, 2); default: return $value; } } /** * @param string $propertyName * @param callable $customRule */ public function setCustomRule(string $propertyName, callable $customRule): void { $lowerName = mb_strtolower($propertyName, 'UTF-8'); $this->customRules[$lowerName] = $customRule; } } Logging/SplFileObjectLogger.php 0000604 00000002224 15224610354 0012466 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; use Exception; use SplFileObject; /** * Class SplFileObjectLogger * * @package OnlinePayments\Sdk\Logging */ class SplFileObjectLogger implements CommunicatorLogger { /** */ const DATE_FORMAT_STRING = DATE_ATOM; /** @var SplFileObject */ private SplFileObject $splFileObject; /** @param SplFileObject $splFileObject */ public function __construct(SplFileObject $splFileObject) { $this->splFileObject = $splFileObject; } /** @return SplFileObject */ public function getSplFileObject(): SplFileObject { return $this->splFileObject; } /** @inheritdoc */ public function log(string $message): void { $this->splFileObject->fwrite($this->getDatePrefix() . $message . PHP_EOL); } /** @inheritdoc */ public function logException(string $message, Exception $exception): void { $this->splFileObject->fwrite($this->getDatePrefix() . $message . PHP_EOL . $exception . PHP_EOL); } /** @return string */ protected function getDatePrefix(): string { return date(static::DATE_FORMAT_STRING) . ' '; } } Logging/CommunicatorLogger.php 0000604 00000000645 15224610354 0012446 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; use Exception; /** * Class CommunicatorLogger * * @package OnlinePayments\Sdk\Logging */ interface CommunicatorLogger { /** * @param string $message */ public function log(string $message): void; /** * @param string $message * @param Exception $exception */ public function logException(string $message, Exception $exception): void; } Logging/HeaderObfuscator.php 0000604 00000005654 15224610354 0012073 0 ustar 00 <?php namespace App\Libs\Sdk\Logging; /** * Class HeaderObfuscator * * @package OnlinePayments\Sdk\Logging */ class HeaderObfuscator { /** @var ValueObfuscator */ protected ValueObfuscator $valueObfuscator; /** @var array<string, callable> */ private array $customRules = array(); public function __construct() { $this->valueObfuscator = new ValueObfuscator(); } /** * @param string[] $headers * @return string[] */ public function obfuscateHeaders(array $headers): array { foreach ($headers as $headerName => &$headerValue) { $headerValue = $this->obfuscateHeaderValue($headerName, $headerValue); } return $headers; } /** * @param string $key * @param array|string $value * @return array|string */ protected function obfuscateHeaderValue(string $key, $value) { $lowerKey = mb_strtolower($key, 'UTF-8'); if (isset($this->customRules[$lowerKey])) { return $this->replaceHeaderValueWithCustomRule($value, $this->customRules[$lowerKey]); } switch ($lowerKey) { case 'x-gcs-authentication-token': return $this->valueObfuscator->obfuscateFixedLength(8); case 'x-gcs-callerpassword': return $this->valueObfuscator->obfuscateFixedLength(8); case 'authorization': case 'www-authenticate': case 'proxy-authenticate': case 'proxy-authorization': return $this->replaceHeaderValueWithFixedNumberOfCharacters($value, 8); default: return $value; } } /** * @param array|string $value * @param int $numberOfCharacters * @return array|string */ protected function replaceHeaderValueWithFixedNumberOfCharacters($value, int $numberOfCharacters) { if (is_array($value)) { return array_fill(0, count($value), $this->valueObfuscator->obfuscateFixedLength($numberOfCharacters)); } else { return $this->valueObfuscator->obfuscateFixedLength($numberOfCharacters); } } /** * @param array|string $value * @param callable $customRule * @return array|string */ protected function replaceHeaderValueWithCustomRule($value, callable $customRule) { if (is_array($value)) { return array_map(function ($v) use ($customRule) { return call_user_func($customRule, $v, $this->valueObfuscator); }, $value); } else { return call_user_func($customRule, $value, $this->valueObfuscator); } } /** * @param string $headerName * @param callable $customRule */ public function setCustomRule(string $headerName, callable $customRule): void { $lowerName = mb_strtolower($headerName, 'UTF-8'); $this->customRules[$lowerName] = $customRule; } } ClientInterface.php 0000644 00000001515 15224675305 0010327 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Merchant\MerchantClientInterface; use App\Libs\Sdk\Logging\CommunicatorLogger; /** * Payment platform client interface. */ interface ClientInterface { /** * @param CommunicatorLogger $communicatorLogger */ function enableLogging(CommunicatorLogger $communicatorLogger): void; /** * @return void */ function disableLogging(): void; /** * @param string $clientMetaInfo * @return $this */ function setClientMetaInfo(string $clientMetaInfo): ClientInterface; /** * Resource /v2/{merchantId} * * @param string $merchantId * @return MerchantClientInterface */ function merchant(string $merchantId): MerchantClientInterface; } ExceptionFactory.php 0000644 00000006655 15224675305 0010570 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Domain\APIError; use App\Libs\OnlinePayments\Sdk\Domain\PaymentErrorResponse; use App\Libs\OnlinePayments\Sdk\Domain\PayoutErrorResponse; use App\Libs\OnlinePayments\Sdk\Domain\RefundErrorResponse; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Domain\DataObject; /** * Class ExceptionFactory * * @package OnlinePayments\Sdk */ class ExceptionFactory { const IDEMPOTENCE_ERROR_CODE = '1409'; /** * @param int $httpStatusCode * @param DataObject $errorObject * @param CallContext|null $callContext * @return ResponseException */ public function createException( int $httpStatusCode, DataObject $errorObject, ?CallContext $callContext = null ): ResponseException { if ($errorObject instanceof PaymentErrorResponse && !is_null($errorObject->paymentResult)) { return new DeclinedPaymentException($httpStatusCode, $errorObject); } if ($errorObject instanceof PayoutErrorResponse && !is_null($errorObject->payoutResult)) { return new DeclinedPayoutException($httpStatusCode, $errorObject); } if ($errorObject instanceof RefundErrorResponse && !is_null($errorObject->refundResult)) { return new DeclinedRefundException($httpStatusCode, $errorObject); } if ($httpStatusCode === 400) { return new ValidationException($httpStatusCode, $errorObject); } if ($httpStatusCode === 403) { return new AuthorizationException($httpStatusCode, $errorObject); } if ($httpStatusCode === 404) { return new ReferenceException($httpStatusCode, $errorObject); } if ($httpStatusCode === 409) { if ($callContext && strlen($callContext->getIdempotenceKey()) > 0 && $this->isIdempotenceError($errorObject) ) { return new IdempotenceException( $httpStatusCode, $errorObject, null, $callContext->getIdempotenceKey(), $callContext->getIdempotenceRequestTimestamp() ); } return new ReferenceException($httpStatusCode, $errorObject); } if ($httpStatusCode === 410) { return new ReferenceException($httpStatusCode, $errorObject); } if ($httpStatusCode === 500) { return new PlatformException($httpStatusCode, $errorObject); } if ($httpStatusCode === 502) { return new PlatformException($httpStatusCode, $errorObject); } if ($httpStatusCode === 503) { return new PlatformException($httpStatusCode, $errorObject); } return new ApiException($httpStatusCode, $errorObject); } /** * @param DataObject $errorObject * @return bool */ protected function isIdempotenceError(DataObject $errorObject): bool { $errorObjectVariables = get_object_vars($errorObject); if (!array_key_exists('errors', $errorObjectVariables)) { return false; } $errors = $errorObjectVariables['errors']; return is_array($errors) && count($errors) === 1 && $errors[0] instanceof APIError && $errors[0]->errorCode == static::IDEMPOTENCE_ERROR_CODE; } } IdempotenceException.php 0000644 00000002676 15224675305 0011414 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class IdempotenceException * * @package OnlinePayments\Sdk */ class IdempotenceException extends ResponseException { /** @var string */ private string $idempotenceKey; /** @var string */ private string $idempotenceRequestTimestamp; /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message * @param string $idempotenceKey * @param string $idempotenceRequestTimestamp; */ public function __construct( int $httpStatusCode, DataObject $response, ?string $message = null, string $idempotenceKey = '', string $idempotenceRequestTimestamp = '' ) { if ($message == null) { $message = 'the payment platform returned a duplicate request error response'; } parent::__construct($httpStatusCode, $response, $message); $this->idempotenceKey = $idempotenceKey; $this->idempotenceRequestTimestamp = $idempotenceRequestTimestamp; } /** * @return string */ public function getIdempotenceKey(): string { return $this->idempotenceKey; } /** * @return string */ public function getIdempotenceRequestTimestamp(): string { return $this->idempotenceRequestTimestamp; } } DeclinedPayoutException.php 0000644 00000003216 15224675305 0012060 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Domain\PayoutErrorResponse; use App\Libs\OnlinePayments\Sdk\Domain\PayoutResult; use App\Libs\Sdk\Domain\DataObject; /** * Class DeclinedPayoutException * * @package OnlinePayments\Sdk */ class DeclinedPayoutException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = DeclinedPayoutException::buildMessage($response); } parent::__construct($httpStatusCode, $response, $message); } private static function buildMessage(DataObject $response): string { if ($response instanceof PayoutErrorResponse && $response->payoutResult != null) { $payoutResult = $response->payoutResult; return "declined payout '$payoutResult->id' with status '$payoutResult->status'"; } return 'the payment platform returned a declined payout response'; } /** * @return PayoutResult */ public function getPayoutResult() { $responseVariables = get_object_vars($this->getResponse()); if (!array_key_exists('payoutResult', $responseVariables)) { return new PayoutResult(); } $payoutResult = $responseVariables['payoutResult']; if (!($payoutResult instanceof PayoutResult)) { return new PayoutResult(); } return $payoutResult; } } ValidationException.php 0000644 00000001265 15224675305 0011243 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class ValidationException * * @package OnlinePayments\Sdk */ class ValidationException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned an incorrect request error response'; } parent::__construct($httpStatusCode, $response, $message); } } ReferenceException.php 0000644 00000001252 15224675305 0011043 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class ReferenceException * * @package OnlinePayments\Sdk */ class ReferenceException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned a reference error response'; } parent::__construct($httpStatusCode, $response, $message); } } ResponseException.php 0000644 00000004710 15224675305 0010745 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Domain\APIError; use App\Libs\Sdk\Domain\DataObject; use RuntimeException; /** * Class ResponseException * * @package OnlinePayments\Sdk */ class ResponseException extends RuntimeException { /** @var int */ private int $httpStatusCode; /** * @var DataObject */ private DataObject $response; /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned an error response'; } parent::__construct($message); $this->httpStatusCode = $httpStatusCode; $this->response = $response; } public function __toString(): string { return sprintf( "exception '%s' with message '%s'. in %s:%d\nHTTP status code: %s\nResponse:\n%s\nStack trace:\n%s", __CLASS__, $this->getMessage(), $this->getFile(), $this->getLine(), $this->getHttpStatusCode(), json_encode($this->getResponse(), JSON_PRETTY_PRINT), $this->getTraceAsString() ); } /** * @return int */ public function getHttpStatusCode(): int { return $this->httpStatusCode; } /** * @return DataObject */ public function getResponse(): DataObject { return $this->response; } /** * @return string */ public function getErrorId(): string { $responseVariables = get_object_vars($this->getResponse()); if (!array_key_exists('errorId', $responseVariables)) { return ''; } return $responseVariables['errorId'] ?? ''; } /** * @return APIError[] */ public function getErrors(): array { $responseVariables = get_object_vars($this->getResponse()); if (!array_key_exists('errors', $responseVariables)) { return array(); } $errors = $responseVariables['errors']; if (!is_array($errors)) { return array(); } foreach ($errors as $e) { if (!($e instanceof APIError)) { return array(); } } return $errors; } } ApiException.php 0000644 00000001225 15224675305 0007656 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class ApiException * * @package OnlinePayments\Sdk */ class ApiException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned an error response'; } parent::__construct($httpStatusCode, $response, $message); } } DeclinedPaymentException.php 0000644 00000003371 15224675305 0012216 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentErrorResponse; use App\Libs\Sdk\Domain\DataObject; /** * Class DeclinedPaymentException * * @package OnlinePayments\Sdk */ class DeclinedPaymentException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = DeclinedPaymentException::buildMessage($response); } parent::__construct($httpStatusCode, $response, $message); } private static function buildMessage(DataObject $response): string { if ($response instanceof PaymentErrorResponse && $response->paymentResult != null && $response->paymentResult->payment != null) { $payment = $response->paymentResult->payment; return "declined payment '$payment->id' with status '$payment->status'"; } return 'the payment platform returned a declined payment response'; } /** * @return CreatePaymentResponse */ public function getCreatePaymentResponse() { $responseVariables = get_object_vars($this->getResponse()); if (!array_key_exists('paymentResult', $responseVariables)) { return new CreatePaymentResponse(); } $paymentResult = $responseVariables['paymentResult']; if (!($paymentResult instanceof CreatePaymentResponse)) { return new CreatePaymentResponse(); } return $paymentResult; } } PlatformException.php 0000644 00000001232 15224675305 0010727 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class PlatformException * * @package OnlinePayments\Sdk */ class PlatformException extends ApiException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned an error response'; } parent::__construct($httpStatusCode, $response, $message); } } AuthorizationException.php 0000644 00000001267 15224675305 0012013 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\Sdk\Domain\DataObject; /** * Class AuthorizationException * * @package OnlinePayments\Sdk */ class AuthorizationException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = 'the payment platform returned an authorization error response'; } parent::__construct($httpStatusCode, $response, $message); } } Domain/PaymentProduct.php 0000644 00000030275 15224675305 0011462 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct extends DataObject { /** * @var AccountOnFile[]|null */ public ?array $accountsOnFile = null; /** * @var bool|null */ public ?bool $allowsAuthentication = null; /** * @var bool|null */ public ?bool $allowsRecurring = null; /** * @var bool|null */ public ?bool $allowsTokenization = null; /** * @var PaymentProductDisplayHints|null */ public ?PaymentProductDisplayHints $displayHints = null; /** * @var PaymentProductDisplayHints[]|null */ public ?array $displayHintsList = null; /** * @var PaymentProductField[]|null */ public ?array $fields = null; /** * @var int|null */ public ?int $id = null; /** * @var string|null */ public ?string $paymentMethod = null; /** * @var PaymentProduct302SpecificData|null */ public ?PaymentProduct302SpecificData $paymentProduct302SpecificData = null; /** * @var PaymentProduct320SpecificData|null */ public ?PaymentProduct320SpecificData $paymentProduct320SpecificData = null; /** * @var string|null */ public ?string $paymentProductGroup = null; /** * @var bool|null */ public ?bool $usesRedirectionTo3rdParty = null; /** * @return AccountOnFile[]|null */ public function getAccountsOnFile(): ?array { return $this->accountsOnFile; } /** * @param AccountOnFile[]|null $value */ public function setAccountsOnFile(?array $value): void { $this->accountsOnFile = $value; } /** * @return bool|null */ public function getAllowsAuthentication(): ?bool { return $this->allowsAuthentication; } /** * @param bool|null $value */ public function setAllowsAuthentication(?bool $value): void { $this->allowsAuthentication = $value; } /** * @return bool|null */ public function getAllowsRecurring(): ?bool { return $this->allowsRecurring; } /** * @param bool|null $value */ public function setAllowsRecurring(?bool $value): void { $this->allowsRecurring = $value; } /** * @return bool|null */ public function getAllowsTokenization(): ?bool { return $this->allowsTokenization; } /** * @param bool|null $value */ public function setAllowsTokenization(?bool $value): void { $this->allowsTokenization = $value; } /** * @return PaymentProductDisplayHints|null */ public function getDisplayHints(): ?PaymentProductDisplayHints { return $this->displayHints; } /** * @param PaymentProductDisplayHints|null $value */ public function setDisplayHints(?PaymentProductDisplayHints $value): void { $this->displayHints = $value; } /** * @return PaymentProductDisplayHints[]|null */ public function getDisplayHintsList(): ?array { return $this->displayHintsList; } /** * @param PaymentProductDisplayHints[]|null $value */ public function setDisplayHintsList(?array $value): void { $this->displayHintsList = $value; } /** * @return PaymentProductField[]|null */ public function getFields(): ?array { return $this->fields; } /** * @param PaymentProductField[]|null $value */ public function setFields(?array $value): void { $this->fields = $value; } /** * @return int|null */ public function getId(): ?int { return $this->id; } /** * @param int|null $value */ public function setId(?int $value): void { $this->id = $value; } /** * @return string|null */ public function getPaymentMethod(): ?string { return $this->paymentMethod; } /** * @param string|null $value */ public function setPaymentMethod(?string $value): void { $this->paymentMethod = $value; } /** * @return PaymentProduct302SpecificData|null */ public function getPaymentProduct302SpecificData(): ?PaymentProduct302SpecificData { return $this->paymentProduct302SpecificData; } /** * @param PaymentProduct302SpecificData|null $value */ public function setPaymentProduct302SpecificData(?PaymentProduct302SpecificData $value): void { $this->paymentProduct302SpecificData = $value; } /** * @return PaymentProduct320SpecificData|null */ public function getPaymentProduct320SpecificData(): ?PaymentProduct320SpecificData { return $this->paymentProduct320SpecificData; } /** * @param PaymentProduct320SpecificData|null $value */ public function setPaymentProduct320SpecificData(?PaymentProduct320SpecificData $value): void { $this->paymentProduct320SpecificData = $value; } /** * @return string|null */ public function getPaymentProductGroup(): ?string { return $this->paymentProductGroup; } /** * @param string|null $value */ public function setPaymentProductGroup(?string $value): void { $this->paymentProductGroup = $value; } /** * @return bool|null */ public function getUsesRedirectionTo3rdParty(): ?bool { return $this->usesRedirectionTo3rdParty; } /** * @param bool|null $value */ public function setUsesRedirectionTo3rdParty(?bool $value): void { $this->usesRedirectionTo3rdParty = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountsOnFile)) { $object->accountsOnFile = []; foreach ($this->accountsOnFile as $element) { if (!is_null($element)) { $object->accountsOnFile[] = $element->toObject(); } } } if (!is_null($this->allowsAuthentication)) { $object->allowsAuthentication = $this->allowsAuthentication; } if (!is_null($this->allowsRecurring)) { $object->allowsRecurring = $this->allowsRecurring; } if (!is_null($this->allowsTokenization)) { $object->allowsTokenization = $this->allowsTokenization; } if (!is_null($this->displayHints)) { $object->displayHints = $this->displayHints->toObject(); } if (!is_null($this->displayHintsList)) { $object->displayHintsList = []; foreach ($this->displayHintsList as $element) { if (!is_null($element)) { $object->displayHintsList[] = $element->toObject(); } } } if (!is_null($this->fields)) { $object->fields = []; foreach ($this->fields as $element) { if (!is_null($element)) { $object->fields[] = $element->toObject(); } } } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->paymentMethod)) { $object->paymentMethod = $this->paymentMethod; } if (!is_null($this->paymentProduct302SpecificData)) { $object->paymentProduct302SpecificData = $this->paymentProduct302SpecificData->toObject(); } if (!is_null($this->paymentProduct320SpecificData)) { $object->paymentProduct320SpecificData = $this->paymentProduct320SpecificData->toObject(); } if (!is_null($this->paymentProductGroup)) { $object->paymentProductGroup = $this->paymentProductGroup; } if (!is_null($this->usesRedirectionTo3rdParty)) { $object->usesRedirectionTo3rdParty = $this->usesRedirectionTo3rdParty; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct { parent::fromObject($object); if (property_exists($object, 'accountsOnFile')) { if (!is_array($object->accountsOnFile) && !is_object($object->accountsOnFile)) { throw new UnexpectedValueException('value \'' . print_r($object->accountsOnFile, true) . '\' is not an array or object'); } $this->accountsOnFile = []; foreach ($object->accountsOnFile as $element) { $value = new AccountOnFile(); $this->accountsOnFile[] = $value->fromObject($element); } } if (property_exists($object, 'allowsAuthentication')) { $this->allowsAuthentication = $object->allowsAuthentication; } if (property_exists($object, 'allowsRecurring')) { $this->allowsRecurring = $object->allowsRecurring; } if (property_exists($object, 'allowsTokenization')) { $this->allowsTokenization = $object->allowsTokenization; } if (property_exists($object, 'displayHints')) { if (!is_object($object->displayHints)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object'); } $value = new PaymentProductDisplayHints(); $this->displayHints = $value->fromObject($object->displayHints); } if (property_exists($object, 'displayHintsList')) { if (!is_array($object->displayHintsList) && !is_object($object->displayHintsList)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHintsList, true) . '\' is not an array or object'); } $this->displayHintsList = []; foreach ($object->displayHintsList as $element) { $value = new PaymentProductDisplayHints(); $this->displayHintsList[] = $value->fromObject($element); } } if (property_exists($object, 'fields')) { if (!is_array($object->fields) && !is_object($object->fields)) { throw new UnexpectedValueException('value \'' . print_r($object->fields, true) . '\' is not an array or object'); } $this->fields = []; foreach ($object->fields as $element) { $value = new PaymentProductField(); $this->fields[] = $value->fromObject($element); } } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'paymentMethod')) { $this->paymentMethod = $object->paymentMethod; } if (property_exists($object, 'paymentProduct302SpecificData')) { if (!is_object($object->paymentProduct302SpecificData)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct302SpecificData, true) . '\' is not an object'); } $value = new PaymentProduct302SpecificData(); $this->paymentProduct302SpecificData = $value->fromObject($object->paymentProduct302SpecificData); } if (property_exists($object, 'paymentProduct320SpecificData')) { if (!is_object($object->paymentProduct320SpecificData)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct320SpecificData, true) . '\' is not an object'); } $value = new PaymentProduct320SpecificData(); $this->paymentProduct320SpecificData = $value->fromObject($object->paymentProduct320SpecificData); } if (property_exists($object, 'paymentProductGroup')) { $this->paymentProductGroup = $object->paymentProductGroup; } if (property_exists($object, 'usesRedirectionTo3rdParty')) { $this->usesRedirectionTo3rdParty = $object->usesRedirectionTo3rdParty; } return $this; } } Domain/RefundRedirectMethodSpecificOutput.php 0000644 00000003711 15224675305 0015434 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundRedirectMethodSpecificOutput extends DataObject { /** * @var int|null */ public ?int $totalAmountPaid = null; /** * @var int|null */ public ?int $totalAmountRefunded = null; /** * @return int|null */ public function getTotalAmountPaid(): ?int { return $this->totalAmountPaid; } /** * @param int|null $value */ public function setTotalAmountPaid(?int $value): void { $this->totalAmountPaid = $value; } /** * @return int|null */ public function getTotalAmountRefunded(): ?int { return $this->totalAmountRefunded; } /** * @param int|null $value */ public function setTotalAmountRefunded(?int $value): void { $this->totalAmountRefunded = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->totalAmountPaid)) { $object->totalAmountPaid = $this->totalAmountPaid; } if (!is_null($this->totalAmountRefunded)) { $object->totalAmountRefunded = $this->totalAmountRefunded; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundRedirectMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'totalAmountPaid')) { $this->totalAmountPaid = $object->totalAmountPaid; } if (property_exists($object, 'totalAmountRefunded')) { $this->totalAmountRefunded = $object->totalAmountRefunded; } return $this; } } Domain/PersonalNameToken.php 0000644 00000003405 15224675305 0012064 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PersonalNameToken extends DataObject { /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $surname = null; /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->surname)) { $object->surname = $this->surname; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PersonalNameToken { parent::fromObject($object); if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } return $this; } } Domain/ReattemptInstructions.php 0000644 00000005462 15224675305 0013076 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ReattemptInstructions extends DataObject { /** * @var ReattemptInstructionsConditions|null */ public ?ReattemptInstructionsConditions $conditions = null; /** * @var int|null */ public ?int $frozenPeriod = null; /** * @var string|null */ public ?string $indicator = null; /** * @return ReattemptInstructionsConditions|null */ public function getConditions(): ?ReattemptInstructionsConditions { return $this->conditions; } /** * @param ReattemptInstructionsConditions|null $value */ public function setConditions(?ReattemptInstructionsConditions $value): void { $this->conditions = $value; } /** * @return int|null */ public function getFrozenPeriod(): ?int { return $this->frozenPeriod; } /** * @param int|null $value */ public function setFrozenPeriod(?int $value): void { $this->frozenPeriod = $value; } /** * @return string|null */ public function getIndicator(): ?string { return $this->indicator; } /** * @param string|null $value */ public function setIndicator(?string $value): void { $this->indicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->conditions)) { $object->conditions = $this->conditions->toObject(); } if (!is_null($this->frozenPeriod)) { $object->frozenPeriod = $this->frozenPeriod; } if (!is_null($this->indicator)) { $object->indicator = $this->indicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ReattemptInstructions { parent::fromObject($object); if (property_exists($object, 'conditions')) { if (!is_object($object->conditions)) { throw new UnexpectedValueException('value \'' . print_r($object->conditions, true) . '\' is not an object'); } $value = new ReattemptInstructionsConditions(); $this->conditions = $value->fromObject($object->conditions); } if (property_exists($object, 'frozenPeriod')) { $this->frozenPeriod = $object->frozenPeriod; } if (property_exists($object, 'indicator')) { $this->indicator = $object->indicator; } return $this; } } Domain/CreateMandateResponse.php 0000644 00000004760 15224675305 0012720 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateMandateResponse extends DataObject { /** * @var MandateResponse|null */ public ?MandateResponse $mandate = null; /** * @var MandateMerchantAction|null */ public ?MandateMerchantAction $merchantAction = null; /** * @return MandateResponse|null */ public function getMandate(): ?MandateResponse { return $this->mandate; } /** * @param MandateResponse|null $value */ public function setMandate(?MandateResponse $value): void { $this->mandate = $value; } /** * @return MandateMerchantAction|null */ public function getMerchantAction(): ?MandateMerchantAction { return $this->merchantAction; } /** * @param MandateMerchantAction|null $value */ public function setMerchantAction(?MandateMerchantAction $value): void { $this->merchantAction = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->mandate)) { $object->mandate = $this->mandate->toObject(); } if (!is_null($this->merchantAction)) { $object->merchantAction = $this->merchantAction->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateMandateResponse { parent::fromObject($object); if (property_exists($object, 'mandate')) { if (!is_object($object->mandate)) { throw new UnexpectedValueException('value \'' . print_r($object->mandate, true) . '\' is not an object'); } $value = new MandateResponse(); $this->mandate = $value->fromObject($object->mandate); } if (property_exists($object, 'merchantAction')) { if (!is_object($object->merchantAction)) { throw new UnexpectedValueException('value \'' . print_r($object->merchantAction, true) . '\' is not an object'); } $value = new MandateMerchantAction(); $this->merchantAction = $value->fromObject($object->merchantAction); } return $this; } } Domain/MandatePersonalInformation.php 0000644 00000004032 15224675305 0013757 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandatePersonalInformation extends DataObject { /** * @var MandatePersonalName|null */ public ?MandatePersonalName $name = null; /** * @var string|null */ public ?string $title = null; /** * @return MandatePersonalName|null */ public function getName(): ?MandatePersonalName { return $this->name; } /** * @param MandatePersonalName|null $value */ public function setName(?MandatePersonalName $value): void { $this->name = $value; } /** * @return string|null */ public function getTitle(): ?string { return $this->title; } /** * @param string|null $value */ public function setTitle(?string $value): void { $this->title = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->name)) { $object->name = $this->name->toObject(); } if (!is_null($this->title)) { $object->title = $this->title; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandatePersonalInformation { parent::fromObject($object); if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); } $value = new MandatePersonalName(); $this->name = $value->fromObject($object->name); } if (property_exists($object, 'title')) { $this->title = $object->title; } return $this; } } Domain/ShowFormData.php 0000644 00000015375 15224675305 0011046 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ShowFormData extends DataObject { /** * @var PaymentProduct3012|null */ public ?PaymentProduct3012 $paymentProduct3012 = null; /** * @var PaymentProduct350|null */ public ?PaymentProduct350 $paymentProduct350 = null; /** * @var PaymentProduct5001|null */ public ?PaymentProduct5001 $paymentProduct5001 = null; /** * @var PaymentProduct5404|null */ public ?PaymentProduct5404 $paymentProduct5404 = null; /** * @var PaymentProduct5407|null */ public ?PaymentProduct5407 $paymentProduct5407 = null; /** * @var PendingAuthentication|null */ public ?PendingAuthentication $pendingAuthentication = null; /** * @return PaymentProduct3012|null */ public function getPaymentProduct3012(): ?PaymentProduct3012 { return $this->paymentProduct3012; } /** * @param PaymentProduct3012|null $value */ public function setPaymentProduct3012(?PaymentProduct3012 $value): void { $this->paymentProduct3012 = $value; } /** * @return PaymentProduct350|null */ public function getPaymentProduct350(): ?PaymentProduct350 { return $this->paymentProduct350; } /** * @param PaymentProduct350|null $value */ public function setPaymentProduct350(?PaymentProduct350 $value): void { $this->paymentProduct350 = $value; } /** * @return PaymentProduct5001|null */ public function getPaymentProduct5001(): ?PaymentProduct5001 { return $this->paymentProduct5001; } /** * @param PaymentProduct5001|null $value */ public function setPaymentProduct5001(?PaymentProduct5001 $value): void { $this->paymentProduct5001 = $value; } /** * @return PaymentProduct5404|null */ public function getPaymentProduct5404(): ?PaymentProduct5404 { return $this->paymentProduct5404; } /** * @param PaymentProduct5404|null $value */ public function setPaymentProduct5404(?PaymentProduct5404 $value): void { $this->paymentProduct5404 = $value; } /** * @return PaymentProduct5407|null */ public function getPaymentProduct5407(): ?PaymentProduct5407 { return $this->paymentProduct5407; } /** * @param PaymentProduct5407|null $value */ public function setPaymentProduct5407(?PaymentProduct5407 $value): void { $this->paymentProduct5407 = $value; } /** * @return PendingAuthentication|null */ public function getPendingAuthentication(): ?PendingAuthentication { return $this->pendingAuthentication; } /** * @param PendingAuthentication|null $value */ public function setPendingAuthentication(?PendingAuthentication $value): void { $this->pendingAuthentication = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProduct3012)) { $object->paymentProduct3012 = $this->paymentProduct3012->toObject(); } if (!is_null($this->paymentProduct350)) { $object->paymentProduct350 = $this->paymentProduct350->toObject(); } if (!is_null($this->paymentProduct5001)) { $object->paymentProduct5001 = $this->paymentProduct5001->toObject(); } if (!is_null($this->paymentProduct5404)) { $object->paymentProduct5404 = $this->paymentProduct5404->toObject(); } if (!is_null($this->paymentProduct5407)) { $object->paymentProduct5407 = $this->paymentProduct5407->toObject(); } if (!is_null($this->pendingAuthentication)) { $object->pendingAuthentication = $this->pendingAuthentication->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ShowFormData { parent::fromObject($object); if (property_exists($object, 'paymentProduct3012')) { if (!is_object($object->paymentProduct3012)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3012, true) . '\' is not an object'); } $value = new PaymentProduct3012(); $this->paymentProduct3012 = $value->fromObject($object->paymentProduct3012); } if (property_exists($object, 'paymentProduct350')) { if (!is_object($object->paymentProduct350)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct350, true) . '\' is not an object'); } $value = new PaymentProduct350(); $this->paymentProduct350 = $value->fromObject($object->paymentProduct350); } if (property_exists($object, 'paymentProduct5001')) { if (!is_object($object->paymentProduct5001)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5001, true) . '\' is not an object'); } $value = new PaymentProduct5001(); $this->paymentProduct5001 = $value->fromObject($object->paymentProduct5001); } if (property_exists($object, 'paymentProduct5404')) { if (!is_object($object->paymentProduct5404)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5404, true) . '\' is not an object'); } $value = new PaymentProduct5404(); $this->paymentProduct5404 = $value->fromObject($object->paymentProduct5404); } if (property_exists($object, 'paymentProduct5407')) { if (!is_object($object->paymentProduct5407)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5407, true) . '\' is not an object'); } $value = new PaymentProduct5407(); $this->paymentProduct5407 = $value->fromObject($object->paymentProduct5407); } if (property_exists($object, 'pendingAuthentication')) { if (!is_object($object->pendingAuthentication)) { throw new UnexpectedValueException('value \'' . print_r($object->pendingAuthentication, true) . '\' is not an object'); } $value = new PendingAuthentication(); $this->pendingAuthentication = $value->fromObject($object->pendingAuthentication); } return $this; } } Domain/CaptureOutput.php 0000644 00000032122 15224675305 0011321 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CaptureOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $acquiredAmount = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var int|null * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public ?int $amountPaid = null; /** * @var CardPaymentMethodSpecificOutput|null */ public ?CardPaymentMethodSpecificOutput $cardPaymentMethodSpecificOutput = null; /** * @var string|null */ public ?string $merchantParameters = null; /** * @var MobilePaymentMethodSpecificOutput|null */ public ?MobilePaymentMethodSpecificOutput $mobilePaymentMethodSpecificOutput = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @var string|null */ public ?string $paymentMethod = null; /** * @var RedirectPaymentMethodSpecificOutput|null */ public ?RedirectPaymentMethodSpecificOutput $redirectPaymentMethodSpecificOutput = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @var SepaDirectDebitPaymentMethodSpecificOutput|null */ public ?SepaDirectDebitPaymentMethodSpecificOutput $sepaDirectDebitPaymentMethodSpecificOutput = null; /** * @var SurchargeSpecificOutput|null */ public ?SurchargeSpecificOutput $surchargeSpecificOutput = null; /** * @return AmountOfMoney|null */ public function getAcquiredAmount(): ?AmountOfMoney { return $this->acquiredAmount; } /** * @param AmountOfMoney|null $value */ public function setAcquiredAmount(?AmountOfMoney $value): void { $this->acquiredAmount = $value; } /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return int|null * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public function getAmountPaid(): ?int { return $this->amountPaid; } /** * @param int|null $value * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public function setAmountPaid(?int $value): void { $this->amountPaid = $value; } /** * @return CardPaymentMethodSpecificOutput|null */ public function getCardPaymentMethodSpecificOutput(): ?CardPaymentMethodSpecificOutput { return $this->cardPaymentMethodSpecificOutput; } /** * @param CardPaymentMethodSpecificOutput|null $value */ public function setCardPaymentMethodSpecificOutput(?CardPaymentMethodSpecificOutput $value): void { $this->cardPaymentMethodSpecificOutput = $value; } /** * @return string|null */ public function getMerchantParameters(): ?string { return $this->merchantParameters; } /** * @param string|null $value */ public function setMerchantParameters(?string $value): void { $this->merchantParameters = $value; } /** * @return MobilePaymentMethodSpecificOutput|null */ public function getMobilePaymentMethodSpecificOutput(): ?MobilePaymentMethodSpecificOutput { return $this->mobilePaymentMethodSpecificOutput; } /** * @param MobilePaymentMethodSpecificOutput|null $value */ public function setMobilePaymentMethodSpecificOutput(?MobilePaymentMethodSpecificOutput $value): void { $this->mobilePaymentMethodSpecificOutput = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return string|null */ public function getPaymentMethod(): ?string { return $this->paymentMethod; } /** * @param string|null $value */ public function setPaymentMethod(?string $value): void { $this->paymentMethod = $value; } /** * @return RedirectPaymentMethodSpecificOutput|null */ public function getRedirectPaymentMethodSpecificOutput(): ?RedirectPaymentMethodSpecificOutput { return $this->redirectPaymentMethodSpecificOutput; } /** * @param RedirectPaymentMethodSpecificOutput|null $value */ public function setRedirectPaymentMethodSpecificOutput(?RedirectPaymentMethodSpecificOutput $value): void { $this->redirectPaymentMethodSpecificOutput = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return SepaDirectDebitPaymentMethodSpecificOutput|null */ public function getSepaDirectDebitPaymentMethodSpecificOutput(): ?SepaDirectDebitPaymentMethodSpecificOutput { return $this->sepaDirectDebitPaymentMethodSpecificOutput; } /** * @param SepaDirectDebitPaymentMethodSpecificOutput|null $value */ public function setSepaDirectDebitPaymentMethodSpecificOutput(?SepaDirectDebitPaymentMethodSpecificOutput $value): void { $this->sepaDirectDebitPaymentMethodSpecificOutput = $value; } /** * @return SurchargeSpecificOutput|null */ public function getSurchargeSpecificOutput(): ?SurchargeSpecificOutput { return $this->surchargeSpecificOutput; } /** * @param SurchargeSpecificOutput|null $value */ public function setSurchargeSpecificOutput(?SurchargeSpecificOutput $value): void { $this->surchargeSpecificOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acquiredAmount)) { $object->acquiredAmount = $this->acquiredAmount->toObject(); } if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->amountPaid)) { $object->amountPaid = $this->amountPaid; } if (!is_null($this->cardPaymentMethodSpecificOutput)) { $object->cardPaymentMethodSpecificOutput = $this->cardPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->merchantParameters)) { $object->merchantParameters = $this->merchantParameters; } if (!is_null($this->mobilePaymentMethodSpecificOutput)) { $object->mobilePaymentMethodSpecificOutput = $this->mobilePaymentMethodSpecificOutput->toObject(); } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } if (!is_null($this->paymentMethod)) { $object->paymentMethod = $this->paymentMethod; } if (!is_null($this->redirectPaymentMethodSpecificOutput)) { $object->redirectPaymentMethodSpecificOutput = $this->redirectPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } if (!is_null($this->sepaDirectDebitPaymentMethodSpecificOutput)) { $object->sepaDirectDebitPaymentMethodSpecificOutput = $this->sepaDirectDebitPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->surchargeSpecificOutput)) { $object->surchargeSpecificOutput = $this->surchargeSpecificOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CaptureOutput { parent::fromObject($object); if (property_exists($object, 'acquiredAmount')) { if (!is_object($object->acquiredAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->acquiredAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->acquiredAmount = $value->fromObject($object->acquiredAmount); } if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'amountPaid')) { $this->amountPaid = $object->amountPaid; } if (property_exists($object, 'cardPaymentMethodSpecificOutput')) { if (!is_object($object->cardPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificOutput(); $this->cardPaymentMethodSpecificOutput = $value->fromObject($object->cardPaymentMethodSpecificOutput); } if (property_exists($object, 'merchantParameters')) { $this->merchantParameters = $object->merchantParameters; } if (property_exists($object, 'mobilePaymentMethodSpecificOutput')) { if (!is_object($object->mobilePaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobilePaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new MobilePaymentMethodSpecificOutput(); $this->mobilePaymentMethodSpecificOutput = $value->fromObject($object->mobilePaymentMethodSpecificOutput); } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } if (property_exists($object, 'paymentMethod')) { $this->paymentMethod = $object->paymentMethod; } if (property_exists($object, 'redirectPaymentMethodSpecificOutput')) { if (!is_object($object->redirectPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new RedirectPaymentMethodSpecificOutput(); $this->redirectPaymentMethodSpecificOutput = $value->fromObject($object->redirectPaymentMethodSpecificOutput); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificOutput')) { if (!is_object($object->sepaDirectDebitPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentMethodSpecificOutput(); $this->sepaDirectDebitPaymentMethodSpecificOutput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificOutput); } if (property_exists($object, 'surchargeSpecificOutput')) { if (!is_object($object->surchargeSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeSpecificOutput, true) . '\' is not an object'); } $value = new SurchargeSpecificOutput(); $this->surchargeSpecificOutput = $value->fromObject($object->surchargeSpecificOutput); } return $this; } } Domain/PaymentProductGroup.php 0000644 00000010554 15224675305 0012475 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductGroup extends DataObject { /** * @var AccountOnFile|null */ public ?AccountOnFile $accountOnFile = null; /** * @var PaymentProductDisplayHints|null */ public ?PaymentProductDisplayHints $displayHints = null; /** * @var PaymentProductDisplayHints[]|null */ public ?array $displayHintsList = null; /** * @var string|null */ public ?string $id = null; /** * @return AccountOnFile|null */ public function getAccountOnFile(): ?AccountOnFile { return $this->accountOnFile; } /** * @param AccountOnFile|null $value */ public function setAccountOnFile(?AccountOnFile $value): void { $this->accountOnFile = $value; } /** * @return PaymentProductDisplayHints|null */ public function getDisplayHints(): ?PaymentProductDisplayHints { return $this->displayHints; } /** * @param PaymentProductDisplayHints|null $value */ public function setDisplayHints(?PaymentProductDisplayHints $value): void { $this->displayHints = $value; } /** * @return PaymentProductDisplayHints[]|null */ public function getDisplayHintsList(): ?array { return $this->displayHintsList; } /** * @param PaymentProductDisplayHints[]|null $value */ public function setDisplayHintsList(?array $value): void { $this->displayHintsList = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountOnFile)) { $object->accountOnFile = $this->accountOnFile->toObject(); } if (!is_null($this->displayHints)) { $object->displayHints = $this->displayHints->toObject(); } if (!is_null($this->displayHintsList)) { $object->displayHintsList = []; foreach ($this->displayHintsList as $element) { if (!is_null($element)) { $object->displayHintsList[] = $element->toObject(); } } } if (!is_null($this->id)) { $object->id = $this->id; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductGroup { parent::fromObject($object); if (property_exists($object, 'accountOnFile')) { if (!is_object($object->accountOnFile)) { throw new UnexpectedValueException('value \'' . print_r($object->accountOnFile, true) . '\' is not an object'); } $value = new AccountOnFile(); $this->accountOnFile = $value->fromObject($object->accountOnFile); } if (property_exists($object, 'displayHints')) { if (!is_object($object->displayHints)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object'); } $value = new PaymentProductDisplayHints(); $this->displayHints = $value->fromObject($object->displayHints); } if (property_exists($object, 'displayHintsList')) { if (!is_array($object->displayHintsList) && !is_object($object->displayHintsList)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHintsList, true) . '\' is not an array or object'); } $this->displayHintsList = []; foreach ($object->displayHintsList as $element) { $value = new PaymentProductDisplayHints(); $this->displayHintsList[] = $value->fromObject($element); } } if (property_exists($object, 'id')) { $this->id = $object->id; } return $this; } } Domain/GetHostedTokenizationResponse.php 0000644 00000004105 15224675305 0014501 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetHostedTokenizationResponse extends DataObject { /** * @var TokenResponse|null */ public ?TokenResponse $token = null; /** * @var string|null */ public ?string $tokenStatus = null; /** * @return TokenResponse|null */ public function getToken(): ?TokenResponse { return $this->token; } /** * @param TokenResponse|null $value */ public function setToken(?TokenResponse $value): void { $this->token = $value; } /** * @return string|null */ public function getTokenStatus(): ?string { return $this->tokenStatus; } /** * @param string|null $value */ public function setTokenStatus(?string $value): void { $this->tokenStatus = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->token)) { $object->token = $this->token->toObject(); } if (!is_null($this->tokenStatus)) { $object->tokenStatus = $this->tokenStatus; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetHostedTokenizationResponse { parent::fromObject($object); if (property_exists($object, 'token')) { if (!is_object($object->token)) { throw new UnexpectedValueException('value \'' . print_r($object->token, true) . '\' is not an object'); } $value = new TokenResponse(); $this->token = $value->fromObject($object->token); } if (property_exists($object, 'tokenStatus')) { $this->tokenStatus = $object->tokenStatus; } return $this; } } Domain/GetPrivacyPolicyResponse.php 0000644 00000002372 15224675305 0013455 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetPrivacyPolicyResponse extends DataObject { /** * @var string|null */ public ?string $htmlContent = null; /** * @return string|null */ public function getHtmlContent(): ?string { return $this->htmlContent; } /** * @param string|null $value */ public function setHtmlContent(?string $value): void { $this->htmlContent = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->htmlContent)) { $object->htmlContent = $this->htmlContent; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetPrivacyPolicyResponse { parent::fromObject($object); if (property_exists($object, 'htmlContent')) { $this->htmlContent = $object->htmlContent; } return $this; } } Domain/EmptyValidator.php 0000644 00000001213 15224675305 0011436 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class EmptyValidator extends DataObject { /** * @return object */ public function toObject(): object { $object = parent::toObject(); return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): EmptyValidator { parent::fromObject($object); return $this; } } Domain/AmountBreakdown.php 0000644 00000003255 15224675305 0011602 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AmountBreakdown extends DataObject { /** * @var int|null */ public ?int $amount = null; /** * @var string|null */ public ?string $type = null; /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AmountBreakdown { parent::fromObject($object); if (property_exists($object, 'amount')) { $this->amount = $object->amount; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/CurrencyConversionSpecificInput.php 0000644 00000002361 15224675305 0015025 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversionSpecificInput extends DataObject { /** * @var bool|null */ public ?bool $dccEnabled = null; /** * @return bool|null */ public function getDccEnabled(): ?bool { return $this->dccEnabled; } /** * @param bool|null $value */ public function setDccEnabled(?bool $value): void { $this->dccEnabled = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dccEnabled)) { $object->dccEnabled = $this->dccEnabled; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversionSpecificInput { parent::fromObject($object); if (property_exists($object, 'dccEnabled')) { $this->dccEnabled = $object->dccEnabled; } return $this; } } Domain/ErrorResponse.php 0000644 00000004417 15224675305 0011313 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ErrorResponse extends DataObject { /** * @var string|null */ public ?string $errorId = null; /** * @var APIError[]|null */ public ?array $errors = null; /** * @return string|null */ public function getErrorId(): ?string { return $this->errorId; } /** * @param string|null $value */ public function setErrorId(?string $value): void { $this->errorId = $value; } /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errorId)) { $object->errorId = $this->errorId; } if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ErrorResponse { parent::fromObject($object); if (property_exists($object, 'errorId')) { $this->errorId = $object->errorId; } if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } return $this; } } Domain/CardPaymentMethodSpecificInput.php 0000644 00000062143 15224675305 0014541 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardPaymentMethodSpecificInput extends DataObject { /** * @var bool|null */ public ?bool $allowDynamicLinking = null; /** * @var string|null */ public ?string $authorizationMode = null; /** * @var Card|null */ public ?Card $card = null; /** * @var string|null */ public ?string $cardOnFileRecurringExpiration = null; /** * @var string|null */ public ?string $cardOnFileRecurringFrequency = null; /** * @var string|null */ public ?string $cobrandSelectionIndicator = null; /** * @var CurrencyConversionInput|null */ public ?CurrencyConversionInput $currencyConversion = null; /** * @var string|null */ public ?string $initialSchemeTransactionId = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var MultiplePaymentInformation|null */ public ?MultiplePaymentInformation $multiplePaymentInformation = null; /** * @var NetworkTokenData|null */ public ?NetworkTokenData $networkTokenData = null; /** * @var PaymentProduct130SpecificInput|null */ public ?PaymentProduct130SpecificInput $paymentProduct130SpecificInput = null; /** * @var PaymentProduct3012SpecificInput|null */ public ?PaymentProduct3012SpecificInput $paymentProduct3012SpecificInput = null; /** * @var PaymentProduct3013SpecificInput|null */ public ?PaymentProduct3013SpecificInput $paymentProduct3013SpecificInput = null; /** * @var PaymentProduct3208SpecificInput|null */ public ?PaymentProduct3208SpecificInput $paymentProduct3208SpecificInput = null; /** * @var PaymentProduct3209SpecificInput|null */ public ?PaymentProduct3209SpecificInput $paymentProduct3209SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var CardRecurrenceDetails|null */ public ?CardRecurrenceDetails $recurring = null; /** * @var string|null */ public ?string $returnUrl = null; /** * @var string|null */ public ?string $schemeReferenceData = null; /** * @var bool|null * @deprecated Use threeDSecure.skipAuthentication instead. * true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to recurring. * false = 3D Secure authentication will not be skipped for this transaction. Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction. */ public ?bool $skipAuthentication = null; /** * @var ThreeDSecure|null */ public ?ThreeDSecure $threeDSecure = null; /** * @var string|null */ public ?string $token = null; /** * @var bool|null */ public ?bool $tokenize = null; /** * @var string|null */ public ?string $transactionChannel = null; /** * @var string|null */ public ?string $unscheduledCardOnFileRequestor = null; /** * @var string|null */ public ?string $unscheduledCardOnFileSequenceIndicator = null; /** * @return bool|null */ public function getAllowDynamicLinking(): ?bool { return $this->allowDynamicLinking; } /** * @param bool|null $value */ public function setAllowDynamicLinking(?bool $value): void { $this->allowDynamicLinking = $value; } /** * @return string|null */ public function getAuthorizationMode(): ?string { return $this->authorizationMode; } /** * @param string|null $value */ public function setAuthorizationMode(?string $value): void { $this->authorizationMode = $value; } /** * @return Card|null */ public function getCard(): ?Card { return $this->card; } /** * @param Card|null $value */ public function setCard(?Card $value): void { $this->card = $value; } /** * @return string|null */ public function getCardOnFileRecurringExpiration(): ?string { return $this->cardOnFileRecurringExpiration; } /** * @param string|null $value */ public function setCardOnFileRecurringExpiration(?string $value): void { $this->cardOnFileRecurringExpiration = $value; } /** * @return string|null */ public function getCardOnFileRecurringFrequency(): ?string { return $this->cardOnFileRecurringFrequency; } /** * @param string|null $value */ public function setCardOnFileRecurringFrequency(?string $value): void { $this->cardOnFileRecurringFrequency = $value; } /** * @return string|null */ public function getCobrandSelectionIndicator(): ?string { return $this->cobrandSelectionIndicator; } /** * @param string|null $value */ public function setCobrandSelectionIndicator(?string $value): void { $this->cobrandSelectionIndicator = $value; } /** * @return CurrencyConversionInput|null */ public function getCurrencyConversion(): ?CurrencyConversionInput { return $this->currencyConversion; } /** * @param CurrencyConversionInput|null $value */ public function setCurrencyConversion(?CurrencyConversionInput $value): void { $this->currencyConversion = $value; } /** * @return string|null */ public function getInitialSchemeTransactionId(): ?string { return $this->initialSchemeTransactionId; } /** * @param string|null $value */ public function setInitialSchemeTransactionId(?string $value): void { $this->initialSchemeTransactionId = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return MultiplePaymentInformation|null */ public function getMultiplePaymentInformation(): ?MultiplePaymentInformation { return $this->multiplePaymentInformation; } /** * @param MultiplePaymentInformation|null $value */ public function setMultiplePaymentInformation(?MultiplePaymentInformation $value): void { $this->multiplePaymentInformation = $value; } /** * @return NetworkTokenData|null */ public function getNetworkTokenData(): ?NetworkTokenData { return $this->networkTokenData; } /** * @param NetworkTokenData|null $value */ public function setNetworkTokenData(?NetworkTokenData $value): void { $this->networkTokenData = $value; } /** * @return PaymentProduct130SpecificInput|null */ public function getPaymentProduct130SpecificInput(): ?PaymentProduct130SpecificInput { return $this->paymentProduct130SpecificInput; } /** * @param PaymentProduct130SpecificInput|null $value */ public function setPaymentProduct130SpecificInput(?PaymentProduct130SpecificInput $value): void { $this->paymentProduct130SpecificInput = $value; } /** * @return PaymentProduct3012SpecificInput|null */ public function getPaymentProduct3012SpecificInput(): ?PaymentProduct3012SpecificInput { return $this->paymentProduct3012SpecificInput; } /** * @param PaymentProduct3012SpecificInput|null $value */ public function setPaymentProduct3012SpecificInput(?PaymentProduct3012SpecificInput $value): void { $this->paymentProduct3012SpecificInput = $value; } /** * @return PaymentProduct3013SpecificInput|null */ public function getPaymentProduct3013SpecificInput(): ?PaymentProduct3013SpecificInput { return $this->paymentProduct3013SpecificInput; } /** * @param PaymentProduct3013SpecificInput|null $value */ public function setPaymentProduct3013SpecificInput(?PaymentProduct3013SpecificInput $value): void { $this->paymentProduct3013SpecificInput = $value; } /** * @return PaymentProduct3208SpecificInput|null */ public function getPaymentProduct3208SpecificInput(): ?PaymentProduct3208SpecificInput { return $this->paymentProduct3208SpecificInput; } /** * @param PaymentProduct3208SpecificInput|null $value */ public function setPaymentProduct3208SpecificInput(?PaymentProduct3208SpecificInput $value): void { $this->paymentProduct3208SpecificInput = $value; } /** * @return PaymentProduct3209SpecificInput|null */ public function getPaymentProduct3209SpecificInput(): ?PaymentProduct3209SpecificInput { return $this->paymentProduct3209SpecificInput; } /** * @param PaymentProduct3209SpecificInput|null $value */ public function setPaymentProduct3209SpecificInput(?PaymentProduct3209SpecificInput $value): void { $this->paymentProduct3209SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return CardRecurrenceDetails|null */ public function getRecurring(): ?CardRecurrenceDetails { return $this->recurring; } /** * @param CardRecurrenceDetails|null $value */ public function setRecurring(?CardRecurrenceDetails $value): void { $this->recurring = $value; } /** * @return string|null */ public function getReturnUrl(): ?string { return $this->returnUrl; } /** * @param string|null $value */ public function setReturnUrl(?string $value): void { $this->returnUrl = $value; } /** * @return string|null */ public function getSchemeReferenceData(): ?string { return $this->schemeReferenceData; } /** * @param string|null $value */ public function setSchemeReferenceData(?string $value): void { $this->schemeReferenceData = $value; } /** * @return bool|null * @deprecated Use threeDSecure.skipAuthentication instead. * true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to recurring. * false = 3D Secure authentication will not be skipped for this transaction. Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction. */ public function getSkipAuthentication(): ?bool { return $this->skipAuthentication; } /** * @param bool|null $value * @deprecated Use threeDSecure.skipAuthentication instead. * true = 3D Secure authentication will be skipped for this transaction. This setting should be used when isRecurring is set to true and recurringPaymentSequenceIndicator is set to recurring. * false = 3D Secure authentication will not be skipped for this transaction. Note: This is only possible if your account in our system is setup for 3D Secure authentication and if your configuration in our system allows you to override it per transaction. */ public function setSkipAuthentication(?bool $value): void { $this->skipAuthentication = $value; } /** * @return ThreeDSecure|null */ public function getThreeDSecure(): ?ThreeDSecure { return $this->threeDSecure; } /** * @param ThreeDSecure|null $value */ public function setThreeDSecure(?ThreeDSecure $value): void { $this->threeDSecure = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return bool|null */ public function getTokenize(): ?bool { return $this->tokenize; } /** * @param bool|null $value */ public function setTokenize(?bool $value): void { $this->tokenize = $value; } /** * @return string|null */ public function getTransactionChannel(): ?string { return $this->transactionChannel; } /** * @param string|null $value */ public function setTransactionChannel(?string $value): void { $this->transactionChannel = $value; } /** * @return string|null */ public function getUnscheduledCardOnFileRequestor(): ?string { return $this->unscheduledCardOnFileRequestor; } /** * @param string|null $value */ public function setUnscheduledCardOnFileRequestor(?string $value): void { $this->unscheduledCardOnFileRequestor = $value; } /** * @return string|null */ public function getUnscheduledCardOnFileSequenceIndicator(): ?string { return $this->unscheduledCardOnFileSequenceIndicator; } /** * @param string|null $value */ public function setUnscheduledCardOnFileSequenceIndicator(?string $value): void { $this->unscheduledCardOnFileSequenceIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->allowDynamicLinking)) { $object->allowDynamicLinking = $this->allowDynamicLinking; } if (!is_null($this->authorizationMode)) { $object->authorizationMode = $this->authorizationMode; } if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->cardOnFileRecurringExpiration)) { $object->cardOnFileRecurringExpiration = $this->cardOnFileRecurringExpiration; } if (!is_null($this->cardOnFileRecurringFrequency)) { $object->cardOnFileRecurringFrequency = $this->cardOnFileRecurringFrequency; } if (!is_null($this->cobrandSelectionIndicator)) { $object->cobrandSelectionIndicator = $this->cobrandSelectionIndicator; } if (!is_null($this->currencyConversion)) { $object->currencyConversion = $this->currencyConversion->toObject(); } if (!is_null($this->initialSchemeTransactionId)) { $object->initialSchemeTransactionId = $this->initialSchemeTransactionId; } if (!is_null($this->isRecurring)) { $object->isRecurring = $this->isRecurring; } if (!is_null($this->multiplePaymentInformation)) { $object->multiplePaymentInformation = $this->multiplePaymentInformation->toObject(); } if (!is_null($this->networkTokenData)) { $object->networkTokenData = $this->networkTokenData->toObject(); } if (!is_null($this->paymentProduct130SpecificInput)) { $object->paymentProduct130SpecificInput = $this->paymentProduct130SpecificInput->toObject(); } if (!is_null($this->paymentProduct3012SpecificInput)) { $object->paymentProduct3012SpecificInput = $this->paymentProduct3012SpecificInput->toObject(); } if (!is_null($this->paymentProduct3013SpecificInput)) { $object->paymentProduct3013SpecificInput = $this->paymentProduct3013SpecificInput->toObject(); } if (!is_null($this->paymentProduct3208SpecificInput)) { $object->paymentProduct3208SpecificInput = $this->paymentProduct3208SpecificInput->toObject(); } if (!is_null($this->paymentProduct3209SpecificInput)) { $object->paymentProduct3209SpecificInput = $this->paymentProduct3209SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->recurring)) { $object->recurring = $this->recurring->toObject(); } if (!is_null($this->returnUrl)) { $object->returnUrl = $this->returnUrl; } if (!is_null($this->schemeReferenceData)) { $object->schemeReferenceData = $this->schemeReferenceData; } if (!is_null($this->skipAuthentication)) { $object->skipAuthentication = $this->skipAuthentication; } if (!is_null($this->threeDSecure)) { $object->threeDSecure = $this->threeDSecure->toObject(); } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->tokenize)) { $object->tokenize = $this->tokenize; } if (!is_null($this->transactionChannel)) { $object->transactionChannel = $this->transactionChannel; } if (!is_null($this->unscheduledCardOnFileRequestor)) { $object->unscheduledCardOnFileRequestor = $this->unscheduledCardOnFileRequestor; } if (!is_null($this->unscheduledCardOnFileSequenceIndicator)) { $object->unscheduledCardOnFileSequenceIndicator = $this->unscheduledCardOnFileSequenceIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardPaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'allowDynamicLinking')) { $this->allowDynamicLinking = $object->allowDynamicLinking; } if (property_exists($object, 'authorizationMode')) { $this->authorizationMode = $object->authorizationMode; } if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new Card(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'cardOnFileRecurringExpiration')) { $this->cardOnFileRecurringExpiration = $object->cardOnFileRecurringExpiration; } if (property_exists($object, 'cardOnFileRecurringFrequency')) { $this->cardOnFileRecurringFrequency = $object->cardOnFileRecurringFrequency; } if (property_exists($object, 'cobrandSelectionIndicator')) { $this->cobrandSelectionIndicator = $object->cobrandSelectionIndicator; } if (property_exists($object, 'currencyConversion')) { if (!is_object($object->currencyConversion)) { throw new UnexpectedValueException('value \'' . print_r($object->currencyConversion, true) . '\' is not an object'); } $value = new CurrencyConversionInput(); $this->currencyConversion = $value->fromObject($object->currencyConversion); } if (property_exists($object, 'initialSchemeTransactionId')) { $this->initialSchemeTransactionId = $object->initialSchemeTransactionId; } if (property_exists($object, 'isRecurring')) { $this->isRecurring = $object->isRecurring; } if (property_exists($object, 'multiplePaymentInformation')) { if (!is_object($object->multiplePaymentInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->multiplePaymentInformation, true) . '\' is not an object'); } $value = new MultiplePaymentInformation(); $this->multiplePaymentInformation = $value->fromObject($object->multiplePaymentInformation); } if (property_exists($object, 'networkTokenData')) { if (!is_object($object->networkTokenData)) { throw new UnexpectedValueException('value \'' . print_r($object->networkTokenData, true) . '\' is not an object'); } $value = new NetworkTokenData(); $this->networkTokenData = $value->fromObject($object->networkTokenData); } if (property_exists($object, 'paymentProduct130SpecificInput')) { if (!is_object($object->paymentProduct130SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct130SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct130SpecificInput(); $this->paymentProduct130SpecificInput = $value->fromObject($object->paymentProduct130SpecificInput); } if (property_exists($object, 'paymentProduct3012SpecificInput')) { if (!is_object($object->paymentProduct3012SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3012SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3012SpecificInput(); $this->paymentProduct3012SpecificInput = $value->fromObject($object->paymentProduct3012SpecificInput); } if (property_exists($object, 'paymentProduct3013SpecificInput')) { if (!is_object($object->paymentProduct3013SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3013SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3013SpecificInput(); $this->paymentProduct3013SpecificInput = $value->fromObject($object->paymentProduct3013SpecificInput); } if (property_exists($object, 'paymentProduct3208SpecificInput')) { if (!is_object($object->paymentProduct3208SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3208SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3208SpecificInput(); $this->paymentProduct3208SpecificInput = $value->fromObject($object->paymentProduct3208SpecificInput); } if (property_exists($object, 'paymentProduct3209SpecificInput')) { if (!is_object($object->paymentProduct3209SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3209SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3209SpecificInput(); $this->paymentProduct3209SpecificInput = $value->fromObject($object->paymentProduct3209SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'recurring')) { if (!is_object($object->recurring)) { throw new UnexpectedValueException('value \'' . print_r($object->recurring, true) . '\' is not an object'); } $value = new CardRecurrenceDetails(); $this->recurring = $value->fromObject($object->recurring); } if (property_exists($object, 'returnUrl')) { $this->returnUrl = $object->returnUrl; } if (property_exists($object, 'schemeReferenceData')) { $this->schemeReferenceData = $object->schemeReferenceData; } if (property_exists($object, 'skipAuthentication')) { $this->skipAuthentication = $object->skipAuthentication; } if (property_exists($object, 'threeDSecure')) { if (!is_object($object->threeDSecure)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecure, true) . '\' is not an object'); } $value = new ThreeDSecure(); $this->threeDSecure = $value->fromObject($object->threeDSecure); } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'tokenize')) { $this->tokenize = $object->tokenize; } if (property_exists($object, 'transactionChannel')) { $this->transactionChannel = $object->transactionChannel; } if (property_exists($object, 'unscheduledCardOnFileRequestor')) { $this->unscheduledCardOnFileRequestor = $object->unscheduledCardOnFileRequestor; } if (property_exists($object, 'unscheduledCardOnFileSequenceIndicator')) { $this->unscheduledCardOnFileSequenceIndicator = $object->unscheduledCardOnFileSequenceIndicator; } return $this; } } Domain/PaymentProductFilter.php 0000644 00000005276 15224675305 0012633 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFilter extends DataObject { /** * @var string[]|null */ public ?array $groups = null; /** * @var int[]|null */ public ?array $products = null; /** * @return string[]|null */ public function getGroups(): ?array { return $this->groups; } /** * @param string[]|null $value */ public function setGroups(?array $value): void { $this->groups = $value; } /** * @return int[]|null */ public function getProducts(): ?array { return $this->products; } /** * @param int[]|null $value */ public function setProducts(?array $value): void { $this->products = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->groups)) { $object->groups = []; foreach ($this->groups as $element) { if (!is_null($element)) { $object->groups[] = $element; } } } if (!is_null($this->products)) { $object->products = []; foreach ($this->products as $element) { if (!is_null($element)) { $object->products[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFilter { parent::fromObject($object); if (property_exists($object, 'groups')) { if (!is_array($object->groups) && !is_object($object->groups)) { throw new UnexpectedValueException('value \'' . print_r($object->groups, true) . '\' is not an array or object'); } $this->groups = []; foreach ($object->groups as $element) { $this->groups[] = $element; } } if (property_exists($object, 'products')) { if (!is_array($object->products) && !is_object($object->products)) { throw new UnexpectedValueException('value \'' . print_r($object->products, true) . '\' is not an array or object'); } $this->products = []; foreach ($object->products as $element) { $this->products[] = $element; } } return $this; } } Domain/APIError.php 0000644 00000012333 15224675305 0010122 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class APIError extends DataObject { /** * @var string|null */ public ?string $category = null; /** * @var string|null * @deprecated Use errorCode instead. Error code */ public ?string $code = null; /** * @var string|null */ public ?string $errorCode = null; /** * @var int|null */ public ?int $httpStatusCode = null; /** * @var string|null */ public ?string $id = null; /** * @var string|null */ public ?string $message = null; /** * @var string|null */ public ?string $propertyName = null; /** * @var bool|null */ public ?bool $retriable = null; /** * @return string|null */ public function getCategory(): ?string { return $this->category; } /** * @param string|null $value */ public function setCategory(?string $value): void { $this->category = $value; } /** * @return string|null * @deprecated Use errorCode instead. Error code */ public function getCode(): ?string { return $this->code; } /** * @param string|null $value * @deprecated Use errorCode instead. Error code */ public function setCode(?string $value): void { $this->code = $value; } /** * @return string|null */ public function getErrorCode(): ?string { return $this->errorCode; } /** * @param string|null $value */ public function setErrorCode(?string $value): void { $this->errorCode = $value; } /** * @return int|null */ public function getHttpStatusCode(): ?int { return $this->httpStatusCode; } /** * @param int|null $value */ public function setHttpStatusCode(?int $value): void { $this->httpStatusCode = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return string|null */ public function getMessage(): ?string { return $this->message; } /** * @param string|null $value */ public function setMessage(?string $value): void { $this->message = $value; } /** * @return string|null */ public function getPropertyName(): ?string { return $this->propertyName; } /** * @param string|null $value */ public function setPropertyName(?string $value): void { $this->propertyName = $value; } /** * @return bool|null */ public function getRetriable(): ?bool { return $this->retriable; } /** * @param bool|null $value */ public function setRetriable(?bool $value): void { $this->retriable = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->category)) { $object->category = $this->category; } if (!is_null($this->code)) { $object->code = $this->code; } if (!is_null($this->errorCode)) { $object->errorCode = $this->errorCode; } if (!is_null($this->httpStatusCode)) { $object->httpStatusCode = $this->httpStatusCode; } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->message)) { $object->message = $this->message; } if (!is_null($this->propertyName)) { $object->propertyName = $this->propertyName; } if (!is_null($this->retriable)) { $object->retriable = $this->retriable; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): APIError { parent::fromObject($object); if (property_exists($object, 'category')) { $this->category = $object->category; } if (property_exists($object, 'code')) { $this->code = $object->code; } if (property_exists($object, 'errorCode')) { $this->errorCode = $object->errorCode; } if (property_exists($object, 'httpStatusCode')) { $this->httpStatusCode = $object->httpStatusCode; } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'message')) { $this->message = $object->message; } if (property_exists($object, 'propertyName')) { $this->propertyName = $object->propertyName; } if (property_exists($object, 'retriable')) { $this->retriable = $object->retriable; } return $this; } } Domain/CurrencyConversionInput.php 0000644 00000003563 15224675305 0013364 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversionInput extends DataObject { /** * @var bool|null */ public ?bool $acceptedByUser = null; /** * @var string|null */ public ?string $dccSessionId = null; /** * @return bool|null */ public function getAcceptedByUser(): ?bool { return $this->acceptedByUser; } /** * @param bool|null $value */ public function setAcceptedByUser(?bool $value): void { $this->acceptedByUser = $value; } /** * @return string|null */ public function getDccSessionId(): ?string { return $this->dccSessionId; } /** * @param string|null $value */ public function setDccSessionId(?string $value): void { $this->dccSessionId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acceptedByUser)) { $object->acceptedByUser = $this->acceptedByUser; } if (!is_null($this->dccSessionId)) { $object->dccSessionId = $this->dccSessionId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversionInput { parent::fromObject($object); if (property_exists($object, 'acceptedByUser')) { $this->acceptedByUser = $object->acceptedByUser; } if (property_exists($object, 'dccSessionId')) { $this->dccSessionId = $object->dccSessionId; } return $this; } } Domain/PaymentProduct130SpecificThreeDSecure.php 0000644 00000006111 15224675305 0015607 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct130SpecificThreeDSecure extends DataObject { /** * @var bool|null */ public ?bool $acquirerExemption = null; /** * @var string|null */ public ?string $merchantScore = null; /** * @var int|null */ public ?int $numberOfItems = null; /** * @var string|null */ public ?string $usecase = null; /** * @return bool|null */ public function getAcquirerExemption(): ?bool { return $this->acquirerExemption; } /** * @param bool|null $value */ public function setAcquirerExemption(?bool $value): void { $this->acquirerExemption = $value; } /** * @return string|null */ public function getMerchantScore(): ?string { return $this->merchantScore; } /** * @param string|null $value */ public function setMerchantScore(?string $value): void { $this->merchantScore = $value; } /** * @return int|null */ public function getNumberOfItems(): ?int { return $this->numberOfItems; } /** * @param int|null $value */ public function setNumberOfItems(?int $value): void { $this->numberOfItems = $value; } /** * @return string|null */ public function getUsecase(): ?string { return $this->usecase; } /** * @param string|null $value */ public function setUsecase(?string $value): void { $this->usecase = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acquirerExemption)) { $object->acquirerExemption = $this->acquirerExemption; } if (!is_null($this->merchantScore)) { $object->merchantScore = $this->merchantScore; } if (!is_null($this->numberOfItems)) { $object->numberOfItems = $this->numberOfItems; } if (!is_null($this->usecase)) { $object->usecase = $this->usecase; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct130SpecificThreeDSecure { parent::fromObject($object); if (property_exists($object, 'acquirerExemption')) { $this->acquirerExemption = $object->acquirerExemption; } if (property_exists($object, 'merchantScore')) { $this->merchantScore = $object->merchantScore; } if (property_exists($object, 'numberOfItems')) { $this->numberOfItems = $object->numberOfItems; } if (property_exists($object, 'usecase')) { $this->usecase = $object->usecase; } return $this; } } Domain/ThreeDSecureData.php 0000644 00000004653 15224675305 0011621 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ThreeDSecureData extends DataObject { /** * @var string|null */ public ?string $acsTransactionId = null; /** * @var string|null */ public ?string $method = null; /** * @var string|null */ public ?string $utcTimestamp = null; /** * @return string|null */ public function getAcsTransactionId(): ?string { return $this->acsTransactionId; } /** * @param string|null $value */ public function setAcsTransactionId(?string $value): void { $this->acsTransactionId = $value; } /** * @return string|null */ public function getMethod(): ?string { return $this->method; } /** * @param string|null $value */ public function setMethod(?string $value): void { $this->method = $value; } /** * @return string|null */ public function getUtcTimestamp(): ?string { return $this->utcTimestamp; } /** * @param string|null $value */ public function setUtcTimestamp(?string $value): void { $this->utcTimestamp = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acsTransactionId)) { $object->acsTransactionId = $this->acsTransactionId; } if (!is_null($this->method)) { $object->method = $this->method; } if (!is_null($this->utcTimestamp)) { $object->utcTimestamp = $this->utcTimestamp; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ThreeDSecureData { parent::fromObject($object); if (property_exists($object, 'acsTransactionId')) { $this->acsTransactionId = $object->acsTransactionId; } if (property_exists($object, 'method')) { $this->method = $object->method; } if (property_exists($object, 'utcTimestamp')) { $this->utcTimestamp = $object->utcTimestamp; } return $this; } } Domain/GetIINDetailsResponse.php 0000644 00000034547 15224675305 0012616 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetIINDetailsResponse extends DataObject { /** * @var bool|null */ public ?bool $cardCorporateIndicator = null; /** * @var DateTime|null */ public ?DateTime $cardEffectiveDate = null; /** * @var bool|null */ public ?bool $cardEffectiveDateIndicator = null; /** * @var string|null */ public ?string $cardPanType = null; /** * @var string|null */ public ?string $cardProductCode = null; /** * @var string|null */ public ?string $cardProductName = null; /** * @var string|null */ public ?string $cardProductUsageLabel = null; /** * @var string|null */ public ?string $cardScheme = null; /** * @var string|null */ public ?string $cardType = null; /** * @var IINDetail[]|null */ public ?array $coBrands = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var bool|null */ public ?bool $isAllowedInContext = null; /** * @var string|null */ public ?string $issuerCode = null; /** * @var string|null */ public ?string $issuerName = null; /** * @var string|null */ public ?string $issuerRegionCode = null; /** * @var string|null */ public ?string $issuingCountryCode = null; /** * @var int|null */ public ?int $panLengthMax = null; /** * @var int|null */ public ?int $panLengthMin = null; /** * @var bool|null */ public ?bool $panLuhnCheck = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var bool|null */ public ?bool $virtualCardIndicator = null; /** * @return bool|null */ public function getCardCorporateIndicator(): ?bool { return $this->cardCorporateIndicator; } /** * @param bool|null $value */ public function setCardCorporateIndicator(?bool $value): void { $this->cardCorporateIndicator = $value; } /** * @return DateTime|null */ public function getCardEffectiveDate(): ?DateTime { return $this->cardEffectiveDate; } /** * @param DateTime|null $value */ public function setCardEffectiveDate(?DateTime $value): void { $this->cardEffectiveDate = $value; } /** * @return bool|null */ public function getCardEffectiveDateIndicator(): ?bool { return $this->cardEffectiveDateIndicator; } /** * @param bool|null $value */ public function setCardEffectiveDateIndicator(?bool $value): void { $this->cardEffectiveDateIndicator = $value; } /** * @return string|null */ public function getCardPanType(): ?string { return $this->cardPanType; } /** * @param string|null $value */ public function setCardPanType(?string $value): void { $this->cardPanType = $value; } /** * @return string|null */ public function getCardProductCode(): ?string { return $this->cardProductCode; } /** * @param string|null $value */ public function setCardProductCode(?string $value): void { $this->cardProductCode = $value; } /** * @return string|null */ public function getCardProductName(): ?string { return $this->cardProductName; } /** * @param string|null $value */ public function setCardProductName(?string $value): void { $this->cardProductName = $value; } /** * @return string|null */ public function getCardProductUsageLabel(): ?string { return $this->cardProductUsageLabel; } /** * @param string|null $value */ public function setCardProductUsageLabel(?string $value): void { $this->cardProductUsageLabel = $value; } /** * @return string|null */ public function getCardScheme(): ?string { return $this->cardScheme; } /** * @param string|null $value */ public function setCardScheme(?string $value): void { $this->cardScheme = $value; } /** * @return string|null */ public function getCardType(): ?string { return $this->cardType; } /** * @param string|null $value */ public function setCardType(?string $value): void { $this->cardType = $value; } /** * @return IINDetail[]|null */ public function getCoBrands(): ?array { return $this->coBrands; } /** * @param IINDetail[]|null $value */ public function setCoBrands(?array $value): void { $this->coBrands = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return bool|null */ public function getIsAllowedInContext(): ?bool { return $this->isAllowedInContext; } /** * @param bool|null $value */ public function setIsAllowedInContext(?bool $value): void { $this->isAllowedInContext = $value; } /** * @return string|null */ public function getIssuerCode(): ?string { return $this->issuerCode; } /** * @param string|null $value */ public function setIssuerCode(?string $value): void { $this->issuerCode = $value; } /** * @return string|null */ public function getIssuerName(): ?string { return $this->issuerName; } /** * @param string|null $value */ public function setIssuerName(?string $value): void { $this->issuerName = $value; } /** * @return string|null */ public function getIssuerRegionCode(): ?string { return $this->issuerRegionCode; } /** * @param string|null $value */ public function setIssuerRegionCode(?string $value): void { $this->issuerRegionCode = $value; } /** * @return string|null */ public function getIssuingCountryCode(): ?string { return $this->issuingCountryCode; } /** * @param string|null $value */ public function setIssuingCountryCode(?string $value): void { $this->issuingCountryCode = $value; } /** * @return int|null */ public function getPanLengthMax(): ?int { return $this->panLengthMax; } /** * @param int|null $value */ public function setPanLengthMax(?int $value): void { $this->panLengthMax = $value; } /** * @return int|null */ public function getPanLengthMin(): ?int { return $this->panLengthMin; } /** * @param int|null $value */ public function setPanLengthMin(?int $value): void { $this->panLengthMin = $value; } /** * @return bool|null */ public function getPanLuhnCheck(): ?bool { return $this->panLuhnCheck; } /** * @param bool|null $value */ public function setPanLuhnCheck(?bool $value): void { $this->panLuhnCheck = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return bool|null */ public function getVirtualCardIndicator(): ?bool { return $this->virtualCardIndicator; } /** * @param bool|null $value */ public function setVirtualCardIndicator(?bool $value): void { $this->virtualCardIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardCorporateIndicator)) { $object->cardCorporateIndicator = $this->cardCorporateIndicator; } if (!is_null($this->cardEffectiveDate)) { $object->cardEffectiveDate = $this->cardEffectiveDate->format('Y-m-d'); } if (!is_null($this->cardEffectiveDateIndicator)) { $object->cardEffectiveDateIndicator = $this->cardEffectiveDateIndicator; } if (!is_null($this->cardPanType)) { $object->cardPanType = $this->cardPanType; } if (!is_null($this->cardProductCode)) { $object->cardProductCode = $this->cardProductCode; } if (!is_null($this->cardProductName)) { $object->cardProductName = $this->cardProductName; } if (!is_null($this->cardProductUsageLabel)) { $object->cardProductUsageLabel = $this->cardProductUsageLabel; } if (!is_null($this->cardScheme)) { $object->cardScheme = $this->cardScheme; } if (!is_null($this->cardType)) { $object->cardType = $this->cardType; } if (!is_null($this->coBrands)) { $object->coBrands = []; foreach ($this->coBrands as $element) { if (!is_null($element)) { $object->coBrands[] = $element->toObject(); } } } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->isAllowedInContext)) { $object->isAllowedInContext = $this->isAllowedInContext; } if (!is_null($this->issuerCode)) { $object->issuerCode = $this->issuerCode; } if (!is_null($this->issuerName)) { $object->issuerName = $this->issuerName; } if (!is_null($this->issuerRegionCode)) { $object->issuerRegionCode = $this->issuerRegionCode; } if (!is_null($this->issuingCountryCode)) { $object->issuingCountryCode = $this->issuingCountryCode; } if (!is_null($this->panLengthMax)) { $object->panLengthMax = $this->panLengthMax; } if (!is_null($this->panLengthMin)) { $object->panLengthMin = $this->panLengthMin; } if (!is_null($this->panLuhnCheck)) { $object->panLuhnCheck = $this->panLuhnCheck; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->virtualCardIndicator)) { $object->virtualCardIndicator = $this->virtualCardIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetIINDetailsResponse { parent::fromObject($object); if (property_exists($object, 'cardCorporateIndicator')) { $this->cardCorporateIndicator = $object->cardCorporateIndicator; } if (property_exists($object, 'cardEffectiveDate')) { $this->cardEffectiveDate = new DateTime($object->cardEffectiveDate); } if (property_exists($object, 'cardEffectiveDateIndicator')) { $this->cardEffectiveDateIndicator = $object->cardEffectiveDateIndicator; } if (property_exists($object, 'cardPanType')) { $this->cardPanType = $object->cardPanType; } if (property_exists($object, 'cardProductCode')) { $this->cardProductCode = $object->cardProductCode; } if (property_exists($object, 'cardProductName')) { $this->cardProductName = $object->cardProductName; } if (property_exists($object, 'cardProductUsageLabel')) { $this->cardProductUsageLabel = $object->cardProductUsageLabel; } if (property_exists($object, 'cardScheme')) { $this->cardScheme = $object->cardScheme; } if (property_exists($object, 'cardType')) { $this->cardType = $object->cardType; } if (property_exists($object, 'coBrands')) { if (!is_array($object->coBrands) && !is_object($object->coBrands)) { throw new UnexpectedValueException('value \'' . print_r($object->coBrands, true) . '\' is not an array or object'); } $this->coBrands = []; foreach ($object->coBrands as $element) { $value = new IINDetail(); $this->coBrands[] = $value->fromObject($element); } } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'isAllowedInContext')) { $this->isAllowedInContext = $object->isAllowedInContext; } if (property_exists($object, 'issuerCode')) { $this->issuerCode = $object->issuerCode; } if (property_exists($object, 'issuerName')) { $this->issuerName = $object->issuerName; } if (property_exists($object, 'issuerRegionCode')) { $this->issuerRegionCode = $object->issuerRegionCode; } if (property_exists($object, 'issuingCountryCode')) { $this->issuingCountryCode = $object->issuingCountryCode; } if (property_exists($object, 'panLengthMax')) { $this->panLengthMax = $object->panLengthMax; } if (property_exists($object, 'panLengthMin')) { $this->panLengthMin = $object->panLengthMin; } if (property_exists($object, 'panLuhnCheck')) { $this->panLuhnCheck = $object->panLuhnCheck; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'virtualCardIndicator')) { $this->virtualCardIndicator = $object->virtualCardIndicator; } return $this; } } Domain/RedirectPaymentProduct5001SpecificInput.php 0000644 00000003713 15224675305 0016135 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5001SpecificInput extends DataObject { /** * @var string|null */ public ?string $exemptionRequest = null; /** * @var string|null */ public ?string $subsequentType = null; /** * @return string|null */ public function getExemptionRequest(): ?string { return $this->exemptionRequest; } /** * @param string|null $value */ public function setExemptionRequest(?string $value): void { $this->exemptionRequest = $value; } /** * @return string|null */ public function getSubsequentType(): ?string { return $this->subsequentType; } /** * @param string|null $value */ public function setSubsequentType(?string $value): void { $this->subsequentType = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->exemptionRequest)) { $object->exemptionRequest = $this->exemptionRequest; } if (!is_null($this->subsequentType)) { $object->subsequentType = $this->subsequentType; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5001SpecificInput { parent::fromObject($object); if (property_exists($object, 'exemptionRequest')) { $this->exemptionRequest = $object->exemptionRequest; } if (property_exists($object, 'subsequentType')) { $this->subsequentType = $object->subsequentType; } return $this; } } Domain/MobilePaymentMethodHostedCheckoutSpecificInput.php 0000644 00000011066 15224675305 0017732 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentMethodHostedCheckoutSpecificInput extends DataObject { /** * @var string|null */ public ?string $authorizationMode = null; /** * @var MobilePaymentProduct302SpecificInput|null */ public ?MobilePaymentProduct302SpecificInput $paymentProduct302SpecificInput = null; /** * @var MobilePaymentProduct320SpecificInput|null */ public ?MobilePaymentProduct320SpecificInput $paymentProduct320SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return string|null */ public function getAuthorizationMode(): ?string { return $this->authorizationMode; } /** * @param string|null $value */ public function setAuthorizationMode(?string $value): void { $this->authorizationMode = $value; } /** * @return MobilePaymentProduct302SpecificInput|null */ public function getPaymentProduct302SpecificInput(): ?MobilePaymentProduct302SpecificInput { return $this->paymentProduct302SpecificInput; } /** * @param MobilePaymentProduct302SpecificInput|null $value */ public function setPaymentProduct302SpecificInput(?MobilePaymentProduct302SpecificInput $value): void { $this->paymentProduct302SpecificInput = $value; } /** * @return MobilePaymentProduct320SpecificInput|null */ public function getPaymentProduct320SpecificInput(): ?MobilePaymentProduct320SpecificInput { return $this->paymentProduct320SpecificInput; } /** * @param MobilePaymentProduct320SpecificInput|null $value */ public function setPaymentProduct320SpecificInput(?MobilePaymentProduct320SpecificInput $value): void { $this->paymentProduct320SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authorizationMode)) { $object->authorizationMode = $this->authorizationMode; } if (!is_null($this->paymentProduct302SpecificInput)) { $object->paymentProduct302SpecificInput = $this->paymentProduct302SpecificInput->toObject(); } if (!is_null($this->paymentProduct320SpecificInput)) { $object->paymentProduct320SpecificInput = $this->paymentProduct320SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentMethodHostedCheckoutSpecificInput { parent::fromObject($object); if (property_exists($object, 'authorizationMode')) { $this->authorizationMode = $object->authorizationMode; } if (property_exists($object, 'paymentProduct302SpecificInput')) { if (!is_object($object->paymentProduct302SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct302SpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentProduct302SpecificInput(); $this->paymentProduct302SpecificInput = $value->fromObject($object->paymentProduct302SpecificInput); } if (property_exists($object, 'paymentProduct320SpecificInput')) { if (!is_object($object->paymentProduct320SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct320SpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentProduct320SpecificInput(); $this->paymentProduct320SpecificInput = $value->fromObject($object->paymentProduct320SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/Product320Recurring.php 0000644 00000002742 15224675305 0012230 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Product320Recurring extends DataObject { /** * @var string|null */ public ?string $recurringPaymentSequenceIndicator = null; /** * @return string|null */ public function getRecurringPaymentSequenceIndicator(): ?string { return $this->recurringPaymentSequenceIndicator; } /** * @param string|null $value */ public function setRecurringPaymentSequenceIndicator(?string $value): void { $this->recurringPaymentSequenceIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->recurringPaymentSequenceIndicator)) { $object->recurringPaymentSequenceIndicator = $this->recurringPaymentSequenceIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Product320Recurring { parent::fromObject($object); if (property_exists($object, 'recurringPaymentSequenceIndicator')) { $this->recurringPaymentSequenceIndicator = $object->recurringPaymentSequenceIndicator; } return $this; } } Domain/IINDetail.php 0000644 00000032324 15224675305 0010243 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class IINDetail extends DataObject { /** * @var bool|null */ public ?bool $cardCorporateIndicator = null; /** * @var DateTime|null */ public ?DateTime $cardEffectiveDate = null; /** * @var bool|null */ public ?bool $cardEffectiveDateIndicator = null; /** * @var string|null */ public ?string $cardPanType = null; /** * @var string|null */ public ?string $cardProductCode = null; /** * @var string|null */ public ?string $cardProductName = null; /** * @var string|null */ public ?string $cardProductUsageLabel = null; /** * @var string|null */ public ?string $cardScheme = null; /** * @var string|null */ public ?string $cardType = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var bool|null */ public ?bool $isAllowedInContext = null; /** * @var string|null */ public ?string $issuerCode = null; /** * @var string|null */ public ?string $issuerName = null; /** * @var string|null */ public ?string $issuerRegionCode = null; /** * @var string|null */ public ?string $issuingCountryCode = null; /** * @var int|null */ public ?int $panLengthMax = null; /** * @var int|null */ public ?int $panLengthMin = null; /** * @var bool|null */ public ?bool $panLuhnCheck = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var bool|null */ public ?bool $virtualCardIndicator = null; /** * @return bool|null */ public function getCardCorporateIndicator(): ?bool { return $this->cardCorporateIndicator; } /** * @param bool|null $value */ public function setCardCorporateIndicator(?bool $value): void { $this->cardCorporateIndicator = $value; } /** * @return DateTime|null */ public function getCardEffectiveDate(): ?DateTime { return $this->cardEffectiveDate; } /** * @param DateTime|null $value */ public function setCardEffectiveDate(?DateTime $value): void { $this->cardEffectiveDate = $value; } /** * @return bool|null */ public function getCardEffectiveDateIndicator(): ?bool { return $this->cardEffectiveDateIndicator; } /** * @param bool|null $value */ public function setCardEffectiveDateIndicator(?bool $value): void { $this->cardEffectiveDateIndicator = $value; } /** * @return string|null */ public function getCardPanType(): ?string { return $this->cardPanType; } /** * @param string|null $value */ public function setCardPanType(?string $value): void { $this->cardPanType = $value; } /** * @return string|null */ public function getCardProductCode(): ?string { return $this->cardProductCode; } /** * @param string|null $value */ public function setCardProductCode(?string $value): void { $this->cardProductCode = $value; } /** * @return string|null */ public function getCardProductName(): ?string { return $this->cardProductName; } /** * @param string|null $value */ public function setCardProductName(?string $value): void { $this->cardProductName = $value; } /** * @return string|null */ public function getCardProductUsageLabel(): ?string { return $this->cardProductUsageLabel; } /** * @param string|null $value */ public function setCardProductUsageLabel(?string $value): void { $this->cardProductUsageLabel = $value; } /** * @return string|null */ public function getCardScheme(): ?string { return $this->cardScheme; } /** * @param string|null $value */ public function setCardScheme(?string $value): void { $this->cardScheme = $value; } /** * @return string|null */ public function getCardType(): ?string { return $this->cardType; } /** * @param string|null $value */ public function setCardType(?string $value): void { $this->cardType = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return bool|null */ public function getIsAllowedInContext(): ?bool { return $this->isAllowedInContext; } /** * @param bool|null $value */ public function setIsAllowedInContext(?bool $value): void { $this->isAllowedInContext = $value; } /** * @return string|null */ public function getIssuerCode(): ?string { return $this->issuerCode; } /** * @param string|null $value */ public function setIssuerCode(?string $value): void { $this->issuerCode = $value; } /** * @return string|null */ public function getIssuerName(): ?string { return $this->issuerName; } /** * @param string|null $value */ public function setIssuerName(?string $value): void { $this->issuerName = $value; } /** * @return string|null */ public function getIssuerRegionCode(): ?string { return $this->issuerRegionCode; } /** * @param string|null $value */ public function setIssuerRegionCode(?string $value): void { $this->issuerRegionCode = $value; } /** * @return string|null */ public function getIssuingCountryCode(): ?string { return $this->issuingCountryCode; } /** * @param string|null $value */ public function setIssuingCountryCode(?string $value): void { $this->issuingCountryCode = $value; } /** * @return int|null */ public function getPanLengthMax(): ?int { return $this->panLengthMax; } /** * @param int|null $value */ public function setPanLengthMax(?int $value): void { $this->panLengthMax = $value; } /** * @return int|null */ public function getPanLengthMin(): ?int { return $this->panLengthMin; } /** * @param int|null $value */ public function setPanLengthMin(?int $value): void { $this->panLengthMin = $value; } /** * @return bool|null */ public function getPanLuhnCheck(): ?bool { return $this->panLuhnCheck; } /** * @param bool|null $value */ public function setPanLuhnCheck(?bool $value): void { $this->panLuhnCheck = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return bool|null */ public function getVirtualCardIndicator(): ?bool { return $this->virtualCardIndicator; } /** * @param bool|null $value */ public function setVirtualCardIndicator(?bool $value): void { $this->virtualCardIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardCorporateIndicator)) { $object->cardCorporateIndicator = $this->cardCorporateIndicator; } if (!is_null($this->cardEffectiveDate)) { $object->cardEffectiveDate = $this->cardEffectiveDate->format('Y-m-d'); } if (!is_null($this->cardEffectiveDateIndicator)) { $object->cardEffectiveDateIndicator = $this->cardEffectiveDateIndicator; } if (!is_null($this->cardPanType)) { $object->cardPanType = $this->cardPanType; } if (!is_null($this->cardProductCode)) { $object->cardProductCode = $this->cardProductCode; } if (!is_null($this->cardProductName)) { $object->cardProductName = $this->cardProductName; } if (!is_null($this->cardProductUsageLabel)) { $object->cardProductUsageLabel = $this->cardProductUsageLabel; } if (!is_null($this->cardScheme)) { $object->cardScheme = $this->cardScheme; } if (!is_null($this->cardType)) { $object->cardType = $this->cardType; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->isAllowedInContext)) { $object->isAllowedInContext = $this->isAllowedInContext; } if (!is_null($this->issuerCode)) { $object->issuerCode = $this->issuerCode; } if (!is_null($this->issuerName)) { $object->issuerName = $this->issuerName; } if (!is_null($this->issuerRegionCode)) { $object->issuerRegionCode = $this->issuerRegionCode; } if (!is_null($this->issuingCountryCode)) { $object->issuingCountryCode = $this->issuingCountryCode; } if (!is_null($this->panLengthMax)) { $object->panLengthMax = $this->panLengthMax; } if (!is_null($this->panLengthMin)) { $object->panLengthMin = $this->panLengthMin; } if (!is_null($this->panLuhnCheck)) { $object->panLuhnCheck = $this->panLuhnCheck; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->virtualCardIndicator)) { $object->virtualCardIndicator = $this->virtualCardIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): IINDetail { parent::fromObject($object); if (property_exists($object, 'cardCorporateIndicator')) { $this->cardCorporateIndicator = $object->cardCorporateIndicator; } if (property_exists($object, 'cardEffectiveDate')) { $this->cardEffectiveDate = new DateTime($object->cardEffectiveDate); } if (property_exists($object, 'cardEffectiveDateIndicator')) { $this->cardEffectiveDateIndicator = $object->cardEffectiveDateIndicator; } if (property_exists($object, 'cardPanType')) { $this->cardPanType = $object->cardPanType; } if (property_exists($object, 'cardProductCode')) { $this->cardProductCode = $object->cardProductCode; } if (property_exists($object, 'cardProductName')) { $this->cardProductName = $object->cardProductName; } if (property_exists($object, 'cardProductUsageLabel')) { $this->cardProductUsageLabel = $object->cardProductUsageLabel; } if (property_exists($object, 'cardScheme')) { $this->cardScheme = $object->cardScheme; } if (property_exists($object, 'cardType')) { $this->cardType = $object->cardType; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'isAllowedInContext')) { $this->isAllowedInContext = $object->isAllowedInContext; } if (property_exists($object, 'issuerCode')) { $this->issuerCode = $object->issuerCode; } if (property_exists($object, 'issuerName')) { $this->issuerName = $object->issuerName; } if (property_exists($object, 'issuerRegionCode')) { $this->issuerRegionCode = $object->issuerRegionCode; } if (property_exists($object, 'issuingCountryCode')) { $this->issuingCountryCode = $object->issuingCountryCode; } if (property_exists($object, 'panLengthMax')) { $this->panLengthMax = $object->panLengthMax; } if (property_exists($object, 'panLengthMin')) { $this->panLengthMin = $object->panLengthMin; } if (property_exists($object, 'panLuhnCheck')) { $this->panLuhnCheck = $object->panLuhnCheck; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'virtualCardIndicator')) { $this->virtualCardIndicator = $object->virtualCardIndicator; } return $this; } } Domain/PaymentProduct5001SpecificOutput.php 0000644 00000007420 15224675305 0014653 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5001SpecificOutput extends DataObject { /** * @var string|null */ public ?string $accountNumber = null; /** * @var string|null */ public ?string $authorisationCode = null; /** * @var string|null */ public ?string $liability = null; /** * @var string|null */ public ?string $mobilePhoneNumber = null; /** * @var string|null */ public ?string $operationCode = null; /** * @return string|null */ public function getAccountNumber(): ?string { return $this->accountNumber; } /** * @param string|null $value */ public function setAccountNumber(?string $value): void { $this->accountNumber = $value; } /** * @return string|null */ public function getAuthorisationCode(): ?string { return $this->authorisationCode; } /** * @param string|null $value */ public function setAuthorisationCode(?string $value): void { $this->authorisationCode = $value; } /** * @return string|null */ public function getLiability(): ?string { return $this->liability; } /** * @param string|null $value */ public function setLiability(?string $value): void { $this->liability = $value; } /** * @return string|null */ public function getMobilePhoneNumber(): ?string { return $this->mobilePhoneNumber; } /** * @param string|null $value */ public function setMobilePhoneNumber(?string $value): void { $this->mobilePhoneNumber = $value; } /** * @return string|null */ public function getOperationCode(): ?string { return $this->operationCode; } /** * @param string|null $value */ public function setOperationCode(?string $value): void { $this->operationCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountNumber)) { $object->accountNumber = $this->accountNumber; } if (!is_null($this->authorisationCode)) { $object->authorisationCode = $this->authorisationCode; } if (!is_null($this->liability)) { $object->liability = $this->liability; } if (!is_null($this->mobilePhoneNumber)) { $object->mobilePhoneNumber = $this->mobilePhoneNumber; } if (!is_null($this->operationCode)) { $object->operationCode = $this->operationCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5001SpecificOutput { parent::fromObject($object); if (property_exists($object, 'accountNumber')) { $this->accountNumber = $object->accountNumber; } if (property_exists($object, 'authorisationCode')) { $this->authorisationCode = $object->authorisationCode; } if (property_exists($object, 'liability')) { $this->liability = $object->liability; } if (property_exists($object, 'mobilePhoneNumber')) { $this->mobilePhoneNumber = $object->mobilePhoneNumber; } if (property_exists($object, 'operationCode')) { $this->operationCode = $object->operationCode; } return $this; } } Domain/CurrencyConversion.php 0000644 00000004135 15224675305 0012340 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversion extends DataObject { /** * @var bool|null */ public ?bool $acceptedByUser = null; /** * @var DccProposal|null */ public ?DccProposal $proposal = null; /** * @return bool|null */ public function getAcceptedByUser(): ?bool { return $this->acceptedByUser; } /** * @param bool|null $value */ public function setAcceptedByUser(?bool $value): void { $this->acceptedByUser = $value; } /** * @return DccProposal|null */ public function getProposal(): ?DccProposal { return $this->proposal; } /** * @param DccProposal|null $value */ public function setProposal(?DccProposal $value): void { $this->proposal = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acceptedByUser)) { $object->acceptedByUser = $this->acceptedByUser; } if (!is_null($this->proposal)) { $object->proposal = $this->proposal->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversion { parent::fromObject($object); if (property_exists($object, 'acceptedByUser')) { $this->acceptedByUser = $object->acceptedByUser; } if (property_exists($object, 'proposal')) { if (!is_object($object->proposal)) { throw new UnexpectedValueException('value \'' . print_r($object->proposal, true) . '\' is not an object'); } $value = new DccProposal(); $this->proposal = $value->fromObject($object->proposal); } return $this; } } Domain/ThreeDSecureResults.php 0000644 00000020464 15224675305 0012407 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ThreeDSecureResults extends DataObject { /** * @var string|null */ public ?string $acsTransactionId = null; /** * @var string|null */ public ?string $appliedExemption = null; /** * @var string|null */ public ?string $authenticationStatus = null; /** * @var string|null */ public ?string $cavv = null; /** * @var string|null */ public ?string $challengeIndicator = null; /** * @var string|null */ public ?string $dsTransactionId = null; /** * @var string|null */ public ?string $eci = null; /** * @var string|null */ public ?string $exemptionEngineFlow = null; /** * @var string|null */ public ?string $flow = null; /** * @var string|null */ public ?string $liability = null; /** * @var string|null */ public ?string $schemeEci = null; /** * @var string|null */ public ?string $version = null; /** * @var string|null */ public ?string $xid = null; /** * @return string|null */ public function getAcsTransactionId(): ?string { return $this->acsTransactionId; } /** * @param string|null $value */ public function setAcsTransactionId(?string $value): void { $this->acsTransactionId = $value; } /** * @return string|null */ public function getAppliedExemption(): ?string { return $this->appliedExemption; } /** * @param string|null $value */ public function setAppliedExemption(?string $value): void { $this->appliedExemption = $value; } /** * @return string|null */ public function getAuthenticationStatus(): ?string { return $this->authenticationStatus; } /** * @param string|null $value */ public function setAuthenticationStatus(?string $value): void { $this->authenticationStatus = $value; } /** * @return string|null */ public function getCavv(): ?string { return $this->cavv; } /** * @param string|null $value */ public function setCavv(?string $value): void { $this->cavv = $value; } /** * @return string|null */ public function getChallengeIndicator(): ?string { return $this->challengeIndicator; } /** * @param string|null $value */ public function setChallengeIndicator(?string $value): void { $this->challengeIndicator = $value; } /** * @return string|null */ public function getDsTransactionId(): ?string { return $this->dsTransactionId; } /** * @param string|null $value */ public function setDsTransactionId(?string $value): void { $this->dsTransactionId = $value; } /** * @return string|null */ public function getEci(): ?string { return $this->eci; } /** * @param string|null $value */ public function setEci(?string $value): void { $this->eci = $value; } /** * @return string|null */ public function getExemptionEngineFlow(): ?string { return $this->exemptionEngineFlow; } /** * @param string|null $value */ public function setExemptionEngineFlow(?string $value): void { $this->exemptionEngineFlow = $value; } /** * @return string|null */ public function getFlow(): ?string { return $this->flow; } /** * @param string|null $value */ public function setFlow(?string $value): void { $this->flow = $value; } /** * @return string|null */ public function getLiability(): ?string { return $this->liability; } /** * @param string|null $value */ public function setLiability(?string $value): void { $this->liability = $value; } /** * @return string|null */ public function getSchemeEci(): ?string { return $this->schemeEci; } /** * @param string|null $value */ public function setSchemeEci(?string $value): void { $this->schemeEci = $value; } /** * @return string|null */ public function getVersion(): ?string { return $this->version; } /** * @param string|null $value */ public function setVersion(?string $value): void { $this->version = $value; } /** * @return string|null */ public function getXid(): ?string { return $this->xid; } /** * @param string|null $value */ public function setXid(?string $value): void { $this->xid = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acsTransactionId)) { $object->acsTransactionId = $this->acsTransactionId; } if (!is_null($this->appliedExemption)) { $object->appliedExemption = $this->appliedExemption; } if (!is_null($this->authenticationStatus)) { $object->authenticationStatus = $this->authenticationStatus; } if (!is_null($this->cavv)) { $object->cavv = $this->cavv; } if (!is_null($this->challengeIndicator)) { $object->challengeIndicator = $this->challengeIndicator; } if (!is_null($this->dsTransactionId)) { $object->dsTransactionId = $this->dsTransactionId; } if (!is_null($this->eci)) { $object->eci = $this->eci; } if (!is_null($this->exemptionEngineFlow)) { $object->exemptionEngineFlow = $this->exemptionEngineFlow; } if (!is_null($this->flow)) { $object->flow = $this->flow; } if (!is_null($this->liability)) { $object->liability = $this->liability; } if (!is_null($this->schemeEci)) { $object->schemeEci = $this->schemeEci; } if (!is_null($this->version)) { $object->version = $this->version; } if (!is_null($this->xid)) { $object->xid = $this->xid; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ThreeDSecureResults { parent::fromObject($object); if (property_exists($object, 'acsTransactionId')) { $this->acsTransactionId = $object->acsTransactionId; } if (property_exists($object, 'appliedExemption')) { $this->appliedExemption = $object->appliedExemption; } if (property_exists($object, 'authenticationStatus')) { $this->authenticationStatus = $object->authenticationStatus; } if (property_exists($object, 'cavv')) { $this->cavv = $object->cavv; } if (property_exists($object, 'challengeIndicator')) { $this->challengeIndicator = $object->challengeIndicator; } if (property_exists($object, 'dsTransactionId')) { $this->dsTransactionId = $object->dsTransactionId; } if (property_exists($object, 'eci')) { $this->eci = $object->eci; } if (property_exists($object, 'exemptionEngineFlow')) { $this->exemptionEngineFlow = $object->exemptionEngineFlow; } if (property_exists($object, 'flow')) { $this->flow = $object->flow; } if (property_exists($object, 'liability')) { $this->liability = $object->liability; } if (property_exists($object, 'schemeEci')) { $this->schemeEci = $object->schemeEci; } if (property_exists($object, 'version')) { $this->version = $object->version; } if (property_exists($object, 'xid')) { $this->xid = $object->xid; } return $this; } } Domain/PaymentProduct3209SpecificOutput.php 0000644 00000002644 15224675305 0014666 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3209SpecificOutput extends DataObject { /** * @var string|null */ public ?string $buyerCompliantBankMessage = null; /** * @return string|null */ public function getBuyerCompliantBankMessage(): ?string { return $this->buyerCompliantBankMessage; } /** * @param string|null $value */ public function setBuyerCompliantBankMessage(?string $value): void { $this->buyerCompliantBankMessage = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->buyerCompliantBankMessage)) { $object->buyerCompliantBankMessage = $this->buyerCompliantBankMessage; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3209SpecificOutput { parent::fromObject($object); if (property_exists($object, 'buyerCompliantBankMessage')) { $this->buyerCompliantBankMessage = $object->buyerCompliantBankMessage; } return $this; } } Domain/MandateCustomerResponse.php 0000644 00000012466 15224675305 0013320 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateCustomerResponse extends DataObject { /** * @var BankAccountIban|null */ public ?BankAccountIban $bankAccountIban = null; /** * @var string|null */ public ?string $companyName = null; /** * @var MandateContactDetails|null */ public ?MandateContactDetails $contactDetails = null; /** * @var MandateAddressResponse|null */ public ?MandateAddressResponse $mandateAddress = null; /** * @var MandatePersonalInformationResponse|null */ public ?MandatePersonalInformationResponse $personalInformation = null; /** * @return BankAccountIban|null */ public function getBankAccountIban(): ?BankAccountIban { return $this->bankAccountIban; } /** * @param BankAccountIban|null $value */ public function setBankAccountIban(?BankAccountIban $value): void { $this->bankAccountIban = $value; } /** * @return string|null */ public function getCompanyName(): ?string { return $this->companyName; } /** * @param string|null $value */ public function setCompanyName(?string $value): void { $this->companyName = $value; } /** * @return MandateContactDetails|null */ public function getContactDetails(): ?MandateContactDetails { return $this->contactDetails; } /** * @param MandateContactDetails|null $value */ public function setContactDetails(?MandateContactDetails $value): void { $this->contactDetails = $value; } /** * @return MandateAddressResponse|null */ public function getMandateAddress(): ?MandateAddressResponse { return $this->mandateAddress; } /** * @param MandateAddressResponse|null $value */ public function setMandateAddress(?MandateAddressResponse $value): void { $this->mandateAddress = $value; } /** * @return MandatePersonalInformationResponse|null */ public function getPersonalInformation(): ?MandatePersonalInformationResponse { return $this->personalInformation; } /** * @param MandatePersonalInformationResponse|null $value */ public function setPersonalInformation(?MandatePersonalInformationResponse $value): void { $this->personalInformation = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bankAccountIban)) { $object->bankAccountIban = $this->bankAccountIban->toObject(); } if (!is_null($this->companyName)) { $object->companyName = $this->companyName; } if (!is_null($this->contactDetails)) { $object->contactDetails = $this->contactDetails->toObject(); } if (!is_null($this->mandateAddress)) { $object->mandateAddress = $this->mandateAddress->toObject(); } if (!is_null($this->personalInformation)) { $object->personalInformation = $this->personalInformation->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateCustomerResponse { parent::fromObject($object); if (property_exists($object, 'bankAccountIban')) { if (!is_object($object->bankAccountIban)) { throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object'); } $value = new BankAccountIban(); $this->bankAccountIban = $value->fromObject($object->bankAccountIban); } if (property_exists($object, 'companyName')) { $this->companyName = $object->companyName; } if (property_exists($object, 'contactDetails')) { if (!is_object($object->contactDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->contactDetails, true) . '\' is not an object'); } $value = new MandateContactDetails(); $this->contactDetails = $value->fromObject($object->contactDetails); } if (property_exists($object, 'mandateAddress')) { if (!is_object($object->mandateAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->mandateAddress, true) . '\' is not an object'); } $value = new MandateAddressResponse(); $this->mandateAddress = $value->fromObject($object->mandateAddress); } if (property_exists($object, 'personalInformation')) { if (!is_object($object->personalInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->personalInformation, true) . '\' is not an object'); } $value = new MandatePersonalInformationResponse(); $this->personalInformation = $value->fromObject($object->personalInformation); } return $this; } } Domain/MobilePaymentData.php 0000644 00000003357 15224675305 0012044 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentData extends DataObject { /** * @var string|null */ public ?string $dpan = null; /** * @var string|null */ public ?string $expiryDate = null; /** * @return string|null */ public function getDpan(): ?string { return $this->dpan; } /** * @param string|null $value */ public function setDpan(?string $value): void { $this->dpan = $value; } /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dpan)) { $object->dpan = $this->dpan; } if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentData { parent::fromObject($object); if (property_exists($object, 'dpan')) { $this->dpan = $object->dpan; } if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } return $this; } } Domain/PaymentProduct3208SpecificInput.php 0000644 00000002540 15224675305 0014457 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3208SpecificInput extends DataObject { /** * @var string|null */ public ?string $merchantFinanceCode = null; /** * @return string|null */ public function getMerchantFinanceCode(): ?string { return $this->merchantFinanceCode; } /** * @param string|null $value */ public function setMerchantFinanceCode(?string $value): void { $this->merchantFinanceCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->merchantFinanceCode)) { $object->merchantFinanceCode = $this->merchantFinanceCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3208SpecificInput { parent::fromObject($object); if (property_exists($object, 'merchantFinanceCode')) { $this->merchantFinanceCode = $object->merchantFinanceCode; } return $this; } } Domain/RedirectPaymentProduct5408SpecificInput.php 0000644 00000004572 15224675305 0016154 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5408SpecificInput extends DataObject { /** * @var CustomerBankAccount|null */ public ?CustomerBankAccount $customerBankAccount = null; /** * @var bool|null */ public ?bool $instantPaymentOnly = null; /** * @return CustomerBankAccount|null */ public function getCustomerBankAccount(): ?CustomerBankAccount { return $this->customerBankAccount; } /** * @param CustomerBankAccount|null $value */ public function setCustomerBankAccount(?CustomerBankAccount $value): void { $this->customerBankAccount = $value; } /** * @return bool|null */ public function getInstantPaymentOnly(): ?bool { return $this->instantPaymentOnly; } /** * @param bool|null $value */ public function setInstantPaymentOnly(?bool $value): void { $this->instantPaymentOnly = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->customerBankAccount)) { $object->customerBankAccount = $this->customerBankAccount->toObject(); } if (!is_null($this->instantPaymentOnly)) { $object->instantPaymentOnly = $this->instantPaymentOnly; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5408SpecificInput { parent::fromObject($object); if (property_exists($object, 'customerBankAccount')) { if (!is_object($object->customerBankAccount)) { throw new UnexpectedValueException('value \'' . print_r($object->customerBankAccount, true) . '\' is not an object'); } $value = new CustomerBankAccount(); $this->customerBankAccount = $value->fromObject($object->customerBankAccount); } if (property_exists($object, 'instantPaymentOnly')) { $this->instantPaymentOnly = $object->instantPaymentOnly; } return $this; } } Domain/CalculateSurchargeRequest.php 0000644 00000004667 15224675305 0013624 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CalculateSurchargeRequest extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var CardSource|null */ public ?CardSource $cardSource = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return CardSource|null */ public function getCardSource(): ?CardSource { return $this->cardSource; } /** * @param CardSource|null $value */ public function setCardSource(?CardSource $value): void { $this->cardSource = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->cardSource)) { $object->cardSource = $this->cardSource->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CalculateSurchargeRequest { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'cardSource')) { if (!is_object($object->cardSource)) { throw new UnexpectedValueException('value \'' . print_r($object->cardSource, true) . '\' is not an object'); } $value = new CardSource(); $this->cardSource = $value->fromObject($object->cardSource); } return $this; } } Domain/PaymentProduct840SpecificOutput.php 0000644 00000016423 15224675305 0014604 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct840SpecificOutput extends DataObject { /** * @var Address|null */ public ?Address $billingAddress = null; /** * @var AddressPersonal|null */ public ?AddressPersonal $billingPersonalAddress = null; /** * @var PaymentProduct840CustomerAccount|null */ public ?PaymentProduct840CustomerAccount $customerAccount = null; /** * @var Address|null */ public ?Address $customerAddress = null; /** * @var string|null */ public ?string $payPalTransactionId = null; /** * @var ProtectionEligibility|null */ public ?ProtectionEligibility $protectionEligibility = null; /** * @var AddressPersonal|null */ public ?AddressPersonal $shippingAddress = null; /** * @return Address|null */ public function getBillingAddress(): ?Address { return $this->billingAddress; } /** * @param Address|null $value */ public function setBillingAddress(?Address $value): void { $this->billingAddress = $value; } /** * @return AddressPersonal|null */ public function getBillingPersonalAddress(): ?AddressPersonal { return $this->billingPersonalAddress; } /** * @param AddressPersonal|null $value */ public function setBillingPersonalAddress(?AddressPersonal $value): void { $this->billingPersonalAddress = $value; } /** * @return PaymentProduct840CustomerAccount|null */ public function getCustomerAccount(): ?PaymentProduct840CustomerAccount { return $this->customerAccount; } /** * @param PaymentProduct840CustomerAccount|null $value */ public function setCustomerAccount(?PaymentProduct840CustomerAccount $value): void { $this->customerAccount = $value; } /** * @return Address|null */ public function getCustomerAddress(): ?Address { return $this->customerAddress; } /** * @param Address|null $value */ public function setCustomerAddress(?Address $value): void { $this->customerAddress = $value; } /** * @return string|null */ public function getPayPalTransactionId(): ?string { return $this->payPalTransactionId; } /** * @param string|null $value */ public function setPayPalTransactionId(?string $value): void { $this->payPalTransactionId = $value; } /** * @return ProtectionEligibility|null */ public function getProtectionEligibility(): ?ProtectionEligibility { return $this->protectionEligibility; } /** * @param ProtectionEligibility|null $value */ public function setProtectionEligibility(?ProtectionEligibility $value): void { $this->protectionEligibility = $value; } /** * @return AddressPersonal|null */ public function getShippingAddress(): ?AddressPersonal { return $this->shippingAddress; } /** * @param AddressPersonal|null $value */ public function setShippingAddress(?AddressPersonal $value): void { $this->shippingAddress = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->billingAddress)) { $object->billingAddress = $this->billingAddress->toObject(); } if (!is_null($this->billingPersonalAddress)) { $object->billingPersonalAddress = $this->billingPersonalAddress->toObject(); } if (!is_null($this->customerAccount)) { $object->customerAccount = $this->customerAccount->toObject(); } if (!is_null($this->customerAddress)) { $object->customerAddress = $this->customerAddress->toObject(); } if (!is_null($this->payPalTransactionId)) { $object->payPalTransactionId = $this->payPalTransactionId; } if (!is_null($this->protectionEligibility)) { $object->protectionEligibility = $this->protectionEligibility->toObject(); } if (!is_null($this->shippingAddress)) { $object->shippingAddress = $this->shippingAddress->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct840SpecificOutput { parent::fromObject($object); if (property_exists($object, 'billingAddress')) { if (!is_object($object->billingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->billingAddress, true) . '\' is not an object'); } $value = new Address(); $this->billingAddress = $value->fromObject($object->billingAddress); } if (property_exists($object, 'billingPersonalAddress')) { if (!is_object($object->billingPersonalAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->billingPersonalAddress, true) . '\' is not an object'); } $value = new AddressPersonal(); $this->billingPersonalAddress = $value->fromObject($object->billingPersonalAddress); } if (property_exists($object, 'customerAccount')) { if (!is_object($object->customerAccount)) { throw new UnexpectedValueException('value \'' . print_r($object->customerAccount, true) . '\' is not an object'); } $value = new PaymentProduct840CustomerAccount(); $this->customerAccount = $value->fromObject($object->customerAccount); } if (property_exists($object, 'customerAddress')) { if (!is_object($object->customerAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->customerAddress, true) . '\' is not an object'); } $value = new Address(); $this->customerAddress = $value->fromObject($object->customerAddress); } if (property_exists($object, 'payPalTransactionId')) { $this->payPalTransactionId = $object->payPalTransactionId; } if (property_exists($object, 'protectionEligibility')) { if (!is_object($object->protectionEligibility)) { throw new UnexpectedValueException('value \'' . print_r($object->protectionEligibility, true) . '\' is not an object'); } $value = new ProtectionEligibility(); $this->protectionEligibility = $value->fromObject($object->protectionEligibility); } if (property_exists($object, 'shippingAddress')) { if (!is_object($object->shippingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->shippingAddress, true) . '\' is not an object'); } $value = new AddressPersonal(); $this->shippingAddress = $value->fromObject($object->shippingAddress); } return $this; } } Domain/AdditionalOrderInput.php 0000644 00000010466 15224675305 0012570 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AdditionalOrderInput extends DataObject { /** * @var AirlineData|null */ public ?AirlineData $airlineData = null; /** * @var LoanRecipient|null */ public ?LoanRecipient $loanRecipient = null; /** * @var LodgingData|null */ public ?LodgingData $lodgingData = null; /** * @var OrderTypeInformation|null */ public ?OrderTypeInformation $typeInformation = null; /** * @return AirlineData|null */ public function getAirlineData(): ?AirlineData { return $this->airlineData; } /** * @param AirlineData|null $value */ public function setAirlineData(?AirlineData $value): void { $this->airlineData = $value; } /** * @return LoanRecipient|null */ public function getLoanRecipient(): ?LoanRecipient { return $this->loanRecipient; } /** * @param LoanRecipient|null $value */ public function setLoanRecipient(?LoanRecipient $value): void { $this->loanRecipient = $value; } /** * @return LodgingData|null */ public function getLodgingData(): ?LodgingData { return $this->lodgingData; } /** * @param LodgingData|null $value */ public function setLodgingData(?LodgingData $value): void { $this->lodgingData = $value; } /** * @return OrderTypeInformation|null */ public function getTypeInformation(): ?OrderTypeInformation { return $this->typeInformation; } /** * @param OrderTypeInformation|null $value */ public function setTypeInformation(?OrderTypeInformation $value): void { $this->typeInformation = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->airlineData)) { $object->airlineData = $this->airlineData->toObject(); } if (!is_null($this->loanRecipient)) { $object->loanRecipient = $this->loanRecipient->toObject(); } if (!is_null($this->lodgingData)) { $object->lodgingData = $this->lodgingData->toObject(); } if (!is_null($this->typeInformation)) { $object->typeInformation = $this->typeInformation->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AdditionalOrderInput { parent::fromObject($object); if (property_exists($object, 'airlineData')) { if (!is_object($object->airlineData)) { throw new UnexpectedValueException('value \'' . print_r($object->airlineData, true) . '\' is not an object'); } $value = new AirlineData(); $this->airlineData = $value->fromObject($object->airlineData); } if (property_exists($object, 'loanRecipient')) { if (!is_object($object->loanRecipient)) { throw new UnexpectedValueException('value \'' . print_r($object->loanRecipient, true) . '\' is not an object'); } $value = new LoanRecipient(); $this->loanRecipient = $value->fromObject($object->loanRecipient); } if (property_exists($object, 'lodgingData')) { if (!is_object($object->lodgingData)) { throw new UnexpectedValueException('value \'' . print_r($object->lodgingData, true) . '\' is not an object'); } $value = new LodgingData(); $this->lodgingData = $value->fromObject($object->lodgingData); } if (property_exists($object, 'typeInformation')) { if (!is_object($object->typeInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->typeInformation, true) . '\' is not an object'); } $value = new OrderTypeInformation(); $this->typeInformation = $value->fromObject($object->typeInformation); } return $this; } } Domain/OrderTypeInformation.php 0000644 00000003604 15224675305 0012623 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OrderTypeInformation extends DataObject { /** * @var string|null */ public ?string $purchaseType = null; /** * @var string|null */ public ?string $transactionType = null; /** * @return string|null */ public function getPurchaseType(): ?string { return $this->purchaseType; } /** * @param string|null $value */ public function setPurchaseType(?string $value): void { $this->purchaseType = $value; } /** * @return string|null */ public function getTransactionType(): ?string { return $this->transactionType; } /** * @param string|null $value */ public function setTransactionType(?string $value): void { $this->transactionType = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->purchaseType)) { $object->purchaseType = $this->purchaseType; } if (!is_null($this->transactionType)) { $object->transactionType = $this->transactionType; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OrderTypeInformation { parent::fromObject($object); if (property_exists($object, 'purchaseType')) { $this->purchaseType = $object->purchaseType; } if (property_exists($object, 'transactionType')) { $this->transactionType = $object->transactionType; } return $this; } } Domain/PayoutResponse.php 0000644 00000006773 15224675305 0011512 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PayoutResponse extends DataObject { /** * @var string|null */ public ?string $id = null; /** * @var PayoutOutput|null */ public ?PayoutOutput $payoutOutput = null; /** * @var string|null */ public ?string $status = null; /** * @var PayoutStatusOutput|null */ public ?PayoutStatusOutput $statusOutput = null; /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return PayoutOutput|null */ public function getPayoutOutput(): ?PayoutOutput { return $this->payoutOutput; } /** * @param PayoutOutput|null $value */ public function setPayoutOutput(?PayoutOutput $value): void { $this->payoutOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return PayoutStatusOutput|null */ public function getStatusOutput(): ?PayoutStatusOutput { return $this->statusOutput; } /** * @param PayoutStatusOutput|null $value */ public function setStatusOutput(?PayoutStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->payoutOutput)) { $object->payoutOutput = $this->payoutOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PayoutResponse { parent::fromObject($object); if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'payoutOutput')) { if (!is_object($object->payoutOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->payoutOutput, true) . '\' is not an object'); } $value = new PayoutOutput(); $this->payoutOutput = $value->fromObject($object->payoutOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new PayoutStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PaymentProduct3204SpecificOutput.php 0000644 00000002466 15224675305 0014663 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3204SpecificOutput extends DataObject { /** * @var string|null */ public ?string $bankingAppLabel = null; /** * @return string|null */ public function getBankingAppLabel(): ?string { return $this->bankingAppLabel; } /** * @param string|null $value */ public function setBankingAppLabel(?string $value): void { $this->bankingAppLabel = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bankingAppLabel)) { $object->bankingAppLabel = $this->bankingAppLabel; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3204SpecificOutput { parent::fromObject($object); if (property_exists($object, 'bankingAppLabel')) { $this->bankingAppLabel = $object->bankingAppLabel; } return $this; } } Domain/HostedCheckoutSpecificOutput.php 0000644 00000003550 15224675305 0014303 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class HostedCheckoutSpecificOutput extends DataObject { /** * @var string|null */ public ?string $hostedCheckoutId = null; /** * @var string|null */ public ?string $variant = null; /** * @return string|null */ public function getHostedCheckoutId(): ?string { return $this->hostedCheckoutId; } /** * @param string|null $value */ public function setHostedCheckoutId(?string $value): void { $this->hostedCheckoutId = $value; } /** * @return string|null */ public function getVariant(): ?string { return $this->variant; } /** * @param string|null $value */ public function setVariant(?string $value): void { $this->variant = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->hostedCheckoutId)) { $object->hostedCheckoutId = $this->hostedCheckoutId; } if (!is_null($this->variant)) { $object->variant = $this->variant; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): HostedCheckoutSpecificOutput { parent::fromObject($object); if (property_exists($object, 'hostedCheckoutId')) { $this->hostedCheckoutId = $object->hostedCheckoutId; } if (property_exists($object, 'variant')) { $this->variant = $object->variant; } return $this; } } Domain/PaymentLinkOrderOutput.php 0000644 00000006367 15224675305 0013161 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentLinkOrderOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amount = null; /** * @var string|null */ public ?string $merchantReference = null; /** * @var SurchargeForPaymentLink|null */ public ?SurchargeForPaymentLink $surchargeSpecificOutput = null; /** * @return AmountOfMoney|null */ public function getAmount(): ?AmountOfMoney { return $this->amount; } /** * @param AmountOfMoney|null $value */ public function setAmount(?AmountOfMoney $value): void { $this->amount = $value; } /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return SurchargeForPaymentLink|null */ public function getSurchargeSpecificOutput(): ?SurchargeForPaymentLink { return $this->surchargeSpecificOutput; } /** * @param SurchargeForPaymentLink|null $value */ public function setSurchargeSpecificOutput(?SurchargeForPaymentLink $value): void { $this->surchargeSpecificOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount->toObject(); } if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->surchargeSpecificOutput)) { $object->surchargeSpecificOutput = $this->surchargeSpecificOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinkOrderOutput { parent::fromObject($object); if (property_exists($object, 'amount')) { if (!is_object($object->amount)) { throw new UnexpectedValueException('value \'' . print_r($object->amount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amount = $value->fromObject($object->amount); } if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'surchargeSpecificOutput')) { if (!is_object($object->surchargeSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeSpecificOutput, true) . '\' is not an object'); } $value = new SurchargeForPaymentLink(); $this->surchargeSpecificOutput = $value->fromObject($object->surchargeSpecificOutput); } return $this; } } Domain/CreatePayoutRequest.php 0000644 00000014553 15224675305 0012463 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatePayoutRequest extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var CardPayoutMethodSpecificInput|null */ public ?CardPayoutMethodSpecificInput $cardPayoutMethodSpecificInput = null; /** * @var string|null */ public ?string $descriptor = null; /** * @var Feedbacks|null */ public ?Feedbacks $feedbacks = null; /** * @var OmnichannelPayoutSpecificInput|null */ public ?OmnichannelPayoutSpecificInput $omnichannelPayoutSpecificInput = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return CardPayoutMethodSpecificInput|null */ public function getCardPayoutMethodSpecificInput(): ?CardPayoutMethodSpecificInput { return $this->cardPayoutMethodSpecificInput; } /** * @param CardPayoutMethodSpecificInput|null $value */ public function setCardPayoutMethodSpecificInput(?CardPayoutMethodSpecificInput $value): void { $this->cardPayoutMethodSpecificInput = $value; } /** * @return string|null */ public function getDescriptor(): ?string { return $this->descriptor; } /** * @param string|null $value */ public function setDescriptor(?string $value): void { $this->descriptor = $value; } /** * @return Feedbacks|null */ public function getFeedbacks(): ?Feedbacks { return $this->feedbacks; } /** * @param Feedbacks|null $value */ public function setFeedbacks(?Feedbacks $value): void { $this->feedbacks = $value; } /** * @return OmnichannelPayoutSpecificInput|null */ public function getOmnichannelPayoutSpecificInput(): ?OmnichannelPayoutSpecificInput { return $this->omnichannelPayoutSpecificInput; } /** * @param OmnichannelPayoutSpecificInput|null $value */ public function setOmnichannelPayoutSpecificInput(?OmnichannelPayoutSpecificInput $value): void { $this->omnichannelPayoutSpecificInput = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->cardPayoutMethodSpecificInput)) { $object->cardPayoutMethodSpecificInput = $this->cardPayoutMethodSpecificInput->toObject(); } if (!is_null($this->descriptor)) { $object->descriptor = $this->descriptor; } if (!is_null($this->feedbacks)) { $object->feedbacks = $this->feedbacks->toObject(); } if (!is_null($this->omnichannelPayoutSpecificInput)) { $object->omnichannelPayoutSpecificInput = $this->omnichannelPayoutSpecificInput->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatePayoutRequest { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'cardPayoutMethodSpecificInput')) { if (!is_object($object->cardPayoutMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPayoutMethodSpecificInput, true) . '\' is not an object'); } $value = new CardPayoutMethodSpecificInput(); $this->cardPayoutMethodSpecificInput = $value->fromObject($object->cardPayoutMethodSpecificInput); } if (property_exists($object, 'descriptor')) { $this->descriptor = $object->descriptor; } if (property_exists($object, 'feedbacks')) { if (!is_object($object->feedbacks)) { throw new UnexpectedValueException('value \'' . print_r($object->feedbacks, true) . '\' is not an object'); } $value = new Feedbacks(); $this->feedbacks = $value->fromObject($object->feedbacks); } if (property_exists($object, 'omnichannelPayoutSpecificInput')) { if (!is_object($object->omnichannelPayoutSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->omnichannelPayoutSpecificInput, true) . '\' is not an object'); } $value = new OmnichannelPayoutSpecificInput(); $this->omnichannelPayoutSpecificInput = $value->fromObject($object->omnichannelPayoutSpecificInput); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } return $this; } } Domain/ThreeDSecureBase.php 0000644 00000015670 15224675305 0011623 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ThreeDSecureBase extends DataObject { /** * @var int|null */ public ?int $authenticationAmount = null; /** * @var string|null */ public ?string $challengeCanvasSize = null; /** * @var string|null */ public ?string $challengeIndicator = null; /** * @var string|null */ public ?string $exemptionRequest = null; /** * @var int|null */ public ?int $merchantFraudRate = null; /** * @var ThreeDSecureData|null */ public ?ThreeDSecureData $priorThreeDSecureData = null; /** * @var bool|null */ public ?bool $secureCorporatePayment = null; /** * @var bool|null */ public ?bool $skipAuthentication = null; /** * @var bool|null */ public ?bool $skipSoftDecline = null; /** * @return int|null */ public function getAuthenticationAmount(): ?int { return $this->authenticationAmount; } /** * @param int|null $value */ public function setAuthenticationAmount(?int $value): void { $this->authenticationAmount = $value; } /** * @return string|null */ public function getChallengeCanvasSize(): ?string { return $this->challengeCanvasSize; } /** * @param string|null $value */ public function setChallengeCanvasSize(?string $value): void { $this->challengeCanvasSize = $value; } /** * @return string|null */ public function getChallengeIndicator(): ?string { return $this->challengeIndicator; } /** * @param string|null $value */ public function setChallengeIndicator(?string $value): void { $this->challengeIndicator = $value; } /** * @return string|null */ public function getExemptionRequest(): ?string { return $this->exemptionRequest; } /** * @param string|null $value */ public function setExemptionRequest(?string $value): void { $this->exemptionRequest = $value; } /** * @return int|null */ public function getMerchantFraudRate(): ?int { return $this->merchantFraudRate; } /** * @param int|null $value */ public function setMerchantFraudRate(?int $value): void { $this->merchantFraudRate = $value; } /** * @return ThreeDSecureData|null */ public function getPriorThreeDSecureData(): ?ThreeDSecureData { return $this->priorThreeDSecureData; } /** * @param ThreeDSecureData|null $value */ public function setPriorThreeDSecureData(?ThreeDSecureData $value): void { $this->priorThreeDSecureData = $value; } /** * @return bool|null */ public function getSecureCorporatePayment(): ?bool { return $this->secureCorporatePayment; } /** * @param bool|null $value */ public function setSecureCorporatePayment(?bool $value): void { $this->secureCorporatePayment = $value; } /** * @return bool|null */ public function getSkipAuthentication(): ?bool { return $this->skipAuthentication; } /** * @param bool|null $value */ public function setSkipAuthentication(?bool $value): void { $this->skipAuthentication = $value; } /** * @return bool|null */ public function getSkipSoftDecline(): ?bool { return $this->skipSoftDecline; } /** * @param bool|null $value */ public function setSkipSoftDecline(?bool $value): void { $this->skipSoftDecline = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authenticationAmount)) { $object->authenticationAmount = $this->authenticationAmount; } if (!is_null($this->challengeCanvasSize)) { $object->challengeCanvasSize = $this->challengeCanvasSize; } if (!is_null($this->challengeIndicator)) { $object->challengeIndicator = $this->challengeIndicator; } if (!is_null($this->exemptionRequest)) { $object->exemptionRequest = $this->exemptionRequest; } if (!is_null($this->merchantFraudRate)) { $object->merchantFraudRate = $this->merchantFraudRate; } if (!is_null($this->priorThreeDSecureData)) { $object->priorThreeDSecureData = $this->priorThreeDSecureData->toObject(); } if (!is_null($this->secureCorporatePayment)) { $object->secureCorporatePayment = $this->secureCorporatePayment; } if (!is_null($this->skipAuthentication)) { $object->skipAuthentication = $this->skipAuthentication; } if (!is_null($this->skipSoftDecline)) { $object->skipSoftDecline = $this->skipSoftDecline; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ThreeDSecureBase { parent::fromObject($object); if (property_exists($object, 'authenticationAmount')) { $this->authenticationAmount = $object->authenticationAmount; } if (property_exists($object, 'challengeCanvasSize')) { $this->challengeCanvasSize = $object->challengeCanvasSize; } if (property_exists($object, 'challengeIndicator')) { $this->challengeIndicator = $object->challengeIndicator; } if (property_exists($object, 'exemptionRequest')) { $this->exemptionRequest = $object->exemptionRequest; } if (property_exists($object, 'merchantFraudRate')) { $this->merchantFraudRate = $object->merchantFraudRate; } if (property_exists($object, 'priorThreeDSecureData')) { if (!is_object($object->priorThreeDSecureData)) { throw new UnexpectedValueException('value \'' . print_r($object->priorThreeDSecureData, true) . '\' is not an object'); } $value = new ThreeDSecureData(); $this->priorThreeDSecureData = $value->fromObject($object->priorThreeDSecureData); } if (property_exists($object, 'secureCorporatePayment')) { $this->secureCorporatePayment = $object->secureCorporatePayment; } if (property_exists($object, 'skipAuthentication')) { $this->skipAuthentication = $object->skipAuthentication; } if (property_exists($object, 'skipSoftDecline')) { $this->skipSoftDecline = $object->skipSoftDecline; } return $this; } } Domain/AccountOnFileDisplayHints.php 0000644 00000004646 15224675305 0013534 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AccountOnFileDisplayHints extends DataObject { /** * @var LabelTemplateElement[]|null */ public ?array $labelTemplate = null; /** * @var string|null */ public ?string $logo = null; /** * @return LabelTemplateElement[]|null */ public function getLabelTemplate(): ?array { return $this->labelTemplate; } /** * @param LabelTemplateElement[]|null $value */ public function setLabelTemplate(?array $value): void { $this->labelTemplate = $value; } /** * @return string|null */ public function getLogo(): ?string { return $this->logo; } /** * @param string|null $value */ public function setLogo(?string $value): void { $this->logo = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->labelTemplate)) { $object->labelTemplate = []; foreach ($this->labelTemplate as $element) { if (!is_null($element)) { $object->labelTemplate[] = $element->toObject(); } } } if (!is_null($this->logo)) { $object->logo = $this->logo; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AccountOnFileDisplayHints { parent::fromObject($object); if (property_exists($object, 'labelTemplate')) { if (!is_array($object->labelTemplate) && !is_object($object->labelTemplate)) { throw new UnexpectedValueException('value \'' . print_r($object->labelTemplate, true) . '\' is not an array or object'); } $this->labelTemplate = []; foreach ($object->labelTemplate as $element) { $value = new LabelTemplateElement(); $this->labelTemplate[] = $value->fromObject($element); } } if (property_exists($object, 'logo')) { $this->logo = $object->logo; } return $this; } } Domain/CustomerDevice.php 0000644 00000012247 15224675305 0011424 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerDevice extends DataObject { /** * @var string|null */ public ?string $acceptHeader = null; /** * @var BrowserData|null */ public ?BrowserData $browserData = null; /** * @var string|null */ public ?string $deviceFingerprint = null; /** * @var string|null */ public ?string $ipAddress = null; /** * @var string|null */ public ?string $locale = null; /** * @var string|null */ public ?string $timezoneOffsetUtcMinutes = null; /** * @var string|null */ public ?string $userAgent = null; /** * @return string|null */ public function getAcceptHeader(): ?string { return $this->acceptHeader; } /** * @param string|null $value */ public function setAcceptHeader(?string $value): void { $this->acceptHeader = $value; } /** * @return BrowserData|null */ public function getBrowserData(): ?BrowserData { return $this->browserData; } /** * @param BrowserData|null $value */ public function setBrowserData(?BrowserData $value): void { $this->browserData = $value; } /** * @return string|null */ public function getDeviceFingerprint(): ?string { return $this->deviceFingerprint; } /** * @param string|null $value */ public function setDeviceFingerprint(?string $value): void { $this->deviceFingerprint = $value; } /** * @return string|null */ public function getIpAddress(): ?string { return $this->ipAddress; } /** * @param string|null $value */ public function setIpAddress(?string $value): void { $this->ipAddress = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return string|null */ public function getTimezoneOffsetUtcMinutes(): ?string { return $this->timezoneOffsetUtcMinutes; } /** * @param string|null $value */ public function setTimezoneOffsetUtcMinutes(?string $value): void { $this->timezoneOffsetUtcMinutes = $value; } /** * @return string|null */ public function getUserAgent(): ?string { return $this->userAgent; } /** * @param string|null $value */ public function setUserAgent(?string $value): void { $this->userAgent = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acceptHeader)) { $object->acceptHeader = $this->acceptHeader; } if (!is_null($this->browserData)) { $object->browserData = $this->browserData->toObject(); } if (!is_null($this->deviceFingerprint)) { $object->deviceFingerprint = $this->deviceFingerprint; } if (!is_null($this->ipAddress)) { $object->ipAddress = $this->ipAddress; } if (!is_null($this->locale)) { $object->locale = $this->locale; } if (!is_null($this->timezoneOffsetUtcMinutes)) { $object->timezoneOffsetUtcMinutes = $this->timezoneOffsetUtcMinutes; } if (!is_null($this->userAgent)) { $object->userAgent = $this->userAgent; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerDevice { parent::fromObject($object); if (property_exists($object, 'acceptHeader')) { $this->acceptHeader = $object->acceptHeader; } if (property_exists($object, 'browserData')) { if (!is_object($object->browserData)) { throw new UnexpectedValueException('value \'' . print_r($object->browserData, true) . '\' is not an object'); } $value = new BrowserData(); $this->browserData = $value->fromObject($object->browserData); } if (property_exists($object, 'deviceFingerprint')) { $this->deviceFingerprint = $object->deviceFingerprint; } if (property_exists($object, 'ipAddress')) { $this->ipAddress = $object->ipAddress; } if (property_exists($object, 'locale')) { $this->locale = $object->locale; } if (property_exists($object, 'timezoneOffsetUtcMinutes')) { $this->timezoneOffsetUtcMinutes = $object->timezoneOffsetUtcMinutes; } if (property_exists($object, 'userAgent')) { $this->userAgent = $object->userAgent; } return $this; } } Domain/DirectoryEntry.php 0000644 00000004545 15224675305 0011473 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class DirectoryEntry extends DataObject { /** * @var string|null */ public ?string $issuerId = null; /** * @var string|null */ public ?string $issuerList = null; /** * @var string|null */ public ?string $issuerName = null; /** * @return string|null */ public function getIssuerId(): ?string { return $this->issuerId; } /** * @param string|null $value */ public function setIssuerId(?string $value): void { $this->issuerId = $value; } /** * @return string|null */ public function getIssuerList(): ?string { return $this->issuerList; } /** * @param string|null $value */ public function setIssuerList(?string $value): void { $this->issuerList = $value; } /** * @return string|null */ public function getIssuerName(): ?string { return $this->issuerName; } /** * @param string|null $value */ public function setIssuerName(?string $value): void { $this->issuerName = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->issuerId)) { $object->issuerId = $this->issuerId; } if (!is_null($this->issuerList)) { $object->issuerList = $this->issuerList; } if (!is_null($this->issuerName)) { $object->issuerName = $this->issuerName; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DirectoryEntry { parent::fromObject($object); if (property_exists($object, 'issuerId')) { $this->issuerId = $object->issuerId; } if (property_exists($object, 'issuerList')) { $this->issuerList = $object->issuerList; } if (property_exists($object, 'issuerName')) { $this->issuerName = $object->issuerName; } return $this; } } Domain/ContactDetails.php 0000644 00000007265 15224675305 0011410 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ContactDetails extends DataObject { /** * @var string|null */ public ?string $emailAddress = null; /** * @var string|null */ public ?string $faxNumber = null; /** * @var string|null */ public ?string $mobilePhoneNumber = null; /** * @var string|null */ public ?string $phoneNumber = null; /** * @var string|null */ public ?string $workPhoneNumber = null; /** * @return string|null */ public function getEmailAddress(): ?string { return $this->emailAddress; } /** * @param string|null $value */ public function setEmailAddress(?string $value): void { $this->emailAddress = $value; } /** * @return string|null */ public function getFaxNumber(): ?string { return $this->faxNumber; } /** * @param string|null $value */ public function setFaxNumber(?string $value): void { $this->faxNumber = $value; } /** * @return string|null */ public function getMobilePhoneNumber(): ?string { return $this->mobilePhoneNumber; } /** * @param string|null $value */ public function setMobilePhoneNumber(?string $value): void { $this->mobilePhoneNumber = $value; } /** * @return string|null */ public function getPhoneNumber(): ?string { return $this->phoneNumber; } /** * @param string|null $value */ public function setPhoneNumber(?string $value): void { $this->phoneNumber = $value; } /** * @return string|null */ public function getWorkPhoneNumber(): ?string { return $this->workPhoneNumber; } /** * @param string|null $value */ public function setWorkPhoneNumber(?string $value): void { $this->workPhoneNumber = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->emailAddress)) { $object->emailAddress = $this->emailAddress; } if (!is_null($this->faxNumber)) { $object->faxNumber = $this->faxNumber; } if (!is_null($this->mobilePhoneNumber)) { $object->mobilePhoneNumber = $this->mobilePhoneNumber; } if (!is_null($this->phoneNumber)) { $object->phoneNumber = $this->phoneNumber; } if (!is_null($this->workPhoneNumber)) { $object->workPhoneNumber = $this->workPhoneNumber; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ContactDetails { parent::fromObject($object); if (property_exists($object, 'emailAddress')) { $this->emailAddress = $object->emailAddress; } if (property_exists($object, 'faxNumber')) { $this->faxNumber = $object->faxNumber; } if (property_exists($object, 'mobilePhoneNumber')) { $this->mobilePhoneNumber = $object->mobilePhoneNumber; } if (property_exists($object, 'phoneNumber')) { $this->phoneNumber = $object->phoneNumber; } if (property_exists($object, 'workPhoneNumber')) { $this->workPhoneNumber = $object->workPhoneNumber; } return $this; } } Domain/CurrencyConversionRequest.php 0000644 00000004644 15224675305 0013716 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversionRequest extends DataObject { /** * @var DccCardSource|null */ public ?DccCardSource $cardSource = null; /** * @var Transaction|null */ public ?Transaction $transaction = null; /** * @return DccCardSource|null */ public function getCardSource(): ?DccCardSource { return $this->cardSource; } /** * @param DccCardSource|null $value */ public function setCardSource(?DccCardSource $value): void { $this->cardSource = $value; } /** * @return Transaction|null */ public function getTransaction(): ?Transaction { return $this->transaction; } /** * @param Transaction|null $value */ public function setTransaction(?Transaction $value): void { $this->transaction = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardSource)) { $object->cardSource = $this->cardSource->toObject(); } if (!is_null($this->transaction)) { $object->transaction = $this->transaction->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversionRequest { parent::fromObject($object); if (property_exists($object, 'cardSource')) { if (!is_object($object->cardSource)) { throw new UnexpectedValueException('value \'' . print_r($object->cardSource, true) . '\' is not an object'); } $value = new DccCardSource(); $this->cardSource = $value->fromObject($object->cardSource); } if (property_exists($object, 'transaction')) { if (!is_object($object->transaction)) { throw new UnexpectedValueException('value \'' . print_r($object->transaction, true) . '\' is not an object'); } $value = new Transaction(); $this->transaction = $value->fromObject($object->transaction); } return $this; } } Domain/GetMandateResponse.php 0000644 00000002774 15224675305 0012237 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetMandateResponse extends DataObject { /** * @var MandateResponse|null */ public ?MandateResponse $mandate = null; /** * @return MandateResponse|null */ public function getMandate(): ?MandateResponse { return $this->mandate; } /** * @param MandateResponse|null $value */ public function setMandate(?MandateResponse $value): void { $this->mandate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->mandate)) { $object->mandate = $this->mandate->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetMandateResponse { parent::fromObject($object); if (property_exists($object, 'mandate')) { if (!is_object($object->mandate)) { throw new UnexpectedValueException('value \'' . print_r($object->mandate, true) . '\' is not an object'); } $value = new MandateResponse(); $this->mandate = $value->fromObject($object->mandate); } return $this; } } Domain/TokenData.php 0000644 00000004153 15224675305 0010352 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenData extends DataObject { /** * @var Card|null */ public ?Card $card = null; /** * @var string|null */ public ?string $cobrandSelectionIndicator = null; /** * @return Card|null */ public function getCard(): ?Card { return $this->card; } /** * @param Card|null $value */ public function setCard(?Card $value): void { $this->card = $value; } /** * @return string|null */ public function getCobrandSelectionIndicator(): ?string { return $this->cobrandSelectionIndicator; } /** * @param string|null $value */ public function setCobrandSelectionIndicator(?string $value): void { $this->cobrandSelectionIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->cobrandSelectionIndicator)) { $object->cobrandSelectionIndicator = $this->cobrandSelectionIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenData { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new Card(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'cobrandSelectionIndicator')) { $this->cobrandSelectionIndicator = $object->cobrandSelectionIndicator; } return $this; } } Domain/PaymentProduct3209SpecificInput.php 0000644 00000002540 15224675305 0014460 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3209SpecificInput extends DataObject { /** * @var string|null */ public ?string $merchantFinanceCode = null; /** * @return string|null */ public function getMerchantFinanceCode(): ?string { return $this->merchantFinanceCode; } /** * @param string|null $value */ public function setMerchantFinanceCode(?string $value): void { $this->merchantFinanceCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->merchantFinanceCode)) { $object->merchantFinanceCode = $this->merchantFinanceCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3209SpecificInput { parent::fromObject($object); if (property_exists($object, 'merchantFinanceCode')) { $this->merchantFinanceCode = $object->merchantFinanceCode; } return $this; } } Domain/AddressPersonal.php 0000644 00000013625 15224675305 0011575 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AddressPersonal extends DataObject { /** * @var string|null */ public ?string $additionalInfo = null; /** * @var string|null */ public ?string $city = null; /** * @var string|null */ public ?string $companyName = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $houseNumber = null; /** * @var PersonalName|null */ public ?PersonalName $name = null; /** * @var string|null */ public ?string $state = null; /** * @var string|null */ public ?string $street = null; /** * @var string|null */ public ?string $zip = null; /** * @return string|null */ public function getAdditionalInfo(): ?string { return $this->additionalInfo; } /** * @param string|null $value */ public function setAdditionalInfo(?string $value): void { $this->additionalInfo = $value; } /** * @return string|null */ public function getCity(): ?string { return $this->city; } /** * @param string|null $value */ public function setCity(?string $value): void { $this->city = $value; } /** * @return string|null */ public function getCompanyName(): ?string { return $this->companyName; } /** * @param string|null $value */ public function setCompanyName(?string $value): void { $this->companyName = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getHouseNumber(): ?string { return $this->houseNumber; } /** * @param string|null $value */ public function setHouseNumber(?string $value): void { $this->houseNumber = $value; } /** * @return PersonalName|null */ public function getName(): ?PersonalName { return $this->name; } /** * @param PersonalName|null $value */ public function setName(?PersonalName $value): void { $this->name = $value; } /** * @return string|null */ public function getState(): ?string { return $this->state; } /** * @param string|null $value */ public function setState(?string $value): void { $this->state = $value; } /** * @return string|null */ public function getStreet(): ?string { return $this->street; } /** * @param string|null $value */ public function setStreet(?string $value): void { $this->street = $value; } /** * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * @param string|null $value */ public function setZip(?string $value): void { $this->zip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->additionalInfo)) { $object->additionalInfo = $this->additionalInfo; } if (!is_null($this->city)) { $object->city = $this->city; } if (!is_null($this->companyName)) { $object->companyName = $this->companyName; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->houseNumber)) { $object->houseNumber = $this->houseNumber; } if (!is_null($this->name)) { $object->name = $this->name->toObject(); } if (!is_null($this->state)) { $object->state = $this->state; } if (!is_null($this->street)) { $object->street = $this->street; } if (!is_null($this->zip)) { $object->zip = $this->zip; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AddressPersonal { parent::fromObject($object); if (property_exists($object, 'additionalInfo')) { $this->additionalInfo = $object->additionalInfo; } if (property_exists($object, 'city')) { $this->city = $object->city; } if (property_exists($object, 'companyName')) { $this->companyName = $object->companyName; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'houseNumber')) { $this->houseNumber = $object->houseNumber; } if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); } $value = new PersonalName(); $this->name = $value->fromObject($object->name); } if (property_exists($object, 'state')) { $this->state = $object->state; } if (property_exists($object, 'street')) { $this->street = $object->street; } if (property_exists($object, 'zip')) { $this->zip = $object->zip; } return $this; } } Domain/RedirectPaymentMethodSpecificOutput.php 0000644 00000031317 15224675305 0015631 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentMethodSpecificOutput extends DataObject { /** * @var string|null */ public ?string $authorisationCode = null; /** * @var CustomerBankAccount|null */ public ?CustomerBankAccount $customerBankAccount = null; /** * @var FraudResults|null */ public ?FraudResults $fraudResults = null; /** * @var PaymentProduct3204SpecificOutput|null */ public ?PaymentProduct3204SpecificOutput $paymentMethod3204SpecificOutput = null; /** * @var string|null */ public ?string $paymentOption = null; /** * @var PaymentProduct3203SpecificOutput|null */ public ?PaymentProduct3203SpecificOutput $paymentProduct3203SpecificOutput = null; /** * @var PaymentProduct5001SpecificOutput|null */ public ?PaymentProduct5001SpecificOutput $paymentProduct5001SpecificOutput = null; /** * @var PaymentProduct5402SpecificOutput|null */ public ?PaymentProduct5402SpecificOutput $paymentProduct5402SpecificOutput = null; /** * @var PaymentProduct5500SpecificOutput|null */ public ?PaymentProduct5500SpecificOutput $paymentProduct5500SpecificOutput = null; /** * @var PaymentProduct840SpecificOutput|null */ public ?PaymentProduct840SpecificOutput $paymentProduct840SpecificOutput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var string|null */ public ?string $token = null; /** * @return string|null */ public function getAuthorisationCode(): ?string { return $this->authorisationCode; } /** * @param string|null $value */ public function setAuthorisationCode(?string $value): void { $this->authorisationCode = $value; } /** * @return CustomerBankAccount|null */ public function getCustomerBankAccount(): ?CustomerBankAccount { return $this->customerBankAccount; } /** * @param CustomerBankAccount|null $value */ public function setCustomerBankAccount(?CustomerBankAccount $value): void { $this->customerBankAccount = $value; } /** * @return FraudResults|null */ public function getFraudResults(): ?FraudResults { return $this->fraudResults; } /** * @param FraudResults|null $value */ public function setFraudResults(?FraudResults $value): void { $this->fraudResults = $value; } /** * @return PaymentProduct3204SpecificOutput|null */ public function getPaymentMethod3204SpecificOutput(): ?PaymentProduct3204SpecificOutput { return $this->paymentMethod3204SpecificOutput; } /** * @param PaymentProduct3204SpecificOutput|null $value */ public function setPaymentMethod3204SpecificOutput(?PaymentProduct3204SpecificOutput $value): void { $this->paymentMethod3204SpecificOutput = $value; } /** * @return string|null */ public function getPaymentOption(): ?string { return $this->paymentOption; } /** * @param string|null $value */ public function setPaymentOption(?string $value): void { $this->paymentOption = $value; } /** * @return PaymentProduct3203SpecificOutput|null */ public function getPaymentProduct3203SpecificOutput(): ?PaymentProduct3203SpecificOutput { return $this->paymentProduct3203SpecificOutput; } /** * @param PaymentProduct3203SpecificOutput|null $value */ public function setPaymentProduct3203SpecificOutput(?PaymentProduct3203SpecificOutput $value): void { $this->paymentProduct3203SpecificOutput = $value; } /** * @return PaymentProduct5001SpecificOutput|null */ public function getPaymentProduct5001SpecificOutput(): ?PaymentProduct5001SpecificOutput { return $this->paymentProduct5001SpecificOutput; } /** * @param PaymentProduct5001SpecificOutput|null $value */ public function setPaymentProduct5001SpecificOutput(?PaymentProduct5001SpecificOutput $value): void { $this->paymentProduct5001SpecificOutput = $value; } /** * @return PaymentProduct5402SpecificOutput|null */ public function getPaymentProduct5402SpecificOutput(): ?PaymentProduct5402SpecificOutput { return $this->paymentProduct5402SpecificOutput; } /** * @param PaymentProduct5402SpecificOutput|null $value */ public function setPaymentProduct5402SpecificOutput(?PaymentProduct5402SpecificOutput $value): void { $this->paymentProduct5402SpecificOutput = $value; } /** * @return PaymentProduct5500SpecificOutput|null */ public function getPaymentProduct5500SpecificOutput(): ?PaymentProduct5500SpecificOutput { return $this->paymentProduct5500SpecificOutput; } /** * @param PaymentProduct5500SpecificOutput|null $value */ public function setPaymentProduct5500SpecificOutput(?PaymentProduct5500SpecificOutput $value): void { $this->paymentProduct5500SpecificOutput = $value; } /** * @return PaymentProduct840SpecificOutput|null */ public function getPaymentProduct840SpecificOutput(): ?PaymentProduct840SpecificOutput { return $this->paymentProduct840SpecificOutput; } /** * @param PaymentProduct840SpecificOutput|null $value */ public function setPaymentProduct840SpecificOutput(?PaymentProduct840SpecificOutput $value): void { $this->paymentProduct840SpecificOutput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authorisationCode)) { $object->authorisationCode = $this->authorisationCode; } if (!is_null($this->customerBankAccount)) { $object->customerBankAccount = $this->customerBankAccount->toObject(); } if (!is_null($this->fraudResults)) { $object->fraudResults = $this->fraudResults->toObject(); } if (!is_null($this->paymentMethod3204SpecificOutput)) { $object->paymentMethod3204SpecificOutput = $this->paymentMethod3204SpecificOutput->toObject(); } if (!is_null($this->paymentOption)) { $object->paymentOption = $this->paymentOption; } if (!is_null($this->paymentProduct3203SpecificOutput)) { $object->paymentProduct3203SpecificOutput = $this->paymentProduct3203SpecificOutput->toObject(); } if (!is_null($this->paymentProduct5001SpecificOutput)) { $object->paymentProduct5001SpecificOutput = $this->paymentProduct5001SpecificOutput->toObject(); } if (!is_null($this->paymentProduct5402SpecificOutput)) { $object->paymentProduct5402SpecificOutput = $this->paymentProduct5402SpecificOutput->toObject(); } if (!is_null($this->paymentProduct5500SpecificOutput)) { $object->paymentProduct5500SpecificOutput = $this->paymentProduct5500SpecificOutput->toObject(); } if (!is_null($this->paymentProduct840SpecificOutput)) { $object->paymentProduct840SpecificOutput = $this->paymentProduct840SpecificOutput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->token)) { $object->token = $this->token; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'authorisationCode')) { $this->authorisationCode = $object->authorisationCode; } if (property_exists($object, 'customerBankAccount')) { if (!is_object($object->customerBankAccount)) { throw new UnexpectedValueException('value \'' . print_r($object->customerBankAccount, true) . '\' is not an object'); } $value = new CustomerBankAccount(); $this->customerBankAccount = $value->fromObject($object->customerBankAccount); } if (property_exists($object, 'fraudResults')) { if (!is_object($object->fraudResults)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudResults, true) . '\' is not an object'); } $value = new FraudResults(); $this->fraudResults = $value->fromObject($object->fraudResults); } if (property_exists($object, 'paymentMethod3204SpecificOutput')) { if (!is_object($object->paymentMethod3204SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentMethod3204SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct3204SpecificOutput(); $this->paymentMethod3204SpecificOutput = $value->fromObject($object->paymentMethod3204SpecificOutput); } if (property_exists($object, 'paymentOption')) { $this->paymentOption = $object->paymentOption; } if (property_exists($object, 'paymentProduct3203SpecificOutput')) { if (!is_object($object->paymentProduct3203SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3203SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct3203SpecificOutput(); $this->paymentProduct3203SpecificOutput = $value->fromObject($object->paymentProduct3203SpecificOutput); } if (property_exists($object, 'paymentProduct5001SpecificOutput')) { if (!is_object($object->paymentProduct5001SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5001SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct5001SpecificOutput(); $this->paymentProduct5001SpecificOutput = $value->fromObject($object->paymentProduct5001SpecificOutput); } if (property_exists($object, 'paymentProduct5402SpecificOutput')) { if (!is_object($object->paymentProduct5402SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5402SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct5402SpecificOutput(); $this->paymentProduct5402SpecificOutput = $value->fromObject($object->paymentProduct5402SpecificOutput); } if (property_exists($object, 'paymentProduct5500SpecificOutput')) { if (!is_object($object->paymentProduct5500SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5500SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct5500SpecificOutput(); $this->paymentProduct5500SpecificOutput = $value->fromObject($object->paymentProduct5500SpecificOutput); } if (property_exists($object, 'paymentProduct840SpecificOutput')) { if (!is_object($object->paymentProduct840SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct840SpecificOutput(); $this->paymentProduct840SpecificOutput = $value->fromObject($object->paymentProduct840SpecificOutput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'token')) { $this->token = $object->token; } return $this; } } Domain/PaymentProductFieldTooltip.php 0000644 00000004166 15224675305 0014001 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldTooltip extends DataObject { /** * @var string|null * @deprecated This field is not used by any payment product Relative URL that can be used to retrieve an image for the tooltip image. */ public ?string $image = null; /** * @var string|null */ public ?string $label = null; /** * @return string|null * @deprecated This field is not used by any payment product Relative URL that can be used to retrieve an image for the tooltip image. */ public function getImage(): ?string { return $this->image; } /** * @param string|null $value * @deprecated This field is not used by any payment product Relative URL that can be used to retrieve an image for the tooltip image. */ public function setImage(?string $value): void { $this->image = $value; } /** * @return string|null */ public function getLabel(): ?string { return $this->label; } /** * @param string|null $value */ public function setLabel(?string $value): void { $this->label = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->image)) { $object->image = $this->image; } if (!is_null($this->label)) { $object->label = $this->label; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldTooltip { parent::fromObject($object); if (property_exists($object, 'image')) { $this->image = $object->image; } if (property_exists($object, 'label')) { $this->label = $object->label; } return $this; } } Domain/MandateResponse.php 0000644 00000012265 15224675305 0011573 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateResponse extends DataObject { /** * @var string|null */ public ?string $alias = null; /** * @var MandateCustomerResponse|null */ public ?MandateCustomerResponse $customer = null; /** * @var string|null */ public ?string $customerReference = null; /** * @var string|null */ public ?string $mandatePdf = null; /** * @var string|null */ public ?string $recurrenceType = null; /** * @var string|null */ public ?string $status = null; /** * @var string|null */ public ?string $uniqueMandateReference = null; /** * @return string|null */ public function getAlias(): ?string { return $this->alias; } /** * @param string|null $value */ public function setAlias(?string $value): void { $this->alias = $value; } /** * @return MandateCustomerResponse|null */ public function getCustomer(): ?MandateCustomerResponse { return $this->customer; } /** * @param MandateCustomerResponse|null $value */ public function setCustomer(?MandateCustomerResponse $value): void { $this->customer = $value; } /** * @return string|null */ public function getCustomerReference(): ?string { return $this->customerReference; } /** * @param string|null $value */ public function setCustomerReference(?string $value): void { $this->customerReference = $value; } /** * @return string|null */ public function getMandatePdf(): ?string { return $this->mandatePdf; } /** * @param string|null $value */ public function setMandatePdf(?string $value): void { $this->mandatePdf = $value; } /** * @return string|null */ public function getRecurrenceType(): ?string { return $this->recurrenceType; } /** * @param string|null $value */ public function setRecurrenceType(?string $value): void { $this->recurrenceType = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return string|null */ public function getUniqueMandateReference(): ?string { return $this->uniqueMandateReference; } /** * @param string|null $value */ public function setUniqueMandateReference(?string $value): void { $this->uniqueMandateReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alias)) { $object->alias = $this->alias; } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } if (!is_null($this->customerReference)) { $object->customerReference = $this->customerReference; } if (!is_null($this->mandatePdf)) { $object->mandatePdf = $this->mandatePdf; } if (!is_null($this->recurrenceType)) { $object->recurrenceType = $this->recurrenceType; } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->uniqueMandateReference)) { $object->uniqueMandateReference = $this->uniqueMandateReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateResponse { parent::fromObject($object); if (property_exists($object, 'alias')) { $this->alias = $object->alias; } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new MandateCustomerResponse(); $this->customer = $value->fromObject($object->customer); } if (property_exists($object, 'customerReference')) { $this->customerReference = $object->customerReference; } if (property_exists($object, 'mandatePdf')) { $this->mandatePdf = $object->mandatePdf; } if (property_exists($object, 'recurrenceType')) { $this->recurrenceType = $object->recurrenceType; } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'uniqueMandateReference')) { $this->uniqueMandateReference = $object->uniqueMandateReference; } return $this; } } Domain/Capture.php 0000644 00000007010 15224675305 0010076 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Capture extends DataObject { /** * @var CaptureOutput|null */ public ?CaptureOutput $captureOutput = null; /** * @var string|null */ public ?string $id = null; /** * @var string|null */ public ?string $status = null; /** * @var CaptureStatusOutput|null */ public ?CaptureStatusOutput $statusOutput = null; /** * @return CaptureOutput|null */ public function getCaptureOutput(): ?CaptureOutput { return $this->captureOutput; } /** * @param CaptureOutput|null $value */ public function setCaptureOutput(?CaptureOutput $value): void { $this->captureOutput = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return CaptureStatusOutput|null */ public function getStatusOutput(): ?CaptureStatusOutput { return $this->statusOutput; } /** * @param CaptureStatusOutput|null $value */ public function setStatusOutput(?CaptureStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->captureOutput)) { $object->captureOutput = $this->captureOutput->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Capture { parent::fromObject($object); if (property_exists($object, 'captureOutput')) { if (!is_object($object->captureOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->captureOutput, true) . '\' is not an object'); } $value = new CaptureOutput(); $this->captureOutput = $value->fromObject($object->captureOutput); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new CaptureStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/MandateRedirectData.php 0000644 00000003465 15224675305 0012332 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateRedirectData extends DataObject { /** * @var string|null */ public ?string $RETURNMAC = null; /** * @var string|null */ public ?string $redirectURL = null; /** * @return string|null */ public function getRETURNMAC(): ?string { return $this->RETURNMAC; } /** * @param string|null $value */ public function setRETURNMAC(?string $value): void { $this->RETURNMAC = $value; } /** * @return string|null */ public function getRedirectURL(): ?string { return $this->redirectURL; } /** * @param string|null $value */ public function setRedirectURL(?string $value): void { $this->redirectURL = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->RETURNMAC)) { $object->RETURNMAC = $this->RETURNMAC; } if (!is_null($this->redirectURL)) { $object->redirectURL = $this->redirectURL; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateRedirectData { parent::fromObject($object); if (property_exists($object, 'RETURNMAC')) { $this->RETURNMAC = $object->RETURNMAC; } if (property_exists($object, 'redirectURL')) { $this->redirectURL = $object->redirectURL; } return $this; } } Domain/Shipping.php 0000644 00000014742 15224675305 0010266 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Shipping extends DataObject { /** * @var AddressPersonal|null */ public ?AddressPersonal $address = null; /** * @var string|null */ public ?string $addressIndicator = null; /** * @var string|null */ public ?string $emailAddress = null; /** * @var string|null */ public ?string $firstUsageDate = null; /** * @var bool|null */ public ?bool $isFirstUsage = null; /** * @var ShippingMethod|null */ public ?ShippingMethod $method = null; /** * @var int|null */ public ?int $shippingCost = null; /** * @var int|null */ public ?int $shippingCostTax = null; /** * @var string|null */ public ?string $type = null; /** * @return AddressPersonal|null */ public function getAddress(): ?AddressPersonal { return $this->address; } /** * @param AddressPersonal|null $value */ public function setAddress(?AddressPersonal $value): void { $this->address = $value; } /** * @return string|null */ public function getAddressIndicator(): ?string { return $this->addressIndicator; } /** * @param string|null $value */ public function setAddressIndicator(?string $value): void { $this->addressIndicator = $value; } /** * @return string|null */ public function getEmailAddress(): ?string { return $this->emailAddress; } /** * @param string|null $value */ public function setEmailAddress(?string $value): void { $this->emailAddress = $value; } /** * @return string|null */ public function getFirstUsageDate(): ?string { return $this->firstUsageDate; } /** * @param string|null $value */ public function setFirstUsageDate(?string $value): void { $this->firstUsageDate = $value; } /** * @return bool|null */ public function getIsFirstUsage(): ?bool { return $this->isFirstUsage; } /** * @param bool|null $value */ public function setIsFirstUsage(?bool $value): void { $this->isFirstUsage = $value; } /** * @return ShippingMethod|null */ public function getMethod(): ?ShippingMethod { return $this->method; } /** * @param ShippingMethod|null $value */ public function setMethod(?ShippingMethod $value): void { $this->method = $value; } /** * @return int|null */ public function getShippingCost(): ?int { return $this->shippingCost; } /** * @param int|null $value */ public function setShippingCost(?int $value): void { $this->shippingCost = $value; } /** * @return int|null */ public function getShippingCostTax(): ?int { return $this->shippingCostTax; } /** * @param int|null $value */ public function setShippingCostTax(?int $value): void { $this->shippingCostTax = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->address)) { $object->address = $this->address->toObject(); } if (!is_null($this->addressIndicator)) { $object->addressIndicator = $this->addressIndicator; } if (!is_null($this->emailAddress)) { $object->emailAddress = $this->emailAddress; } if (!is_null($this->firstUsageDate)) { $object->firstUsageDate = $this->firstUsageDate; } if (!is_null($this->isFirstUsage)) { $object->isFirstUsage = $this->isFirstUsage; } if (!is_null($this->method)) { $object->method = $this->method->toObject(); } if (!is_null($this->shippingCost)) { $object->shippingCost = $this->shippingCost; } if (!is_null($this->shippingCostTax)) { $object->shippingCostTax = $this->shippingCostTax; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Shipping { parent::fromObject($object); if (property_exists($object, 'address')) { if (!is_object($object->address)) { throw new UnexpectedValueException('value \'' . print_r($object->address, true) . '\' is not an object'); } $value = new AddressPersonal(); $this->address = $value->fromObject($object->address); } if (property_exists($object, 'addressIndicator')) { $this->addressIndicator = $object->addressIndicator; } if (property_exists($object, 'emailAddress')) { $this->emailAddress = $object->emailAddress; } if (property_exists($object, 'firstUsageDate')) { $this->firstUsageDate = $object->firstUsageDate; } if (property_exists($object, 'isFirstUsage')) { $this->isFirstUsage = $object->isFirstUsage; } if (property_exists($object, 'method')) { if (!is_object($object->method)) { throw new UnexpectedValueException('value \'' . print_r($object->method, true) . '\' is not an object'); } $value = new ShippingMethod(); $this->method = $value->fromObject($object->method); } if (property_exists($object, 'shippingCost')) { $this->shippingCost = $object->shippingCost; } if (property_exists($object, 'shippingCostTax')) { $this->shippingCostTax = $object->shippingCostTax; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/PaymentProductField.php 0000644 00000007437 15224675305 0012432 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductField extends DataObject { /** * @var PaymentProductFieldDataRestrictions|null */ public ?PaymentProductFieldDataRestrictions $dataRestrictions = null; /** * @var PaymentProductFieldDisplayHints|null */ public ?PaymentProductFieldDisplayHints $displayHints = null; /** * @var string|null */ public ?string $id = null; /** * @var string|null */ public ?string $type = null; /** * @return PaymentProductFieldDataRestrictions|null */ public function getDataRestrictions(): ?PaymentProductFieldDataRestrictions { return $this->dataRestrictions; } /** * @param PaymentProductFieldDataRestrictions|null $value */ public function setDataRestrictions(?PaymentProductFieldDataRestrictions $value): void { $this->dataRestrictions = $value; } /** * @return PaymentProductFieldDisplayHints|null */ public function getDisplayHints(): ?PaymentProductFieldDisplayHints { return $this->displayHints; } /** * @param PaymentProductFieldDisplayHints|null $value */ public function setDisplayHints(?PaymentProductFieldDisplayHints $value): void { $this->displayHints = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dataRestrictions)) { $object->dataRestrictions = $this->dataRestrictions->toObject(); } if (!is_null($this->displayHints)) { $object->displayHints = $this->displayHints->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductField { parent::fromObject($object); if (property_exists($object, 'dataRestrictions')) { if (!is_object($object->dataRestrictions)) { throw new UnexpectedValueException('value \'' . print_r($object->dataRestrictions, true) . '\' is not an object'); } $value = new PaymentProductFieldDataRestrictions(); $this->dataRestrictions = $value->fromObject($object->dataRestrictions); } if (property_exists($object, 'displayHints')) { if (!is_object($object->displayHints)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object'); } $value = new PaymentProductFieldDisplayHints(); $this->displayHints = $value->fromObject($object->displayHints); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/PaymentReferences.php 0000644 00000005265 15224675305 0012124 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentReferences extends DataObject { /** * @var string|null */ public ?string $merchantParameters = null; /** * @var string|null */ public ?string $merchantReference = null; /** * @var string|null */ public ?string $operationGroupReference = null; /** * @return string|null */ public function getMerchantParameters(): ?string { return $this->merchantParameters; } /** * @param string|null $value */ public function setMerchantParameters(?string $value): void { $this->merchantParameters = $value; } /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return string|null */ public function getOperationGroupReference(): ?string { return $this->operationGroupReference; } /** * @param string|null $value */ public function setOperationGroupReference(?string $value): void { $this->operationGroupReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->merchantParameters)) { $object->merchantParameters = $this->merchantParameters; } if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->operationGroupReference)) { $object->operationGroupReference = $this->operationGroupReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentReferences { parent::fromObject($object); if (property_exists($object, 'merchantParameters')) { $this->merchantParameters = $object->merchantParameters; } if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'operationGroupReference')) { $this->operationGroupReference = $object->operationGroupReference; } return $this; } } Domain/RedirectPaymentProduct3302SpecificInput.php 0000644 00000005252 15224675305 0016137 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct3302SpecificInput extends DataObject { /** * @var string|null */ public ?string $organizationEntityType = null; /** * @var string|null */ public ?string $organizationRegistrationId = null; /** * @var string|null */ public ?string $vatId = null; /** * @return string|null */ public function getOrganizationEntityType(): ?string { return $this->organizationEntityType; } /** * @param string|null $value */ public function setOrganizationEntityType(?string $value): void { $this->organizationEntityType = $value; } /** * @return string|null */ public function getOrganizationRegistrationId(): ?string { return $this->organizationRegistrationId; } /** * @param string|null $value */ public function setOrganizationRegistrationId(?string $value): void { $this->organizationRegistrationId = $value; } /** * @return string|null */ public function getVatId(): ?string { return $this->vatId; } /** * @param string|null $value */ public function setVatId(?string $value): void { $this->vatId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->organizationEntityType)) { $object->organizationEntityType = $this->organizationEntityType; } if (!is_null($this->organizationRegistrationId)) { $object->organizationRegistrationId = $this->organizationRegistrationId; } if (!is_null($this->vatId)) { $object->vatId = $this->vatId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct3302SpecificInput { parent::fromObject($object); if (property_exists($object, 'organizationEntityType')) { $this->organizationEntityType = $object->organizationEntityType; } if (property_exists($object, 'organizationRegistrationId')) { $this->organizationRegistrationId = $object->organizationRegistrationId; } if (property_exists($object, 'vatId')) { $this->vatId = $object->vatId; } return $this; } } Domain/SessionResponse.php 0000644 00000010174 15224675305 0011642 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SessionResponse extends DataObject { /** * @var string|null */ public ?string $assetUrl = null; /** * @var string|null */ public ?string $clientApiUrl = null; /** * @var string|null */ public ?string $clientSessionId = null; /** * @var string|null */ public ?string $customerId = null; /** * @var string[]|null */ public ?array $invalidTokens = null; /** * @return string|null */ public function getAssetUrl(): ?string { return $this->assetUrl; } /** * @param string|null $value */ public function setAssetUrl(?string $value): void { $this->assetUrl = $value; } /** * @return string|null */ public function getClientApiUrl(): ?string { return $this->clientApiUrl; } /** * @param string|null $value */ public function setClientApiUrl(?string $value): void { $this->clientApiUrl = $value; } /** * @return string|null */ public function getClientSessionId(): ?string { return $this->clientSessionId; } /** * @param string|null $value */ public function setClientSessionId(?string $value): void { $this->clientSessionId = $value; } /** * @return string|null */ public function getCustomerId(): ?string { return $this->customerId; } /** * @param string|null $value */ public function setCustomerId(?string $value): void { $this->customerId = $value; } /** * @return string[]|null */ public function getInvalidTokens(): ?array { return $this->invalidTokens; } /** * @param string[]|null $value */ public function setInvalidTokens(?array $value): void { $this->invalidTokens = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->assetUrl)) { $object->assetUrl = $this->assetUrl; } if (!is_null($this->clientApiUrl)) { $object->clientApiUrl = $this->clientApiUrl; } if (!is_null($this->clientSessionId)) { $object->clientSessionId = $this->clientSessionId; } if (!is_null($this->customerId)) { $object->customerId = $this->customerId; } if (!is_null($this->invalidTokens)) { $object->invalidTokens = []; foreach ($this->invalidTokens as $element) { if (!is_null($element)) { $object->invalidTokens[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SessionResponse { parent::fromObject($object); if (property_exists($object, 'assetUrl')) { $this->assetUrl = $object->assetUrl; } if (property_exists($object, 'clientApiUrl')) { $this->clientApiUrl = $object->clientApiUrl; } if (property_exists($object, 'clientSessionId')) { $this->clientSessionId = $object->clientSessionId; } if (property_exists($object, 'customerId')) { $this->customerId = $object->customerId; } if (property_exists($object, 'invalidTokens')) { if (!is_array($object->invalidTokens) && !is_object($object->invalidTokens)) { throw new UnexpectedValueException('value \'' . print_r($object->invalidTokens, true) . '\' is not an array or object'); } $this->invalidTokens = []; foreach ($object->invalidTokens as $element) { $this->invalidTokens[] = $element; } } return $this; } } Domain/AcquirerSelectionInformation.php 0000644 00000004544 15224675305 0014333 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AcquirerSelectionInformation extends DataObject { /** * @var int|null */ public ?int $fallbackLevel = null; /** * @var string|null */ public ?string $result = null; /** * @var string|null */ public ?string $ruleName = null; /** * @return int|null */ public function getFallbackLevel(): ?int { return $this->fallbackLevel; } /** * @param int|null $value */ public function setFallbackLevel(?int $value): void { $this->fallbackLevel = $value; } /** * @return string|null */ public function getResult(): ?string { return $this->result; } /** * @param string|null $value */ public function setResult(?string $value): void { $this->result = $value; } /** * @return string|null */ public function getRuleName(): ?string { return $this->ruleName; } /** * @param string|null $value */ public function setRuleName(?string $value): void { $this->ruleName = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->fallbackLevel)) { $object->fallbackLevel = $this->fallbackLevel; } if (!is_null($this->result)) { $object->result = $this->result; } if (!is_null($this->ruleName)) { $object->ruleName = $this->ruleName; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AcquirerSelectionInformation { parent::fromObject($object); if (property_exists($object, 'fallbackLevel')) { $this->fallbackLevel = $object->fallbackLevel; } if (property_exists($object, 'result')) { $this->result = $object->result; } if (property_exists($object, 'ruleName')) { $this->ruleName = $object->ruleName; } return $this; } } Domain/CustomerDeviceOutput.php 0000644 00000002525 15224675305 0012643 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerDeviceOutput extends DataObject { /** * @var string|null */ public ?string $ipAddressCountryCode = null; /** * @return string|null */ public function getIpAddressCountryCode(): ?string { return $this->ipAddressCountryCode; } /** * @param string|null $value */ public function setIpAddressCountryCode(?string $value): void { $this->ipAddressCountryCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->ipAddressCountryCode)) { $object->ipAddressCountryCode = $this->ipAddressCountryCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerDeviceOutput { parent::fromObject($object); if (property_exists($object, 'ipAddressCountryCode')) { $this->ipAddressCountryCode = $object->ipAddressCountryCode; } return $this; } } Domain/CompletePaymentCardPaymentMethodSpecificInput.php 0000644 00000003004 15224675305 0017557 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CompletePaymentCardPaymentMethodSpecificInput extends DataObject { /** * @var CardWithoutCvv|null */ public ?CardWithoutCvv $card = null; /** * @return CardWithoutCvv|null */ public function getCard(): ?CardWithoutCvv { return $this->card; } /** * @param CardWithoutCvv|null $value */ public function setCard(?CardWithoutCvv $value): void { $this->card = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CompletePaymentCardPaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new CardWithoutCvv(); $this->card = $value->fromObject($object->card); } return $this; } } Domain/SurchargeCalculationCard.php 0000644 00000003557 15224675305 0013403 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SurchargeCalculationCard extends DataObject { /** * @var string|null */ public ?string $cardNumber = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return string|null */ public function getCardNumber(): ?string { return $this->cardNumber; } /** * @param string|null $value */ public function setCardNumber(?string $value): void { $this->cardNumber = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardNumber)) { $object->cardNumber = $this->cardNumber; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SurchargeCalculationCard { parent::fromObject($object); if (property_exists($object, 'cardNumber')) { $this->cardNumber = $object->cardNumber; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/RefundErrorResponse.php 0000644 00000006276 15224675305 0012464 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundErrorResponse extends DataObject { /** * @var string|null */ public ?string $errorId = null; /** * @var APIError[]|null */ public ?array $errors = null; /** * @var RefundResponse|null */ public ?RefundResponse $refundResult = null; /** * @return string|null */ public function getErrorId(): ?string { return $this->errorId; } /** * @param string|null $value */ public function setErrorId(?string $value): void { $this->errorId = $value; } /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return RefundResponse|null */ public function getRefundResult(): ?RefundResponse { return $this->refundResult; } /** * @param RefundResponse|null $value */ public function setRefundResult(?RefundResponse $value): void { $this->refundResult = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errorId)) { $object->errorId = $this->errorId; } if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } if (!is_null($this->refundResult)) { $object->refundResult = $this->refundResult->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundErrorResponse { parent::fromObject($object); if (property_exists($object, 'errorId')) { $this->errorId = $object->errorId; } if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } if (property_exists($object, 'refundResult')) { if (!is_object($object->refundResult)) { throw new UnexpectedValueException('value \'' . print_r($object->refundResult, true) . '\' is not an object'); } $value = new RefundResponse(); $this->refundResult = $value->fromObject($object->refundResult); } return $this; } } Domain/OrderStatusOutput.php 0000644 00000010361 15224675305 0012176 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OrderStatusOutput extends DataObject { /** * @var APIError[]|null */ public ?array $errors = null; /** * @var bool|null */ public ?bool $isCancellable = null; /** * @var string|null */ public ?string $statusCategory = null; /** * @var int|null */ public ?int $statusCode = null; /** * @var string|null */ public ?string $statusCodeChangeDateTime = null; /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return bool|null */ public function getIsCancellable(): ?bool { return $this->isCancellable; } /** * @param bool|null $value */ public function setIsCancellable(?bool $value): void { $this->isCancellable = $value; } /** * @return string|null */ public function getStatusCategory(): ?string { return $this->statusCategory; } /** * @param string|null $value */ public function setStatusCategory(?string $value): void { $this->statusCategory = $value; } /** * @return int|null */ public function getStatusCode(): ?int { return $this->statusCode; } /** * @param int|null $value */ public function setStatusCode(?int $value): void { $this->statusCode = $value; } /** * @return string|null */ public function getStatusCodeChangeDateTime(): ?string { return $this->statusCodeChangeDateTime; } /** * @param string|null $value */ public function setStatusCodeChangeDateTime(?string $value): void { $this->statusCodeChangeDateTime = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } if (!is_null($this->isCancellable)) { $object->isCancellable = $this->isCancellable; } if (!is_null($this->statusCategory)) { $object->statusCategory = $this->statusCategory; } if (!is_null($this->statusCode)) { $object->statusCode = $this->statusCode; } if (!is_null($this->statusCodeChangeDateTime)) { $object->statusCodeChangeDateTime = $this->statusCodeChangeDateTime; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OrderStatusOutput { parent::fromObject($object); if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } if (property_exists($object, 'isCancellable')) { $this->isCancellable = $object->isCancellable; } if (property_exists($object, 'statusCategory')) { $this->statusCategory = $object->statusCategory; } if (property_exists($object, 'statusCode')) { $this->statusCode = $object->statusCode; } if (property_exists($object, 'statusCodeChangeDateTime')) { $this->statusCodeChangeDateTime = $object->statusCodeChangeDateTime; } return $this; } } Domain/SendTestRequest.php 0000644 00000002220 15224675305 0011573 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SendTestRequest extends DataObject { /** * @var string|null */ public ?string $url = null; /** * @return string|null */ public function getUrl(): ?string { return $this->url; } /** * @param string|null $value */ public function setUrl(?string $value): void { $this->url = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->url)) { $object->url = $this->url; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SendTestRequest { parent::fromObject($object); if (property_exists($object, 'url')) { $this->url = $object->url; } return $this; } } Domain/CustomerBankAccount.php 0000644 00000004503 15224675305 0012411 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerBankAccount extends DataObject { /** * @var string|null */ public ?string $accountHolderName = null; /** * @var string|null */ public ?string $bic = null; /** * @var string|null */ public ?string $iban = null; /** * @return string|null */ public function getAccountHolderName(): ?string { return $this->accountHolderName; } /** * @param string|null $value */ public function setAccountHolderName(?string $value): void { $this->accountHolderName = $value; } /** * @return string|null */ public function getBic(): ?string { return $this->bic; } /** * @param string|null $value */ public function setBic(?string $value): void { $this->bic = $value; } /** * @return string|null */ public function getIban(): ?string { return $this->iban; } /** * @param string|null $value */ public function setIban(?string $value): void { $this->iban = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountHolderName)) { $object->accountHolderName = $this->accountHolderName; } if (!is_null($this->bic)) { $object->bic = $this->bic; } if (!is_null($this->iban)) { $object->iban = $this->iban; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerBankAccount { parent::fromObject($object); if (property_exists($object, 'accountHolderName')) { $this->accountHolderName = $object->accountHolderName; } if (property_exists($object, 'bic')) { $this->bic = $object->bic; } if (property_exists($object, 'iban')) { $this->iban = $object->iban; } return $this; } } Domain/CompanyInformation.php 0000644 00000002241 15224675305 0012310 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CompanyInformation extends DataObject { /** * @var string|null */ public ?string $name = null; /** * @return string|null */ public function getName(): ?string { return $this->name; } /** * @param string|null $value */ public function setName(?string $value): void { $this->name = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->name)) { $object->name = $this->name; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CompanyInformation { parent::fromObject($object); if (property_exists($object, 'name')) { $this->name = $object->name; } return $this; } } Domain/RegularExpressionValidator.php 0000644 00000002500 15224675305 0014021 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RegularExpressionValidator extends DataObject { /** * @var string|null */ public ?string $regularExpression = null; /** * @return string|null */ public function getRegularExpression(): ?string { return $this->regularExpression; } /** * @param string|null $value */ public function setRegularExpression(?string $value): void { $this->regularExpression = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->regularExpression)) { $object->regularExpression = $this->regularExpression; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RegularExpressionValidator { parent::fromObject($object); if (property_exists($object, 'regularExpression')) { $this->regularExpression = $object->regularExpression; } return $this; } } Domain/PaymentProduct5404.php 0000644 00000003511 15224675305 0011770 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5404 extends DataObject { /** * @var string|null */ public ?string $appSwitchLink = null; /** * @var string|null */ public ?string $qrCodeUrl = null; /** * @return string|null */ public function getAppSwitchLink(): ?string { return $this->appSwitchLink; } /** * @param string|null $value */ public function setAppSwitchLink(?string $value): void { $this->appSwitchLink = $value; } /** * @return string|null */ public function getQrCodeUrl(): ?string { return $this->qrCodeUrl; } /** * @param string|null $value */ public function setQrCodeUrl(?string $value): void { $this->qrCodeUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->appSwitchLink)) { $object->appSwitchLink = $this->appSwitchLink; } if (!is_null($this->qrCodeUrl)) { $object->qrCodeUrl = $this->qrCodeUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5404 { parent::fromObject($object); if (property_exists($object, 'appSwitchLink')) { $this->appSwitchLink = $object->appSwitchLink; } if (property_exists($object, 'qrCodeUrl')) { $this->qrCodeUrl = $object->qrCodeUrl; } return $this; } } Domain/CreateMandateWithReturnUrl.php 0000644 00000013417 15224675305 0013717 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateMandateWithReturnUrl extends DataObject { /** * @var string|null */ public ?string $alias = null; /** * @var MandateCustomer|null */ public ?MandateCustomer $customer = null; /** * @var string|null */ public ?string $customerReference = null; /** * @var string|null */ public ?string $language = null; /** * @var string|null */ public ?string $recurrenceType = null; /** * @var string|null */ public ?string $returnUrl = null; /** * @var string|null */ public ?string $signatureType = null; /** * @var string|null */ public ?string $uniqueMandateReference = null; /** * @return string|null */ public function getAlias(): ?string { return $this->alias; } /** * @param string|null $value */ public function setAlias(?string $value): void { $this->alias = $value; } /** * @return MandateCustomer|null */ public function getCustomer(): ?MandateCustomer { return $this->customer; } /** * @param MandateCustomer|null $value */ public function setCustomer(?MandateCustomer $value): void { $this->customer = $value; } /** * @return string|null */ public function getCustomerReference(): ?string { return $this->customerReference; } /** * @param string|null $value */ public function setCustomerReference(?string $value): void { $this->customerReference = $value; } /** * @return string|null */ public function getLanguage(): ?string { return $this->language; } /** * @param string|null $value */ public function setLanguage(?string $value): void { $this->language = $value; } /** * @return string|null */ public function getRecurrenceType(): ?string { return $this->recurrenceType; } /** * @param string|null $value */ public function setRecurrenceType(?string $value): void { $this->recurrenceType = $value; } /** * @return string|null */ public function getReturnUrl(): ?string { return $this->returnUrl; } /** * @param string|null $value */ public function setReturnUrl(?string $value): void { $this->returnUrl = $value; } /** * @return string|null */ public function getSignatureType(): ?string { return $this->signatureType; } /** * @param string|null $value */ public function setSignatureType(?string $value): void { $this->signatureType = $value; } /** * @return string|null */ public function getUniqueMandateReference(): ?string { return $this->uniqueMandateReference; } /** * @param string|null $value */ public function setUniqueMandateReference(?string $value): void { $this->uniqueMandateReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alias)) { $object->alias = $this->alias; } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } if (!is_null($this->customerReference)) { $object->customerReference = $this->customerReference; } if (!is_null($this->language)) { $object->language = $this->language; } if (!is_null($this->recurrenceType)) { $object->recurrenceType = $this->recurrenceType; } if (!is_null($this->returnUrl)) { $object->returnUrl = $this->returnUrl; } if (!is_null($this->signatureType)) { $object->signatureType = $this->signatureType; } if (!is_null($this->uniqueMandateReference)) { $object->uniqueMandateReference = $this->uniqueMandateReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateMandateWithReturnUrl { parent::fromObject($object); if (property_exists($object, 'alias')) { $this->alias = $object->alias; } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new MandateCustomer(); $this->customer = $value->fromObject($object->customer); } if (property_exists($object, 'customerReference')) { $this->customerReference = $object->customerReference; } if (property_exists($object, 'language')) { $this->language = $object->language; } if (property_exists($object, 'recurrenceType')) { $this->recurrenceType = $object->recurrenceType; } if (property_exists($object, 'returnUrl')) { $this->returnUrl = $object->returnUrl; } if (property_exists($object, 'signatureType')) { $this->signatureType = $object->signatureType; } if (property_exists($object, 'uniqueMandateReference')) { $this->uniqueMandateReference = $object->uniqueMandateReference; } return $this; } } Domain/OmnichannelRefundSpecificInput.php 0000644 00000002373 15224675305 0014567 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OmnichannelRefundSpecificInput extends DataObject { /** * @var string|null */ public ?string $operatorId = null; /** * @return string|null */ public function getOperatorId(): ?string { return $this->operatorId; } /** * @param string|null $value */ public function setOperatorId(?string $value): void { $this->operatorId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->operatorId)) { $object->operatorId = $this->operatorId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OmnichannelRefundSpecificInput { parent::fromObject($object); if (property_exists($object, 'operatorId')) { $this->operatorId = $object->operatorId; } return $this; } } Domain/CompletePaymentRequest.php 0000644 00000005412 15224675305 0013156 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CompletePaymentRequest extends DataObject { /** * @var CompletePaymentCardPaymentMethodSpecificInput|null */ public ?CompletePaymentCardPaymentMethodSpecificInput $cardPaymentMethodSpecificInput = null; /** * @var Order|null */ public ?Order $order = null; /** * @return CompletePaymentCardPaymentMethodSpecificInput|null */ public function getCardPaymentMethodSpecificInput(): ?CompletePaymentCardPaymentMethodSpecificInput { return $this->cardPaymentMethodSpecificInput; } /** * @param CompletePaymentCardPaymentMethodSpecificInput|null $value */ public function setCardPaymentMethodSpecificInput(?CompletePaymentCardPaymentMethodSpecificInput $value): void { $this->cardPaymentMethodSpecificInput = $value; } /** * @return Order|null */ public function getOrder(): ?Order { return $this->order; } /** * @param Order|null $value */ public function setOrder(?Order $value): void { $this->order = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardPaymentMethodSpecificInput)) { $object->cardPaymentMethodSpecificInput = $this->cardPaymentMethodSpecificInput->toObject(); } if (!is_null($this->order)) { $object->order = $this->order->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CompletePaymentRequest { parent::fromObject($object); if (property_exists($object, 'cardPaymentMethodSpecificInput')) { if (!is_object($object->cardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new CompletePaymentCardPaymentMethodSpecificInput(); $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput); } if (property_exists($object, 'order')) { if (!is_object($object->order)) { throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object'); } $value = new Order(); $this->order = $value->fromObject($object->order); } return $this; } } Domain/PayoutResult.php 0000644 00000006767 15224675305 0011175 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PayoutResult extends DataObject { /** * @var string|null */ public ?string $id = null; /** * @var PayoutOutput|null */ public ?PayoutOutput $payoutOutput = null; /** * @var string|null */ public ?string $status = null; /** * @var PayoutStatusOutput|null */ public ?PayoutStatusOutput $statusOutput = null; /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return PayoutOutput|null */ public function getPayoutOutput(): ?PayoutOutput { return $this->payoutOutput; } /** * @param PayoutOutput|null $value */ public function setPayoutOutput(?PayoutOutput $value): void { $this->payoutOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return PayoutStatusOutput|null */ public function getStatusOutput(): ?PayoutStatusOutput { return $this->statusOutput; } /** * @param PayoutStatusOutput|null $value */ public function setStatusOutput(?PayoutStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->payoutOutput)) { $object->payoutOutput = $this->payoutOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PayoutResult { parent::fromObject($object); if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'payoutOutput')) { if (!is_object($object->payoutOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->payoutOutput, true) . '\' is not an object'); } $value = new PayoutOutput(); $this->payoutOutput = $value->fromObject($object->payoutOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new PayoutStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/MobilePaymentMethodSpecificInput.php 0000644 00000020152 15224675305 0015071 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentMethodSpecificInput extends DataObject { /** * @var string|null */ public ?string $authorizationMode = null; /** * @var DecryptedPaymentData|null */ public ?DecryptedPaymentData $decryptedPaymentData = null; /** * @var string|null */ public ?string $encryptedPaymentData = null; /** * @var string|null */ public ?string $ephemeralKey = null; /** * @var MobilePaymentProduct302SpecificInput|null */ public ?MobilePaymentProduct302SpecificInput $paymentProduct302SpecificInput = null; /** * @var MobilePaymentProduct320SpecificInput|null */ public ?MobilePaymentProduct320SpecificInput $paymentProduct320SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var string|null */ public ?string $publicKeyHash = null; /** * @var bool|null */ public ?bool $requiresApproval = null; /** * @return string|null */ public function getAuthorizationMode(): ?string { return $this->authorizationMode; } /** * @param string|null $value */ public function setAuthorizationMode(?string $value): void { $this->authorizationMode = $value; } /** * @return DecryptedPaymentData|null */ public function getDecryptedPaymentData(): ?DecryptedPaymentData { return $this->decryptedPaymentData; } /** * @param DecryptedPaymentData|null $value */ public function setDecryptedPaymentData(?DecryptedPaymentData $value): void { $this->decryptedPaymentData = $value; } /** * @return string|null */ public function getEncryptedPaymentData(): ?string { return $this->encryptedPaymentData; } /** * @param string|null $value */ public function setEncryptedPaymentData(?string $value): void { $this->encryptedPaymentData = $value; } /** * @return string|null */ public function getEphemeralKey(): ?string { return $this->ephemeralKey; } /** * @param string|null $value */ public function setEphemeralKey(?string $value): void { $this->ephemeralKey = $value; } /** * @return MobilePaymentProduct302SpecificInput|null */ public function getPaymentProduct302SpecificInput(): ?MobilePaymentProduct302SpecificInput { return $this->paymentProduct302SpecificInput; } /** * @param MobilePaymentProduct302SpecificInput|null $value */ public function setPaymentProduct302SpecificInput(?MobilePaymentProduct302SpecificInput $value): void { $this->paymentProduct302SpecificInput = $value; } /** * @return MobilePaymentProduct320SpecificInput|null */ public function getPaymentProduct320SpecificInput(): ?MobilePaymentProduct320SpecificInput { return $this->paymentProduct320SpecificInput; } /** * @param MobilePaymentProduct320SpecificInput|null $value */ public function setPaymentProduct320SpecificInput(?MobilePaymentProduct320SpecificInput $value): void { $this->paymentProduct320SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return string|null */ public function getPublicKeyHash(): ?string { return $this->publicKeyHash; } /** * @param string|null $value */ public function setPublicKeyHash(?string $value): void { $this->publicKeyHash = $value; } /** * @return bool|null */ public function getRequiresApproval(): ?bool { return $this->requiresApproval; } /** * @param bool|null $value */ public function setRequiresApproval(?bool $value): void { $this->requiresApproval = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authorizationMode)) { $object->authorizationMode = $this->authorizationMode; } if (!is_null($this->decryptedPaymentData)) { $object->decryptedPaymentData = $this->decryptedPaymentData->toObject(); } if (!is_null($this->encryptedPaymentData)) { $object->encryptedPaymentData = $this->encryptedPaymentData; } if (!is_null($this->ephemeralKey)) { $object->ephemeralKey = $this->ephemeralKey; } if (!is_null($this->paymentProduct302SpecificInput)) { $object->paymentProduct302SpecificInput = $this->paymentProduct302SpecificInput->toObject(); } if (!is_null($this->paymentProduct320SpecificInput)) { $object->paymentProduct320SpecificInput = $this->paymentProduct320SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->publicKeyHash)) { $object->publicKeyHash = $this->publicKeyHash; } if (!is_null($this->requiresApproval)) { $object->requiresApproval = $this->requiresApproval; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'authorizationMode')) { $this->authorizationMode = $object->authorizationMode; } if (property_exists($object, 'decryptedPaymentData')) { if (!is_object($object->decryptedPaymentData)) { throw new UnexpectedValueException('value \'' . print_r($object->decryptedPaymentData, true) . '\' is not an object'); } $value = new DecryptedPaymentData(); $this->decryptedPaymentData = $value->fromObject($object->decryptedPaymentData); } if (property_exists($object, 'encryptedPaymentData')) { $this->encryptedPaymentData = $object->encryptedPaymentData; } if (property_exists($object, 'ephemeralKey')) { $this->ephemeralKey = $object->ephemeralKey; } if (property_exists($object, 'paymentProduct302SpecificInput')) { if (!is_object($object->paymentProduct302SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct302SpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentProduct302SpecificInput(); $this->paymentProduct302SpecificInput = $value->fromObject($object->paymentProduct302SpecificInput); } if (property_exists($object, 'paymentProduct320SpecificInput')) { if (!is_object($object->paymentProduct320SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct320SpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentProduct320SpecificInput(); $this->paymentProduct320SpecificInput = $value->fromObject($object->paymentProduct320SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'publicKeyHash')) { $this->publicKeyHash = $object->publicKeyHash; } if (property_exists($object, 'requiresApproval')) { $this->requiresApproval = $object->requiresApproval; } return $this; } } Domain/CardEssentials.php 0000644 00000033145 15224675305 0011407 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardEssentials extends DataObject { /** * @var string|null */ public ?string $bin = null; /** * @var bool|null */ public ?bool $cardCorporateIndicator = null; /** * @var DateTime|null */ public ?DateTime $cardEffectiveDate = null; /** * @var bool|null */ public ?bool $cardEffectiveDateIndicator = null; /** * @var string|null */ public ?string $cardNumber = null; /** * @var string|null */ public ?string $cardPanType = null; /** * @var string|null */ public ?string $cardProductCode = null; /** * @var string|null */ public ?string $cardProductName = null; /** * @var string|null */ public ?string $cardProductUsageLabel = null; /** * @var string|null */ public ?string $cardScheme = null; /** * @var string|null */ public ?string $cardType = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $expiryDate = null; /** * @var string|null */ public ?string $issuerCode = null; /** * @var string|null */ public ?string $issuerName = null; /** * @var string|null */ public ?string $issuerRegionCode = null; /** * @var string|null */ public ?string $issuingCountryCode = null; /** * @var int|null */ public ?int $panLengthMax = null; /** * @var int|null */ public ?int $panLengthMin = null; /** * @var bool|null */ public ?bool $panLuhnCheck = null; /** * @var bool|null */ public ?bool $virtualCardIndicator = null; /** * @return string|null */ public function getBin(): ?string { return $this->bin; } /** * @param string|null $value */ public function setBin(?string $value): void { $this->bin = $value; } /** * @return bool|null */ public function getCardCorporateIndicator(): ?bool { return $this->cardCorporateIndicator; } /** * @param bool|null $value */ public function setCardCorporateIndicator(?bool $value): void { $this->cardCorporateIndicator = $value; } /** * @return DateTime|null */ public function getCardEffectiveDate(): ?DateTime { return $this->cardEffectiveDate; } /** * @param DateTime|null $value */ public function setCardEffectiveDate(?DateTime $value): void { $this->cardEffectiveDate = $value; } /** * @return bool|null */ public function getCardEffectiveDateIndicator(): ?bool { return $this->cardEffectiveDateIndicator; } /** * @param bool|null $value */ public function setCardEffectiveDateIndicator(?bool $value): void { $this->cardEffectiveDateIndicator = $value; } /** * @return string|null */ public function getCardNumber(): ?string { return $this->cardNumber; } /** * @param string|null $value */ public function setCardNumber(?string $value): void { $this->cardNumber = $value; } /** * @return string|null */ public function getCardPanType(): ?string { return $this->cardPanType; } /** * @param string|null $value */ public function setCardPanType(?string $value): void { $this->cardPanType = $value; } /** * @return string|null */ public function getCardProductCode(): ?string { return $this->cardProductCode; } /** * @param string|null $value */ public function setCardProductCode(?string $value): void { $this->cardProductCode = $value; } /** * @return string|null */ public function getCardProductName(): ?string { return $this->cardProductName; } /** * @param string|null $value */ public function setCardProductName(?string $value): void { $this->cardProductName = $value; } /** * @return string|null */ public function getCardProductUsageLabel(): ?string { return $this->cardProductUsageLabel; } /** * @param string|null $value */ public function setCardProductUsageLabel(?string $value): void { $this->cardProductUsageLabel = $value; } /** * @return string|null */ public function getCardScheme(): ?string { return $this->cardScheme; } /** * @param string|null $value */ public function setCardScheme(?string $value): void { $this->cardScheme = $value; } /** * @return string|null */ public function getCardType(): ?string { return $this->cardType; } /** * @param string|null $value */ public function setCardType(?string $value): void { $this->cardType = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return string|null */ public function getIssuerCode(): ?string { return $this->issuerCode; } /** * @param string|null $value */ public function setIssuerCode(?string $value): void { $this->issuerCode = $value; } /** * @return string|null */ public function getIssuerName(): ?string { return $this->issuerName; } /** * @param string|null $value */ public function setIssuerName(?string $value): void { $this->issuerName = $value; } /** * @return string|null */ public function getIssuerRegionCode(): ?string { return $this->issuerRegionCode; } /** * @param string|null $value */ public function setIssuerRegionCode(?string $value): void { $this->issuerRegionCode = $value; } /** * @return string|null */ public function getIssuingCountryCode(): ?string { return $this->issuingCountryCode; } /** * @param string|null $value */ public function setIssuingCountryCode(?string $value): void { $this->issuingCountryCode = $value; } /** * @return int|null */ public function getPanLengthMax(): ?int { return $this->panLengthMax; } /** * @param int|null $value */ public function setPanLengthMax(?int $value): void { $this->panLengthMax = $value; } /** * @return int|null */ public function getPanLengthMin(): ?int { return $this->panLengthMin; } /** * @param int|null $value */ public function setPanLengthMin(?int $value): void { $this->panLengthMin = $value; } /** * @return bool|null */ public function getPanLuhnCheck(): ?bool { return $this->panLuhnCheck; } /** * @param bool|null $value */ public function setPanLuhnCheck(?bool $value): void { $this->panLuhnCheck = $value; } /** * @return bool|null */ public function getVirtualCardIndicator(): ?bool { return $this->virtualCardIndicator; } /** * @param bool|null $value */ public function setVirtualCardIndicator(?bool $value): void { $this->virtualCardIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bin)) { $object->bin = $this->bin; } if (!is_null($this->cardCorporateIndicator)) { $object->cardCorporateIndicator = $this->cardCorporateIndicator; } if (!is_null($this->cardEffectiveDate)) { $object->cardEffectiveDate = $this->cardEffectiveDate->format('Y-m-d'); } if (!is_null($this->cardEffectiveDateIndicator)) { $object->cardEffectiveDateIndicator = $this->cardEffectiveDateIndicator; } if (!is_null($this->cardNumber)) { $object->cardNumber = $this->cardNumber; } if (!is_null($this->cardPanType)) { $object->cardPanType = $this->cardPanType; } if (!is_null($this->cardProductCode)) { $object->cardProductCode = $this->cardProductCode; } if (!is_null($this->cardProductName)) { $object->cardProductName = $this->cardProductName; } if (!is_null($this->cardProductUsageLabel)) { $object->cardProductUsageLabel = $this->cardProductUsageLabel; } if (!is_null($this->cardScheme)) { $object->cardScheme = $this->cardScheme; } if (!is_null($this->cardType)) { $object->cardType = $this->cardType; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } if (!is_null($this->issuerCode)) { $object->issuerCode = $this->issuerCode; } if (!is_null($this->issuerName)) { $object->issuerName = $this->issuerName; } if (!is_null($this->issuerRegionCode)) { $object->issuerRegionCode = $this->issuerRegionCode; } if (!is_null($this->issuingCountryCode)) { $object->issuingCountryCode = $this->issuingCountryCode; } if (!is_null($this->panLengthMax)) { $object->panLengthMax = $this->panLengthMax; } if (!is_null($this->panLengthMin)) { $object->panLengthMin = $this->panLengthMin; } if (!is_null($this->panLuhnCheck)) { $object->panLuhnCheck = $this->panLuhnCheck; } if (!is_null($this->virtualCardIndicator)) { $object->virtualCardIndicator = $this->virtualCardIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardEssentials { parent::fromObject($object); if (property_exists($object, 'bin')) { $this->bin = $object->bin; } if (property_exists($object, 'cardCorporateIndicator')) { $this->cardCorporateIndicator = $object->cardCorporateIndicator; } if (property_exists($object, 'cardEffectiveDate')) { $this->cardEffectiveDate = new DateTime($object->cardEffectiveDate); } if (property_exists($object, 'cardEffectiveDateIndicator')) { $this->cardEffectiveDateIndicator = $object->cardEffectiveDateIndicator; } if (property_exists($object, 'cardNumber')) { $this->cardNumber = $object->cardNumber; } if (property_exists($object, 'cardPanType')) { $this->cardPanType = $object->cardPanType; } if (property_exists($object, 'cardProductCode')) { $this->cardProductCode = $object->cardProductCode; } if (property_exists($object, 'cardProductName')) { $this->cardProductName = $object->cardProductName; } if (property_exists($object, 'cardProductUsageLabel')) { $this->cardProductUsageLabel = $object->cardProductUsageLabel; } if (property_exists($object, 'cardScheme')) { $this->cardScheme = $object->cardScheme; } if (property_exists($object, 'cardType')) { $this->cardType = $object->cardType; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } if (property_exists($object, 'issuerCode')) { $this->issuerCode = $object->issuerCode; } if (property_exists($object, 'issuerName')) { $this->issuerName = $object->issuerName; } if (property_exists($object, 'issuerRegionCode')) { $this->issuerRegionCode = $object->issuerRegionCode; } if (property_exists($object, 'issuingCountryCode')) { $this->issuingCountryCode = $object->issuingCountryCode; } if (property_exists($object, 'panLengthMax')) { $this->panLengthMax = $object->panLengthMax; } if (property_exists($object, 'panLengthMin')) { $this->panLengthMin = $object->panLengthMin; } if (property_exists($object, 'panLuhnCheck')) { $this->panLuhnCheck = $object->panLuhnCheck; } if (property_exists($object, 'virtualCardIndicator')) { $this->virtualCardIndicator = $object->virtualCardIndicator; } return $this; } } Domain/CustomerPaymentActivity.php 0000644 00000006014 15224675305 0013352 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerPaymentActivity extends DataObject { /** * @var int|null */ public ?int $numberOfPaymentAttemptsLast24Hours = null; /** * @var int|null */ public ?int $numberOfPaymentAttemptsLastYear = null; /** * @var int|null */ public ?int $numberOfPurchasesLast6Months = null; /** * @return int|null */ public function getNumberOfPaymentAttemptsLast24Hours(): ?int { return $this->numberOfPaymentAttemptsLast24Hours; } /** * @param int|null $value */ public function setNumberOfPaymentAttemptsLast24Hours(?int $value): void { $this->numberOfPaymentAttemptsLast24Hours = $value; } /** * @return int|null */ public function getNumberOfPaymentAttemptsLastYear(): ?int { return $this->numberOfPaymentAttemptsLastYear; } /** * @param int|null $value */ public function setNumberOfPaymentAttemptsLastYear(?int $value): void { $this->numberOfPaymentAttemptsLastYear = $value; } /** * @return int|null */ public function getNumberOfPurchasesLast6Months(): ?int { return $this->numberOfPurchasesLast6Months; } /** * @param int|null $value */ public function setNumberOfPurchasesLast6Months(?int $value): void { $this->numberOfPurchasesLast6Months = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->numberOfPaymentAttemptsLast24Hours)) { $object->numberOfPaymentAttemptsLast24Hours = $this->numberOfPaymentAttemptsLast24Hours; } if (!is_null($this->numberOfPaymentAttemptsLastYear)) { $object->numberOfPaymentAttemptsLastYear = $this->numberOfPaymentAttemptsLastYear; } if (!is_null($this->numberOfPurchasesLast6Months)) { $object->numberOfPurchasesLast6Months = $this->numberOfPurchasesLast6Months; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerPaymentActivity { parent::fromObject($object); if (property_exists($object, 'numberOfPaymentAttemptsLast24Hours')) { $this->numberOfPaymentAttemptsLast24Hours = $object->numberOfPaymentAttemptsLast24Hours; } if (property_exists($object, 'numberOfPaymentAttemptsLastYear')) { $this->numberOfPaymentAttemptsLastYear = $object->numberOfPaymentAttemptsLastYear; } if (property_exists($object, 'numberOfPurchasesLast6Months')) { $this->numberOfPurchasesLast6Months = $object->numberOfPurchasesLast6Months; } return $this; } } Domain/CardSource.php 0000644 00000006657 15224675305 0010545 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardSource extends DataObject { /** * @var SurchargeCalculationCard|null */ public ?SurchargeCalculationCard $card = null; /** * @var string|null */ public ?string $encryptedCustomerInput = null; /** * @var string|null */ public ?string $hostedTokenizationId = null; /** * @var string|null */ public ?string $token = null; /** * @return SurchargeCalculationCard|null */ public function getCard(): ?SurchargeCalculationCard { return $this->card; } /** * @param SurchargeCalculationCard|null $value */ public function setCard(?SurchargeCalculationCard $value): void { $this->card = $value; } /** * @return string|null */ public function getEncryptedCustomerInput(): ?string { return $this->encryptedCustomerInput; } /** * @param string|null $value */ public function setEncryptedCustomerInput(?string $value): void { $this->encryptedCustomerInput = $value; } /** * @return string|null */ public function getHostedTokenizationId(): ?string { return $this->hostedTokenizationId; } /** * @param string|null $value */ public function setHostedTokenizationId(?string $value): void { $this->hostedTokenizationId = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->encryptedCustomerInput)) { $object->encryptedCustomerInput = $this->encryptedCustomerInput; } if (!is_null($this->hostedTokenizationId)) { $object->hostedTokenizationId = $this->hostedTokenizationId; } if (!is_null($this->token)) { $object->token = $this->token; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardSource { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new SurchargeCalculationCard(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'encryptedCustomerInput')) { $this->encryptedCustomerInput = $object->encryptedCustomerInput; } if (property_exists($object, 'hostedTokenizationId')) { $this->hostedTokenizationId = $object->hostedTokenizationId; } if (property_exists($object, 'token')) { $this->token = $object->token; } return $this; } } Domain/ValidateCredentialsResponse.php 0000644 00000002311 15224675305 0014120 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ValidateCredentialsResponse extends DataObject { /** * @var string|null */ public ?string $result = null; /** * @return string|null */ public function getResult(): ?string { return $this->result; } /** * @param string|null $value */ public function setResult(?string $value): void { $this->result = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->result)) { $object->result = $this->result; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ValidateCredentialsResponse { parent::fromObject($object); if (property_exists($object, 'result')) { $this->result = $object->result; } return $this; } } Domain/AccountOnFileAttribute.php 0000644 00000005674 15224675305 0013066 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AccountOnFileAttribute extends DataObject { /** * @var string|null */ public ?string $key = null; /** * @var string|null * @deprecated Deprecated */ public ?string $mustWriteReason = null; /** * @var string|null */ public ?string $status = null; /** * @var string|null */ public ?string $value = null; /** * @return string|null */ public function getKey(): ?string { return $this->key; } /** * @param string|null $value */ public function setKey(?string $value): void { $this->key = $value; } /** * @return string|null * @deprecated Deprecated */ public function getMustWriteReason(): ?string { return $this->mustWriteReason; } /** * @param string|null $value * @deprecated Deprecated */ public function setMustWriteReason(?string $value): void { $this->mustWriteReason = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return string|null */ public function getValue(): ?string { return $this->value; } /** * @param string|null $value */ public function setValue(?string $value): void { $this->value = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->key)) { $object->key = $this->key; } if (!is_null($this->mustWriteReason)) { $object->mustWriteReason = $this->mustWriteReason; } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->value)) { $object->value = $this->value; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AccountOnFileAttribute { parent::fromObject($object); if (property_exists($object, 'key')) { $this->key = $object->key; } if (property_exists($object, 'mustWriteReason')) { $this->mustWriteReason = $object->mustWriteReason; } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'value')) { $this->value = $object->value; } return $this; } } Domain/RedirectionData.php 0000644 00000002322 15224675305 0011535 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectionData extends DataObject { /** * @var string|null */ public ?string $returnUrl = null; /** * @return string|null */ public function getReturnUrl(): ?string { return $this->returnUrl; } /** * @param string|null $value */ public function setReturnUrl(?string $value): void { $this->returnUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->returnUrl)) { $object->returnUrl = $this->returnUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectionData { parent::fromObject($object); if (property_exists($object, 'returnUrl')) { $this->returnUrl = $object->returnUrl; } return $this; } } Domain/PaymentProduct3208SpecificOutput.php 0000644 00000002644 15224675305 0014665 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3208SpecificOutput extends DataObject { /** * @var string|null */ public ?string $buyerCompliantBankMessage = null; /** * @return string|null */ public function getBuyerCompliantBankMessage(): ?string { return $this->buyerCompliantBankMessage; } /** * @param string|null $value */ public function setBuyerCompliantBankMessage(?string $value): void { $this->buyerCompliantBankMessage = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->buyerCompliantBankMessage)) { $object->buyerCompliantBankMessage = $this->buyerCompliantBankMessage; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3208SpecificOutput { parent::fromObject($object); if (property_exists($object, 'buyerCompliantBankMessage')) { $this->buyerCompliantBankMessage = $object->buyerCompliantBankMessage; } return $this; } } Domain/TokenCardData.php 0000644 00000006370 15224675305 0011147 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenCardData extends DataObject { /** * @var CardBinDetails|null */ public ?CardBinDetails $cardBinDetails = null; /** * @var CardWithoutCvv|null */ public ?CardWithoutCvv $cardWithoutCvv = null; /** * @var string|null */ public ?string $cobrandSelectionIndicator = null; /** * @return CardBinDetails|null */ public function getCardBinDetails(): ?CardBinDetails { return $this->cardBinDetails; } /** * @param CardBinDetails|null $value */ public function setCardBinDetails(?CardBinDetails $value): void { $this->cardBinDetails = $value; } /** * @return CardWithoutCvv|null */ public function getCardWithoutCvv(): ?CardWithoutCvv { return $this->cardWithoutCvv; } /** * @param CardWithoutCvv|null $value */ public function setCardWithoutCvv(?CardWithoutCvv $value): void { $this->cardWithoutCvv = $value; } /** * @return string|null */ public function getCobrandSelectionIndicator(): ?string { return $this->cobrandSelectionIndicator; } /** * @param string|null $value */ public function setCobrandSelectionIndicator(?string $value): void { $this->cobrandSelectionIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardBinDetails)) { $object->cardBinDetails = $this->cardBinDetails->toObject(); } if (!is_null($this->cardWithoutCvv)) { $object->cardWithoutCvv = $this->cardWithoutCvv->toObject(); } if (!is_null($this->cobrandSelectionIndicator)) { $object->cobrandSelectionIndicator = $this->cobrandSelectionIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenCardData { parent::fromObject($object); if (property_exists($object, 'cardBinDetails')) { if (!is_object($object->cardBinDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->cardBinDetails, true) . '\' is not an object'); } $value = new CardBinDetails(); $this->cardBinDetails = $value->fromObject($object->cardBinDetails); } if (property_exists($object, 'cardWithoutCvv')) { if (!is_object($object->cardWithoutCvv)) { throw new UnexpectedValueException('value \'' . print_r($object->cardWithoutCvv, true) . '\' is not an object'); } $value = new CardWithoutCvv(); $this->cardWithoutCvv = $value->fromObject($object->cardWithoutCvv); } if (property_exists($object, 'cobrandSelectionIndicator')) { $this->cobrandSelectionIndicator = $object->cobrandSelectionIndicator; } return $this; } } Domain/SepaDirectDebitPaymentMethodSpecificInput.php 0000644 00000005247 15224675305 0016665 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SepaDirectDebitPaymentMethodSpecificInput extends DataObject { /** * @var SepaDirectDebitPaymentProduct771SpecificInput|null */ public ?SepaDirectDebitPaymentProduct771SpecificInput $paymentProduct771SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return SepaDirectDebitPaymentProduct771SpecificInput|null */ public function getPaymentProduct771SpecificInput(): ?SepaDirectDebitPaymentProduct771SpecificInput { return $this->paymentProduct771SpecificInput; } /** * @param SepaDirectDebitPaymentProduct771SpecificInput|null $value */ public function setPaymentProduct771SpecificInput(?SepaDirectDebitPaymentProduct771SpecificInput $value): void { $this->paymentProduct771SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProduct771SpecificInput)) { $object->paymentProduct771SpecificInput = $this->paymentProduct771SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SepaDirectDebitPaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'paymentProduct771SpecificInput')) { if (!is_object($object->paymentProduct771SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct771SpecificInput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentProduct771SpecificInput(); $this->paymentProduct771SpecificInput = $value->fromObject($object->paymentProduct771SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/SepaDirectDebitPaymentProduct771SpecificInput.php 0000644 00000004653 15224675305 0017324 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SepaDirectDebitPaymentProduct771SpecificInput extends DataObject { /** * @var string|null */ public ?string $existingUniqueMandateReference = null; /** * @var CreateMandateWithReturnUrl|null */ public ?CreateMandateWithReturnUrl $mandate = null; /** * @return string|null */ public function getExistingUniqueMandateReference(): ?string { return $this->existingUniqueMandateReference; } /** * @param string|null $value */ public function setExistingUniqueMandateReference(?string $value): void { $this->existingUniqueMandateReference = $value; } /** * @return CreateMandateWithReturnUrl|null */ public function getMandate(): ?CreateMandateWithReturnUrl { return $this->mandate; } /** * @param CreateMandateWithReturnUrl|null $value */ public function setMandate(?CreateMandateWithReturnUrl $value): void { $this->mandate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->existingUniqueMandateReference)) { $object->existingUniqueMandateReference = $this->existingUniqueMandateReference; } if (!is_null($this->mandate)) { $object->mandate = $this->mandate->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SepaDirectDebitPaymentProduct771SpecificInput { parent::fromObject($object); if (property_exists($object, 'existingUniqueMandateReference')) { $this->existingUniqueMandateReference = $object->existingUniqueMandateReference; } if (property_exists($object, 'mandate')) { if (!is_object($object->mandate)) { throw new UnexpectedValueException('value \'' . print_r($object->mandate, true) . '\' is not an object'); } $value = new CreateMandateWithReturnUrl(); $this->mandate = $value->fromObject($object->mandate); } return $this; } } Domain/LengthValidator.php 0000644 00000003363 15224675305 0011571 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LengthValidator extends DataObject { /** * @var int|null */ public ?int $maxLength = null; /** * @var int|null */ public ?int $minLength = null; /** * @return int|null */ public function getMaxLength(): ?int { return $this->maxLength; } /** * @param int|null $value */ public function setMaxLength(?int $value): void { $this->maxLength = $value; } /** * @return int|null */ public function getMinLength(): ?int { return $this->minLength; } /** * @param int|null $value */ public function setMinLength(?int $value): void { $this->minLength = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->maxLength)) { $object->maxLength = $this->maxLength; } if (!is_null($this->minLength)) { $object->minLength = $this->minLength; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LengthValidator { parent::fromObject($object); if (property_exists($object, 'maxLength')) { $this->maxLength = $object->maxLength; } if (property_exists($object, 'minLength')) { $this->minLength = $object->minLength; } return $this; } } Domain/PaymentProduct3203SpecificOutput.php 0000644 00000005104 15224675305 0014652 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3203SpecificOutput extends DataObject { /** * @var AddressPersonal|null */ public ?AddressPersonal $billingAddress = null; /** * @var AddressPersonal|null */ public ?AddressPersonal $shippingAddress = null; /** * @return AddressPersonal|null */ public function getBillingAddress(): ?AddressPersonal { return $this->billingAddress; } /** * @param AddressPersonal|null $value */ public function setBillingAddress(?AddressPersonal $value): void { $this->billingAddress = $value; } /** * @return AddressPersonal|null */ public function getShippingAddress(): ?AddressPersonal { return $this->shippingAddress; } /** * @param AddressPersonal|null $value */ public function setShippingAddress(?AddressPersonal $value): void { $this->shippingAddress = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->billingAddress)) { $object->billingAddress = $this->billingAddress->toObject(); } if (!is_null($this->shippingAddress)) { $object->shippingAddress = $this->shippingAddress->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3203SpecificOutput { parent::fromObject($object); if (property_exists($object, 'billingAddress')) { if (!is_object($object->billingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->billingAddress, true) . '\' is not an object'); } $value = new AddressPersonal(); $this->billingAddress = $value->fromObject($object->billingAddress); } if (property_exists($object, 'shippingAddress')) { if (!is_object($object->shippingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->shippingAddress, true) . '\' is not an object'); } $value = new AddressPersonal(); $this->shippingAddress = $value->fromObject($object->shippingAddress); } return $this; } } Domain/CaptureStatusOutput.php 0000644 00000002323 15224675305 0012525 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CaptureStatusOutput extends DataObject { /** * @var int|null */ public ?int $statusCode = null; /** * @return int|null */ public function getStatusCode(): ?int { return $this->statusCode; } /** * @param int|null $value */ public function setStatusCode(?int $value): void { $this->statusCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->statusCode)) { $object->statusCode = $this->statusCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CaptureStatusOutput { parent::fromObject($object); if (property_exists($object, 'statusCode')) { $this->statusCode = $object->statusCode; } return $this; } } Domain/PaymentProductFiltersHostedTokenization.php 0000644 00000005370 15224675305 0016557 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFiltersHostedTokenization extends DataObject { /** * @var PaymentProductFilterHostedTokenization|null */ public ?PaymentProductFilterHostedTokenization $exclude = null; /** * @var PaymentProductFilterHostedTokenization|null */ public ?PaymentProductFilterHostedTokenization $restrictTo = null; /** * @return PaymentProductFilterHostedTokenization|null */ public function getExclude(): ?PaymentProductFilterHostedTokenization { return $this->exclude; } /** * @param PaymentProductFilterHostedTokenization|null $value */ public function setExclude(?PaymentProductFilterHostedTokenization $value): void { $this->exclude = $value; } /** * @return PaymentProductFilterHostedTokenization|null */ public function getRestrictTo(): ?PaymentProductFilterHostedTokenization { return $this->restrictTo; } /** * @param PaymentProductFilterHostedTokenization|null $value */ public function setRestrictTo(?PaymentProductFilterHostedTokenization $value): void { $this->restrictTo = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->exclude)) { $object->exclude = $this->exclude->toObject(); } if (!is_null($this->restrictTo)) { $object->restrictTo = $this->restrictTo->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFiltersHostedTokenization { parent::fromObject($object); if (property_exists($object, 'exclude')) { if (!is_object($object->exclude)) { throw new UnexpectedValueException('value \'' . print_r($object->exclude, true) . '\' is not an object'); } $value = new PaymentProductFilterHostedTokenization(); $this->exclude = $value->fromObject($object->exclude); } if (property_exists($object, 'restrictTo')) { if (!is_object($object->restrictTo)) { throw new UnexpectedValueException('value \'' . print_r($object->restrictTo, true) . '\' is not an object'); } $value = new PaymentProductFilterHostedTokenization(); $this->restrictTo = $value->fromObject($object->restrictTo); } return $this; } } Domain/SepaDirectDebitPaymentProduct771SpecificInputBase.php 0000644 00000004611 15224675305 0020111 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SepaDirectDebitPaymentProduct771SpecificInputBase extends DataObject { /** * @var string|null */ public ?string $existingUniqueMandateReference = null; /** * @var CreateMandateRequest|null */ public ?CreateMandateRequest $mandate = null; /** * @return string|null */ public function getExistingUniqueMandateReference(): ?string { return $this->existingUniqueMandateReference; } /** * @param string|null $value */ public function setExistingUniqueMandateReference(?string $value): void { $this->existingUniqueMandateReference = $value; } /** * @return CreateMandateRequest|null */ public function getMandate(): ?CreateMandateRequest { return $this->mandate; } /** * @param CreateMandateRequest|null $value */ public function setMandate(?CreateMandateRequest $value): void { $this->mandate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->existingUniqueMandateReference)) { $object->existingUniqueMandateReference = $this->existingUniqueMandateReference; } if (!is_null($this->mandate)) { $object->mandate = $this->mandate->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SepaDirectDebitPaymentProduct771SpecificInputBase { parent::fromObject($object); if (property_exists($object, 'existingUniqueMandateReference')) { $this->existingUniqueMandateReference = $object->existingUniqueMandateReference; } if (property_exists($object, 'mandate')) { if (!is_object($object->mandate)) { throw new UnexpectedValueException('value \'' . print_r($object->mandate, true) . '\' is not an object'); } $value = new CreateMandateRequest(); $this->mandate = $value->fromObject($object->mandate); } return $this; } } Domain/Surcharge.php 0000644 00000012625 15224675305 0010426 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Surcharge extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $netAmount = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var string|null */ public ?string $result = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $surchargeAmount = null; /** * @var SurchargeRate|null */ public ?SurchargeRate $surchargeRate = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $totalAmount = null; /** * @return AmountOfMoney|null */ public function getNetAmount(): ?AmountOfMoney { return $this->netAmount; } /** * @param AmountOfMoney|null $value */ public function setNetAmount(?AmountOfMoney $value): void { $this->netAmount = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return string|null */ public function getResult(): ?string { return $this->result; } /** * @param string|null $value */ public function setResult(?string $value): void { $this->result = $value; } /** * @return AmountOfMoney|null */ public function getSurchargeAmount(): ?AmountOfMoney { return $this->surchargeAmount; } /** * @param AmountOfMoney|null $value */ public function setSurchargeAmount(?AmountOfMoney $value): void { $this->surchargeAmount = $value; } /** * @return SurchargeRate|null */ public function getSurchargeRate(): ?SurchargeRate { return $this->surchargeRate; } /** * @param SurchargeRate|null $value */ public function setSurchargeRate(?SurchargeRate $value): void { $this->surchargeRate = $value; } /** * @return AmountOfMoney|null */ public function getTotalAmount(): ?AmountOfMoney { return $this->totalAmount; } /** * @param AmountOfMoney|null $value */ public function setTotalAmount(?AmountOfMoney $value): void { $this->totalAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->netAmount)) { $object->netAmount = $this->netAmount->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->result)) { $object->result = $this->result; } if (!is_null($this->surchargeAmount)) { $object->surchargeAmount = $this->surchargeAmount->toObject(); } if (!is_null($this->surchargeRate)) { $object->surchargeRate = $this->surchargeRate->toObject(); } if (!is_null($this->totalAmount)) { $object->totalAmount = $this->totalAmount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Surcharge { parent::fromObject($object); if (property_exists($object, 'netAmount')) { if (!is_object($object->netAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->netAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->netAmount = $value->fromObject($object->netAmount); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'result')) { $this->result = $object->result; } if (property_exists($object, 'surchargeAmount')) { if (!is_object($object->surchargeAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->surchargeAmount = $value->fromObject($object->surchargeAmount); } if (property_exists($object, 'surchargeRate')) { if (!is_object($object->surchargeRate)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeRate, true) . '\' is not an object'); } $value = new SurchargeRate(); $this->surchargeRate = $value->fromObject($object->surchargeRate); } if (property_exists($object, 'totalAmount')) { if (!is_object($object->totalAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->totalAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->totalAmount = $value->fromObject($object->totalAmount); } return $this; } } Domain/RangeValidator.php 0000644 00000003333 15224675305 0011401 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RangeValidator extends DataObject { /** * @var int|null */ public ?int $maxValue = null; /** * @var int|null */ public ?int $minValue = null; /** * @return int|null */ public function getMaxValue(): ?int { return $this->maxValue; } /** * @param int|null $value */ public function setMaxValue(?int $value): void { $this->maxValue = $value; } /** * @return int|null */ public function getMinValue(): ?int { return $this->minValue; } /** * @param int|null $value */ public function setMinValue(?int $value): void { $this->minValue = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->maxValue)) { $object->maxValue = $this->maxValue; } if (!is_null($this->minValue)) { $object->minValue = $this->minValue; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RangeValidator { parent::fromObject($object); if (property_exists($object, 'maxValue')) { $this->maxValue = $object->maxValue; } if (property_exists($object, 'minValue')) { $this->minValue = $object->minValue; } return $this; } } Domain/MandatePersonalName.php 0000644 00000003411 15224675305 0012352 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandatePersonalName extends DataObject { /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $surname = null; /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->surname)) { $object->surname = $this->surname; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandatePersonalName { parent::fromObject($object); if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } return $this; } } Domain/CreateMandateRequest.php 0000644 00000013403 15224675305 0012544 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateMandateRequest extends DataObject { /** * @var string|null */ public ?string $alias = null; /** * @var MandateCustomer|null */ public ?MandateCustomer $customer = null; /** * @var string|null */ public ?string $customerReference = null; /** * @var string|null */ public ?string $language = null; /** * @var string|null */ public ?string $recurrenceType = null; /** * @var string|null */ public ?string $returnUrl = null; /** * @var string|null */ public ?string $signatureType = null; /** * @var string|null */ public ?string $uniqueMandateReference = null; /** * @return string|null */ public function getAlias(): ?string { return $this->alias; } /** * @param string|null $value */ public function setAlias(?string $value): void { $this->alias = $value; } /** * @return MandateCustomer|null */ public function getCustomer(): ?MandateCustomer { return $this->customer; } /** * @param MandateCustomer|null $value */ public function setCustomer(?MandateCustomer $value): void { $this->customer = $value; } /** * @return string|null */ public function getCustomerReference(): ?string { return $this->customerReference; } /** * @param string|null $value */ public function setCustomerReference(?string $value): void { $this->customerReference = $value; } /** * @return string|null */ public function getLanguage(): ?string { return $this->language; } /** * @param string|null $value */ public function setLanguage(?string $value): void { $this->language = $value; } /** * @return string|null */ public function getRecurrenceType(): ?string { return $this->recurrenceType; } /** * @param string|null $value */ public function setRecurrenceType(?string $value): void { $this->recurrenceType = $value; } /** * @return string|null */ public function getReturnUrl(): ?string { return $this->returnUrl; } /** * @param string|null $value */ public function setReturnUrl(?string $value): void { $this->returnUrl = $value; } /** * @return string|null */ public function getSignatureType(): ?string { return $this->signatureType; } /** * @param string|null $value */ public function setSignatureType(?string $value): void { $this->signatureType = $value; } /** * @return string|null */ public function getUniqueMandateReference(): ?string { return $this->uniqueMandateReference; } /** * @param string|null $value */ public function setUniqueMandateReference(?string $value): void { $this->uniqueMandateReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alias)) { $object->alias = $this->alias; } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } if (!is_null($this->customerReference)) { $object->customerReference = $this->customerReference; } if (!is_null($this->language)) { $object->language = $this->language; } if (!is_null($this->recurrenceType)) { $object->recurrenceType = $this->recurrenceType; } if (!is_null($this->returnUrl)) { $object->returnUrl = $this->returnUrl; } if (!is_null($this->signatureType)) { $object->signatureType = $this->signatureType; } if (!is_null($this->uniqueMandateReference)) { $object->uniqueMandateReference = $this->uniqueMandateReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateMandateRequest { parent::fromObject($object); if (property_exists($object, 'alias')) { $this->alias = $object->alias; } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new MandateCustomer(); $this->customer = $value->fromObject($object->customer); } if (property_exists($object, 'customerReference')) { $this->customerReference = $object->customerReference; } if (property_exists($object, 'language')) { $this->language = $object->language; } if (property_exists($object, 'recurrenceType')) { $this->recurrenceType = $object->recurrenceType; } if (property_exists($object, 'returnUrl')) { $this->returnUrl = $object->returnUrl; } if (property_exists($object, 'signatureType')) { $this->signatureType = $object->signatureType; } if (property_exists($object, 'uniqueMandateReference')) { $this->uniqueMandateReference = $object->uniqueMandateReference; } return $this; } } Domain/PaymentProductFieldDisplayHints.php 0000644 00000016403 15224675305 0014757 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldDisplayHints extends DataObject { /** * @var bool|null */ public ?bool $alwaysShow = null; /** * @var int|null */ public ?int $displayOrder = null; /** * @var PaymentProductFieldFormElement|null */ public ?PaymentProductFieldFormElement $formElement = null; /** * @var string|null */ public ?string $label = null; /** * @var string|null * @deprecated Deprecated */ public ?string $link = null; /** * @var string|null */ public ?string $mask = null; /** * @var bool|null */ public ?bool $obfuscate = null; /** * @var string|null */ public ?string $placeholderLabel = null; /** * @var string|null */ public ?string $preferredInputType = null; /** * @var PaymentProductFieldTooltip|null */ public ?PaymentProductFieldTooltip $tooltip = null; /** * @return bool|null */ public function getAlwaysShow(): ?bool { return $this->alwaysShow; } /** * @param bool|null $value */ public function setAlwaysShow(?bool $value): void { $this->alwaysShow = $value; } /** * @return int|null */ public function getDisplayOrder(): ?int { return $this->displayOrder; } /** * @param int|null $value */ public function setDisplayOrder(?int $value): void { $this->displayOrder = $value; } /** * @return PaymentProductFieldFormElement|null */ public function getFormElement(): ?PaymentProductFieldFormElement { return $this->formElement; } /** * @param PaymentProductFieldFormElement|null $value */ public function setFormElement(?PaymentProductFieldFormElement $value): void { $this->formElement = $value; } /** * @return string|null */ public function getLabel(): ?string { return $this->label; } /** * @param string|null $value */ public function setLabel(?string $value): void { $this->label = $value; } /** * @return string|null * @deprecated Deprecated */ public function getLink(): ?string { return $this->link; } /** * @param string|null $value * @deprecated Deprecated */ public function setLink(?string $value): void { $this->link = $value; } /** * @return string|null */ public function getMask(): ?string { return $this->mask; } /** * @param string|null $value */ public function setMask(?string $value): void { $this->mask = $value; } /** * @return bool|null */ public function getObfuscate(): ?bool { return $this->obfuscate; } /** * @param bool|null $value */ public function setObfuscate(?bool $value): void { $this->obfuscate = $value; } /** * @return string|null */ public function getPlaceholderLabel(): ?string { return $this->placeholderLabel; } /** * @param string|null $value */ public function setPlaceholderLabel(?string $value): void { $this->placeholderLabel = $value; } /** * @return string|null */ public function getPreferredInputType(): ?string { return $this->preferredInputType; } /** * @param string|null $value */ public function setPreferredInputType(?string $value): void { $this->preferredInputType = $value; } /** * @return PaymentProductFieldTooltip|null */ public function getTooltip(): ?PaymentProductFieldTooltip { return $this->tooltip; } /** * @param PaymentProductFieldTooltip|null $value */ public function setTooltip(?PaymentProductFieldTooltip $value): void { $this->tooltip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alwaysShow)) { $object->alwaysShow = $this->alwaysShow; } if (!is_null($this->displayOrder)) { $object->displayOrder = $this->displayOrder; } if (!is_null($this->formElement)) { $object->formElement = $this->formElement->toObject(); } if (!is_null($this->label)) { $object->label = $this->label; } if (!is_null($this->link)) { $object->link = $this->link; } if (!is_null($this->mask)) { $object->mask = $this->mask; } if (!is_null($this->obfuscate)) { $object->obfuscate = $this->obfuscate; } if (!is_null($this->placeholderLabel)) { $object->placeholderLabel = $this->placeholderLabel; } if (!is_null($this->preferredInputType)) { $object->preferredInputType = $this->preferredInputType; } if (!is_null($this->tooltip)) { $object->tooltip = $this->tooltip->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldDisplayHints { parent::fromObject($object); if (property_exists($object, 'alwaysShow')) { $this->alwaysShow = $object->alwaysShow; } if (property_exists($object, 'displayOrder')) { $this->displayOrder = $object->displayOrder; } if (property_exists($object, 'formElement')) { if (!is_object($object->formElement)) { throw new UnexpectedValueException('value \'' . print_r($object->formElement, true) . '\' is not an object'); } $value = new PaymentProductFieldFormElement(); $this->formElement = $value->fromObject($object->formElement); } if (property_exists($object, 'label')) { $this->label = $object->label; } if (property_exists($object, 'link')) { $this->link = $object->link; } if (property_exists($object, 'mask')) { $this->mask = $object->mask; } if (property_exists($object, 'obfuscate')) { $this->obfuscate = $object->obfuscate; } if (property_exists($object, 'placeholderLabel')) { $this->placeholderLabel = $object->placeholderLabel; } if (property_exists($object, 'preferredInputType')) { $this->preferredInputType = $object->preferredInputType; } if (property_exists($object, 'tooltip')) { if (!is_object($object->tooltip)) { throw new UnexpectedValueException('value \'' . print_r($object->tooltip, true) . '\' is not an object'); } $value = new PaymentProductFieldTooltip(); $this->tooltip = $value->fromObject($object->tooltip); } return $this; } } Domain/CapturePaymentRequest.php 0000644 00000007276 15224675305 0013023 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CapturePaymentRequest extends DataObject { /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isFinal = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsFinal(): ?bool { return $this->isFinal; } /** * @param bool|null $value */ public function setIsFinal(?bool $value): void { $this->isFinal = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount; } if (!is_null($this->isFinal)) { $object->isFinal = $this->isFinal; } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CapturePaymentRequest { parent::fromObject($object); if (property_exists($object, 'amount')) { $this->amount = $object->amount; } if (property_exists($object, 'isFinal')) { $this->isFinal = $object->isFinal; } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } return $this; } } Domain/Customer.php 0000644 00000021101 15224675305 0010271 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Customer extends DataObject { /** * @var CustomerAccount|null */ public ?CustomerAccount $account = null; /** * @var string|null */ public ?string $accountType = null; /** * @var Address|null */ public ?Address $billingAddress = null; /** * @var CompanyInformation|null */ public ?CompanyInformation $companyInformation = null; /** * @var ContactDetails|null */ public ?ContactDetails $contactDetails = null; /** * @var CustomerDevice|null */ public ?CustomerDevice $device = null; /** * @var string|null */ public ?string $fiscalNumber = null; /** * @var string|null */ public ?string $locale = null; /** * @var string|null */ public ?string $merchantCustomerId = null; /** * @var PersonalInformation|null */ public ?PersonalInformation $personalInformation = null; /** * @return CustomerAccount|null */ public function getAccount(): ?CustomerAccount { return $this->account; } /** * @param CustomerAccount|null $value */ public function setAccount(?CustomerAccount $value): void { $this->account = $value; } /** * @return string|null */ public function getAccountType(): ?string { return $this->accountType; } /** * @param string|null $value */ public function setAccountType(?string $value): void { $this->accountType = $value; } /** * @return Address|null */ public function getBillingAddress(): ?Address { return $this->billingAddress; } /** * @param Address|null $value */ public function setBillingAddress(?Address $value): void { $this->billingAddress = $value; } /** * @return CompanyInformation|null */ public function getCompanyInformation(): ?CompanyInformation { return $this->companyInformation; } /** * @param CompanyInformation|null $value */ public function setCompanyInformation(?CompanyInformation $value): void { $this->companyInformation = $value; } /** * @return ContactDetails|null */ public function getContactDetails(): ?ContactDetails { return $this->contactDetails; } /** * @param ContactDetails|null $value */ public function setContactDetails(?ContactDetails $value): void { $this->contactDetails = $value; } /** * @return CustomerDevice|null */ public function getDevice(): ?CustomerDevice { return $this->device; } /** * @param CustomerDevice|null $value */ public function setDevice(?CustomerDevice $value): void { $this->device = $value; } /** * @return string|null */ public function getFiscalNumber(): ?string { return $this->fiscalNumber; } /** * @param string|null $value */ public function setFiscalNumber(?string $value): void { $this->fiscalNumber = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return string|null */ public function getMerchantCustomerId(): ?string { return $this->merchantCustomerId; } /** * @param string|null $value */ public function setMerchantCustomerId(?string $value): void { $this->merchantCustomerId = $value; } /** * @return PersonalInformation|null */ public function getPersonalInformation(): ?PersonalInformation { return $this->personalInformation; } /** * @param PersonalInformation|null $value */ public function setPersonalInformation(?PersonalInformation $value): void { $this->personalInformation = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->account)) { $object->account = $this->account->toObject(); } if (!is_null($this->accountType)) { $object->accountType = $this->accountType; } if (!is_null($this->billingAddress)) { $object->billingAddress = $this->billingAddress->toObject(); } if (!is_null($this->companyInformation)) { $object->companyInformation = $this->companyInformation->toObject(); } if (!is_null($this->contactDetails)) { $object->contactDetails = $this->contactDetails->toObject(); } if (!is_null($this->device)) { $object->device = $this->device->toObject(); } if (!is_null($this->fiscalNumber)) { $object->fiscalNumber = $this->fiscalNumber; } if (!is_null($this->locale)) { $object->locale = $this->locale; } if (!is_null($this->merchantCustomerId)) { $object->merchantCustomerId = $this->merchantCustomerId; } if (!is_null($this->personalInformation)) { $object->personalInformation = $this->personalInformation->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Customer { parent::fromObject($object); if (property_exists($object, 'account')) { if (!is_object($object->account)) { throw new UnexpectedValueException('value \'' . print_r($object->account, true) . '\' is not an object'); } $value = new CustomerAccount(); $this->account = $value->fromObject($object->account); } if (property_exists($object, 'accountType')) { $this->accountType = $object->accountType; } if (property_exists($object, 'billingAddress')) { if (!is_object($object->billingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->billingAddress, true) . '\' is not an object'); } $value = new Address(); $this->billingAddress = $value->fromObject($object->billingAddress); } if (property_exists($object, 'companyInformation')) { if (!is_object($object->companyInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->companyInformation, true) . '\' is not an object'); } $value = new CompanyInformation(); $this->companyInformation = $value->fromObject($object->companyInformation); } if (property_exists($object, 'contactDetails')) { if (!is_object($object->contactDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->contactDetails, true) . '\' is not an object'); } $value = new ContactDetails(); $this->contactDetails = $value->fromObject($object->contactDetails); } if (property_exists($object, 'device')) { if (!is_object($object->device)) { throw new UnexpectedValueException('value \'' . print_r($object->device, true) . '\' is not an object'); } $value = new CustomerDevice(); $this->device = $value->fromObject($object->device); } if (property_exists($object, 'fiscalNumber')) { $this->fiscalNumber = $object->fiscalNumber; } if (property_exists($object, 'locale')) { $this->locale = $object->locale; } if (property_exists($object, 'merchantCustomerId')) { $this->merchantCustomerId = $object->merchantCustomerId; } if (property_exists($object, 'personalInformation')) { if (!is_object($object->personalInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->personalInformation, true) . '\' is not an object'); } $value = new PersonalInformation(); $this->personalInformation = $value->fromObject($object->personalInformation); } return $this; } } Domain/PaymentAccountOnFile.php 0000644 00000004246 15224675305 0012532 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentAccountOnFile extends DataObject { /** * @var string|null */ public ?string $createDate = null; /** * @var int|null */ public ?int $numberOfCardOnFileCreationAttemptsLast24Hours = null; /** * @return string|null */ public function getCreateDate(): ?string { return $this->createDate; } /** * @param string|null $value */ public function setCreateDate(?string $value): void { $this->createDate = $value; } /** * @return int|null */ public function getNumberOfCardOnFileCreationAttemptsLast24Hours(): ?int { return $this->numberOfCardOnFileCreationAttemptsLast24Hours; } /** * @param int|null $value */ public function setNumberOfCardOnFileCreationAttemptsLast24Hours(?int $value): void { $this->numberOfCardOnFileCreationAttemptsLast24Hours = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->createDate)) { $object->createDate = $this->createDate; } if (!is_null($this->numberOfCardOnFileCreationAttemptsLast24Hours)) { $object->numberOfCardOnFileCreationAttemptsLast24Hours = $this->numberOfCardOnFileCreationAttemptsLast24Hours; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentAccountOnFile { parent::fromObject($object); if (property_exists($object, 'createDate')) { $this->createDate = $object->createDate; } if (property_exists($object, 'numberOfCardOnFileCreationAttemptsLast24Hours')) { $this->numberOfCardOnFileCreationAttemptsLast24Hours = $object->numberOfCardOnFileCreationAttemptsLast24Hours; } return $this; } } Domain/RefundRequest.php 0000644 00000013610 15224675305 0011272 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundRequest extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var string|null */ public ?string $captureId = null; /** * @var OmnichannelRefundSpecificInput|null */ public ?OmnichannelRefundSpecificInput $omnichannelRefundSpecificInput = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @var string|null */ public ?string $reason = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return string|null */ public function getCaptureId(): ?string { return $this->captureId; } /** * @param string|null $value */ public function setCaptureId(?string $value): void { $this->captureId = $value; } /** * @return OmnichannelRefundSpecificInput|null */ public function getOmnichannelRefundSpecificInput(): ?OmnichannelRefundSpecificInput { return $this->omnichannelRefundSpecificInput; } /** * @param OmnichannelRefundSpecificInput|null $value */ public function setOmnichannelRefundSpecificInput(?OmnichannelRefundSpecificInput $value): void { $this->omnichannelRefundSpecificInput = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return string|null */ public function getReason(): ?string { return $this->reason; } /** * @param string|null $value */ public function setReason(?string $value): void { $this->reason = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->captureId)) { $object->captureId = $this->captureId; } if (!is_null($this->omnichannelRefundSpecificInput)) { $object->omnichannelRefundSpecificInput = $this->omnichannelRefundSpecificInput->toObject(); } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } if (!is_null($this->reason)) { $object->reason = $this->reason; } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundRequest { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'captureId')) { $this->captureId = $object->captureId; } if (property_exists($object, 'omnichannelRefundSpecificInput')) { if (!is_object($object->omnichannelRefundSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->omnichannelRefundSpecificInput, true) . '\' is not an object'); } $value = new OmnichannelRefundSpecificInput(); $this->omnichannelRefundSpecificInput = $value->fromObject($object->omnichannelRefundSpecificInput); } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } if (property_exists($object, 'reason')) { $this->reason = $object->reason; } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } return $this; } } Domain/SepaDirectDebitPaymentMethodSpecificInputBase.php 0000644 00000005313 15224675305 0017452 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SepaDirectDebitPaymentMethodSpecificInputBase extends DataObject { /** * @var SepaDirectDebitPaymentProduct771SpecificInputBase|null */ public ?SepaDirectDebitPaymentProduct771SpecificInputBase $paymentProduct771SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return SepaDirectDebitPaymentProduct771SpecificInputBase|null */ public function getPaymentProduct771SpecificInput(): ?SepaDirectDebitPaymentProduct771SpecificInputBase { return $this->paymentProduct771SpecificInput; } /** * @param SepaDirectDebitPaymentProduct771SpecificInputBase|null $value */ public function setPaymentProduct771SpecificInput(?SepaDirectDebitPaymentProduct771SpecificInputBase $value): void { $this->paymentProduct771SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProduct771SpecificInput)) { $object->paymentProduct771SpecificInput = $this->paymentProduct771SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SepaDirectDebitPaymentMethodSpecificInputBase { parent::fromObject($object); if (property_exists($object, 'paymentProduct771SpecificInput')) { if (!is_object($object->paymentProduct771SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct771SpecificInput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentProduct771SpecificInputBase(); $this->paymentProduct771SpecificInput = $value->fromObject($object->paymentProduct771SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/FixedListValidator.php 0000644 00000003413 15224675305 0012237 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class FixedListValidator extends DataObject { /** * @var string[]|null */ public ?array $allowedValues = null; /** * @return string[]|null */ public function getAllowedValues(): ?array { return $this->allowedValues; } /** * @param string[]|null $value */ public function setAllowedValues(?array $value): void { $this->allowedValues = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->allowedValues)) { $object->allowedValues = []; foreach ($this->allowedValues as $element) { if (!is_null($element)) { $object->allowedValues[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): FixedListValidator { parent::fromObject($object); if (property_exists($object, 'allowedValues')) { if (!is_array($object->allowedValues) && !is_object($object->allowedValues)) { throw new UnexpectedValueException('value \'' . print_r($object->allowedValues, true) . '\' is not an array or object'); } $this->allowedValues = []; foreach ($object->allowedValues as $element) { $this->allowedValues[] = $element; } } return $this; } } Domain/NetworkTokenLinked.php 0000644 00000004616 15224675305 0012265 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class NetworkTokenLinked extends DataObject { /** * @var string|null */ public ?string $expiryDate = null; /** * @var string|null */ public ?string $maskedToken = null; /** * @var string|null */ public ?string $tokenState = null; /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return string|null */ public function getMaskedToken(): ?string { return $this->maskedToken; } /** * @param string|null $value */ public function setMaskedToken(?string $value): void { $this->maskedToken = $value; } /** * @return string|null */ public function getTokenState(): ?string { return $this->tokenState; } /** * @param string|null $value */ public function setTokenState(?string $value): void { $this->tokenState = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } if (!is_null($this->maskedToken)) { $object->maskedToken = $this->maskedToken; } if (!is_null($this->tokenState)) { $object->tokenState = $this->tokenState; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): NetworkTokenLinked { parent::fromObject($object); if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } if (property_exists($object, 'maskedToken')) { $this->maskedToken = $object->maskedToken; } if (property_exists($object, 'tokenState')) { $this->tokenState = $object->tokenState; } return $this; } } Domain/LoanRecipient.php 0000644 00000006727 15224675305 0011245 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LoanRecipient extends DataObject { /** * @var string|null */ public ?string $accountNumber = null; /** * @var string|null */ public ?string $dateOfBirth = null; /** * @var string|null */ public ?string $partialPan = null; /** * @var string|null */ public ?string $surname = null; /** * @var string|null */ public ?string $zip = null; /** * @return string|null */ public function getAccountNumber(): ?string { return $this->accountNumber; } /** * @param string|null $value */ public function setAccountNumber(?string $value): void { $this->accountNumber = $value; } /** * @return string|null */ public function getDateOfBirth(): ?string { return $this->dateOfBirth; } /** * @param string|null $value */ public function setDateOfBirth(?string $value): void { $this->dateOfBirth = $value; } /** * @return string|null */ public function getPartialPan(): ?string { return $this->partialPan; } /** * @param string|null $value */ public function setPartialPan(?string $value): void { $this->partialPan = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * @param string|null $value */ public function setZip(?string $value): void { $this->zip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountNumber)) { $object->accountNumber = $this->accountNumber; } if (!is_null($this->dateOfBirth)) { $object->dateOfBirth = $this->dateOfBirth; } if (!is_null($this->partialPan)) { $object->partialPan = $this->partialPan; } if (!is_null($this->surname)) { $object->surname = $this->surname; } if (!is_null($this->zip)) { $object->zip = $this->zip; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LoanRecipient { parent::fromObject($object); if (property_exists($object, 'accountNumber')) { $this->accountNumber = $object->accountNumber; } if (property_exists($object, 'dateOfBirth')) { $this->dateOfBirth = $object->dateOfBirth; } if (property_exists($object, 'partialPan')) { $this->partialPan = $object->partialPan; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } if (property_exists($object, 'zip')) { $this->zip = $object->zip; } return $this; } } Domain/Transaction.php 0000644 00000002723 15224675305 0010766 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Transaction extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amount = null; /** * @return AmountOfMoney|null */ public function getAmount(): ?AmountOfMoney { return $this->amount; } /** * @param AmountOfMoney|null $value */ public function setAmount(?AmountOfMoney $value): void { $this->amount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Transaction { parent::fromObject($object); if (property_exists($object, 'amount')) { if (!is_object($object->amount)) { throw new UnexpectedValueException('value \'' . print_r($object->amount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amount = $value->fromObject($object->amount); } return $this; } } Domain/CreateHostedCheckoutRequest.php 0000644 00000023453 15224675305 0014115 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateHostedCheckoutRequest extends DataObject { /** * @var CardPaymentMethodSpecificInputBase|null */ public ?CardPaymentMethodSpecificInputBase $cardPaymentMethodSpecificInput = null; /** * @var Feedbacks|null */ public ?Feedbacks $feedbacks = null; /** * @var FraudFields|null */ public ?FraudFields $fraudFields = null; /** * @var HostedCheckoutSpecificInput|null */ public ?HostedCheckoutSpecificInput $hostedCheckoutSpecificInput = null; /** * @var MobilePaymentMethodHostedCheckoutSpecificInput|null */ public ?MobilePaymentMethodHostedCheckoutSpecificInput $mobilePaymentMethodSpecificInput = null; /** * @var Order|null */ public ?Order $order = null; /** * @var RedirectPaymentMethodSpecificInput|null */ public ?RedirectPaymentMethodSpecificInput $redirectPaymentMethodSpecificInput = null; /** * @var SepaDirectDebitPaymentMethodSpecificInputBase|null */ public ?SepaDirectDebitPaymentMethodSpecificInputBase $sepaDirectDebitPaymentMethodSpecificInput = null; /** * @return CardPaymentMethodSpecificInputBase|null */ public function getCardPaymentMethodSpecificInput(): ?CardPaymentMethodSpecificInputBase { return $this->cardPaymentMethodSpecificInput; } /** * @param CardPaymentMethodSpecificInputBase|null $value */ public function setCardPaymentMethodSpecificInput(?CardPaymentMethodSpecificInputBase $value): void { $this->cardPaymentMethodSpecificInput = $value; } /** * @return Feedbacks|null */ public function getFeedbacks(): ?Feedbacks { return $this->feedbacks; } /** * @param Feedbacks|null $value */ public function setFeedbacks(?Feedbacks $value): void { $this->feedbacks = $value; } /** * @return FraudFields|null */ public function getFraudFields(): ?FraudFields { return $this->fraudFields; } /** * @param FraudFields|null $value */ public function setFraudFields(?FraudFields $value): void { $this->fraudFields = $value; } /** * @return HostedCheckoutSpecificInput|null */ public function getHostedCheckoutSpecificInput(): ?HostedCheckoutSpecificInput { return $this->hostedCheckoutSpecificInput; } /** * @param HostedCheckoutSpecificInput|null $value */ public function setHostedCheckoutSpecificInput(?HostedCheckoutSpecificInput $value): void { $this->hostedCheckoutSpecificInput = $value; } /** * @return MobilePaymentMethodHostedCheckoutSpecificInput|null */ public function getMobilePaymentMethodSpecificInput(): ?MobilePaymentMethodHostedCheckoutSpecificInput { return $this->mobilePaymentMethodSpecificInput; } /** * @param MobilePaymentMethodHostedCheckoutSpecificInput|null $value */ public function setMobilePaymentMethodSpecificInput(?MobilePaymentMethodHostedCheckoutSpecificInput $value): void { $this->mobilePaymentMethodSpecificInput = $value; } /** * @return Order|null */ public function getOrder(): ?Order { return $this->order; } /** * @param Order|null $value */ public function setOrder(?Order $value): void { $this->order = $value; } /** * @return RedirectPaymentMethodSpecificInput|null */ public function getRedirectPaymentMethodSpecificInput(): ?RedirectPaymentMethodSpecificInput { return $this->redirectPaymentMethodSpecificInput; } /** * @param RedirectPaymentMethodSpecificInput|null $value */ public function setRedirectPaymentMethodSpecificInput(?RedirectPaymentMethodSpecificInput $value): void { $this->redirectPaymentMethodSpecificInput = $value; } /** * @return SepaDirectDebitPaymentMethodSpecificInputBase|null */ public function getSepaDirectDebitPaymentMethodSpecificInput(): ?SepaDirectDebitPaymentMethodSpecificInputBase { return $this->sepaDirectDebitPaymentMethodSpecificInput; } /** * @param SepaDirectDebitPaymentMethodSpecificInputBase|null $value */ public function setSepaDirectDebitPaymentMethodSpecificInput(?SepaDirectDebitPaymentMethodSpecificInputBase $value): void { $this->sepaDirectDebitPaymentMethodSpecificInput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardPaymentMethodSpecificInput)) { $object->cardPaymentMethodSpecificInput = $this->cardPaymentMethodSpecificInput->toObject(); } if (!is_null($this->feedbacks)) { $object->feedbacks = $this->feedbacks->toObject(); } if (!is_null($this->fraudFields)) { $object->fraudFields = $this->fraudFields->toObject(); } if (!is_null($this->hostedCheckoutSpecificInput)) { $object->hostedCheckoutSpecificInput = $this->hostedCheckoutSpecificInput->toObject(); } if (!is_null($this->mobilePaymentMethodSpecificInput)) { $object->mobilePaymentMethodSpecificInput = $this->mobilePaymentMethodSpecificInput->toObject(); } if (!is_null($this->order)) { $object->order = $this->order->toObject(); } if (!is_null($this->redirectPaymentMethodSpecificInput)) { $object->redirectPaymentMethodSpecificInput = $this->redirectPaymentMethodSpecificInput->toObject(); } if (!is_null($this->sepaDirectDebitPaymentMethodSpecificInput)) { $object->sepaDirectDebitPaymentMethodSpecificInput = $this->sepaDirectDebitPaymentMethodSpecificInput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateHostedCheckoutRequest { parent::fromObject($object); if (property_exists($object, 'cardPaymentMethodSpecificInput')) { if (!is_object($object->cardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificInputBase(); $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput); } if (property_exists($object, 'feedbacks')) { if (!is_object($object->feedbacks)) { throw new UnexpectedValueException('value \'' . print_r($object->feedbacks, true) . '\' is not an object'); } $value = new Feedbacks(); $this->feedbacks = $value->fromObject($object->feedbacks); } if (property_exists($object, 'fraudFields')) { if (!is_object($object->fraudFields)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudFields, true) . '\' is not an object'); } $value = new FraudFields(); $this->fraudFields = $value->fromObject($object->fraudFields); } if (property_exists($object, 'hostedCheckoutSpecificInput')) { if (!is_object($object->hostedCheckoutSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->hostedCheckoutSpecificInput, true) . '\' is not an object'); } $value = new HostedCheckoutSpecificInput(); $this->hostedCheckoutSpecificInput = $value->fromObject($object->hostedCheckoutSpecificInput); } if (property_exists($object, 'mobilePaymentMethodSpecificInput')) { if (!is_object($object->mobilePaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobilePaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentMethodHostedCheckoutSpecificInput(); $this->mobilePaymentMethodSpecificInput = $value->fromObject($object->mobilePaymentMethodSpecificInput); } if (property_exists($object, 'order')) { if (!is_object($object->order)) { throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object'); } $value = new Order(); $this->order = $value->fromObject($object->order); } if (property_exists($object, 'redirectPaymentMethodSpecificInput')) { if (!is_object($object->redirectPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentMethodSpecificInput(); $this->redirectPaymentMethodSpecificInput = $value->fromObject($object->redirectPaymentMethodSpecificInput); } if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificInput')) { if (!is_object($object->sepaDirectDebitPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentMethodSpecificInputBase(); $this->sepaDirectDebitPaymentMethodSpecificInput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificInput); } return $this; } } Domain/PaymentProductFieldDisplayElement.php 0000644 00000005351 15224675305 0015263 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldDisplayElement extends DataObject { /** * @var string|null */ public ?string $id = null; /** * @var string|null */ public ?string $label = null; /** * @var string|null */ public ?string $type = null; /** * @var string|null */ public ?string $value = null; /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return string|null */ public function getLabel(): ?string { return $this->label; } /** * @param string|null $value */ public function setLabel(?string $value): void { $this->label = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return string|null */ public function getValue(): ?string { return $this->value; } /** * @param string|null $value */ public function setValue(?string $value): void { $this->value = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->label)) { $object->label = $this->label; } if (!is_null($this->type)) { $object->type = $this->type; } if (!is_null($this->value)) { $object->value = $this->value; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldDisplayElement { parent::fromObject($object); if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'label')) { $this->label = $object->label; } if (property_exists($object, 'type')) { $this->type = $object->type; } if (property_exists($object, 'value')) { $this->value = $object->value; } return $this; } } Domain/RedirectPaymentProduct3306SpecificInput.php 0000644 00000002532 15224675305 0016141 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct3306SpecificInput extends DataObject { /** * @var string|null */ public ?string $extraMerchantData = null; /** * @return string|null */ public function getExtraMerchantData(): ?string { return $this->extraMerchantData; } /** * @param string|null $value */ public function setExtraMerchantData(?string $value): void { $this->extraMerchantData = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->extraMerchantData)) { $object->extraMerchantData = $this->extraMerchantData; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct3306SpecificInput { parent::fromObject($object); if (property_exists($object, 'extraMerchantData')) { $this->extraMerchantData = $object->extraMerchantData; } return $this; } } Domain/AmountOfMoney.php 0000644 00000003401 15224675305 0011233 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AmountOfMoney extends DataObject { /** * @var int|null */ public ?int $amount = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount; } if (!is_null($this->currencyCode)) { $object->currencyCode = $this->currencyCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AmountOfMoney { parent::fromObject($object); if (property_exists($object, 'amount')) { $this->amount = $object->amount; } if (property_exists($object, 'currencyCode')) { $this->currencyCode = $object->currencyCode; } return $this; } } Domain/PaymentProduct771SpecificOutput.php 0000644 00000002477 15224675305 0014613 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct771SpecificOutput extends DataObject { /** * @var string|null */ public ?string $mandateReference = null; /** * @return string|null */ public function getMandateReference(): ?string { return $this->mandateReference; } /** * @param string|null $value */ public function setMandateReference(?string $value): void { $this->mandateReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->mandateReference)) { $object->mandateReference = $this->mandateReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct771SpecificOutput { parent::fromObject($object); if (property_exists($object, 'mandateReference')) { $this->mandateReference = $object->mandateReference; } return $this; } } Domain/AirlineData.php 0000644 00000046013 15224675305 0010656 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AirlineData extends DataObject { /** * @var string|null */ public ?string $agentNumericCode = null; /** * @var string|null */ public ?string $code = null; /** * @var string|null * @deprecated This field is not used by any payment product Date of the Flight Format: YYYYMMDD */ public ?string $flightDate = null; /** * @var string|null */ public ?string $flightIndicator = null; /** * @var AirlineFlightLeg[]|null */ public ?array $flightLegs = null; /** * @var string|null */ public ?string $invoiceNumber = null; /** * @var bool|null * @deprecated Deprecated */ public ?bool $isETicket = null; /** * @var bool|null */ public ?bool $isRestrictedTicket = null; /** * @var bool|null * @deprecated This field is not used by any payment product * true - The payer is the ticket holder * false - The payer is not the ticket holder */ public ?bool $isThirdParty = null; /** * @var string|null */ public ?string $issueDate = null; /** * @var string|null */ public ?string $merchantCustomerId = null; /** * @var string|null * @deprecated This field is not used by any payment product Name of the airline */ public ?string $name = null; /** * @var string|null * @deprecated Use passengers instead Name of passenger */ public ?string $passengerName = null; /** * @var AirlinePassenger[]|null */ public ?array $passengers = null; /** * @var string|null * @deprecated This field is not used by any payment product Place of issue For sales in the US the last two characters (pos 14-15) must be the US state code. */ public ?string $placeOfIssue = null; /** * @var string|null * @deprecated Use passengers instead. */ public ?string $pnr = null; /** * @var string|null */ public ?string $pointOfSale = null; /** * @var string|null * @deprecated This field is not used by any payment product City code of the point of sale */ public ?string $posCityCode = null; /** * @var string|null */ public ?string $ticketCurrency = null; /** * @var string|null * @deprecated This field is not used by any payment product Delivery method of the ticket */ public ?string $ticketDeliveryMethod = null; /** * @var string|null */ public ?string $ticketNumber = null; /** * @var int|null */ public ?int $totalFare = null; /** * @var int|null */ public ?int $totalFee = null; /** * @var int|null */ public ?int $totalTaxes = null; /** * @var string|null */ public ?string $travelAgencyName = null; /** * @return string|null */ public function getAgentNumericCode(): ?string { return $this->agentNumericCode; } /** * @param string|null $value */ public function setAgentNumericCode(?string $value): void { $this->agentNumericCode = $value; } /** * @return string|null */ public function getCode(): ?string { return $this->code; } /** * @param string|null $value */ public function setCode(?string $value): void { $this->code = $value; } /** * @return string|null * @deprecated This field is not used by any payment product Date of the Flight Format: YYYYMMDD */ public function getFlightDate(): ?string { return $this->flightDate; } /** * @param string|null $value * @deprecated This field is not used by any payment product Date of the Flight Format: YYYYMMDD */ public function setFlightDate(?string $value): void { $this->flightDate = $value; } /** * @return string|null */ public function getFlightIndicator(): ?string { return $this->flightIndicator; } /** * @param string|null $value */ public function setFlightIndicator(?string $value): void { $this->flightIndicator = $value; } /** * @return AirlineFlightLeg[]|null */ public function getFlightLegs(): ?array { return $this->flightLegs; } /** * @param AirlineFlightLeg[]|null $value */ public function setFlightLegs(?array $value): void { $this->flightLegs = $value; } /** * @return string|null */ public function getInvoiceNumber(): ?string { return $this->invoiceNumber; } /** * @param string|null $value */ public function setInvoiceNumber(?string $value): void { $this->invoiceNumber = $value; } /** * @return bool|null * @deprecated Deprecated */ public function getIsETicket(): ?bool { return $this->isETicket; } /** * @param bool|null $value * @deprecated Deprecated */ public function setIsETicket(?bool $value): void { $this->isETicket = $value; } /** * @return bool|null */ public function getIsRestrictedTicket(): ?bool { return $this->isRestrictedTicket; } /** * @param bool|null $value */ public function setIsRestrictedTicket(?bool $value): void { $this->isRestrictedTicket = $value; } /** * @return bool|null * @deprecated This field is not used by any payment product * true - The payer is the ticket holder * false - The payer is not the ticket holder */ public function getIsThirdParty(): ?bool { return $this->isThirdParty; } /** * @param bool|null $value * @deprecated This field is not used by any payment product * true - The payer is the ticket holder * false - The payer is not the ticket holder */ public function setIsThirdParty(?bool $value): void { $this->isThirdParty = $value; } /** * @return string|null */ public function getIssueDate(): ?string { return $this->issueDate; } /** * @param string|null $value */ public function setIssueDate(?string $value): void { $this->issueDate = $value; } /** * @return string|null */ public function getMerchantCustomerId(): ?string { return $this->merchantCustomerId; } /** * @param string|null $value */ public function setMerchantCustomerId(?string $value): void { $this->merchantCustomerId = $value; } /** * @return string|null * @deprecated This field is not used by any payment product Name of the airline */ public function getName(): ?string { return $this->name; } /** * @param string|null $value * @deprecated This field is not used by any payment product Name of the airline */ public function setName(?string $value): void { $this->name = $value; } /** * @return string|null * @deprecated Use passengers instead Name of passenger */ public function getPassengerName(): ?string { return $this->passengerName; } /** * @param string|null $value * @deprecated Use passengers instead Name of passenger */ public function setPassengerName(?string $value): void { $this->passengerName = $value; } /** * @return AirlinePassenger[]|null */ public function getPassengers(): ?array { return $this->passengers; } /** * @param AirlinePassenger[]|null $value */ public function setPassengers(?array $value): void { $this->passengers = $value; } /** * @return string|null * @deprecated This field is not used by any payment product Place of issue For sales in the US the last two characters (pos 14-15) must be the US state code. */ public function getPlaceOfIssue(): ?string { return $this->placeOfIssue; } /** * @param string|null $value * @deprecated This field is not used by any payment product Place of issue For sales in the US the last two characters (pos 14-15) must be the US state code. */ public function setPlaceOfIssue(?string $value): void { $this->placeOfIssue = $value; } /** * @return string|null * @deprecated Use passengers instead. */ public function getPnr(): ?string { return $this->pnr; } /** * @param string|null $value * @deprecated Use passengers instead. */ public function setPnr(?string $value): void { $this->pnr = $value; } /** * @return string|null */ public function getPointOfSale(): ?string { return $this->pointOfSale; } /** * @param string|null $value */ public function setPointOfSale(?string $value): void { $this->pointOfSale = $value; } /** * @return string|null * @deprecated This field is not used by any payment product City code of the point of sale */ public function getPosCityCode(): ?string { return $this->posCityCode; } /** * @param string|null $value * @deprecated This field is not used by any payment product City code of the point of sale */ public function setPosCityCode(?string $value): void { $this->posCityCode = $value; } /** * @return string|null */ public function getTicketCurrency(): ?string { return $this->ticketCurrency; } /** * @param string|null $value */ public function setTicketCurrency(?string $value): void { $this->ticketCurrency = $value; } /** * @return string|null * @deprecated This field is not used by any payment product Delivery method of the ticket */ public function getTicketDeliveryMethod(): ?string { return $this->ticketDeliveryMethod; } /** * @param string|null $value * @deprecated This field is not used by any payment product Delivery method of the ticket */ public function setTicketDeliveryMethod(?string $value): void { $this->ticketDeliveryMethod = $value; } /** * @return string|null */ public function getTicketNumber(): ?string { return $this->ticketNumber; } /** * @param string|null $value */ public function setTicketNumber(?string $value): void { $this->ticketNumber = $value; } /** * @return int|null */ public function getTotalFare(): ?int { return $this->totalFare; } /** * @param int|null $value */ public function setTotalFare(?int $value): void { $this->totalFare = $value; } /** * @return int|null */ public function getTotalFee(): ?int { return $this->totalFee; } /** * @param int|null $value */ public function setTotalFee(?int $value): void { $this->totalFee = $value; } /** * @return int|null */ public function getTotalTaxes(): ?int { return $this->totalTaxes; } /** * @param int|null $value */ public function setTotalTaxes(?int $value): void { $this->totalTaxes = $value; } /** * @return string|null */ public function getTravelAgencyName(): ?string { return $this->travelAgencyName; } /** * @param string|null $value */ public function setTravelAgencyName(?string $value): void { $this->travelAgencyName = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->agentNumericCode)) { $object->agentNumericCode = $this->agentNumericCode; } if (!is_null($this->code)) { $object->code = $this->code; } if (!is_null($this->flightDate)) { $object->flightDate = $this->flightDate; } if (!is_null($this->flightIndicator)) { $object->flightIndicator = $this->flightIndicator; } if (!is_null($this->flightLegs)) { $object->flightLegs = []; foreach ($this->flightLegs as $element) { if (!is_null($element)) { $object->flightLegs[] = $element->toObject(); } } } if (!is_null($this->invoiceNumber)) { $object->invoiceNumber = $this->invoiceNumber; } if (!is_null($this->isETicket)) { $object->isETicket = $this->isETicket; } if (!is_null($this->isRestrictedTicket)) { $object->isRestrictedTicket = $this->isRestrictedTicket; } if (!is_null($this->isThirdParty)) { $object->isThirdParty = $this->isThirdParty; } if (!is_null($this->issueDate)) { $object->issueDate = $this->issueDate; } if (!is_null($this->merchantCustomerId)) { $object->merchantCustomerId = $this->merchantCustomerId; } if (!is_null($this->name)) { $object->name = $this->name; } if (!is_null($this->passengerName)) { $object->passengerName = $this->passengerName; } if (!is_null($this->passengers)) { $object->passengers = []; foreach ($this->passengers as $element) { if (!is_null($element)) { $object->passengers[] = $element->toObject(); } } } if (!is_null($this->placeOfIssue)) { $object->placeOfIssue = $this->placeOfIssue; } if (!is_null($this->pnr)) { $object->pnr = $this->pnr; } if (!is_null($this->pointOfSale)) { $object->pointOfSale = $this->pointOfSale; } if (!is_null($this->posCityCode)) { $object->posCityCode = $this->posCityCode; } if (!is_null($this->ticketCurrency)) { $object->ticketCurrency = $this->ticketCurrency; } if (!is_null($this->ticketDeliveryMethod)) { $object->ticketDeliveryMethod = $this->ticketDeliveryMethod; } if (!is_null($this->ticketNumber)) { $object->ticketNumber = $this->ticketNumber; } if (!is_null($this->totalFare)) { $object->totalFare = $this->totalFare; } if (!is_null($this->totalFee)) { $object->totalFee = $this->totalFee; } if (!is_null($this->totalTaxes)) { $object->totalTaxes = $this->totalTaxes; } if (!is_null($this->travelAgencyName)) { $object->travelAgencyName = $this->travelAgencyName; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AirlineData { parent::fromObject($object); if (property_exists($object, 'agentNumericCode')) { $this->agentNumericCode = $object->agentNumericCode; } if (property_exists($object, 'code')) { $this->code = $object->code; } if (property_exists($object, 'flightDate')) { $this->flightDate = $object->flightDate; } if (property_exists($object, 'flightIndicator')) { $this->flightIndicator = $object->flightIndicator; } if (property_exists($object, 'flightLegs')) { if (!is_array($object->flightLegs) && !is_object($object->flightLegs)) { throw new UnexpectedValueException('value \'' . print_r($object->flightLegs, true) . '\' is not an array or object'); } $this->flightLegs = []; foreach ($object->flightLegs as $element) { $value = new AirlineFlightLeg(); $this->flightLegs[] = $value->fromObject($element); } } if (property_exists($object, 'invoiceNumber')) { $this->invoiceNumber = $object->invoiceNumber; } if (property_exists($object, 'isETicket')) { $this->isETicket = $object->isETicket; } if (property_exists($object, 'isRestrictedTicket')) { $this->isRestrictedTicket = $object->isRestrictedTicket; } if (property_exists($object, 'isThirdParty')) { $this->isThirdParty = $object->isThirdParty; } if (property_exists($object, 'issueDate')) { $this->issueDate = $object->issueDate; } if (property_exists($object, 'merchantCustomerId')) { $this->merchantCustomerId = $object->merchantCustomerId; } if (property_exists($object, 'name')) { $this->name = $object->name; } if (property_exists($object, 'passengerName')) { $this->passengerName = $object->passengerName; } if (property_exists($object, 'passengers')) { if (!is_array($object->passengers) && !is_object($object->passengers)) { throw new UnexpectedValueException('value \'' . print_r($object->passengers, true) . '\' is not an array or object'); } $this->passengers = []; foreach ($object->passengers as $element) { $value = new AirlinePassenger(); $this->passengers[] = $value->fromObject($element); } } if (property_exists($object, 'placeOfIssue')) { $this->placeOfIssue = $object->placeOfIssue; } if (property_exists($object, 'pnr')) { $this->pnr = $object->pnr; } if (property_exists($object, 'pointOfSale')) { $this->pointOfSale = $object->pointOfSale; } if (property_exists($object, 'posCityCode')) { $this->posCityCode = $object->posCityCode; } if (property_exists($object, 'ticketCurrency')) { $this->ticketCurrency = $object->ticketCurrency; } if (property_exists($object, 'ticketDeliveryMethod')) { $this->ticketDeliveryMethod = $object->ticketDeliveryMethod; } if (property_exists($object, 'ticketNumber')) { $this->ticketNumber = $object->ticketNumber; } if (property_exists($object, 'totalFare')) { $this->totalFare = $object->totalFare; } if (property_exists($object, 'totalFee')) { $this->totalFee = $object->totalFee; } if (property_exists($object, 'totalTaxes')) { $this->totalTaxes = $object->totalTaxes; } if (property_exists($object, 'travelAgencyName')) { $this->travelAgencyName = $object->travelAgencyName; } return $this; } } Domain/CalculateSurchargeResponse.php 0000644 00000003476 15224675305 0013767 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CalculateSurchargeResponse extends DataObject { /** * @var Surcharge[]|null */ public ?array $surcharges = null; /** * @return Surcharge[]|null */ public function getSurcharges(): ?array { return $this->surcharges; } /** * @param Surcharge[]|null $value */ public function setSurcharges(?array $value): void { $this->surcharges = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->surcharges)) { $object->surcharges = []; foreach ($this->surcharges as $element) { if (!is_null($element)) { $object->surcharges[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CalculateSurchargeResponse { parent::fromObject($object); if (property_exists($object, 'surcharges')) { if (!is_array($object->surcharges) && !is_object($object->surcharges)) { throw new UnexpectedValueException('value \'' . print_r($object->surcharges, true) . '\' is not an array or object'); } $this->surcharges = []; foreach ($object->surcharges as $element) { $value = new Surcharge(); $this->surcharges[] = $value->fromObject($element); } } return $this; } } Domain/Order.php 0000644 00000020721 15224675305 0007552 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Order extends DataObject { /** * @var AdditionalOrderInput|null */ public ?AdditionalOrderInput $additionalInput = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var Customer|null */ public ?Customer $customer = null; /** * @var Discount|null */ public ?Discount $discount = null; /** * @var OrderReferences|null */ public ?OrderReferences $references = null; /** * @var Shipping|null */ public ?Shipping $shipping = null; /** * @var ShoppingCart|null */ public ?ShoppingCart $shoppingCart = null; /** * @var SurchargeSpecificInput|null */ public ?SurchargeSpecificInput $surchargeSpecificInput = null; /** * @var int|null */ public ?int $totalTaxAmount = null; /** * @return AdditionalOrderInput|null */ public function getAdditionalInput(): ?AdditionalOrderInput { return $this->additionalInput; } /** * @param AdditionalOrderInput|null $value */ public function setAdditionalInput(?AdditionalOrderInput $value): void { $this->additionalInput = $value; } /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return Customer|null */ public function getCustomer(): ?Customer { return $this->customer; } /** * @param Customer|null $value */ public function setCustomer(?Customer $value): void { $this->customer = $value; } /** * @return Discount|null */ public function getDiscount(): ?Discount { return $this->discount; } /** * @param Discount|null $value */ public function setDiscount(?Discount $value): void { $this->discount = $value; } /** * @return OrderReferences|null */ public function getReferences(): ?OrderReferences { return $this->references; } /** * @param OrderReferences|null $value */ public function setReferences(?OrderReferences $value): void { $this->references = $value; } /** * @return Shipping|null */ public function getShipping(): ?Shipping { return $this->shipping; } /** * @param Shipping|null $value */ public function setShipping(?Shipping $value): void { $this->shipping = $value; } /** * @return ShoppingCart|null */ public function getShoppingCart(): ?ShoppingCart { return $this->shoppingCart; } /** * @param ShoppingCart|null $value */ public function setShoppingCart(?ShoppingCart $value): void { $this->shoppingCart = $value; } /** * @return SurchargeSpecificInput|null */ public function getSurchargeSpecificInput(): ?SurchargeSpecificInput { return $this->surchargeSpecificInput; } /** * @param SurchargeSpecificInput|null $value */ public function setSurchargeSpecificInput(?SurchargeSpecificInput $value): void { $this->surchargeSpecificInput = $value; } /** * @return int|null */ public function getTotalTaxAmount(): ?int { return $this->totalTaxAmount; } /** * @param int|null $value */ public function setTotalTaxAmount(?int $value): void { $this->totalTaxAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->additionalInput)) { $object->additionalInput = $this->additionalInput->toObject(); } if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } if (!is_null($this->discount)) { $object->discount = $this->discount->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } if (!is_null($this->shipping)) { $object->shipping = $this->shipping->toObject(); } if (!is_null($this->shoppingCart)) { $object->shoppingCart = $this->shoppingCart->toObject(); } if (!is_null($this->surchargeSpecificInput)) { $object->surchargeSpecificInput = $this->surchargeSpecificInput->toObject(); } if (!is_null($this->totalTaxAmount)) { $object->totalTaxAmount = $this->totalTaxAmount; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Order { parent::fromObject($object); if (property_exists($object, 'additionalInput')) { if (!is_object($object->additionalInput)) { throw new UnexpectedValueException('value \'' . print_r($object->additionalInput, true) . '\' is not an object'); } $value = new AdditionalOrderInput(); $this->additionalInput = $value->fromObject($object->additionalInput); } if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new Customer(); $this->customer = $value->fromObject($object->customer); } if (property_exists($object, 'discount')) { if (!is_object($object->discount)) { throw new UnexpectedValueException('value \'' . print_r($object->discount, true) . '\' is not an object'); } $value = new Discount(); $this->discount = $value->fromObject($object->discount); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new OrderReferences(); $this->references = $value->fromObject($object->references); } if (property_exists($object, 'shipping')) { if (!is_object($object->shipping)) { throw new UnexpectedValueException('value \'' . print_r($object->shipping, true) . '\' is not an object'); } $value = new Shipping(); $this->shipping = $value->fromObject($object->shipping); } if (property_exists($object, 'shoppingCart')) { if (!is_object($object->shoppingCart)) { throw new UnexpectedValueException('value \'' . print_r($object->shoppingCart, true) . '\' is not an object'); } $value = new ShoppingCart(); $this->shoppingCart = $value->fromObject($object->shoppingCart); } if (property_exists($object, 'surchargeSpecificInput')) { if (!is_object($object->surchargeSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeSpecificInput, true) . '\' is not an object'); } $value = new SurchargeSpecificInput(); $this->surchargeSpecificInput = $value->fromObject($object->surchargeSpecificInput); } if (property_exists($object, 'totalTaxAmount')) { $this->totalTaxAmount = $object->totalTaxAmount; } return $this; } } Domain/ValidateCredentialsRequest.php 0000644 00000003312 15224675305 0013754 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ValidateCredentialsRequest extends DataObject { /** * @var string|null */ public ?string $key = null; /** * @var string|null */ public ?string $secret = null; /** * @return string|null */ public function getKey(): ?string { return $this->key; } /** * @param string|null $value */ public function setKey(?string $value): void { $this->key = $value; } /** * @return string|null */ public function getSecret(): ?string { return $this->secret; } /** * @param string|null $value */ public function setSecret(?string $value): void { $this->secret = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->key)) { $object->key = $this->key; } if (!is_null($this->secret)) { $object->secret = $this->secret; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ValidateCredentialsRequest { parent::fromObject($object); if (property_exists($object, 'key')) { $this->key = $object->key; } if (property_exists($object, 'secret')) { $this->secret = $object->secret; } return $this; } } Domain/PersonalInformation.php 0000644 00000005101 15224675305 0012463 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PersonalInformation extends DataObject { /** * @var string|null */ public ?string $dateOfBirth = null; /** * @var string|null */ public ?string $gender = null; /** * @var PersonalName|null */ public ?PersonalName $name = null; /** * @return string|null */ public function getDateOfBirth(): ?string { return $this->dateOfBirth; } /** * @param string|null $value */ public function setDateOfBirth(?string $value): void { $this->dateOfBirth = $value; } /** * @return string|null */ public function getGender(): ?string { return $this->gender; } /** * @param string|null $value */ public function setGender(?string $value): void { $this->gender = $value; } /** * @return PersonalName|null */ public function getName(): ?PersonalName { return $this->name; } /** * @param PersonalName|null $value */ public function setName(?PersonalName $value): void { $this->name = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dateOfBirth)) { $object->dateOfBirth = $this->dateOfBirth; } if (!is_null($this->gender)) { $object->gender = $this->gender; } if (!is_null($this->name)) { $object->name = $this->name->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PersonalInformation { parent::fromObject($object); if (property_exists($object, 'dateOfBirth')) { $this->dateOfBirth = $object->dateOfBirth; } if (property_exists($object, 'gender')) { $this->gender = $object->gender; } if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); } $value = new PersonalName(); $this->name = $value->fromObject($object->name); } return $this; } } Domain/CardBinDetails.php 0000644 00000027702 15224675305 0011315 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardBinDetails extends DataObject { /** * @var bool|null */ public ?bool $cardCorporateIndicator = null; /** * @var DateTime|null */ public ?DateTime $cardEffectiveDate = null; /** * @var bool|null */ public ?bool $cardEffectiveDateIndicator = null; /** * @var string|null */ public ?string $cardPanType = null; /** * @var string|null */ public ?string $cardProductCode = null; /** * @var string|null */ public ?string $cardProductName = null; /** * @var string|null */ public ?string $cardProductUsageLabel = null; /** * @var string|null */ public ?string $cardScheme = null; /** * @var string|null */ public ?string $cardType = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $issuerCode = null; /** * @var string|null */ public ?string $issuerName = null; /** * @var string|null */ public ?string $issuerRegionCode = null; /** * @var string|null */ public ?string $issuingCountryCode = null; /** * @var int|null */ public ?int $panLengthMax = null; /** * @var int|null */ public ?int $panLengthMin = null; /** * @var bool|null */ public ?bool $panLuhnCheck = null; /** * @var bool|null */ public ?bool $virtualCardIndicator = null; /** * @return bool|null */ public function getCardCorporateIndicator(): ?bool { return $this->cardCorporateIndicator; } /** * @param bool|null $value */ public function setCardCorporateIndicator(?bool $value): void { $this->cardCorporateIndicator = $value; } /** * @return DateTime|null */ public function getCardEffectiveDate(): ?DateTime { return $this->cardEffectiveDate; } /** * @param DateTime|null $value */ public function setCardEffectiveDate(?DateTime $value): void { $this->cardEffectiveDate = $value; } /** * @return bool|null */ public function getCardEffectiveDateIndicator(): ?bool { return $this->cardEffectiveDateIndicator; } /** * @param bool|null $value */ public function setCardEffectiveDateIndicator(?bool $value): void { $this->cardEffectiveDateIndicator = $value; } /** * @return string|null */ public function getCardPanType(): ?string { return $this->cardPanType; } /** * @param string|null $value */ public function setCardPanType(?string $value): void { $this->cardPanType = $value; } /** * @return string|null */ public function getCardProductCode(): ?string { return $this->cardProductCode; } /** * @param string|null $value */ public function setCardProductCode(?string $value): void { $this->cardProductCode = $value; } /** * @return string|null */ public function getCardProductName(): ?string { return $this->cardProductName; } /** * @param string|null $value */ public function setCardProductName(?string $value): void { $this->cardProductName = $value; } /** * @return string|null */ public function getCardProductUsageLabel(): ?string { return $this->cardProductUsageLabel; } /** * @param string|null $value */ public function setCardProductUsageLabel(?string $value): void { $this->cardProductUsageLabel = $value; } /** * @return string|null */ public function getCardScheme(): ?string { return $this->cardScheme; } /** * @param string|null $value */ public function setCardScheme(?string $value): void { $this->cardScheme = $value; } /** * @return string|null */ public function getCardType(): ?string { return $this->cardType; } /** * @param string|null $value */ public function setCardType(?string $value): void { $this->cardType = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getIssuerCode(): ?string { return $this->issuerCode; } /** * @param string|null $value */ public function setIssuerCode(?string $value): void { $this->issuerCode = $value; } /** * @return string|null */ public function getIssuerName(): ?string { return $this->issuerName; } /** * @param string|null $value */ public function setIssuerName(?string $value): void { $this->issuerName = $value; } /** * @return string|null */ public function getIssuerRegionCode(): ?string { return $this->issuerRegionCode; } /** * @param string|null $value */ public function setIssuerRegionCode(?string $value): void { $this->issuerRegionCode = $value; } /** * @return string|null */ public function getIssuingCountryCode(): ?string { return $this->issuingCountryCode; } /** * @param string|null $value */ public function setIssuingCountryCode(?string $value): void { $this->issuingCountryCode = $value; } /** * @return int|null */ public function getPanLengthMax(): ?int { return $this->panLengthMax; } /** * @param int|null $value */ public function setPanLengthMax(?int $value): void { $this->panLengthMax = $value; } /** * @return int|null */ public function getPanLengthMin(): ?int { return $this->panLengthMin; } /** * @param int|null $value */ public function setPanLengthMin(?int $value): void { $this->panLengthMin = $value; } /** * @return bool|null */ public function getPanLuhnCheck(): ?bool { return $this->panLuhnCheck; } /** * @param bool|null $value */ public function setPanLuhnCheck(?bool $value): void { $this->panLuhnCheck = $value; } /** * @return bool|null */ public function getVirtualCardIndicator(): ?bool { return $this->virtualCardIndicator; } /** * @param bool|null $value */ public function setVirtualCardIndicator(?bool $value): void { $this->virtualCardIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardCorporateIndicator)) { $object->cardCorporateIndicator = $this->cardCorporateIndicator; } if (!is_null($this->cardEffectiveDate)) { $object->cardEffectiveDate = $this->cardEffectiveDate->format('Y-m-d'); } if (!is_null($this->cardEffectiveDateIndicator)) { $object->cardEffectiveDateIndicator = $this->cardEffectiveDateIndicator; } if (!is_null($this->cardPanType)) { $object->cardPanType = $this->cardPanType; } if (!is_null($this->cardProductCode)) { $object->cardProductCode = $this->cardProductCode; } if (!is_null($this->cardProductName)) { $object->cardProductName = $this->cardProductName; } if (!is_null($this->cardProductUsageLabel)) { $object->cardProductUsageLabel = $this->cardProductUsageLabel; } if (!is_null($this->cardScheme)) { $object->cardScheme = $this->cardScheme; } if (!is_null($this->cardType)) { $object->cardType = $this->cardType; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->issuerCode)) { $object->issuerCode = $this->issuerCode; } if (!is_null($this->issuerName)) { $object->issuerName = $this->issuerName; } if (!is_null($this->issuerRegionCode)) { $object->issuerRegionCode = $this->issuerRegionCode; } if (!is_null($this->issuingCountryCode)) { $object->issuingCountryCode = $this->issuingCountryCode; } if (!is_null($this->panLengthMax)) { $object->panLengthMax = $this->panLengthMax; } if (!is_null($this->panLengthMin)) { $object->panLengthMin = $this->panLengthMin; } if (!is_null($this->panLuhnCheck)) { $object->panLuhnCheck = $this->panLuhnCheck; } if (!is_null($this->virtualCardIndicator)) { $object->virtualCardIndicator = $this->virtualCardIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardBinDetails { parent::fromObject($object); if (property_exists($object, 'cardCorporateIndicator')) { $this->cardCorporateIndicator = $object->cardCorporateIndicator; } if (property_exists($object, 'cardEffectiveDate')) { $this->cardEffectiveDate = new DateTime($object->cardEffectiveDate); } if (property_exists($object, 'cardEffectiveDateIndicator')) { $this->cardEffectiveDateIndicator = $object->cardEffectiveDateIndicator; } if (property_exists($object, 'cardPanType')) { $this->cardPanType = $object->cardPanType; } if (property_exists($object, 'cardProductCode')) { $this->cardProductCode = $object->cardProductCode; } if (property_exists($object, 'cardProductName')) { $this->cardProductName = $object->cardProductName; } if (property_exists($object, 'cardProductUsageLabel')) { $this->cardProductUsageLabel = $object->cardProductUsageLabel; } if (property_exists($object, 'cardScheme')) { $this->cardScheme = $object->cardScheme; } if (property_exists($object, 'cardType')) { $this->cardType = $object->cardType; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'issuerCode')) { $this->issuerCode = $object->issuerCode; } if (property_exists($object, 'issuerName')) { $this->issuerName = $object->issuerName; } if (property_exists($object, 'issuerRegionCode')) { $this->issuerRegionCode = $object->issuerRegionCode; } if (property_exists($object, 'issuingCountryCode')) { $this->issuingCountryCode = $object->issuingCountryCode; } if (property_exists($object, 'panLengthMax')) { $this->panLengthMax = $object->panLengthMax; } if (property_exists($object, 'panLengthMin')) { $this->panLengthMin = $object->panLengthMin; } if (property_exists($object, 'panLuhnCheck')) { $this->panLuhnCheck = $object->panLuhnCheck; } if (property_exists($object, 'virtualCardIndicator')) { $this->virtualCardIndicator = $object->virtualCardIndicator; } return $this; } } Domain/DccCardSource.php 0000644 00000006505 15224675305 0011147 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class DccCardSource extends DataObject { /** * @var CardInfo|null */ public ?CardInfo $card = null; /** * @var string|null */ public ?string $encryptedCustomerInput = null; /** * @var string|null */ public ?string $hostedTokenizationId = null; /** * @var string|null */ public ?string $token = null; /** * @return CardInfo|null */ public function getCard(): ?CardInfo { return $this->card; } /** * @param CardInfo|null $value */ public function setCard(?CardInfo $value): void { $this->card = $value; } /** * @return string|null */ public function getEncryptedCustomerInput(): ?string { return $this->encryptedCustomerInput; } /** * @param string|null $value */ public function setEncryptedCustomerInput(?string $value): void { $this->encryptedCustomerInput = $value; } /** * @return string|null */ public function getHostedTokenizationId(): ?string { return $this->hostedTokenizationId; } /** * @param string|null $value */ public function setHostedTokenizationId(?string $value): void { $this->hostedTokenizationId = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->encryptedCustomerInput)) { $object->encryptedCustomerInput = $this->encryptedCustomerInput; } if (!is_null($this->hostedTokenizationId)) { $object->hostedTokenizationId = $this->hostedTokenizationId; } if (!is_null($this->token)) { $object->token = $this->token; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DccCardSource { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new CardInfo(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'encryptedCustomerInput')) { $this->encryptedCustomerInput = $object->encryptedCustomerInput; } if (property_exists($object, 'hostedTokenizationId')) { $this->hostedTokenizationId = $object->hostedTokenizationId; } if (property_exists($object, 'token')) { $this->token = $object->token; } return $this; } } Domain/PaymentProduct5001.php 0000644 00000003605 15224675305 0011765 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain * @deprecated Deprecated by pendingAuthentication. Contains the third party data for payment product 5001 (Bizum) */ class PaymentProduct5001 extends DataObject { /** * @var string|null */ public ?string $message = null; /** * @var string|null */ public ?string $pollingUrl = null; /** * @return string|null */ public function getMessage(): ?string { return $this->message; } /** * @param string|null $value */ public function setMessage(?string $value): void { $this->message = $value; } /** * @return string|null */ public function getPollingUrl(): ?string { return $this->pollingUrl; } /** * @param string|null $value */ public function setPollingUrl(?string $value): void { $this->pollingUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->message)) { $object->message = $this->message; } if (!is_null($this->pollingUrl)) { $object->pollingUrl = $this->pollingUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5001 { parent::fromObject($object); if (property_exists($object, 'message')) { $this->message = $object->message; } if (property_exists($object, 'pollingUrl')) { $this->pollingUrl = $object->pollingUrl; } return $this; } } Domain/Product302Recurring.php 0000644 00000002742 15224675305 0012230 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Product302Recurring extends DataObject { /** * @var string|null */ public ?string $recurringPaymentSequenceIndicator = null; /** * @return string|null */ public function getRecurringPaymentSequenceIndicator(): ?string { return $this->recurringPaymentSequenceIndicator; } /** * @param string|null $value */ public function setRecurringPaymentSequenceIndicator(?string $value): void { $this->recurringPaymentSequenceIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->recurringPaymentSequenceIndicator)) { $object->recurringPaymentSequenceIndicator = $this->recurringPaymentSequenceIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Product302Recurring { parent::fromObject($object); if (property_exists($object, 'recurringPaymentSequenceIndicator')) { $this->recurringPaymentSequenceIndicator = $object->recurringPaymentSequenceIndicator; } return $this; } } Domain/SurchargeRate.php 0000644 00000006447 15224675305 0011247 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SurchargeRate extends DataObject { /** * @var float|null */ public ?float $adValoremRate = null; /** * @var int|null */ public ?int $specificRate = null; /** * @var string|null */ public ?string $surchargeProductTypeId = null; /** * @var string|null */ public ?string $surchargeProductTypeVersion = null; /** * @return float|null */ public function getAdValoremRate(): ?float { return $this->adValoremRate; } /** * @param float|null $value */ public function setAdValoremRate(?float $value): void { $this->adValoremRate = $value; } /** * @return int|null */ public function getSpecificRate(): ?int { return $this->specificRate; } /** * @param int|null $value */ public function setSpecificRate(?int $value): void { $this->specificRate = $value; } /** * @return string|null */ public function getSurchargeProductTypeId(): ?string { return $this->surchargeProductTypeId; } /** * @param string|null $value */ public function setSurchargeProductTypeId(?string $value): void { $this->surchargeProductTypeId = $value; } /** * @return string|null */ public function getSurchargeProductTypeVersion(): ?string { return $this->surchargeProductTypeVersion; } /** * @param string|null $value */ public function setSurchargeProductTypeVersion(?string $value): void { $this->surchargeProductTypeVersion = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->adValoremRate)) { $object->adValoremRate = $this->adValoremRate; } if (!is_null($this->specificRate)) { $object->specificRate = $this->specificRate; } if (!is_null($this->surchargeProductTypeId)) { $object->surchargeProductTypeId = $this->surchargeProductTypeId; } if (!is_null($this->surchargeProductTypeVersion)) { $object->surchargeProductTypeVersion = $this->surchargeProductTypeVersion; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SurchargeRate { parent::fromObject($object); if (property_exists($object, 'adValoremRate')) { $this->adValoremRate = $object->adValoremRate; } if (property_exists($object, 'specificRate')) { $this->specificRate = $object->specificRate; } if (property_exists($object, 'surchargeProductTypeId')) { $this->surchargeProductTypeId = $object->surchargeProductTypeId; } if (property_exists($object, 'surchargeProductTypeVersion')) { $this->surchargeProductTypeVersion = $object->surchargeProductTypeVersion; } return $this; } } Domain/MobilePaymentMethodSpecificOutput.php 0000644 00000012572 15224675305 0015301 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentMethodSpecificOutput extends DataObject { /** * @var string|null */ public ?string $authorisationCode = null; /** * @var CardFraudResults|null */ public ?CardFraudResults $fraudResults = null; /** * @var string|null */ public ?string $network = null; /** * @var MobilePaymentData|null */ public ?MobilePaymentData $paymentData = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var ThreeDSecureResults|null */ public ?ThreeDSecureResults $threeDSecureResults = null; /** * @return string|null */ public function getAuthorisationCode(): ?string { return $this->authorisationCode; } /** * @param string|null $value */ public function setAuthorisationCode(?string $value): void { $this->authorisationCode = $value; } /** * @return CardFraudResults|null */ public function getFraudResults(): ?CardFraudResults { return $this->fraudResults; } /** * @param CardFraudResults|null $value */ public function setFraudResults(?CardFraudResults $value): void { $this->fraudResults = $value; } /** * @return string|null */ public function getNetwork(): ?string { return $this->network; } /** * @param string|null $value */ public function setNetwork(?string $value): void { $this->network = $value; } /** * @return MobilePaymentData|null */ public function getPaymentData(): ?MobilePaymentData { return $this->paymentData; } /** * @param MobilePaymentData|null $value */ public function setPaymentData(?MobilePaymentData $value): void { $this->paymentData = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return ThreeDSecureResults|null */ public function getThreeDSecureResults(): ?ThreeDSecureResults { return $this->threeDSecureResults; } /** * @param ThreeDSecureResults|null $value */ public function setThreeDSecureResults(?ThreeDSecureResults $value): void { $this->threeDSecureResults = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authorisationCode)) { $object->authorisationCode = $this->authorisationCode; } if (!is_null($this->fraudResults)) { $object->fraudResults = $this->fraudResults->toObject(); } if (!is_null($this->network)) { $object->network = $this->network; } if (!is_null($this->paymentData)) { $object->paymentData = $this->paymentData->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->threeDSecureResults)) { $object->threeDSecureResults = $this->threeDSecureResults->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'authorisationCode')) { $this->authorisationCode = $object->authorisationCode; } if (property_exists($object, 'fraudResults')) { if (!is_object($object->fraudResults)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudResults, true) . '\' is not an object'); } $value = new CardFraudResults(); $this->fraudResults = $value->fromObject($object->fraudResults); } if (property_exists($object, 'network')) { $this->network = $object->network; } if (property_exists($object, 'paymentData')) { if (!is_object($object->paymentData)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentData, true) . '\' is not an object'); } $value = new MobilePaymentData(); $this->paymentData = $value->fromObject($object->paymentData); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'threeDSecureResults')) { if (!is_object($object->threeDSecureResults)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecureResults, true) . '\' is not an object'); } $value = new ThreeDSecureResults(); $this->threeDSecureResults = $value->fromObject($object->threeDSecureResults); } return $this; } } Domain/PaymentProductFilterHostedTokenization.php 0000644 00000003332 15224675305 0016370 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFilterHostedTokenization extends DataObject { /** * @var int[]|null */ public ?array $products = null; /** * @return int[]|null */ public function getProducts(): ?array { return $this->products; } /** * @param int[]|null $value */ public function setProducts(?array $value): void { $this->products = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->products)) { $object->products = []; foreach ($this->products as $element) { if (!is_null($element)) { $object->products[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFilterHostedTokenization { parent::fromObject($object); if (property_exists($object, 'products')) { if (!is_array($object->products) && !is_object($object->products)) { throw new UnexpectedValueException('value \'' . print_r($object->products, true) . '\' is not an array or object'); } $this->products = []; foreach ($object->products as $element) { $this->products[] = $element; } } return $this; } } Domain/MandateMerchantAction.php 0000644 00000004257 15224675305 0012676 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateMerchantAction extends DataObject { /** * @var string|null */ public ?string $actionType = null; /** * @var MandateRedirectData|null */ public ?MandateRedirectData $redirectData = null; /** * @return string|null */ public function getActionType(): ?string { return $this->actionType; } /** * @param string|null $value */ public function setActionType(?string $value): void { $this->actionType = $value; } /** * @return MandateRedirectData|null */ public function getRedirectData(): ?MandateRedirectData { return $this->redirectData; } /** * @param MandateRedirectData|null $value */ public function setRedirectData(?MandateRedirectData $value): void { $this->redirectData = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->actionType)) { $object->actionType = $this->actionType; } if (!is_null($this->redirectData)) { $object->redirectData = $this->redirectData->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateMerchantAction { parent::fromObject($object); if (property_exists($object, 'actionType')) { $this->actionType = $object->actionType; } if (property_exists($object, 'redirectData')) { if (!is_object($object->redirectData)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectData, true) . '\' is not an object'); } $value = new MandateRedirectData(); $this->redirectData = $value->fromObject($object->redirectData); } return $this; } } Domain/MobilePaymentProduct302SpecificInput.php 0000644 00000007744 15224675305 0015532 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentProduct302SpecificInput extends DataObject { /** * @var ApplePayRecurringPaymentRequest|null */ public ?ApplePayRecurringPaymentRequest $applePayRecurringPaymentRequest = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var Product302Recurring|null */ public ?Product302Recurring $recurring = null; /** * @var bool|null */ public ?bool $tokenize = null; /** * @return ApplePayRecurringPaymentRequest|null */ public function getApplePayRecurringPaymentRequest(): ?ApplePayRecurringPaymentRequest { return $this->applePayRecurringPaymentRequest; } /** * @param ApplePayRecurringPaymentRequest|null $value */ public function setApplePayRecurringPaymentRequest(?ApplePayRecurringPaymentRequest $value): void { $this->applePayRecurringPaymentRequest = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return Product302Recurring|null */ public function getRecurring(): ?Product302Recurring { return $this->recurring; } /** * @param Product302Recurring|null $value */ public function setRecurring(?Product302Recurring $value): void { $this->recurring = $value; } /** * @return bool|null */ public function getTokenize(): ?bool { return $this->tokenize; } /** * @param bool|null $value */ public function setTokenize(?bool $value): void { $this->tokenize = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->applePayRecurringPaymentRequest)) { $object->applePayRecurringPaymentRequest = $this->applePayRecurringPaymentRequest->toObject(); } if (!is_null($this->isRecurring)) { $object->isRecurring = $this->isRecurring; } if (!is_null($this->recurring)) { $object->recurring = $this->recurring->toObject(); } if (!is_null($this->tokenize)) { $object->tokenize = $this->tokenize; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentProduct302SpecificInput { parent::fromObject($object); if (property_exists($object, 'applePayRecurringPaymentRequest')) { if (!is_object($object->applePayRecurringPaymentRequest)) { throw new UnexpectedValueException('value \'' . print_r($object->applePayRecurringPaymentRequest, true) . '\' is not an object'); } $value = new ApplePayRecurringPaymentRequest(); $this->applePayRecurringPaymentRequest = $value->fromObject($object->applePayRecurringPaymentRequest); } if (property_exists($object, 'isRecurring')) { $this->isRecurring = $object->isRecurring; } if (property_exists($object, 'recurring')) { if (!is_object($object->recurring)) { throw new UnexpectedValueException('value \'' . print_r($object->recurring, true) . '\' is not an object'); } $value = new Product302Recurring(); $this->recurring = $value->fromObject($object->recurring); } if (property_exists($object, 'tokenize')) { $this->tokenize = $object->tokenize; } return $this; } } Domain/GetPaymentProductGroupsResponse.php 0000644 00000004020 15224675305 0015026 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetPaymentProductGroupsResponse extends DataObject { /** * @var PaymentProductGroup[]|null */ public ?array $paymentProductGroups = null; /** * @return PaymentProductGroup[]|null */ public function getPaymentProductGroups(): ?array { return $this->paymentProductGroups; } /** * @param PaymentProductGroup[]|null $value */ public function setPaymentProductGroups(?array $value): void { $this->paymentProductGroups = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProductGroups)) { $object->paymentProductGroups = []; foreach ($this->paymentProductGroups as $element) { if (!is_null($element)) { $object->paymentProductGroups[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetPaymentProductGroupsResponse { parent::fromObject($object); if (property_exists($object, 'paymentProductGroups')) { if (!is_array($object->paymentProductGroups) && !is_object($object->paymentProductGroups)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProductGroups, true) . '\' is not an array or object'); } $this->paymentProductGroups = []; foreach ($object->paymentProductGroups as $element) { $value = new PaymentProductGroup(); $this->paymentProductGroups[] = $value->fromObject($element); } } return $this; } } Domain/RefundPaymentProduct840SpecificOutput.php 0000644 00000003453 15224675305 0015747 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundPaymentProduct840SpecificOutput extends DataObject { /** * @var RefundPaymentProduct840CustomerAccount|null */ public ?RefundPaymentProduct840CustomerAccount $customerAccount = null; /** * @return RefundPaymentProduct840CustomerAccount|null */ public function getCustomerAccount(): ?RefundPaymentProduct840CustomerAccount { return $this->customerAccount; } /** * @param RefundPaymentProduct840CustomerAccount|null $value */ public function setCustomerAccount(?RefundPaymentProduct840CustomerAccount $value): void { $this->customerAccount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->customerAccount)) { $object->customerAccount = $this->customerAccount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundPaymentProduct840SpecificOutput { parent::fromObject($object); if (property_exists($object, 'customerAccount')) { if (!is_object($object->customerAccount)) { throw new UnexpectedValueException('value \'' . print_r($object->customerAccount, true) . '\' is not an object'); } $value = new RefundPaymentProduct840CustomerAccount(); $this->customerAccount = $value->fromObject($object->customerAccount); } return $this; } } Domain/CreateHostedCheckoutResponse.php 0000644 00000011626 15224675305 0014262 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateHostedCheckoutResponse extends DataObject { /** * @var string|null */ public ?string $RETURNMAC = null; /** * @var string|null */ public ?string $hostedCheckoutId = null; /** * @var string[]|null */ public ?array $invalidTokens = null; /** * @var string|null */ public ?string $merchantReference = null; /** * @var string|null */ public ?string $partialRedirectUrl = null; /** * @var string|null */ public ?string $redirectUrl = null; /** * @return string|null */ public function getRETURNMAC(): ?string { return $this->RETURNMAC; } /** * @param string|null $value */ public function setRETURNMAC(?string $value): void { $this->RETURNMAC = $value; } /** * @return string|null */ public function getHostedCheckoutId(): ?string { return $this->hostedCheckoutId; } /** * @param string|null $value */ public function setHostedCheckoutId(?string $value): void { $this->hostedCheckoutId = $value; } /** * @return string[]|null */ public function getInvalidTokens(): ?array { return $this->invalidTokens; } /** * @param string[]|null $value */ public function setInvalidTokens(?array $value): void { $this->invalidTokens = $value; } /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return string|null */ public function getPartialRedirectUrl(): ?string { return $this->partialRedirectUrl; } /** * @param string|null $value */ public function setPartialRedirectUrl(?string $value): void { $this->partialRedirectUrl = $value; } /** * @return string|null */ public function getRedirectUrl(): ?string { return $this->redirectUrl; } /** * @param string|null $value */ public function setRedirectUrl(?string $value): void { $this->redirectUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->RETURNMAC)) { $object->RETURNMAC = $this->RETURNMAC; } if (!is_null($this->hostedCheckoutId)) { $object->hostedCheckoutId = $this->hostedCheckoutId; } if (!is_null($this->invalidTokens)) { $object->invalidTokens = []; foreach ($this->invalidTokens as $element) { if (!is_null($element)) { $object->invalidTokens[] = $element; } } } if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->partialRedirectUrl)) { $object->partialRedirectUrl = $this->partialRedirectUrl; } if (!is_null($this->redirectUrl)) { $object->redirectUrl = $this->redirectUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateHostedCheckoutResponse { parent::fromObject($object); if (property_exists($object, 'RETURNMAC')) { $this->RETURNMAC = $object->RETURNMAC; } if (property_exists($object, 'hostedCheckoutId')) { $this->hostedCheckoutId = $object->hostedCheckoutId; } if (property_exists($object, 'invalidTokens')) { if (!is_array($object->invalidTokens) && !is_object($object->invalidTokens)) { throw new UnexpectedValueException('value \'' . print_r($object->invalidTokens, true) . '\' is not an array or object'); } $this->invalidTokens = []; foreach ($object->invalidTokens as $element) { $this->invalidTokens[] = $element; } } if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'partialRedirectUrl')) { $this->partialRedirectUrl = $object->partialRedirectUrl; } if (property_exists($object, 'redirectUrl')) { $this->redirectUrl = $object->redirectUrl; } return $this; } } Domain/ApplePayLineItem.php 0000644 00000012466 15224675305 0011650 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ApplePayLineItem extends DataObject { /** * @var string|null */ public ?string $amount = null; /** * @var string|null */ public ?string $label = null; /** * @var string|null */ public ?string $paymentTiming = null; /** * @var string|null */ public ?string $recurringPaymentEndDate = null; /** * @var int|null */ public ?int $recurringPaymentIntervalCount = null; /** * @var string|null */ public ?string $recurringPaymentIntervalUnit = null; /** * @var string|null */ public ?string $recurringPaymentStartDate = null; /** * @return string|null */ public function getAmount(): ?string { return $this->amount; } /** * @param string|null $value */ public function setAmount(?string $value): void { $this->amount = $value; } /** * @return string|null */ public function getLabel(): ?string { return $this->label; } /** * @param string|null $value */ public function setLabel(?string $value): void { $this->label = $value; } /** * @return string|null */ public function getPaymentTiming(): ?string { return $this->paymentTiming; } /** * @param string|null $value */ public function setPaymentTiming(?string $value): void { $this->paymentTiming = $value; } /** * @return string|null */ public function getRecurringPaymentEndDate(): ?string { return $this->recurringPaymentEndDate; } /** * @param string|null $value */ public function setRecurringPaymentEndDate(?string $value): void { $this->recurringPaymentEndDate = $value; } /** * @return int|null */ public function getRecurringPaymentIntervalCount(): ?int { return $this->recurringPaymentIntervalCount; } /** * @param int|null $value */ public function setRecurringPaymentIntervalCount(?int $value): void { $this->recurringPaymentIntervalCount = $value; } /** * @return string|null */ public function getRecurringPaymentIntervalUnit(): ?string { return $this->recurringPaymentIntervalUnit; } /** * @param string|null $value */ public function setRecurringPaymentIntervalUnit(?string $value): void { $this->recurringPaymentIntervalUnit = $value; } /** * @return string|null */ public function getRecurringPaymentStartDate(): ?string { return $this->recurringPaymentStartDate; } /** * @param string|null $value */ public function setRecurringPaymentStartDate(?string $value): void { $this->recurringPaymentStartDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount; } if (!is_null($this->label)) { $object->label = $this->label; } if (!is_null($this->paymentTiming)) { $object->paymentTiming = $this->paymentTiming; } if (!is_null($this->recurringPaymentEndDate)) { $object->recurringPaymentEndDate = $this->recurringPaymentEndDate; } if (!is_null($this->recurringPaymentIntervalCount)) { $object->recurringPaymentIntervalCount = $this->recurringPaymentIntervalCount; } if (!is_null($this->recurringPaymentIntervalUnit)) { $object->recurringPaymentIntervalUnit = $this->recurringPaymentIntervalUnit; } if (!is_null($this->recurringPaymentStartDate)) { $object->recurringPaymentStartDate = $this->recurringPaymentStartDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ApplePayLineItem { parent::fromObject($object); if (property_exists($object, 'amount')) { $this->amount = $object->amount; } if (property_exists($object, 'label')) { $this->label = $object->label; } if (property_exists($object, 'paymentTiming')) { $this->paymentTiming = $object->paymentTiming; } if (property_exists($object, 'recurringPaymentEndDate')) { $this->recurringPaymentEndDate = $object->recurringPaymentEndDate; } if (property_exists($object, 'recurringPaymentIntervalCount')) { $this->recurringPaymentIntervalCount = $object->recurringPaymentIntervalCount; } if (property_exists($object, 'recurringPaymentIntervalUnit')) { $this->recurringPaymentIntervalUnit = $object->recurringPaymentIntervalUnit; } if (property_exists($object, 'recurringPaymentStartDate')) { $this->recurringPaymentStartDate = $object->recurringPaymentStartDate; } return $this; } } Domain/RefundCardMethodSpecificOutput.php 0000644 00000005716 15224675305 0014553 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundCardMethodSpecificOutput extends DataObject { /** * @var CurrencyConversion|null */ public ?CurrencyConversion $currencyConversion = null; /** * @var int|null */ public ?int $totalAmountPaid = null; /** * @var int|null */ public ?int $totalAmountRefunded = null; /** * @return CurrencyConversion|null */ public function getCurrencyConversion(): ?CurrencyConversion { return $this->currencyConversion; } /** * @param CurrencyConversion|null $value */ public function setCurrencyConversion(?CurrencyConversion $value): void { $this->currencyConversion = $value; } /** * @return int|null */ public function getTotalAmountPaid(): ?int { return $this->totalAmountPaid; } /** * @param int|null $value */ public function setTotalAmountPaid(?int $value): void { $this->totalAmountPaid = $value; } /** * @return int|null */ public function getTotalAmountRefunded(): ?int { return $this->totalAmountRefunded; } /** * @param int|null $value */ public function setTotalAmountRefunded(?int $value): void { $this->totalAmountRefunded = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->currencyConversion)) { $object->currencyConversion = $this->currencyConversion->toObject(); } if (!is_null($this->totalAmountPaid)) { $object->totalAmountPaid = $this->totalAmountPaid; } if (!is_null($this->totalAmountRefunded)) { $object->totalAmountRefunded = $this->totalAmountRefunded; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundCardMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'currencyConversion')) { if (!is_object($object->currencyConversion)) { throw new UnexpectedValueException('value \'' . print_r($object->currencyConversion, true) . '\' is not an object'); } $value = new CurrencyConversion(); $this->currencyConversion = $value->fromObject($object->currencyConversion); } if (property_exists($object, 'totalAmountPaid')) { $this->totalAmountPaid = $object->totalAmountPaid; } if (property_exists($object, 'totalAmountRefunded')) { $this->totalAmountRefunded = $object->totalAmountRefunded; } return $this; } } Domain/LodgingData.php 0000644 00000002340 15224675305 0010651 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LodgingData extends DataObject { /** * @var string|null */ public ?string $checkInDate = null; /** * @return string|null */ public function getCheckInDate(): ?string { return $this->checkInDate; } /** * @param string|null $value */ public function setCheckInDate(?string $value): void { $this->checkInDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->checkInDate)) { $object->checkInDate = $this->checkInDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LodgingData { parent::fromObject($object); if (property_exists($object, 'checkInDate')) { $this->checkInDate = $object->checkInDate; } return $this; } } Domain/NetworkTokenEssentials.php 0000644 00000010411 15224675305 0013157 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class NetworkTokenEssentials extends DataObject { /** * @var string|null */ public ?string $bin = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $networkToken = null; /** * @var string|null */ public ?string $networkTokenState = null; /** * @var bool|null */ public ?bool $networkTokenUsed = null; /** * @var string|null */ public ?string $tokenExpiryDate = null; /** * @return string|null */ public function getBin(): ?string { return $this->bin; } /** * @param string|null $value */ public function setBin(?string $value): void { $this->bin = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getNetworkToken(): ?string { return $this->networkToken; } /** * @param string|null $value */ public function setNetworkToken(?string $value): void { $this->networkToken = $value; } /** * @return string|null */ public function getNetworkTokenState(): ?string { return $this->networkTokenState; } /** * @param string|null $value */ public function setNetworkTokenState(?string $value): void { $this->networkTokenState = $value; } /** * @return bool|null */ public function getNetworkTokenUsed(): ?bool { return $this->networkTokenUsed; } /** * @param bool|null $value */ public function setNetworkTokenUsed(?bool $value): void { $this->networkTokenUsed = $value; } /** * @return string|null */ public function getTokenExpiryDate(): ?string { return $this->tokenExpiryDate; } /** * @param string|null $value */ public function setTokenExpiryDate(?string $value): void { $this->tokenExpiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bin)) { $object->bin = $this->bin; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->networkToken)) { $object->networkToken = $this->networkToken; } if (!is_null($this->networkTokenState)) { $object->networkTokenState = $this->networkTokenState; } if (!is_null($this->networkTokenUsed)) { $object->networkTokenUsed = $this->networkTokenUsed; } if (!is_null($this->tokenExpiryDate)) { $object->tokenExpiryDate = $this->tokenExpiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): NetworkTokenEssentials { parent::fromObject($object); if (property_exists($object, 'bin')) { $this->bin = $object->bin; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'networkToken')) { $this->networkToken = $object->networkToken; } if (property_exists($object, 'networkTokenState')) { $this->networkTokenState = $object->networkTokenState; } if (property_exists($object, 'networkTokenUsed')) { $this->networkTokenUsed = $object->networkTokenUsed; } if (property_exists($object, 'tokenExpiryDate')) { $this->tokenExpiryDate = $object->tokenExpiryDate; } return $this; } } Domain/ReattemptInstructionsConditions.php 0000644 00000003436 15224675305 0015127 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ReattemptInstructionsConditions extends DataObject { /** * @var int|null */ public ?int $maxAttempts = null; /** * @var int|null */ public ?int $maxDelay = null; /** * @return int|null */ public function getMaxAttempts(): ?int { return $this->maxAttempts; } /** * @param int|null $value */ public function setMaxAttempts(?int $value): void { $this->maxAttempts = $value; } /** * @return int|null */ public function getMaxDelay(): ?int { return $this->maxDelay; } /** * @param int|null $value */ public function setMaxDelay(?int $value): void { $this->maxDelay = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->maxAttempts)) { $object->maxAttempts = $this->maxAttempts; } if (!is_null($this->maxDelay)) { $object->maxDelay = $this->maxDelay; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ReattemptInstructionsConditions { parent::fromObject($object); if (property_exists($object, 'maxAttempts')) { $this->maxAttempts = $object->maxAttempts; } if (property_exists($object, 'maxDelay')) { $this->maxDelay = $object->maxDelay; } return $this; } } Domain/CreatedPaymentOutput.php 0000644 00000004311 15224675305 0012622 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatedPaymentOutput extends DataObject { /** * @var PaymentResponse|null */ public ?PaymentResponse $payment = null; /** * @var string|null */ public ?string $paymentStatusCategory = null; /** * @return PaymentResponse|null */ public function getPayment(): ?PaymentResponse { return $this->payment; } /** * @param PaymentResponse|null $value */ public function setPayment(?PaymentResponse $value): void { $this->payment = $value; } /** * @return string|null */ public function getPaymentStatusCategory(): ?string { return $this->paymentStatusCategory; } /** * @param string|null $value */ public function setPaymentStatusCategory(?string $value): void { $this->paymentStatusCategory = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } if (!is_null($this->paymentStatusCategory)) { $object->paymentStatusCategory = $this->paymentStatusCategory; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatedPaymentOutput { parent::fromObject($object); if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } if (property_exists($object, 'paymentStatusCategory')) { $this->paymentStatusCategory = $object->paymentStatusCategory; } return $this; } } Domain/PayoutErrorResponse.php 0000644 00000006260 15224675305 0012513 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PayoutErrorResponse extends DataObject { /** * @var string|null */ public ?string $errorId = null; /** * @var APIError[]|null */ public ?array $errors = null; /** * @var PayoutResult|null */ public ?PayoutResult $payoutResult = null; /** * @return string|null */ public function getErrorId(): ?string { return $this->errorId; } /** * @param string|null $value */ public function setErrorId(?string $value): void { $this->errorId = $value; } /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return PayoutResult|null */ public function getPayoutResult(): ?PayoutResult { return $this->payoutResult; } /** * @param PayoutResult|null $value */ public function setPayoutResult(?PayoutResult $value): void { $this->payoutResult = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errorId)) { $object->errorId = $this->errorId; } if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } if (!is_null($this->payoutResult)) { $object->payoutResult = $this->payoutResult->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PayoutErrorResponse { parent::fromObject($object); if (property_exists($object, 'errorId')) { $this->errorId = $object->errorId; } if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } if (property_exists($object, 'payoutResult')) { if (!is_object($object->payoutResult)) { throw new UnexpectedValueException('value \'' . print_r($object->payoutResult, true) . '\' is not an object'); } $value = new PayoutResult(); $this->payoutResult = $value->fromObject($object->payoutResult); } return $this; } } Domain/RefundEWalletMethodSpecificOutput.php 0000644 00000006402 15224675305 0015230 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundEWalletMethodSpecificOutput extends DataObject { /** * @var RefundPaymentProduct840SpecificOutput|null */ public ?RefundPaymentProduct840SpecificOutput $paymentProduct840SpecificOutput = null; /** * @var int|null */ public ?int $totalAmountPaid = null; /** * @var int|null */ public ?int $totalAmountRefunded = null; /** * @return RefundPaymentProduct840SpecificOutput|null */ public function getPaymentProduct840SpecificOutput(): ?RefundPaymentProduct840SpecificOutput { return $this->paymentProduct840SpecificOutput; } /** * @param RefundPaymentProduct840SpecificOutput|null $value */ public function setPaymentProduct840SpecificOutput(?RefundPaymentProduct840SpecificOutput $value): void { $this->paymentProduct840SpecificOutput = $value; } /** * @return int|null */ public function getTotalAmountPaid(): ?int { return $this->totalAmountPaid; } /** * @param int|null $value */ public function setTotalAmountPaid(?int $value): void { $this->totalAmountPaid = $value; } /** * @return int|null */ public function getTotalAmountRefunded(): ?int { return $this->totalAmountRefunded; } /** * @param int|null $value */ public function setTotalAmountRefunded(?int $value): void { $this->totalAmountRefunded = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProduct840SpecificOutput)) { $object->paymentProduct840SpecificOutput = $this->paymentProduct840SpecificOutput->toObject(); } if (!is_null($this->totalAmountPaid)) { $object->totalAmountPaid = $this->totalAmountPaid; } if (!is_null($this->totalAmountRefunded)) { $object->totalAmountRefunded = $this->totalAmountRefunded; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundEWalletMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'paymentProduct840SpecificOutput')) { if (!is_object($object->paymentProduct840SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificOutput, true) . '\' is not an object'); } $value = new RefundPaymentProduct840SpecificOutput(); $this->paymentProduct840SpecificOutput = $value->fromObject($object->paymentProduct840SpecificOutput); } if (property_exists($object, 'totalAmountPaid')) { $this->totalAmountPaid = $object->totalAmountPaid; } if (property_exists($object, 'totalAmountRefunded')) { $this->totalAmountRefunded = $object->totalAmountRefunded; } return $this; } } Domain/PaymentOutput.php 0000644 00000033264 15224675305 0011343 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $acquiredAmount = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var int|null * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public ?int $amountPaid = null; /** * @var CardPaymentMethodSpecificOutput|null */ public ?CardPaymentMethodSpecificOutput $cardPaymentMethodSpecificOutput = null; /** * @var CustomerOutput|null */ public ?CustomerOutput $customer = null; /** * @var Discount|null */ public ?Discount $discount = null; /** * @var string|null */ public ?string $merchantParameters = null; /** * @var MobilePaymentMethodSpecificOutput|null */ public ?MobilePaymentMethodSpecificOutput $mobilePaymentMethodSpecificOutput = null; /** * @var string|null */ public ?string $paymentMethod = null; /** * @var RedirectPaymentMethodSpecificOutput|null */ public ?RedirectPaymentMethodSpecificOutput $redirectPaymentMethodSpecificOutput = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @var SepaDirectDebitPaymentMethodSpecificOutput|null */ public ?SepaDirectDebitPaymentMethodSpecificOutput $sepaDirectDebitPaymentMethodSpecificOutput = null; /** * @var SurchargeSpecificOutput|null */ public ?SurchargeSpecificOutput $surchargeSpecificOutput = null; /** * @return AmountOfMoney|null */ public function getAcquiredAmount(): ?AmountOfMoney { return $this->acquiredAmount; } /** * @param AmountOfMoney|null $value */ public function setAcquiredAmount(?AmountOfMoney $value): void { $this->acquiredAmount = $value; } /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return int|null * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public function getAmountPaid(): ?int { return $this->amountPaid; } /** * @param int|null $value * @deprecated Amount that has been paid. This is deprecated. Use acquiredAmount instead. */ public function setAmountPaid(?int $value): void { $this->amountPaid = $value; } /** * @return CardPaymentMethodSpecificOutput|null */ public function getCardPaymentMethodSpecificOutput(): ?CardPaymentMethodSpecificOutput { return $this->cardPaymentMethodSpecificOutput; } /** * @param CardPaymentMethodSpecificOutput|null $value */ public function setCardPaymentMethodSpecificOutput(?CardPaymentMethodSpecificOutput $value): void { $this->cardPaymentMethodSpecificOutput = $value; } /** * @return CustomerOutput|null */ public function getCustomer(): ?CustomerOutput { return $this->customer; } /** * @param CustomerOutput|null $value */ public function setCustomer(?CustomerOutput $value): void { $this->customer = $value; } /** * @return Discount|null */ public function getDiscount(): ?Discount { return $this->discount; } /** * @param Discount|null $value */ public function setDiscount(?Discount $value): void { $this->discount = $value; } /** * @return string|null */ public function getMerchantParameters(): ?string { return $this->merchantParameters; } /** * @param string|null $value */ public function setMerchantParameters(?string $value): void { $this->merchantParameters = $value; } /** * @return MobilePaymentMethodSpecificOutput|null */ public function getMobilePaymentMethodSpecificOutput(): ?MobilePaymentMethodSpecificOutput { return $this->mobilePaymentMethodSpecificOutput; } /** * @param MobilePaymentMethodSpecificOutput|null $value */ public function setMobilePaymentMethodSpecificOutput(?MobilePaymentMethodSpecificOutput $value): void { $this->mobilePaymentMethodSpecificOutput = $value; } /** * @return string|null */ public function getPaymentMethod(): ?string { return $this->paymentMethod; } /** * @param string|null $value */ public function setPaymentMethod(?string $value): void { $this->paymentMethod = $value; } /** * @return RedirectPaymentMethodSpecificOutput|null */ public function getRedirectPaymentMethodSpecificOutput(): ?RedirectPaymentMethodSpecificOutput { return $this->redirectPaymentMethodSpecificOutput; } /** * @param RedirectPaymentMethodSpecificOutput|null $value */ public function setRedirectPaymentMethodSpecificOutput(?RedirectPaymentMethodSpecificOutput $value): void { $this->redirectPaymentMethodSpecificOutput = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return SepaDirectDebitPaymentMethodSpecificOutput|null */ public function getSepaDirectDebitPaymentMethodSpecificOutput(): ?SepaDirectDebitPaymentMethodSpecificOutput { return $this->sepaDirectDebitPaymentMethodSpecificOutput; } /** * @param SepaDirectDebitPaymentMethodSpecificOutput|null $value */ public function setSepaDirectDebitPaymentMethodSpecificOutput(?SepaDirectDebitPaymentMethodSpecificOutput $value): void { $this->sepaDirectDebitPaymentMethodSpecificOutput = $value; } /** * @return SurchargeSpecificOutput|null */ public function getSurchargeSpecificOutput(): ?SurchargeSpecificOutput { return $this->surchargeSpecificOutput; } /** * @param SurchargeSpecificOutput|null $value */ public function setSurchargeSpecificOutput(?SurchargeSpecificOutput $value): void { $this->surchargeSpecificOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acquiredAmount)) { $object->acquiredAmount = $this->acquiredAmount->toObject(); } if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->amountPaid)) { $object->amountPaid = $this->amountPaid; } if (!is_null($this->cardPaymentMethodSpecificOutput)) { $object->cardPaymentMethodSpecificOutput = $this->cardPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } if (!is_null($this->discount)) { $object->discount = $this->discount->toObject(); } if (!is_null($this->merchantParameters)) { $object->merchantParameters = $this->merchantParameters; } if (!is_null($this->mobilePaymentMethodSpecificOutput)) { $object->mobilePaymentMethodSpecificOutput = $this->mobilePaymentMethodSpecificOutput->toObject(); } if (!is_null($this->paymentMethod)) { $object->paymentMethod = $this->paymentMethod; } if (!is_null($this->redirectPaymentMethodSpecificOutput)) { $object->redirectPaymentMethodSpecificOutput = $this->redirectPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } if (!is_null($this->sepaDirectDebitPaymentMethodSpecificOutput)) { $object->sepaDirectDebitPaymentMethodSpecificOutput = $this->sepaDirectDebitPaymentMethodSpecificOutput->toObject(); } if (!is_null($this->surchargeSpecificOutput)) { $object->surchargeSpecificOutput = $this->surchargeSpecificOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentOutput { parent::fromObject($object); if (property_exists($object, 'acquiredAmount')) { if (!is_object($object->acquiredAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->acquiredAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->acquiredAmount = $value->fromObject($object->acquiredAmount); } if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'amountPaid')) { $this->amountPaid = $object->amountPaid; } if (property_exists($object, 'cardPaymentMethodSpecificOutput')) { if (!is_object($object->cardPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificOutput(); $this->cardPaymentMethodSpecificOutput = $value->fromObject($object->cardPaymentMethodSpecificOutput); } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new CustomerOutput(); $this->customer = $value->fromObject($object->customer); } if (property_exists($object, 'discount')) { if (!is_object($object->discount)) { throw new UnexpectedValueException('value \'' . print_r($object->discount, true) . '\' is not an object'); } $value = new Discount(); $this->discount = $value->fromObject($object->discount); } if (property_exists($object, 'merchantParameters')) { $this->merchantParameters = $object->merchantParameters; } if (property_exists($object, 'mobilePaymentMethodSpecificOutput')) { if (!is_object($object->mobilePaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobilePaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new MobilePaymentMethodSpecificOutput(); $this->mobilePaymentMethodSpecificOutput = $value->fromObject($object->mobilePaymentMethodSpecificOutput); } if (property_exists($object, 'paymentMethod')) { $this->paymentMethod = $object->paymentMethod; } if (property_exists($object, 'redirectPaymentMethodSpecificOutput')) { if (!is_object($object->redirectPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new RedirectPaymentMethodSpecificOutput(); $this->redirectPaymentMethodSpecificOutput = $value->fromObject($object->redirectPaymentMethodSpecificOutput); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificOutput')) { if (!is_object($object->sepaDirectDebitPaymentMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificOutput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentMethodSpecificOutput(); $this->sepaDirectDebitPaymentMethodSpecificOutput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificOutput); } if (property_exists($object, 'surchargeSpecificOutput')) { if (!is_object($object->surchargeSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeSpecificOutput, true) . '\' is not an object'); } $value = new SurchargeSpecificOutput(); $this->surchargeSpecificOutput = $value->fromObject($object->surchargeSpecificOutput); } return $this; } } Domain/CapturesResponse.php 0000644 00000003402 15224675305 0012001 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CapturesResponse extends DataObject { /** * @var Capture[]|null */ public ?array $captures = null; /** * @return Capture[]|null */ public function getCaptures(): ?array { return $this->captures; } /** * @param Capture[]|null $value */ public function setCaptures(?array $value): void { $this->captures = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->captures)) { $object->captures = []; foreach ($this->captures as $element) { if (!is_null($element)) { $object->captures[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CapturesResponse { parent::fromObject($object); if (property_exists($object, 'captures')) { if (!is_array($object->captures) && !is_object($object->captures)) { throw new UnexpectedValueException('value \'' . print_r($object->captures, true) . '\' is not an array or object'); } $this->captures = []; foreach ($object->captures as $element) { $value = new Capture(); $this->captures[] = $value->fromObject($element); } } return $this; } } Domain/SubsequentPaymentRequest.php 0000644 00000010506 15224675306 0013545 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SubsequentPaymentRequest extends DataObject { /** * @var Order|null */ public ?Order $order = null; /** * @var SubsequentPaymentProduct5001SpecificInput|null */ public ?SubsequentPaymentProduct5001SpecificInput $subsequentPaymentProduct5001SpecificInput = null; /** * @var SubsequentCardPaymentMethodSpecificInput|null */ public ?SubsequentCardPaymentMethodSpecificInput $subsequentcardPaymentMethodSpecificInput = null; /** * @return Order|null */ public function getOrder(): ?Order { return $this->order; } /** * @param Order|null $value */ public function setOrder(?Order $value): void { $this->order = $value; } /** * @return SubsequentPaymentProduct5001SpecificInput|null */ public function getSubsequentPaymentProduct5001SpecificInput(): ?SubsequentPaymentProduct5001SpecificInput { return $this->subsequentPaymentProduct5001SpecificInput; } /** * @param SubsequentPaymentProduct5001SpecificInput|null $value */ public function setSubsequentPaymentProduct5001SpecificInput(?SubsequentPaymentProduct5001SpecificInput $value): void { $this->subsequentPaymentProduct5001SpecificInput = $value; } /** * @return SubsequentCardPaymentMethodSpecificInput|null */ public function getSubsequentcardPaymentMethodSpecificInput(): ?SubsequentCardPaymentMethodSpecificInput { return $this->subsequentcardPaymentMethodSpecificInput; } /** * @param SubsequentCardPaymentMethodSpecificInput|null $value */ public function setSubsequentcardPaymentMethodSpecificInput(?SubsequentCardPaymentMethodSpecificInput $value): void { $this->subsequentcardPaymentMethodSpecificInput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->order)) { $object->order = $this->order->toObject(); } if (!is_null($this->subsequentPaymentProduct5001SpecificInput)) { $object->subsequentPaymentProduct5001SpecificInput = $this->subsequentPaymentProduct5001SpecificInput->toObject(); } if (!is_null($this->subsequentcardPaymentMethodSpecificInput)) { $object->subsequentcardPaymentMethodSpecificInput = $this->subsequentcardPaymentMethodSpecificInput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SubsequentPaymentRequest { parent::fromObject($object); if (property_exists($object, 'order')) { if (!is_object($object->order)) { throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object'); } $value = new Order(); $this->order = $value->fromObject($object->order); } if (property_exists($object, 'subsequentPaymentProduct5001SpecificInput')) { if (!is_object($object->subsequentPaymentProduct5001SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->subsequentPaymentProduct5001SpecificInput, true) . '\' is not an object'); } $value = new SubsequentPaymentProduct5001SpecificInput(); $this->subsequentPaymentProduct5001SpecificInput = $value->fromObject($object->subsequentPaymentProduct5001SpecificInput); } if (property_exists($object, 'subsequentcardPaymentMethodSpecificInput')) { if (!is_object($object->subsequentcardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->subsequentcardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new SubsequentCardPaymentMethodSpecificInput(); $this->subsequentcardPaymentMethodSpecificInput = $value->fromObject($object->subsequentcardPaymentMethodSpecificInput); } return $this; } } Domain/OmnichannelPayoutSpecificInput.php 0000644 00000002360 15224675306 0014622 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OmnichannelPayoutSpecificInput extends DataObject { /** * @var string|null */ public ?string $paymentId = null; /** * @return string|null */ public function getPaymentId(): ?string { return $this->paymentId; } /** * @param string|null $value */ public function setPaymentId(?string $value): void { $this->paymentId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentId)) { $object->paymentId = $this->paymentId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OmnichannelPayoutSpecificInput { parent::fromObject($object); if (property_exists($object, 'paymentId')) { $this->paymentId = $object->paymentId; } return $this; } } Domain/RedirectPaymentProduct840SpecificInput.php 0000644 00000006174 15224675306 0016070 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct840SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $JavaScriptSdkFlow = null; /** * @var bool|null */ public ?bool $addressSelectionAtPayPal = null; /** * @var string|null */ public ?string $custom = null; /** * @var bool|null */ public ?bool $payLater = null; /** * @return bool|null */ public function getJavaScriptSdkFlow(): ?bool { return $this->JavaScriptSdkFlow; } /** * @param bool|null $value */ public function setJavaScriptSdkFlow(?bool $value): void { $this->JavaScriptSdkFlow = $value; } /** * @return bool|null */ public function getAddressSelectionAtPayPal(): ?bool { return $this->addressSelectionAtPayPal; } /** * @param bool|null $value */ public function setAddressSelectionAtPayPal(?bool $value): void { $this->addressSelectionAtPayPal = $value; } /** * @return string|null */ public function getCustom(): ?string { return $this->custom; } /** * @param string|null $value */ public function setCustom(?string $value): void { $this->custom = $value; } /** * @return bool|null */ public function getPayLater(): ?bool { return $this->payLater; } /** * @param bool|null $value */ public function setPayLater(?bool $value): void { $this->payLater = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->JavaScriptSdkFlow)) { $object->JavaScriptSdkFlow = $this->JavaScriptSdkFlow; } if (!is_null($this->addressSelectionAtPayPal)) { $object->addressSelectionAtPayPal = $this->addressSelectionAtPayPal; } if (!is_null($this->custom)) { $object->custom = $this->custom; } if (!is_null($this->payLater)) { $object->payLater = $this->payLater; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct840SpecificInput { parent::fromObject($object); if (property_exists($object, 'JavaScriptSdkFlow')) { $this->JavaScriptSdkFlow = $object->JavaScriptSdkFlow; } if (property_exists($object, 'addressSelectionAtPayPal')) { $this->addressSelectionAtPayPal = $object->addressSelectionAtPayPal; } if (property_exists($object, 'custom')) { $this->custom = $object->custom; } if (property_exists($object, 'payLater')) { $this->payLater = $object->payLater; } return $this; } } Domain/PaymentLinkEvent.php 0000644 00000004406 15224675306 0011737 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentLinkEvent extends DataObject { /** * @var string|null */ public ?string $dateTime = null; /** * @var string|null */ public ?string $details = null; /** * @var string|null */ public ?string $type = null; /** * @return string|null */ public function getDateTime(): ?string { return $this->dateTime; } /** * @param string|null $value */ public function setDateTime(?string $value): void { $this->dateTime = $value; } /** * @return string|null */ public function getDetails(): ?string { return $this->details; } /** * @param string|null $value */ public function setDetails(?string $value): void { $this->details = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dateTime)) { $object->dateTime = $this->dateTime; } if (!is_null($this->details)) { $object->details = $this->details; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinkEvent { parent::fromObject($object); if (property_exists($object, 'dateTime')) { $this->dateTime = $object->dateTime; } if (property_exists($object, 'details')) { $this->details = $object->details; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/CreatePaymentRequest.php 0000644 00000025035 15224675306 0012615 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatePaymentRequest extends DataObject { /** * @var CardPaymentMethodSpecificInput|null */ public ?CardPaymentMethodSpecificInput $cardPaymentMethodSpecificInput = null; /** * @var string|null */ public ?string $encryptedCustomerInput = null; /** * @var Feedbacks|null */ public ?Feedbacks $feedbacks = null; /** * @var FraudFields|null */ public ?FraudFields $fraudFields = null; /** * @var string|null */ public ?string $hostedFieldsSessionId = null; /** * @var string|null */ public ?string $hostedTokenizationId = null; /** * @var MobilePaymentMethodSpecificInput|null */ public ?MobilePaymentMethodSpecificInput $mobilePaymentMethodSpecificInput = null; /** * @var Order|null */ public ?Order $order = null; /** * @var RedirectPaymentMethodSpecificInput|null */ public ?RedirectPaymentMethodSpecificInput $redirectPaymentMethodSpecificInput = null; /** * @var SepaDirectDebitPaymentMethodSpecificInput|null */ public ?SepaDirectDebitPaymentMethodSpecificInput $sepaDirectDebitPaymentMethodSpecificInput = null; /** * @return CardPaymentMethodSpecificInput|null */ public function getCardPaymentMethodSpecificInput(): ?CardPaymentMethodSpecificInput { return $this->cardPaymentMethodSpecificInput; } /** * @param CardPaymentMethodSpecificInput|null $value */ public function setCardPaymentMethodSpecificInput(?CardPaymentMethodSpecificInput $value): void { $this->cardPaymentMethodSpecificInput = $value; } /** * @return string|null */ public function getEncryptedCustomerInput(): ?string { return $this->encryptedCustomerInput; } /** * @param string|null $value */ public function setEncryptedCustomerInput(?string $value): void { $this->encryptedCustomerInput = $value; } /** * @return Feedbacks|null */ public function getFeedbacks(): ?Feedbacks { return $this->feedbacks; } /** * @param Feedbacks|null $value */ public function setFeedbacks(?Feedbacks $value): void { $this->feedbacks = $value; } /** * @return FraudFields|null */ public function getFraudFields(): ?FraudFields { return $this->fraudFields; } /** * @param FraudFields|null $value */ public function setFraudFields(?FraudFields $value): void { $this->fraudFields = $value; } /** * @return string|null */ public function getHostedFieldsSessionId(): ?string { return $this->hostedFieldsSessionId; } /** * @param string|null $value */ public function setHostedFieldsSessionId(?string $value): void { $this->hostedFieldsSessionId = $value; } /** * @return string|null */ public function getHostedTokenizationId(): ?string { return $this->hostedTokenizationId; } /** * @param string|null $value */ public function setHostedTokenizationId(?string $value): void { $this->hostedTokenizationId = $value; } /** * @return MobilePaymentMethodSpecificInput|null */ public function getMobilePaymentMethodSpecificInput(): ?MobilePaymentMethodSpecificInput { return $this->mobilePaymentMethodSpecificInput; } /** * @param MobilePaymentMethodSpecificInput|null $value */ public function setMobilePaymentMethodSpecificInput(?MobilePaymentMethodSpecificInput $value): void { $this->mobilePaymentMethodSpecificInput = $value; } /** * @return Order|null */ public function getOrder(): ?Order { return $this->order; } /** * @param Order|null $value */ public function setOrder(?Order $value): void { $this->order = $value; } /** * @return RedirectPaymentMethodSpecificInput|null */ public function getRedirectPaymentMethodSpecificInput(): ?RedirectPaymentMethodSpecificInput { return $this->redirectPaymentMethodSpecificInput; } /** * @param RedirectPaymentMethodSpecificInput|null $value */ public function setRedirectPaymentMethodSpecificInput(?RedirectPaymentMethodSpecificInput $value): void { $this->redirectPaymentMethodSpecificInput = $value; } /** * @return SepaDirectDebitPaymentMethodSpecificInput|null */ public function getSepaDirectDebitPaymentMethodSpecificInput(): ?SepaDirectDebitPaymentMethodSpecificInput { return $this->sepaDirectDebitPaymentMethodSpecificInput; } /** * @param SepaDirectDebitPaymentMethodSpecificInput|null $value */ public function setSepaDirectDebitPaymentMethodSpecificInput(?SepaDirectDebitPaymentMethodSpecificInput $value): void { $this->sepaDirectDebitPaymentMethodSpecificInput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardPaymentMethodSpecificInput)) { $object->cardPaymentMethodSpecificInput = $this->cardPaymentMethodSpecificInput->toObject(); } if (!is_null($this->encryptedCustomerInput)) { $object->encryptedCustomerInput = $this->encryptedCustomerInput; } if (!is_null($this->feedbacks)) { $object->feedbacks = $this->feedbacks->toObject(); } if (!is_null($this->fraudFields)) { $object->fraudFields = $this->fraudFields->toObject(); } if (!is_null($this->hostedFieldsSessionId)) { $object->hostedFieldsSessionId = $this->hostedFieldsSessionId; } if (!is_null($this->hostedTokenizationId)) { $object->hostedTokenizationId = $this->hostedTokenizationId; } if (!is_null($this->mobilePaymentMethodSpecificInput)) { $object->mobilePaymentMethodSpecificInput = $this->mobilePaymentMethodSpecificInput->toObject(); } if (!is_null($this->order)) { $object->order = $this->order->toObject(); } if (!is_null($this->redirectPaymentMethodSpecificInput)) { $object->redirectPaymentMethodSpecificInput = $this->redirectPaymentMethodSpecificInput->toObject(); } if (!is_null($this->sepaDirectDebitPaymentMethodSpecificInput)) { $object->sepaDirectDebitPaymentMethodSpecificInput = $this->sepaDirectDebitPaymentMethodSpecificInput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatePaymentRequest { parent::fromObject($object); if (property_exists($object, 'cardPaymentMethodSpecificInput')) { if (!is_object($object->cardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificInput(); $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput); } if (property_exists($object, 'encryptedCustomerInput')) { $this->encryptedCustomerInput = $object->encryptedCustomerInput; } if (property_exists($object, 'feedbacks')) { if (!is_object($object->feedbacks)) { throw new UnexpectedValueException('value \'' . print_r($object->feedbacks, true) . '\' is not an object'); } $value = new Feedbacks(); $this->feedbacks = $value->fromObject($object->feedbacks); } if (property_exists($object, 'fraudFields')) { if (!is_object($object->fraudFields)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudFields, true) . '\' is not an object'); } $value = new FraudFields(); $this->fraudFields = $value->fromObject($object->fraudFields); } if (property_exists($object, 'hostedFieldsSessionId')) { $this->hostedFieldsSessionId = $object->hostedFieldsSessionId; } if (property_exists($object, 'hostedTokenizationId')) { $this->hostedTokenizationId = $object->hostedTokenizationId; } if (property_exists($object, 'mobilePaymentMethodSpecificInput')) { if (!is_object($object->mobilePaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobilePaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentMethodSpecificInput(); $this->mobilePaymentMethodSpecificInput = $value->fromObject($object->mobilePaymentMethodSpecificInput); } if (property_exists($object, 'order')) { if (!is_object($object->order)) { throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object'); } $value = new Order(); $this->order = $value->fromObject($object->order); } if (property_exists($object, 'redirectPaymentMethodSpecificInput')) { if (!is_object($object->redirectPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentMethodSpecificInput(); $this->redirectPaymentMethodSpecificInput = $value->fromObject($object->redirectPaymentMethodSpecificInput); } if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificInput')) { if (!is_object($object->sepaDirectDebitPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentMethodSpecificInput(); $this->sepaDirectDebitPaymentMethodSpecificInput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificInput); } return $this; } } Domain/HostedCheckoutSpecificInput.php 0000644 00000021371 15224675306 0014104 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class HostedCheckoutSpecificInput extends DataObject { /** * @var int|null */ public ?int $allowedNumberOfPaymentAttempts = null; /** * @var CardPaymentMethodSpecificInputForHostedCheckout|null */ public ?CardPaymentMethodSpecificInputForHostedCheckout $cardPaymentMethodSpecificInput = null; /** * @var bool|null */ public ?bool $isNewUnscheduledCardOnFileSeries = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var string|null */ public ?string $locale = null; /** * @var PaymentProductFiltersHostedCheckout|null */ public ?PaymentProductFiltersHostedCheckout $paymentProductFilters = null; /** * @var string|null */ public ?string $returnUrl = null; /** * @var int|null */ public ?int $sessionTimeout = null; /** * @var bool|null */ public ?bool $showResultPage = null; /** * @var string|null */ public ?string $tokens = null; /** * @var string|null */ public ?string $variant = null; /** * @return int|null */ public function getAllowedNumberOfPaymentAttempts(): ?int { return $this->allowedNumberOfPaymentAttempts; } /** * @param int|null $value */ public function setAllowedNumberOfPaymentAttempts(?int $value): void { $this->allowedNumberOfPaymentAttempts = $value; } /** * @return CardPaymentMethodSpecificInputForHostedCheckout|null */ public function getCardPaymentMethodSpecificInput(): ?CardPaymentMethodSpecificInputForHostedCheckout { return $this->cardPaymentMethodSpecificInput; } /** * @param CardPaymentMethodSpecificInputForHostedCheckout|null $value */ public function setCardPaymentMethodSpecificInput(?CardPaymentMethodSpecificInputForHostedCheckout $value): void { $this->cardPaymentMethodSpecificInput = $value; } /** * @return bool|null */ public function getIsNewUnscheduledCardOnFileSeries(): ?bool { return $this->isNewUnscheduledCardOnFileSeries; } /** * @param bool|null $value */ public function setIsNewUnscheduledCardOnFileSeries(?bool $value): void { $this->isNewUnscheduledCardOnFileSeries = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return PaymentProductFiltersHostedCheckout|null */ public function getPaymentProductFilters(): ?PaymentProductFiltersHostedCheckout { return $this->paymentProductFilters; } /** * @param PaymentProductFiltersHostedCheckout|null $value */ public function setPaymentProductFilters(?PaymentProductFiltersHostedCheckout $value): void { $this->paymentProductFilters = $value; } /** * @return string|null */ public function getReturnUrl(): ?string { return $this->returnUrl; } /** * @param string|null $value */ public function setReturnUrl(?string $value): void { $this->returnUrl = $value; } /** * @return int|null */ public function getSessionTimeout(): ?int { return $this->sessionTimeout; } /** * @param int|null $value */ public function setSessionTimeout(?int $value): void { $this->sessionTimeout = $value; } /** * @return bool|null */ public function getShowResultPage(): ?bool { return $this->showResultPage; } /** * @param bool|null $value */ public function setShowResultPage(?bool $value): void { $this->showResultPage = $value; } /** * @return string|null */ public function getTokens(): ?string { return $this->tokens; } /** * @param string|null $value */ public function setTokens(?string $value): void { $this->tokens = $value; } /** * @return string|null */ public function getVariant(): ?string { return $this->variant; } /** * @param string|null $value */ public function setVariant(?string $value): void { $this->variant = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->allowedNumberOfPaymentAttempts)) { $object->allowedNumberOfPaymentAttempts = $this->allowedNumberOfPaymentAttempts; } if (!is_null($this->cardPaymentMethodSpecificInput)) { $object->cardPaymentMethodSpecificInput = $this->cardPaymentMethodSpecificInput->toObject(); } if (!is_null($this->isNewUnscheduledCardOnFileSeries)) { $object->isNewUnscheduledCardOnFileSeries = $this->isNewUnscheduledCardOnFileSeries; } if (!is_null($this->isRecurring)) { $object->isRecurring = $this->isRecurring; } if (!is_null($this->locale)) { $object->locale = $this->locale; } if (!is_null($this->paymentProductFilters)) { $object->paymentProductFilters = $this->paymentProductFilters->toObject(); } if (!is_null($this->returnUrl)) { $object->returnUrl = $this->returnUrl; } if (!is_null($this->sessionTimeout)) { $object->sessionTimeout = $this->sessionTimeout; } if (!is_null($this->showResultPage)) { $object->showResultPage = $this->showResultPage; } if (!is_null($this->tokens)) { $object->tokens = $this->tokens; } if (!is_null($this->variant)) { $object->variant = $this->variant; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): HostedCheckoutSpecificInput { parent::fromObject($object); if (property_exists($object, 'allowedNumberOfPaymentAttempts')) { $this->allowedNumberOfPaymentAttempts = $object->allowedNumberOfPaymentAttempts; } if (property_exists($object, 'cardPaymentMethodSpecificInput')) { if (!is_object($object->cardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificInputForHostedCheckout(); $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput); } if (property_exists($object, 'isNewUnscheduledCardOnFileSeries')) { $this->isNewUnscheduledCardOnFileSeries = $object->isNewUnscheduledCardOnFileSeries; } if (property_exists($object, 'isRecurring')) { $this->isRecurring = $object->isRecurring; } if (property_exists($object, 'locale')) { $this->locale = $object->locale; } if (property_exists($object, 'paymentProductFilters')) { if (!is_object($object->paymentProductFilters)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProductFilters, true) . '\' is not an object'); } $value = new PaymentProductFiltersHostedCheckout(); $this->paymentProductFilters = $value->fromObject($object->paymentProductFilters); } if (property_exists($object, 'returnUrl')) { $this->returnUrl = $object->returnUrl; } if (property_exists($object, 'sessionTimeout')) { $this->sessionTimeout = $object->sessionTimeout; } if (property_exists($object, 'showResultPage')) { $this->showResultPage = $object->showResultPage; } if (property_exists($object, 'tokens')) { $this->tokens = $object->tokens; } if (property_exists($object, 'variant')) { $this->variant = $object->variant; } return $this; } } Domain/AcquirerInformation.php 0000644 00000004570 15224675306 0012465 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AcquirerInformation extends DataObject { /** * @var AcquirerSelectionInformation|null */ public ?AcquirerSelectionInformation $acquirerSelectionInformation = null; /** * @var string|null */ public ?string $name = null; /** * @return AcquirerSelectionInformation|null */ public function getAcquirerSelectionInformation(): ?AcquirerSelectionInformation { return $this->acquirerSelectionInformation; } /** * @param AcquirerSelectionInformation|null $value */ public function setAcquirerSelectionInformation(?AcquirerSelectionInformation $value): void { $this->acquirerSelectionInformation = $value; } /** * @return string|null */ public function getName(): ?string { return $this->name; } /** * @param string|null $value */ public function setName(?string $value): void { $this->name = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acquirerSelectionInformation)) { $object->acquirerSelectionInformation = $this->acquirerSelectionInformation->toObject(); } if (!is_null($this->name)) { $object->name = $this->name; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AcquirerInformation { parent::fromObject($object); if (property_exists($object, 'acquirerSelectionInformation')) { if (!is_object($object->acquirerSelectionInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->acquirerSelectionInformation, true) . '\' is not an object'); } $value = new AcquirerSelectionInformation(); $this->acquirerSelectionInformation = $value->fromObject($object->acquirerSelectionInformation); } if (property_exists($object, 'name')) { $this->name = $object->name; } return $this; } } Domain/CardRecurrenceDetails.php 0000644 00000002746 15224675306 0012704 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardRecurrenceDetails extends DataObject { /** * @var string|null */ public ?string $recurringPaymentSequenceIndicator = null; /** * @return string|null */ public function getRecurringPaymentSequenceIndicator(): ?string { return $this->recurringPaymentSequenceIndicator; } /** * @param string|null $value */ public function setRecurringPaymentSequenceIndicator(?string $value): void { $this->recurringPaymentSequenceIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->recurringPaymentSequenceIndicator)) { $object->recurringPaymentSequenceIndicator = $this->recurringPaymentSequenceIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardRecurrenceDetails { parent::fromObject($object); if (property_exists($object, 'recurringPaymentSequenceIndicator')) { $this->recurringPaymentSequenceIndicator = $object->recurringPaymentSequenceIndicator; } return $this; } } Domain/PaymentProduct5100SpecificInput.php 0000644 00000002306 15224675306 0014451 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5100SpecificInput extends DataObject { /** * @var string|null */ public ?string $brand = null; /** * @return string|null */ public function getBrand(): ?string { return $this->brand; } /** * @param string|null $value */ public function setBrand(?string $value): void { $this->brand = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->brand)) { $object->brand = $this->brand; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5100SpecificInput { parent::fromObject($object); if (property_exists($object, 'brand')) { $this->brand = $object->brand; } return $this; } } Domain/ApplePayRecurringPaymentRequest.php 0000644 00000010724 15224675306 0015005 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ApplePayRecurringPaymentRequest extends DataObject { /** * @var string|null */ public ?string $billingAgreement = null; /** * @var string|null */ public ?string $managementUrl = null; /** * @var string|null */ public ?string $paymentDescription = null; /** * @var ApplePayLineItem|null */ public ?ApplePayLineItem $regularBilling = null; /** * @var ApplePayLineItem|null */ public ?ApplePayLineItem $trialBilling = null; /** * @return string|null */ public function getBillingAgreement(): ?string { return $this->billingAgreement; } /** * @param string|null $value */ public function setBillingAgreement(?string $value): void { $this->billingAgreement = $value; } /** * @return string|null */ public function getManagementUrl(): ?string { return $this->managementUrl; } /** * @param string|null $value */ public function setManagementUrl(?string $value): void { $this->managementUrl = $value; } /** * @return string|null */ public function getPaymentDescription(): ?string { return $this->paymentDescription; } /** * @param string|null $value */ public function setPaymentDescription(?string $value): void { $this->paymentDescription = $value; } /** * @return ApplePayLineItem|null */ public function getRegularBilling(): ?ApplePayLineItem { return $this->regularBilling; } /** * @param ApplePayLineItem|null $value */ public function setRegularBilling(?ApplePayLineItem $value): void { $this->regularBilling = $value; } /** * @return ApplePayLineItem|null */ public function getTrialBilling(): ?ApplePayLineItem { return $this->trialBilling; } /** * @param ApplePayLineItem|null $value */ public function setTrialBilling(?ApplePayLineItem $value): void { $this->trialBilling = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->billingAgreement)) { $object->billingAgreement = $this->billingAgreement; } if (!is_null($this->managementUrl)) { $object->managementUrl = $this->managementUrl; } if (!is_null($this->paymentDescription)) { $object->paymentDescription = $this->paymentDescription; } if (!is_null($this->regularBilling)) { $object->regularBilling = $this->regularBilling->toObject(); } if (!is_null($this->trialBilling)) { $object->trialBilling = $this->trialBilling->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ApplePayRecurringPaymentRequest { parent::fromObject($object); if (property_exists($object, 'billingAgreement')) { $this->billingAgreement = $object->billingAgreement; } if (property_exists($object, 'managementUrl')) { $this->managementUrl = $object->managementUrl; } if (property_exists($object, 'paymentDescription')) { $this->paymentDescription = $object->paymentDescription; } if (property_exists($object, 'regularBilling')) { if (!is_object($object->regularBilling)) { throw new UnexpectedValueException('value \'' . print_r($object->regularBilling, true) . '\' is not an object'); } $value = new ApplePayLineItem(); $this->regularBilling = $value->fromObject($object->regularBilling); } if (property_exists($object, 'trialBilling')) { if (!is_object($object->trialBilling)) { throw new UnexpectedValueException('value \'' . print_r($object->trialBilling, true) . '\' is not an object'); } $value = new ApplePayLineItem(); $this->trialBilling = $value->fromObject($object->trialBilling); } return $this; } } Domain/CustomerOutput.php 0000644 00000003012 15224675306 0011514 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerOutput extends DataObject { /** * @var CustomerDeviceOutput|null */ public ?CustomerDeviceOutput $device = null; /** * @return CustomerDeviceOutput|null */ public function getDevice(): ?CustomerDeviceOutput { return $this->device; } /** * @param CustomerDeviceOutput|null $value */ public function setDevice(?CustomerDeviceOutput $value): void { $this->device = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->device)) { $object->device = $this->device->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerOutput { parent::fromObject($object); if (property_exists($object, 'device')) { if (!is_object($object->device)) { throw new UnexpectedValueException('value \'' . print_r($object->device, true) . '\' is not an object'); } $value = new CustomerDeviceOutput(); $this->device = $value->fromObject($object->device); } return $this; } } Domain/MandatePersonalInformationResponse.php 0000644 00000004142 15224675306 0015501 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandatePersonalInformationResponse extends DataObject { /** * @var MandatePersonalNameResponse|null */ public ?MandatePersonalNameResponse $name = null; /** * @var string|null */ public ?string $title = null; /** * @return MandatePersonalNameResponse|null */ public function getName(): ?MandatePersonalNameResponse { return $this->name; } /** * @param MandatePersonalNameResponse|null $value */ public function setName(?MandatePersonalNameResponse $value): void { $this->name = $value; } /** * @return string|null */ public function getTitle(): ?string { return $this->title; } /** * @param string|null $value */ public function setTitle(?string $value): void { $this->title = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->name)) { $object->name = $this->name->toObject(); } if (!is_null($this->title)) { $object->title = $this->title; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandatePersonalInformationResponse { parent::fromObject($object); if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); } $value = new MandatePersonalNameResponse(); $this->name = $value->fromObject($object->name); } if (property_exists($object, 'title')) { $this->title = $object->title; } return $this; } } Domain/PaymentErrorResponse.php 0000644 00000006376 15224675306 0012660 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentErrorResponse extends DataObject { /** * @var string|null */ public ?string $errorId = null; /** * @var APIError[]|null */ public ?array $errors = null; /** * @var CreatePaymentResponse|null */ public ?CreatePaymentResponse $paymentResult = null; /** * @return string|null */ public function getErrorId(): ?string { return $this->errorId; } /** * @param string|null $value */ public function setErrorId(?string $value): void { $this->errorId = $value; } /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return CreatePaymentResponse|null */ public function getPaymentResult(): ?CreatePaymentResponse { return $this->paymentResult; } /** * @param CreatePaymentResponse|null $value */ public function setPaymentResult(?CreatePaymentResponse $value): void { $this->paymentResult = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errorId)) { $object->errorId = $this->errorId; } if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } if (!is_null($this->paymentResult)) { $object->paymentResult = $this->paymentResult->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentErrorResponse { parent::fromObject($object); if (property_exists($object, 'errorId')) { $this->errorId = $object->errorId; } if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } if (property_exists($object, 'paymentResult')) { if (!is_object($object->paymentResult)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentResult, true) . '\' is not an object'); } $value = new CreatePaymentResponse(); $this->paymentResult = $value->fromObject($object->paymentResult); } return $this; } } Domain/MandateAddressResponse.php 0000644 00000006606 15224675306 0013104 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateAddressResponse extends DataObject { /** * @var string|null */ public ?string $city = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $houseNumber = null; /** * @var string|null */ public ?string $street = null; /** * @var string|null */ public ?string $zip = null; /** * @return string|null */ public function getCity(): ?string { return $this->city; } /** * @param string|null $value */ public function setCity(?string $value): void { $this->city = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getHouseNumber(): ?string { return $this->houseNumber; } /** * @param string|null $value */ public function setHouseNumber(?string $value): void { $this->houseNumber = $value; } /** * @return string|null */ public function getStreet(): ?string { return $this->street; } /** * @param string|null $value */ public function setStreet(?string $value): void { $this->street = $value; } /** * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * @param string|null $value */ public function setZip(?string $value): void { $this->zip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->city)) { $object->city = $this->city; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->houseNumber)) { $object->houseNumber = $this->houseNumber; } if (!is_null($this->street)) { $object->street = $this->street; } if (!is_null($this->zip)) { $object->zip = $this->zip; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateAddressResponse { parent::fromObject($object); if (property_exists($object, 'city')) { $this->city = $object->city; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'houseNumber')) { $this->houseNumber = $object->houseNumber; } if (property_exists($object, 'street')) { $this->street = $object->street; } if (property_exists($object, 'zip')) { $this->zip = $object->zip; } return $this; } } Domain/PaymentLinkSpecificInput.php 0000644 00000005053 15224675306 0013422 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentLinkSpecificInput extends DataObject { /** * @var string|null */ public ?string $description = null; /** * @var DateTime|null */ public ?DateTime $expirationDate = null; /** * @var string|null */ public ?string $recipientName = null; /** * @return string|null */ public function getDescription(): ?string { return $this->description; } /** * @param string|null $value */ public function setDescription(?string $value): void { $this->description = $value; } /** * @return DateTime|null */ public function getExpirationDate(): ?DateTime { return $this->expirationDate; } /** * @param DateTime|null $value */ public function setExpirationDate(?DateTime $value): void { $this->expirationDate = $value; } /** * @return string|null */ public function getRecipientName(): ?string { return $this->recipientName; } /** * @param string|null $value */ public function setRecipientName(?string $value): void { $this->recipientName = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->description)) { $object->description = $this->description; } if (!is_null($this->expirationDate)) { $object->expirationDate = $this->expirationDate->format('Y-m-d\\TH:i:s.vP'); } if (!is_null($this->recipientName)) { $object->recipientName = $this->recipientName; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinkSpecificInput { parent::fromObject($object); if (property_exists($object, 'description')) { $this->description = $object->description; } if (property_exists($object, 'expirationDate')) { $this->expirationDate = new DateTime($object->expirationDate); } if (property_exists($object, 'recipientName')) { $this->recipientName = $object->recipientName; } return $this; } } Domain/SurchargeForPaymentLink.php 0000644 00000002416 15224675306 0013247 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SurchargeForPaymentLink extends DataObject { /** * @var string|null */ public ?string $surchargeMode = null; /** * @return string|null */ public function getSurchargeMode(): ?string { return $this->surchargeMode; } /** * @param string|null $value */ public function setSurchargeMode(?string $value): void { $this->surchargeMode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->surchargeMode)) { $object->surchargeMode = $this->surchargeMode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SurchargeForPaymentLink { parent::fromObject($object); if (property_exists($object, 'surchargeMode')) { $this->surchargeMode = $object->surchargeMode; } return $this; } } Domain/RedirectPaymentProduct809SpecificInput.php 0000644 00000002450 15224675306 0016066 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain * @deprecated Deprecated, this is no longer used. */ class RedirectPaymentProduct809SpecificInput extends DataObject { /** * @var string|null */ public ?string $issuerId = null; /** * @return string|null */ public function getIssuerId(): ?string { return $this->issuerId; } /** * @param string|null $value */ public function setIssuerId(?string $value): void { $this->issuerId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->issuerId)) { $object->issuerId = $this->issuerId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct809SpecificInput { parent::fromObject($object); if (property_exists($object, 'issuerId')) { $this->issuerId = $object->issuerId; } return $this; } } Domain/PaymentProduct5402SpecificOutput.php 0000644 00000002310 15224675306 0014652 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5402SpecificOutput extends DataObject { /** * @var string|null */ public ?string $brand = null; /** * @return string|null */ public function getBrand(): ?string { return $this->brand; } /** * @param string|null $value */ public function setBrand(?string $value): void { $this->brand = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->brand)) { $object->brand = $this->brand; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5402SpecificOutput { parent::fromObject($object); if (property_exists($object, 'brand')) { $this->brand = $object->brand; } return $this; } } Domain/SubsequentPaymentResponse.php 0000644 00000003012 15224675306 0013705 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SubsequentPaymentResponse extends DataObject { /** * @var PaymentResponse|null */ public ?PaymentResponse $payment = null; /** * @return PaymentResponse|null */ public function getPayment(): ?PaymentResponse { return $this->payment; } /** * @param PaymentResponse|null $value */ public function setPayment(?PaymentResponse $value): void { $this->payment = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SubsequentPaymentResponse { parent::fromObject($object); if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } return $this; } } Domain/CardPaymentMethodSpecificInputForHostedCheckout.php 0000644 00000006264 15224675306 0020050 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardPaymentMethodSpecificInputForHostedCheckout extends DataObject { /** * @var bool|null */ public ?bool $clickToPay = null; /** * @var bool|null */ public ?bool $groupCards = null; /** * @var int[]|null */ public ?array $paymentProductPreferredOrder = null; /** * @return bool|null */ public function getClickToPay(): ?bool { return $this->clickToPay; } /** * @param bool|null $value */ public function setClickToPay(?bool $value): void { $this->clickToPay = $value; } /** * @return bool|null */ public function getGroupCards(): ?bool { return $this->groupCards; } /** * @param bool|null $value */ public function setGroupCards(?bool $value): void { $this->groupCards = $value; } /** * @return int[]|null */ public function getPaymentProductPreferredOrder(): ?array { return $this->paymentProductPreferredOrder; } /** * @param int[]|null $value */ public function setPaymentProductPreferredOrder(?array $value): void { $this->paymentProductPreferredOrder = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->clickToPay)) { $object->clickToPay = $this->clickToPay; } if (!is_null($this->groupCards)) { $object->groupCards = $this->groupCards; } if (!is_null($this->paymentProductPreferredOrder)) { $object->paymentProductPreferredOrder = []; foreach ($this->paymentProductPreferredOrder as $element) { if (!is_null($element)) { $object->paymentProductPreferredOrder[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardPaymentMethodSpecificInputForHostedCheckout { parent::fromObject($object); if (property_exists($object, 'clickToPay')) { $this->clickToPay = $object->clickToPay; } if (property_exists($object, 'groupCards')) { $this->groupCards = $object->groupCards; } if (property_exists($object, 'paymentProductPreferredOrder')) { if (!is_array($object->paymentProductPreferredOrder) && !is_object($object->paymentProductPreferredOrder)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProductPreferredOrder, true) . '\' is not an array or object'); } $this->paymentProductPreferredOrder = []; foreach ($object->paymentProductPreferredOrder as $element) { $this->paymentProductPreferredOrder[] = $element; } } return $this; } } Domain/PaymentProduct3012.php 0000644 00000003374 15224675306 0011771 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3012 extends DataObject { /** * @var string|null */ public ?string $qrCode = null; /** * @var string|null */ public ?string $urlIntent = null; /** * @return string|null */ public function getQrCode(): ?string { return $this->qrCode; } /** * @param string|null $value */ public function setQrCode(?string $value): void { $this->qrCode = $value; } /** * @return string|null */ public function getUrlIntent(): ?string { return $this->urlIntent; } /** * @param string|null $value */ public function setUrlIntent(?string $value): void { $this->urlIntent = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->qrCode)) { $object->qrCode = $this->qrCode; } if (!is_null($this->urlIntent)) { $object->urlIntent = $this->urlIntent; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3012 { parent::fromObject($object); if (property_exists($object, 'qrCode')) { $this->qrCode = $object->qrCode; } if (property_exists($object, 'urlIntent')) { $this->urlIntent = $object->urlIntent; } return $this; } } Domain/RefundsResponse.php 0000644 00000003414 15224675306 0011625 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundsResponse extends DataObject { /** * @var RefundResponse[]|null */ public ?array $refunds = null; /** * @return RefundResponse[]|null */ public function getRefunds(): ?array { return $this->refunds; } /** * @param RefundResponse[]|null $value */ public function setRefunds(?array $value): void { $this->refunds = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->refunds)) { $object->refunds = []; foreach ($this->refunds as $element) { if (!is_null($element)) { $object->refunds[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundsResponse { parent::fromObject($object); if (property_exists($object, 'refunds')) { if (!is_array($object->refunds) && !is_object($object->refunds)) { throw new UnexpectedValueException('value \'' . print_r($object->refunds, true) . '\' is not an array or object'); } $this->refunds = []; foreach ($object->refunds as $element) { $value = new RefundResponse(); $this->refunds[] = $value->fromObject($element); } } return $this; } } Domain/FraudFields.php 0000644 00000006674 15224675306 0010703 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class FraudFields extends DataObject { /** * @var string|null */ public ?string $blackListData = null; /** * @var string|null * @deprecated Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment */ public ?string $customerIpAddress = null; /** * @var string[]|null */ public ?array $productCategories = null; /** * @return string|null */ public function getBlackListData(): ?string { return $this->blackListData; } /** * @param string|null $value */ public function setBlackListData(?string $value): void { $this->blackListData = $value; } /** * @return string|null * @deprecated Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment */ public function getCustomerIpAddress(): ?string { return $this->customerIpAddress; } /** * @param string|null $value * @deprecated Use order.customer.device.ipAddress instead. The IP Address of the customer that is making the payment */ public function setCustomerIpAddress(?string $value): void { $this->customerIpAddress = $value; } /** * @return string[]|null */ public function getProductCategories(): ?array { return $this->productCategories; } /** * @param string[]|null $value */ public function setProductCategories(?array $value): void { $this->productCategories = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->blackListData)) { $object->blackListData = $this->blackListData; } if (!is_null($this->customerIpAddress)) { $object->customerIpAddress = $this->customerIpAddress; } if (!is_null($this->productCategories)) { $object->productCategories = []; foreach ($this->productCategories as $element) { if (!is_null($element)) { $object->productCategories[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): FraudFields { parent::fromObject($object); if (property_exists($object, 'blackListData')) { $this->blackListData = $object->blackListData; } if (property_exists($object, 'customerIpAddress')) { $this->customerIpAddress = $object->customerIpAddress; } if (property_exists($object, 'productCategories')) { if (!is_array($object->productCategories) && !is_object($object->productCategories)) { throw new UnexpectedValueException('value \'' . print_r($object->productCategories, true) . '\' is not an array or object'); } $this->productCategories = []; foreach ($object->productCategories as $element) { $this->productCategories[] = $element; } } return $this; } } Domain/OrderLineDetails.php 0000644 00000013455 15224675306 0011677 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OrderLineDetails extends DataObject { /** * @var int|null */ public ?int $discountAmount = null; /** * @var string|null */ public ?string $productBrand = null; /** * @var string|null */ public ?string $productCode = null; /** * @var string|null */ public ?string $productName = null; /** * @var int|null */ public ?int $productPrice = null; /** * @var string|null */ public ?string $productType = null; /** * @var int|null */ public ?int $quantity = null; /** * @var int|null */ public ?int $taxAmount = null; /** * @var string|null */ public ?string $unit = null; /** * @return int|null */ public function getDiscountAmount(): ?int { return $this->discountAmount; } /** * @param int|null $value */ public function setDiscountAmount(?int $value): void { $this->discountAmount = $value; } /** * @return string|null */ public function getProductBrand(): ?string { return $this->productBrand; } /** * @param string|null $value */ public function setProductBrand(?string $value): void { $this->productBrand = $value; } /** * @return string|null */ public function getProductCode(): ?string { return $this->productCode; } /** * @param string|null $value */ public function setProductCode(?string $value): void { $this->productCode = $value; } /** * @return string|null */ public function getProductName(): ?string { return $this->productName; } /** * @param string|null $value */ public function setProductName(?string $value): void { $this->productName = $value; } /** * @return int|null */ public function getProductPrice(): ?int { return $this->productPrice; } /** * @param int|null $value */ public function setProductPrice(?int $value): void { $this->productPrice = $value; } /** * @return string|null */ public function getProductType(): ?string { return $this->productType; } /** * @param string|null $value */ public function setProductType(?string $value): void { $this->productType = $value; } /** * @return int|null */ public function getQuantity(): ?int { return $this->quantity; } /** * @param int|null $value */ public function setQuantity(?int $value): void { $this->quantity = $value; } /** * @return int|null */ public function getTaxAmount(): ?int { return $this->taxAmount; } /** * @param int|null $value */ public function setTaxAmount(?int $value): void { $this->taxAmount = $value; } /** * @return string|null */ public function getUnit(): ?string { return $this->unit; } /** * @param string|null $value */ public function setUnit(?string $value): void { $this->unit = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->discountAmount)) { $object->discountAmount = $this->discountAmount; } if (!is_null($this->productBrand)) { $object->productBrand = $this->productBrand; } if (!is_null($this->productCode)) { $object->productCode = $this->productCode; } if (!is_null($this->productName)) { $object->productName = $this->productName; } if (!is_null($this->productPrice)) { $object->productPrice = $this->productPrice; } if (!is_null($this->productType)) { $object->productType = $this->productType; } if (!is_null($this->quantity)) { $object->quantity = $this->quantity; } if (!is_null($this->taxAmount)) { $object->taxAmount = $this->taxAmount; } if (!is_null($this->unit)) { $object->unit = $this->unit; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OrderLineDetails { parent::fromObject($object); if (property_exists($object, 'discountAmount')) { $this->discountAmount = $object->discountAmount; } if (property_exists($object, 'productBrand')) { $this->productBrand = $object->productBrand; } if (property_exists($object, 'productCode')) { $this->productCode = $object->productCode; } if (property_exists($object, 'productName')) { $this->productName = $object->productName; } if (property_exists($object, 'productPrice')) { $this->productPrice = $object->productPrice; } if (property_exists($object, 'productType')) { $this->productType = $object->productType; } if (property_exists($object, 'quantity')) { $this->quantity = $object->quantity; } if (property_exists($object, 'taxAmount')) { $this->taxAmount = $object->taxAmount; } if (property_exists($object, 'unit')) { $this->unit = $object->unit; } return $this; } } Domain/AirlineFlightLeg.php 0000644 00000031426 15224675306 0011655 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AirlineFlightLeg extends DataObject { /** * @var string|null */ public ?string $airlineClass = null; /** * @var string|null */ public ?string $arrivalAirport = null; /** * @var string|null */ public ?string $arrivalTime = null; /** * @var string|null */ public ?string $carrierCode = null; /** * @var string|null */ public ?string $conjunctionTicket = null; /** * @var string|null */ public ?string $couponNumber = null; /** * @var string|null */ public ?string $date = null; /** * @var string|null */ public ?string $departureTime = null; /** * @var string|null */ public ?string $endorsementOrRestriction = null; /** * @var string|null */ public ?string $exchangeTicket = null; /** * @var string|null * @deprecated Use legFare instead. Fare of this leg */ public ?string $fare = null; /** * @var string|null */ public ?string $fareBasis = null; /** * @var int|null */ public ?int $fee = null; /** * @var string|null */ public ?string $flightNumber = null; /** * @var int|null */ public ?int $legFare = null; /** * @var int|null * @deprecated This field is not used by any payment product Sequence number of the flight leg */ public ?int $number = null; /** * @var string|null */ public ?string $originAirport = null; /** * @var string|null */ public ?string $passengerClass = null; /** * @var string|null */ public ?string $stopoverCode = null; /** * @var int|null */ public ?int $taxes = null; /** * @return string|null */ public function getAirlineClass(): ?string { return $this->airlineClass; } /** * @param string|null $value */ public function setAirlineClass(?string $value): void { $this->airlineClass = $value; } /** * @return string|null */ public function getArrivalAirport(): ?string { return $this->arrivalAirport; } /** * @param string|null $value */ public function setArrivalAirport(?string $value): void { $this->arrivalAirport = $value; } /** * @return string|null */ public function getArrivalTime(): ?string { return $this->arrivalTime; } /** * @param string|null $value */ public function setArrivalTime(?string $value): void { $this->arrivalTime = $value; } /** * @return string|null */ public function getCarrierCode(): ?string { return $this->carrierCode; } /** * @param string|null $value */ public function setCarrierCode(?string $value): void { $this->carrierCode = $value; } /** * @return string|null */ public function getConjunctionTicket(): ?string { return $this->conjunctionTicket; } /** * @param string|null $value */ public function setConjunctionTicket(?string $value): void { $this->conjunctionTicket = $value; } /** * @return string|null */ public function getCouponNumber(): ?string { return $this->couponNumber; } /** * @param string|null $value */ public function setCouponNumber(?string $value): void { $this->couponNumber = $value; } /** * @return string|null */ public function getDate(): ?string { return $this->date; } /** * @param string|null $value */ public function setDate(?string $value): void { $this->date = $value; } /** * @return string|null */ public function getDepartureTime(): ?string { return $this->departureTime; } /** * @param string|null $value */ public function setDepartureTime(?string $value): void { $this->departureTime = $value; } /** * @return string|null */ public function getEndorsementOrRestriction(): ?string { return $this->endorsementOrRestriction; } /** * @param string|null $value */ public function setEndorsementOrRestriction(?string $value): void { $this->endorsementOrRestriction = $value; } /** * @return string|null */ public function getExchangeTicket(): ?string { return $this->exchangeTicket; } /** * @param string|null $value */ public function setExchangeTicket(?string $value): void { $this->exchangeTicket = $value; } /** * @return string|null * @deprecated Use legFare instead. Fare of this leg */ public function getFare(): ?string { return $this->fare; } /** * @param string|null $value * @deprecated Use legFare instead. Fare of this leg */ public function setFare(?string $value): void { $this->fare = $value; } /** * @return string|null */ public function getFareBasis(): ?string { return $this->fareBasis; } /** * @param string|null $value */ public function setFareBasis(?string $value): void { $this->fareBasis = $value; } /** * @return int|null */ public function getFee(): ?int { return $this->fee; } /** * @param int|null $value */ public function setFee(?int $value): void { $this->fee = $value; } /** * @return string|null */ public function getFlightNumber(): ?string { return $this->flightNumber; } /** * @param string|null $value */ public function setFlightNumber(?string $value): void { $this->flightNumber = $value; } /** * @return int|null */ public function getLegFare(): ?int { return $this->legFare; } /** * @param int|null $value */ public function setLegFare(?int $value): void { $this->legFare = $value; } /** * @return int|null * @deprecated This field is not used by any payment product Sequence number of the flight leg */ public function getNumber(): ?int { return $this->number; } /** * @param int|null $value * @deprecated This field is not used by any payment product Sequence number of the flight leg */ public function setNumber(?int $value): void { $this->number = $value; } /** * @return string|null */ public function getOriginAirport(): ?string { return $this->originAirport; } /** * @param string|null $value */ public function setOriginAirport(?string $value): void { $this->originAirport = $value; } /** * @return string|null */ public function getPassengerClass(): ?string { return $this->passengerClass; } /** * @param string|null $value */ public function setPassengerClass(?string $value): void { $this->passengerClass = $value; } /** * @return string|null */ public function getStopoverCode(): ?string { return $this->stopoverCode; } /** * @param string|null $value */ public function setStopoverCode(?string $value): void { $this->stopoverCode = $value; } /** * @return int|null */ public function getTaxes(): ?int { return $this->taxes; } /** * @param int|null $value */ public function setTaxes(?int $value): void { $this->taxes = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->airlineClass)) { $object->airlineClass = $this->airlineClass; } if (!is_null($this->arrivalAirport)) { $object->arrivalAirport = $this->arrivalAirport; } if (!is_null($this->arrivalTime)) { $object->arrivalTime = $this->arrivalTime; } if (!is_null($this->carrierCode)) { $object->carrierCode = $this->carrierCode; } if (!is_null($this->conjunctionTicket)) { $object->conjunctionTicket = $this->conjunctionTicket; } if (!is_null($this->couponNumber)) { $object->couponNumber = $this->couponNumber; } if (!is_null($this->date)) { $object->date = $this->date; } if (!is_null($this->departureTime)) { $object->departureTime = $this->departureTime; } if (!is_null($this->endorsementOrRestriction)) { $object->endorsementOrRestriction = $this->endorsementOrRestriction; } if (!is_null($this->exchangeTicket)) { $object->exchangeTicket = $this->exchangeTicket; } if (!is_null($this->fare)) { $object->fare = $this->fare; } if (!is_null($this->fareBasis)) { $object->fareBasis = $this->fareBasis; } if (!is_null($this->fee)) { $object->fee = $this->fee; } if (!is_null($this->flightNumber)) { $object->flightNumber = $this->flightNumber; } if (!is_null($this->legFare)) { $object->legFare = $this->legFare; } if (!is_null($this->number)) { $object->number = $this->number; } if (!is_null($this->originAirport)) { $object->originAirport = $this->originAirport; } if (!is_null($this->passengerClass)) { $object->passengerClass = $this->passengerClass; } if (!is_null($this->stopoverCode)) { $object->stopoverCode = $this->stopoverCode; } if (!is_null($this->taxes)) { $object->taxes = $this->taxes; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AirlineFlightLeg { parent::fromObject($object); if (property_exists($object, 'airlineClass')) { $this->airlineClass = $object->airlineClass; } if (property_exists($object, 'arrivalAirport')) { $this->arrivalAirport = $object->arrivalAirport; } if (property_exists($object, 'arrivalTime')) { $this->arrivalTime = $object->arrivalTime; } if (property_exists($object, 'carrierCode')) { $this->carrierCode = $object->carrierCode; } if (property_exists($object, 'conjunctionTicket')) { $this->conjunctionTicket = $object->conjunctionTicket; } if (property_exists($object, 'couponNumber')) { $this->couponNumber = $object->couponNumber; } if (property_exists($object, 'date')) { $this->date = $object->date; } if (property_exists($object, 'departureTime')) { $this->departureTime = $object->departureTime; } if (property_exists($object, 'endorsementOrRestriction')) { $this->endorsementOrRestriction = $object->endorsementOrRestriction; } if (property_exists($object, 'exchangeTicket')) { $this->exchangeTicket = $object->exchangeTicket; } if (property_exists($object, 'fare')) { $this->fare = $object->fare; } if (property_exists($object, 'fareBasis')) { $this->fareBasis = $object->fareBasis; } if (property_exists($object, 'fee')) { $this->fee = $object->fee; } if (property_exists($object, 'flightNumber')) { $this->flightNumber = $object->flightNumber; } if (property_exists($object, 'legFare')) { $this->legFare = $object->legFare; } if (property_exists($object, 'number')) { $this->number = $object->number; } if (property_exists($object, 'originAirport')) { $this->originAirport = $object->originAirport; } if (property_exists($object, 'passengerClass')) { $this->passengerClass = $object->passengerClass; } if (property_exists($object, 'stopoverCode')) { $this->stopoverCode = $object->stopoverCode; } if (property_exists($object, 'taxes')) { $this->taxes = $object->taxes; } return $this; } } Domain/PaymentStatusOutput.php 0000644 00000012651 15224675306 0012545 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentStatusOutput extends DataObject { /** * @var APIError[]|null */ public ?array $errors = null; /** * @var bool|null */ public ?bool $isAuthorized = null; /** * @var bool|null */ public ?bool $isCancellable = null; /** * @var bool|null */ public ?bool $isRefundable = null; /** * @var string|null */ public ?string $statusCategory = null; /** * @var int|null */ public ?int $statusCode = null; /** * @var string|null */ public ?string $statusCodeChangeDateTime = null; /** * @return APIError[]|null */ public function getErrors(): ?array { return $this->errors; } /** * @param APIError[]|null $value */ public function setErrors(?array $value): void { $this->errors = $value; } /** * @return bool|null */ public function getIsAuthorized(): ?bool { return $this->isAuthorized; } /** * @param bool|null $value */ public function setIsAuthorized(?bool $value): void { $this->isAuthorized = $value; } /** * @return bool|null */ public function getIsCancellable(): ?bool { return $this->isCancellable; } /** * @param bool|null $value */ public function setIsCancellable(?bool $value): void { $this->isCancellable = $value; } /** * @return bool|null */ public function getIsRefundable(): ?bool { return $this->isRefundable; } /** * @param bool|null $value */ public function setIsRefundable(?bool $value): void { $this->isRefundable = $value; } /** * @return string|null */ public function getStatusCategory(): ?string { return $this->statusCategory; } /** * @param string|null $value */ public function setStatusCategory(?string $value): void { $this->statusCategory = $value; } /** * @return int|null */ public function getStatusCode(): ?int { return $this->statusCode; } /** * @param int|null $value */ public function setStatusCode(?int $value): void { $this->statusCode = $value; } /** * @return string|null */ public function getStatusCodeChangeDateTime(): ?string { return $this->statusCodeChangeDateTime; } /** * @param string|null $value */ public function setStatusCodeChangeDateTime(?string $value): void { $this->statusCodeChangeDateTime = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->errors)) { $object->errors = []; foreach ($this->errors as $element) { if (!is_null($element)) { $object->errors[] = $element->toObject(); } } } if (!is_null($this->isAuthorized)) { $object->isAuthorized = $this->isAuthorized; } if (!is_null($this->isCancellable)) { $object->isCancellable = $this->isCancellable; } if (!is_null($this->isRefundable)) { $object->isRefundable = $this->isRefundable; } if (!is_null($this->statusCategory)) { $object->statusCategory = $this->statusCategory; } if (!is_null($this->statusCode)) { $object->statusCode = $this->statusCode; } if (!is_null($this->statusCodeChangeDateTime)) { $object->statusCodeChangeDateTime = $this->statusCodeChangeDateTime; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentStatusOutput { parent::fromObject($object); if (property_exists($object, 'errors')) { if (!is_array($object->errors) && !is_object($object->errors)) { throw new UnexpectedValueException('value \'' . print_r($object->errors, true) . '\' is not an array or object'); } $this->errors = []; foreach ($object->errors as $element) { $value = new APIError(); $this->errors[] = $value->fromObject($element); } } if (property_exists($object, 'isAuthorized')) { $this->isAuthorized = $object->isAuthorized; } if (property_exists($object, 'isCancellable')) { $this->isCancellable = $object->isCancellable; } if (property_exists($object, 'isRefundable')) { $this->isRefundable = $object->isRefundable; } if (property_exists($object, 'statusCategory')) { $this->statusCategory = $object->statusCategory; } if (property_exists($object, 'statusCode')) { $this->statusCode = $object->statusCode; } if (property_exists($object, 'statusCodeChangeDateTime')) { $this->statusCodeChangeDateTime = $object->statusCodeChangeDateTime; } return $this; } } Domain/RefundOutput.php 0000644 00000025037 15224675306 0011151 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var int|null */ public ?int $amountPaid = null; /** * @var RefundCardMethodSpecificOutput|null */ public ?RefundCardMethodSpecificOutput $cardRefundMethodSpecificOutput = null; /** * @var RefundEWalletMethodSpecificOutput|null */ public ?RefundEWalletMethodSpecificOutput $eWalletRefundMethodSpecificOutput = null; /** * @var string|null */ public ?string $merchantParameters = null; /** * @var RefundMobileMethodSpecificOutput|null */ public ?RefundMobileMethodSpecificOutput $mobileRefundMethodSpecificOutput = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @var string|null */ public ?string $paymentMethod = null; /** * @var RefundRedirectMethodSpecificOutput|null */ public ?RefundRedirectMethodSpecificOutput $redirectRefundMethodSpecificOutput = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return int|null */ public function getAmountPaid(): ?int { return $this->amountPaid; } /** * @param int|null $value */ public function setAmountPaid(?int $value): void { $this->amountPaid = $value; } /** * @return RefundCardMethodSpecificOutput|null */ public function getCardRefundMethodSpecificOutput(): ?RefundCardMethodSpecificOutput { return $this->cardRefundMethodSpecificOutput; } /** * @param RefundCardMethodSpecificOutput|null $value */ public function setCardRefundMethodSpecificOutput(?RefundCardMethodSpecificOutput $value): void { $this->cardRefundMethodSpecificOutput = $value; } /** * @return RefundEWalletMethodSpecificOutput|null */ public function getEWalletRefundMethodSpecificOutput(): ?RefundEWalletMethodSpecificOutput { return $this->eWalletRefundMethodSpecificOutput; } /** * @param RefundEWalletMethodSpecificOutput|null $value */ public function setEWalletRefundMethodSpecificOutput(?RefundEWalletMethodSpecificOutput $value): void { $this->eWalletRefundMethodSpecificOutput = $value; } /** * @return string|null */ public function getMerchantParameters(): ?string { return $this->merchantParameters; } /** * @param string|null $value */ public function setMerchantParameters(?string $value): void { $this->merchantParameters = $value; } /** * @return RefundMobileMethodSpecificOutput|null */ public function getMobileRefundMethodSpecificOutput(): ?RefundMobileMethodSpecificOutput { return $this->mobileRefundMethodSpecificOutput; } /** * @param RefundMobileMethodSpecificOutput|null $value */ public function setMobileRefundMethodSpecificOutput(?RefundMobileMethodSpecificOutput $value): void { $this->mobileRefundMethodSpecificOutput = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return string|null */ public function getPaymentMethod(): ?string { return $this->paymentMethod; } /** * @param string|null $value */ public function setPaymentMethod(?string $value): void { $this->paymentMethod = $value; } /** * @return RefundRedirectMethodSpecificOutput|null */ public function getRedirectRefundMethodSpecificOutput(): ?RefundRedirectMethodSpecificOutput { return $this->redirectRefundMethodSpecificOutput; } /** * @param RefundRedirectMethodSpecificOutput|null $value */ public function setRedirectRefundMethodSpecificOutput(?RefundRedirectMethodSpecificOutput $value): void { $this->redirectRefundMethodSpecificOutput = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->amountPaid)) { $object->amountPaid = $this->amountPaid; } if (!is_null($this->cardRefundMethodSpecificOutput)) { $object->cardRefundMethodSpecificOutput = $this->cardRefundMethodSpecificOutput->toObject(); } if (!is_null($this->eWalletRefundMethodSpecificOutput)) { $object->eWalletRefundMethodSpecificOutput = $this->eWalletRefundMethodSpecificOutput->toObject(); } if (!is_null($this->merchantParameters)) { $object->merchantParameters = $this->merchantParameters; } if (!is_null($this->mobileRefundMethodSpecificOutput)) { $object->mobileRefundMethodSpecificOutput = $this->mobileRefundMethodSpecificOutput->toObject(); } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } if (!is_null($this->paymentMethod)) { $object->paymentMethod = $this->paymentMethod; } if (!is_null($this->redirectRefundMethodSpecificOutput)) { $object->redirectRefundMethodSpecificOutput = $this->redirectRefundMethodSpecificOutput->toObject(); } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundOutput { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'amountPaid')) { $this->amountPaid = $object->amountPaid; } if (property_exists($object, 'cardRefundMethodSpecificOutput')) { if (!is_object($object->cardRefundMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardRefundMethodSpecificOutput, true) . '\' is not an object'); } $value = new RefundCardMethodSpecificOutput(); $this->cardRefundMethodSpecificOutput = $value->fromObject($object->cardRefundMethodSpecificOutput); } if (property_exists($object, 'eWalletRefundMethodSpecificOutput')) { if (!is_object($object->eWalletRefundMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->eWalletRefundMethodSpecificOutput, true) . '\' is not an object'); } $value = new RefundEWalletMethodSpecificOutput(); $this->eWalletRefundMethodSpecificOutput = $value->fromObject($object->eWalletRefundMethodSpecificOutput); } if (property_exists($object, 'merchantParameters')) { $this->merchantParameters = $object->merchantParameters; } if (property_exists($object, 'mobileRefundMethodSpecificOutput')) { if (!is_object($object->mobileRefundMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobileRefundMethodSpecificOutput, true) . '\' is not an object'); } $value = new RefundMobileMethodSpecificOutput(); $this->mobileRefundMethodSpecificOutput = $value->fromObject($object->mobileRefundMethodSpecificOutput); } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } if (property_exists($object, 'paymentMethod')) { $this->paymentMethod = $object->paymentMethod; } if (property_exists($object, 'redirectRefundMethodSpecificOutput')) { if (!is_object($object->redirectRefundMethodSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectRefundMethodSpecificOutput, true) . '\' is not an object'); } $value = new RefundRedirectMethodSpecificOutput(); $this->redirectRefundMethodSpecificOutput = $value->fromObject($object->redirectRefundMethodSpecificOutput); } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } return $this; } } Domain/PaymentProduct320SpecificData.php 0000644 00000004400 15224675306 0014137 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct320SpecificData extends DataObject { /** * @var string|null */ public ?string $gateway = null; /** * @var string[]|null */ public ?array $networks = null; /** * @return string|null */ public function getGateway(): ?string { return $this->gateway; } /** * @param string|null $value */ public function setGateway(?string $value): void { $this->gateway = $value; } /** * @return string[]|null */ public function getNetworks(): ?array { return $this->networks; } /** * @param string[]|null $value */ public function setNetworks(?array $value): void { $this->networks = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->gateway)) { $object->gateway = $this->gateway; } if (!is_null($this->networks)) { $object->networks = []; foreach ($this->networks as $element) { if (!is_null($element)) { $object->networks[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct320SpecificData { parent::fromObject($object); if (property_exists($object, 'gateway')) { $this->gateway = $object->gateway; } if (property_exists($object, 'networks')) { if (!is_array($object->networks) && !is_object($object->networks)) { throw new UnexpectedValueException('value \'' . print_r($object->networks, true) . '\' is not an array or object'); } $this->networks = []; foreach ($object->networks as $element) { $this->networks[] = $element; } } return $this; } } Domain/OperationOutput.php 0000644 00000014171 15224675306 0011663 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OperationOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var string|null */ public ?string $id = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @var string|null */ public ?string $paymentMethod = null; /** * @var PaymentReferences|null */ public ?PaymentReferences $references = null; /** * @var string|null */ public ?string $status = null; /** * @var PaymentStatusOutput|null */ public ?PaymentStatusOutput $statusOutput = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return string|null */ public function getPaymentMethod(): ?string { return $this->paymentMethod; } /** * @param string|null $value */ public function setPaymentMethod(?string $value): void { $this->paymentMethod = $value; } /** * @return PaymentReferences|null */ public function getReferences(): ?PaymentReferences { return $this->references; } /** * @param PaymentReferences|null $value */ public function setReferences(?PaymentReferences $value): void { $this->references = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return PaymentStatusOutput|null */ public function getStatusOutput(): ?PaymentStatusOutput { return $this->statusOutput; } /** * @param PaymentStatusOutput|null $value */ public function setStatusOutput(?PaymentStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } if (!is_null($this->paymentMethod)) { $object->paymentMethod = $this->paymentMethod; } if (!is_null($this->references)) { $object->references = $this->references->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OperationOutput { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } if (property_exists($object, 'paymentMethod')) { $this->paymentMethod = $object->paymentMethod; } if (property_exists($object, 'references')) { if (!is_object($object->references)) { throw new UnexpectedValueException('value \'' . print_r($object->references, true) . '\' is not an object'); } $value = new PaymentReferences(); $this->references = $value->fromObject($object->references); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new PaymentStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PaymentProductNetworksResponse.php 0000644 00000003323 15224675306 0014731 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductNetworksResponse extends DataObject { /** * @var string[]|null */ public ?array $networks = null; /** * @return string[]|null */ public function getNetworks(): ?array { return $this->networks; } /** * @param string[]|null $value */ public function setNetworks(?array $value): void { $this->networks = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->networks)) { $object->networks = []; foreach ($this->networks as $element) { if (!is_null($element)) { $object->networks[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductNetworksResponse { parent::fromObject($object); if (property_exists($object, 'networks')) { if (!is_array($object->networks) && !is_object($object->networks)) { throw new UnexpectedValueException('value \'' . print_r($object->networks, true) . '\' is not an array or object'); } $this->networks = []; foreach ($object->networks as $element) { $this->networks[] = $element; } } return $this; } } Domain/RedirectPaymentProduct5402SpecificInput.php 0000644 00000002735 15224675306 0016146 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5402SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $completeRemainingPaymentAmount = null; /** * @return bool|null */ public function getCompleteRemainingPaymentAmount(): ?bool { return $this->completeRemainingPaymentAmount; } /** * @param bool|null $value */ public function setCompleteRemainingPaymentAmount(?bool $value): void { $this->completeRemainingPaymentAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->completeRemainingPaymentAmount)) { $object->completeRemainingPaymentAmount = $this->completeRemainingPaymentAmount; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5402SpecificInput { parent::fromObject($object); if (property_exists($object, 'completeRemainingPaymentAmount')) { $this->completeRemainingPaymentAmount = $object->completeRemainingPaymentAmount; } return $this; } } Domain/PaymentProduct5407.php 0000644 00000003435 15224675306 0012001 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5407 extends DataObject { /** * @var string|null */ public ?string $pairingToken = null; /** * @var string|null */ public ?string $qrCode = null; /** * @return string|null */ public function getPairingToken(): ?string { return $this->pairingToken; } /** * @param string|null $value */ public function setPairingToken(?string $value): void { $this->pairingToken = $value; } /** * @return string|null */ public function getQrCode(): ?string { return $this->qrCode; } /** * @param string|null $value */ public function setQrCode(?string $value): void { $this->qrCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->pairingToken)) { $object->pairingToken = $this->pairingToken; } if (!is_null($this->qrCode)) { $object->qrCode = $this->qrCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5407 { parent::fromObject($object); if (property_exists($object, 'pairingToken')) { $this->pairingToken = $object->pairingToken; } if (property_exists($object, 'qrCode')) { $this->qrCode = $object->qrCode; } return $this; } } Domain/CardPayoutMethodSpecificInput.php 0000644 00000006235 15224675306 0014406 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardPayoutMethodSpecificInput extends DataObject { /** * @var Card|null */ public ?Card $card = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var string|null */ public ?string $payoutReason = null; /** * @var string|null */ public ?string $token = null; /** * @return Card|null */ public function getCard(): ?Card { return $this->card; } /** * @param Card|null $value */ public function setCard(?Card $value): void { $this->card = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return string|null */ public function getPayoutReason(): ?string { return $this->payoutReason; } /** * @param string|null $value */ public function setPayoutReason(?string $value): void { $this->payoutReason = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->payoutReason)) { $object->payoutReason = $this->payoutReason; } if (!is_null($this->token)) { $object->token = $this->token; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardPayoutMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new Card(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'payoutReason')) { $this->payoutReason = $object->payoutReason; } if (property_exists($object, 'token')) { $this->token = $object->token; } return $this; } } Domain/PersonalName.php 0000644 00000004424 15224675306 0011066 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PersonalName extends DataObject { /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $surname = null; /** * @var string|null */ public ?string $title = null; /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return string|null */ public function getTitle(): ?string { return $this->title; } /** * @param string|null $value */ public function setTitle(?string $value): void { $this->title = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->surname)) { $object->surname = $this->surname; } if (!is_null($this->title)) { $object->title = $this->title; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PersonalName { parent::fromObject($object); if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } if (property_exists($object, 'title')) { $this->title = $object->title; } return $this; } } Domain/RedirectPaymentProduct5300SpecificInput.php 0000644 00000012045 15224675306 0016136 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5300SpecificInput extends DataObject { /** * @var string|null */ public ?string $birthCity = null; /** * @var string|null */ public ?string $birthCountry = null; /** * @var string|null */ public ?string $birthZipCode = null; /** * @var string|null */ public ?string $channel = null; /** * @var string|null */ public ?string $loyaltyCardNumber = null; /** * @var string|null */ public ?string $secondInstallmentPaymentDate = null; /** * @var int|null */ public ?int $sessionDuration = null; /** * @return string|null */ public function getBirthCity(): ?string { return $this->birthCity; } /** * @param string|null $value */ public function setBirthCity(?string $value): void { $this->birthCity = $value; } /** * @return string|null */ public function getBirthCountry(): ?string { return $this->birthCountry; } /** * @param string|null $value */ public function setBirthCountry(?string $value): void { $this->birthCountry = $value; } /** * @return string|null */ public function getBirthZipCode(): ?string { return $this->birthZipCode; } /** * @param string|null $value */ public function setBirthZipCode(?string $value): void { $this->birthZipCode = $value; } /** * @return string|null */ public function getChannel(): ?string { return $this->channel; } /** * @param string|null $value */ public function setChannel(?string $value): void { $this->channel = $value; } /** * @return string|null */ public function getLoyaltyCardNumber(): ?string { return $this->loyaltyCardNumber; } /** * @param string|null $value */ public function setLoyaltyCardNumber(?string $value): void { $this->loyaltyCardNumber = $value; } /** * @return string|null */ public function getSecondInstallmentPaymentDate(): ?string { return $this->secondInstallmentPaymentDate; } /** * @param string|null $value */ public function setSecondInstallmentPaymentDate(?string $value): void { $this->secondInstallmentPaymentDate = $value; } /** * @return int|null */ public function getSessionDuration(): ?int { return $this->sessionDuration; } /** * @param int|null $value */ public function setSessionDuration(?int $value): void { $this->sessionDuration = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->birthCity)) { $object->birthCity = $this->birthCity; } if (!is_null($this->birthCountry)) { $object->birthCountry = $this->birthCountry; } if (!is_null($this->birthZipCode)) { $object->birthZipCode = $this->birthZipCode; } if (!is_null($this->channel)) { $object->channel = $this->channel; } if (!is_null($this->loyaltyCardNumber)) { $object->loyaltyCardNumber = $this->loyaltyCardNumber; } if (!is_null($this->secondInstallmentPaymentDate)) { $object->secondInstallmentPaymentDate = $this->secondInstallmentPaymentDate; } if (!is_null($this->sessionDuration)) { $object->sessionDuration = $this->sessionDuration; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5300SpecificInput { parent::fromObject($object); if (property_exists($object, 'birthCity')) { $this->birthCity = $object->birthCity; } if (property_exists($object, 'birthCountry')) { $this->birthCountry = $object->birthCountry; } if (property_exists($object, 'birthZipCode')) { $this->birthZipCode = $object->birthZipCode; } if (property_exists($object, 'channel')) { $this->channel = $object->channel; } if (property_exists($object, 'loyaltyCardNumber')) { $this->loyaltyCardNumber = $object->loyaltyCardNumber; } if (property_exists($object, 'secondInstallmentPaymentDate')) { $this->secondInstallmentPaymentDate = $object->secondInstallmentPaymentDate; } if (property_exists($object, 'sessionDuration')) { $this->sessionDuration = $object->sessionDuration; } return $this; } } Domain/ProtectionEligibility.php 0000644 00000003402 15224675306 0013012 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ProtectionEligibility extends DataObject { /** * @var string|null */ public ?string $eligibility = null; /** * @var string|null */ public ?string $type = null; /** * @return string|null */ public function getEligibility(): ?string { return $this->eligibility; } /** * @param string|null $value */ public function setEligibility(?string $value): void { $this->eligibility = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->eligibility)) { $object->eligibility = $this->eligibility; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ProtectionEligibility { parent::fromObject($object); if (property_exists($object, 'eligibility')) { $this->eligibility = $object->eligibility; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/LineItemInvoiceData.php 0000644 00000002360 15224675306 0012314 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LineItemInvoiceData extends DataObject { /** * @var string|null */ public ?string $description = null; /** * @return string|null */ public function getDescription(): ?string { return $this->description; } /** * @param string|null $value */ public function setDescription(?string $value): void { $this->description = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->description)) { $object->description = $this->description; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LineItemInvoiceData { parent::fromObject($object); if (property_exists($object, 'description')) { $this->description = $object->description; } return $this; } } Domain/CardInfo.php 0000644 00000003517 15224675306 0010171 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardInfo extends DataObject { /** * @var string|null */ public ?string $cardNumber = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return string|null */ public function getCardNumber(): ?string { return $this->cardNumber; } /** * @param string|null $value */ public function setCardNumber(?string $value): void { $this->cardNumber = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardNumber)) { $object->cardNumber = $this->cardNumber; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardInfo { parent::fromObject($object); if (property_exists($object, 'cardNumber')) { $this->cardNumber = $object->cardNumber; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/RedirectPaymentProduct3204SpecificInput.php 0000644 00000003507 15224675306 0016142 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct3204SpecificInput extends DataObject { /** * @var string|null */ public ?string $aliasLabel = null; /** * @var string|null */ public ?string $blikCode = null; /** * @return string|null */ public function getAliasLabel(): ?string { return $this->aliasLabel; } /** * @param string|null $value */ public function setAliasLabel(?string $value): void { $this->aliasLabel = $value; } /** * @return string|null */ public function getBlikCode(): ?string { return $this->blikCode; } /** * @param string|null $value */ public function setBlikCode(?string $value): void { $this->blikCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->aliasLabel)) { $object->aliasLabel = $this->aliasLabel; } if (!is_null($this->blikCode)) { $object->blikCode = $this->blikCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct3204SpecificInput { parent::fromObject($object); if (property_exists($object, 'aliasLabel')) { $this->aliasLabel = $object->aliasLabel; } if (property_exists($object, 'blikCode')) { $this->blikCode = $object->blikCode; } return $this; } } Domain/PaymentProductDisplayHints.php 0000644 00000004436 15224675306 0014017 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductDisplayHints extends DataObject { /** * @var int|null */ public ?int $displayOrder = null; /** * @var string|null */ public ?string $label = null; /** * @var string|null */ public ?string $logo = null; /** * @return int|null */ public function getDisplayOrder(): ?int { return $this->displayOrder; } /** * @param int|null $value */ public function setDisplayOrder(?int $value): void { $this->displayOrder = $value; } /** * @return string|null */ public function getLabel(): ?string { return $this->label; } /** * @param string|null $value */ public function setLabel(?string $value): void { $this->label = $value; } /** * @return string|null */ public function getLogo(): ?string { return $this->logo; } /** * @param string|null $value */ public function setLogo(?string $value): void { $this->logo = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->displayOrder)) { $object->displayOrder = $this->displayOrder; } if (!is_null($this->label)) { $object->label = $this->label; } if (!is_null($this->logo)) { $object->logo = $this->logo; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductDisplayHints { parent::fromObject($object); if (property_exists($object, 'displayOrder')) { $this->displayOrder = $object->displayOrder; } if (property_exists($object, 'label')) { $this->label = $object->label; } if (property_exists($object, 'logo')) { $this->logo = $object->logo; } return $this; } } Domain/PaymentLinkOrderInput.php 0000644 00000007110 15224675306 0012744 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain * @deprecated An object containing the details of the related payment input. All properties in paymentLinkOrder are deprecated. Use corresponding values as noted below: | Property | Replacement | | - | - | | merchantReference | references/merchantReference | | amount | order/amountOfMoney | | surchargeSpecificInput | order/surchargeSpecificInput | */ class PaymentLinkOrderInput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amount = null; /** * @var string|null */ public ?string $merchantReference = null; /** * @var SurchargeForPaymentLink|null */ public ?SurchargeForPaymentLink $surchargeSpecificInput = null; /** * @return AmountOfMoney|null */ public function getAmount(): ?AmountOfMoney { return $this->amount; } /** * @param AmountOfMoney|null $value */ public function setAmount(?AmountOfMoney $value): void { $this->amount = $value; } /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return SurchargeForPaymentLink|null */ public function getSurchargeSpecificInput(): ?SurchargeForPaymentLink { return $this->surchargeSpecificInput; } /** * @param SurchargeForPaymentLink|null $value */ public function setSurchargeSpecificInput(?SurchargeForPaymentLink $value): void { $this->surchargeSpecificInput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount->toObject(); } if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->surchargeSpecificInput)) { $object->surchargeSpecificInput = $this->surchargeSpecificInput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinkOrderInput { parent::fromObject($object); if (property_exists($object, 'amount')) { if (!is_object($object->amount)) { throw new UnexpectedValueException('value \'' . print_r($object->amount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amount = $value->fromObject($object->amount); } if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'surchargeSpecificInput')) { if (!is_object($object->surchargeSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeSpecificInput, true) . '\' is not an object'); } $value = new SurchargeForPaymentLink(); $this->surchargeSpecificInput = $value->fromObject($object->surchargeSpecificInput); } return $this; } } Domain/CardFraudResults.php 0000644 00000004701 15224675306 0011715 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardFraudResults extends DataObject { /** * @var string|null */ public ?string $avsResult = null; /** * @var string|null */ public ?string $cvvResult = null; /** * @var string|null */ public ?string $fraudServiceResult = null; /** * @return string|null */ public function getAvsResult(): ?string { return $this->avsResult; } /** * @param string|null $value */ public function setAvsResult(?string $value): void { $this->avsResult = $value; } /** * @return string|null */ public function getCvvResult(): ?string { return $this->cvvResult; } /** * @param string|null $value */ public function setCvvResult(?string $value): void { $this->cvvResult = $value; } /** * @return string|null */ public function getFraudServiceResult(): ?string { return $this->fraudServiceResult; } /** * @param string|null $value */ public function setFraudServiceResult(?string $value): void { $this->fraudServiceResult = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->avsResult)) { $object->avsResult = $this->avsResult; } if (!is_null($this->cvvResult)) { $object->cvvResult = $this->cvvResult; } if (!is_null($this->fraudServiceResult)) { $object->fraudServiceResult = $this->fraudServiceResult; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardFraudResults { parent::fromObject($object); if (property_exists($object, 'avsResult')) { $this->avsResult = $object->avsResult; } if (property_exists($object, 'cvvResult')) { $this->cvvResult = $object->cvvResult; } if (property_exists($object, 'fraudServiceResult')) { $this->fraudServiceResult = $object->fraudServiceResult; } return $this; } } Domain/AirlinePassenger.php 0000644 00000011220 15224675306 0011725 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AirlinePassenger extends DataObject { /** * @var string|null */ public ?string $airlineLoyaltyStatus = null; /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $passengerType = null; /** * @var string|null */ public ?string $surname = null; /** * @var string|null */ public ?string $surnamePrefix = null; /** * @var string|null * @deprecated This field is not used by any payment product Title of the passenger (this property is used for fraud screening on the payment platform) */ public ?string $title = null; /** * @return string|null */ public function getAirlineLoyaltyStatus(): ?string { return $this->airlineLoyaltyStatus; } /** * @param string|null $value */ public function setAirlineLoyaltyStatus(?string $value): void { $this->airlineLoyaltyStatus = $value; } /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getPassengerType(): ?string { return $this->passengerType; } /** * @param string|null $value */ public function setPassengerType(?string $value): void { $this->passengerType = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return string|null */ public function getSurnamePrefix(): ?string { return $this->surnamePrefix; } /** * @param string|null $value */ public function setSurnamePrefix(?string $value): void { $this->surnamePrefix = $value; } /** * @return string|null * @deprecated This field is not used by any payment product Title of the passenger (this property is used for fraud screening on the payment platform) */ public function getTitle(): ?string { return $this->title; } /** * @param string|null $value * @deprecated This field is not used by any payment product Title of the passenger (this property is used for fraud screening on the payment platform) */ public function setTitle(?string $value): void { $this->title = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->airlineLoyaltyStatus)) { $object->airlineLoyaltyStatus = $this->airlineLoyaltyStatus; } if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->passengerType)) { $object->passengerType = $this->passengerType; } if (!is_null($this->surname)) { $object->surname = $this->surname; } if (!is_null($this->surnamePrefix)) { $object->surnamePrefix = $this->surnamePrefix; } if (!is_null($this->title)) { $object->title = $this->title; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AirlinePassenger { parent::fromObject($object); if (property_exists($object, 'airlineLoyaltyStatus')) { $this->airlineLoyaltyStatus = $object->airlineLoyaltyStatus; } if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'passengerType')) { $this->passengerType = $object->passengerType; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } if (property_exists($object, 'surnamePrefix')) { $this->surnamePrefix = $object->surnamePrefix; } if (property_exists($object, 'title')) { $this->title = $object->title; } return $this; } } Domain/LabelTemplateElement.php 0000644 00000003413 15224675306 0012524 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LabelTemplateElement extends DataObject { /** * @var string|null */ public ?string $attributeKey = null; /** * @var string|null */ public ?string $mask = null; /** * @return string|null */ public function getAttributeKey(): ?string { return $this->attributeKey; } /** * @param string|null $value */ public function setAttributeKey(?string $value): void { $this->attributeKey = $value; } /** * @return string|null */ public function getMask(): ?string { return $this->mask; } /** * @param string|null $value */ public function setMask(?string $value): void { $this->mask = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->attributeKey)) { $object->attributeKey = $this->attributeKey; } if (!is_null($this->mask)) { $object->mask = $this->mask; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LabelTemplateElement { parent::fromObject($object); if (property_exists($object, 'attributeKey')) { $this->attributeKey = $object->attributeKey; } if (property_exists($object, 'mask')) { $this->mask = $object->mask; } return $this; } } Domain/PaymentProduct130SpecificInput.php 0000644 00000003357 15224675306 0014376 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct130SpecificInput extends DataObject { /** * @var PaymentProduct130SpecificThreeDSecure|null */ public ?PaymentProduct130SpecificThreeDSecure $threeDSecure = null; /** * @return PaymentProduct130SpecificThreeDSecure|null */ public function getThreeDSecure(): ?PaymentProduct130SpecificThreeDSecure { return $this->threeDSecure; } /** * @param PaymentProduct130SpecificThreeDSecure|null $value */ public function setThreeDSecure(?PaymentProduct130SpecificThreeDSecure $value): void { $this->threeDSecure = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->threeDSecure)) { $object->threeDSecure = $this->threeDSecure->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct130SpecificInput { parent::fromObject($object); if (property_exists($object, 'threeDSecure')) { if (!is_object($object->threeDSecure)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecure, true) . '\' is not an object'); } $value = new PaymentProduct130SpecificThreeDSecure(); $this->threeDSecure = $value->fromObject($object->threeDSecure); } return $this; } } Domain/PaymentProduct3012SpecificInput.php 0000644 00000006642 15224675306 0014460 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3012SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $forceAuthentication = null; /** * @var bool|null */ public ?bool $isDeferredPayment = null; /** * @var bool|null */ public ?bool $isWipTransaction = null; /** * @var string|null */ public ?string $wipMerchantAuthenticationMethod = null; /** * @return bool|null */ public function getForceAuthentication(): ?bool { return $this->forceAuthentication; } /** * @param bool|null $value */ public function setForceAuthentication(?bool $value): void { $this->forceAuthentication = $value; } /** * @return bool|null */ public function getIsDeferredPayment(): ?bool { return $this->isDeferredPayment; } /** * @param bool|null $value */ public function setIsDeferredPayment(?bool $value): void { $this->isDeferredPayment = $value; } /** * @return bool|null */ public function getIsWipTransaction(): ?bool { return $this->isWipTransaction; } /** * @param bool|null $value */ public function setIsWipTransaction(?bool $value): void { $this->isWipTransaction = $value; } /** * @return string|null */ public function getWipMerchantAuthenticationMethod(): ?string { return $this->wipMerchantAuthenticationMethod; } /** * @param string|null $value */ public function setWipMerchantAuthenticationMethod(?string $value): void { $this->wipMerchantAuthenticationMethod = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->forceAuthentication)) { $object->forceAuthentication = $this->forceAuthentication; } if (!is_null($this->isDeferredPayment)) { $object->isDeferredPayment = $this->isDeferredPayment; } if (!is_null($this->isWipTransaction)) { $object->isWipTransaction = $this->isWipTransaction; } if (!is_null($this->wipMerchantAuthenticationMethod)) { $object->wipMerchantAuthenticationMethod = $this->wipMerchantAuthenticationMethod; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3012SpecificInput { parent::fromObject($object); if (property_exists($object, 'forceAuthentication')) { $this->forceAuthentication = $object->forceAuthentication; } if (property_exists($object, 'isDeferredPayment')) { $this->isDeferredPayment = $object->isDeferredPayment; } if (property_exists($object, 'isWipTransaction')) { $this->isWipTransaction = $object->isWipTransaction; } if (property_exists($object, 'wipMerchantAuthenticationMethod')) { $this->wipMerchantAuthenticationMethod = $object->wipMerchantAuthenticationMethod; } return $this; } } Domain/RefundMobileMethodSpecificOutput.php 0000644 00000004764 15224675306 0015114 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundMobileMethodSpecificOutput extends DataObject { /** * @var string|null */ public ?string $network = null; /** * @var int|null */ public ?int $totalAmountPaid = null; /** * @var int|null */ public ?int $totalAmountRefunded = null; /** * @return string|null */ public function getNetwork(): ?string { return $this->network; } /** * @param string|null $value */ public function setNetwork(?string $value): void { $this->network = $value; } /** * @return int|null */ public function getTotalAmountPaid(): ?int { return $this->totalAmountPaid; } /** * @param int|null $value */ public function setTotalAmountPaid(?int $value): void { $this->totalAmountPaid = $value; } /** * @return int|null */ public function getTotalAmountRefunded(): ?int { return $this->totalAmountRefunded; } /** * @param int|null $value */ public function setTotalAmountRefunded(?int $value): void { $this->totalAmountRefunded = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->network)) { $object->network = $this->network; } if (!is_null($this->totalAmountPaid)) { $object->totalAmountPaid = $this->totalAmountPaid; } if (!is_null($this->totalAmountRefunded)) { $object->totalAmountRefunded = $this->totalAmountRefunded; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundMobileMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'network')) { $this->network = $object->network; } if (property_exists($object, 'totalAmountPaid')) { $this->totalAmountPaid = $object->totalAmountPaid; } if (property_exists($object, 'totalAmountRefunded')) { $this->totalAmountRefunded = $object->totalAmountRefunded; } return $this; } } Domain/MultiplePaymentInformation.php 0000644 00000003726 15224675306 0014045 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MultiplePaymentInformation extends DataObject { /** * @var string|null */ public ?string $paymentPattern = null; /** * @var int|null */ public ?int $totalNumberOfPayments = null; /** * @return string|null */ public function getPaymentPattern(): ?string { return $this->paymentPattern; } /** * @param string|null $value */ public function setPaymentPattern(?string $value): void { $this->paymentPattern = $value; } /** * @return int|null */ public function getTotalNumberOfPayments(): ?int { return $this->totalNumberOfPayments; } /** * @param int|null $value */ public function setTotalNumberOfPayments(?int $value): void { $this->totalNumberOfPayments = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentPattern)) { $object->paymentPattern = $this->paymentPattern; } if (!is_null($this->totalNumberOfPayments)) { $object->totalNumberOfPayments = $this->totalNumberOfPayments; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MultiplePaymentInformation { parent::fromObject($object); if (property_exists($object, 'paymentPattern')) { $this->paymentPattern = $object->paymentPattern; } if (property_exists($object, 'totalNumberOfPayments')) { $this->totalNumberOfPayments = $object->totalNumberOfPayments; } return $this; } } Domain/CreatedTokenResponse.php 0000644 00000010253 15224675306 0012566 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatedTokenResponse extends DataObject { /** * @var CardWithoutCvv|null */ public ?CardWithoutCvv $card = null; /** * @var ExternalTokenLinked|null */ public ?ExternalTokenLinked $externalTokenLinked = null; /** * @var bool|null */ public ?bool $isNewToken = null; /** * @var string|null */ public ?string $token = null; /** * @var string|null */ public ?string $tokenStatus = null; /** * @return CardWithoutCvv|null */ public function getCard(): ?CardWithoutCvv { return $this->card; } /** * @param CardWithoutCvv|null $value */ public function setCard(?CardWithoutCvv $value): void { $this->card = $value; } /** * @return ExternalTokenLinked|null */ public function getExternalTokenLinked(): ?ExternalTokenLinked { return $this->externalTokenLinked; } /** * @param ExternalTokenLinked|null $value */ public function setExternalTokenLinked(?ExternalTokenLinked $value): void { $this->externalTokenLinked = $value; } /** * @return bool|null */ public function getIsNewToken(): ?bool { return $this->isNewToken; } /** * @param bool|null $value */ public function setIsNewToken(?bool $value): void { $this->isNewToken = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return string|null */ public function getTokenStatus(): ?string { return $this->tokenStatus; } /** * @param string|null $value */ public function setTokenStatus(?string $value): void { $this->tokenStatus = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->externalTokenLinked)) { $object->externalTokenLinked = $this->externalTokenLinked->toObject(); } if (!is_null($this->isNewToken)) { $object->isNewToken = $this->isNewToken; } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->tokenStatus)) { $object->tokenStatus = $this->tokenStatus; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatedTokenResponse { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new CardWithoutCvv(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'externalTokenLinked')) { if (!is_object($object->externalTokenLinked)) { throw new UnexpectedValueException('value \'' . print_r($object->externalTokenLinked, true) . '\' is not an object'); } $value = new ExternalTokenLinked(); $this->externalTokenLinked = $value->fromObject($object->externalTokenLinked); } if (property_exists($object, 'isNewToken')) { $this->isNewToken = $object->isNewToken; } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'tokenStatus')) { $this->tokenStatus = $object->tokenStatus; } return $this; } } Domain/PayoutOutput.php 0000644 00000004226 15224675306 0011204 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PayoutOutput extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var string|null */ public ?string $payoutReason = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return string|null */ public function getPayoutReason(): ?string { return $this->payoutReason; } /** * @param string|null $value */ public function setPayoutReason(?string $value): void { $this->payoutReason = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->payoutReason)) { $object->payoutReason = $this->payoutReason; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PayoutOutput { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'payoutReason')) { $this->payoutReason = $object->payoutReason; } return $this; } } Domain/PaymentProductFieldValidators.php 0000644 00000021344 15224675306 0014455 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldValidators extends DataObject { /** * @var EmptyValidator|null */ public ?EmptyValidator $emailAddress = null; /** * @var EmptyValidator|null */ public ?EmptyValidator $expirationDate = null; /** * @var FixedListValidator|null */ public ?FixedListValidator $fixedList = null; /** * @var EmptyValidator|null */ public ?EmptyValidator $iban = null; /** * @var LengthValidator|null */ public ?LengthValidator $length = null; /** * @var EmptyValidator|null */ public ?EmptyValidator $luhn = null; /** * @var RangeValidator|null */ public ?RangeValidator $range = null; /** * @var RegularExpressionValidator|null */ public ?RegularExpressionValidator $regularExpression = null; /** * @var EmptyValidator|null */ public ?EmptyValidator $termsAndConditions = null; /** * @return EmptyValidator|null */ public function getEmailAddress(): ?EmptyValidator { return $this->emailAddress; } /** * @param EmptyValidator|null $value */ public function setEmailAddress(?EmptyValidator $value): void { $this->emailAddress = $value; } /** * @return EmptyValidator|null */ public function getExpirationDate(): ?EmptyValidator { return $this->expirationDate; } /** * @param EmptyValidator|null $value */ public function setExpirationDate(?EmptyValidator $value): void { $this->expirationDate = $value; } /** * @return FixedListValidator|null */ public function getFixedList(): ?FixedListValidator { return $this->fixedList; } /** * @param FixedListValidator|null $value */ public function setFixedList(?FixedListValidator $value): void { $this->fixedList = $value; } /** * @return EmptyValidator|null */ public function getIban(): ?EmptyValidator { return $this->iban; } /** * @param EmptyValidator|null $value */ public function setIban(?EmptyValidator $value): void { $this->iban = $value; } /** * @return LengthValidator|null */ public function getLength(): ?LengthValidator { return $this->length; } /** * @param LengthValidator|null $value */ public function setLength(?LengthValidator $value): void { $this->length = $value; } /** * @return EmptyValidator|null */ public function getLuhn(): ?EmptyValidator { return $this->luhn; } /** * @param EmptyValidator|null $value */ public function setLuhn(?EmptyValidator $value): void { $this->luhn = $value; } /** * @return RangeValidator|null */ public function getRange(): ?RangeValidator { return $this->range; } /** * @param RangeValidator|null $value */ public function setRange(?RangeValidator $value): void { $this->range = $value; } /** * @return RegularExpressionValidator|null */ public function getRegularExpression(): ?RegularExpressionValidator { return $this->regularExpression; } /** * @param RegularExpressionValidator|null $value */ public function setRegularExpression(?RegularExpressionValidator $value): void { $this->regularExpression = $value; } /** * @return EmptyValidator|null */ public function getTermsAndConditions(): ?EmptyValidator { return $this->termsAndConditions; } /** * @param EmptyValidator|null $value */ public function setTermsAndConditions(?EmptyValidator $value): void { $this->termsAndConditions = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->emailAddress)) { $object->emailAddress = $this->emailAddress->toObject(); } if (!is_null($this->expirationDate)) { $object->expirationDate = $this->expirationDate->toObject(); } if (!is_null($this->fixedList)) { $object->fixedList = $this->fixedList->toObject(); } if (!is_null($this->iban)) { $object->iban = $this->iban->toObject(); } if (!is_null($this->length)) { $object->length = $this->length->toObject(); } if (!is_null($this->luhn)) { $object->luhn = $this->luhn->toObject(); } if (!is_null($this->range)) { $object->range = $this->range->toObject(); } if (!is_null($this->regularExpression)) { $object->regularExpression = $this->regularExpression->toObject(); } if (!is_null($this->termsAndConditions)) { $object->termsAndConditions = $this->termsAndConditions->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldValidators { parent::fromObject($object); if (property_exists($object, 'emailAddress')) { if (!is_object($object->emailAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->emailAddress, true) . '\' is not an object'); } $value = new EmptyValidator(); $this->emailAddress = $value->fromObject($object->emailAddress); } if (property_exists($object, 'expirationDate')) { if (!is_object($object->expirationDate)) { throw new UnexpectedValueException('value \'' . print_r($object->expirationDate, true) . '\' is not an object'); } $value = new EmptyValidator(); $this->expirationDate = $value->fromObject($object->expirationDate); } if (property_exists($object, 'fixedList')) { if (!is_object($object->fixedList)) { throw new UnexpectedValueException('value \'' . print_r($object->fixedList, true) . '\' is not an object'); } $value = new FixedListValidator(); $this->fixedList = $value->fromObject($object->fixedList); } if (property_exists($object, 'iban')) { if (!is_object($object->iban)) { throw new UnexpectedValueException('value \'' . print_r($object->iban, true) . '\' is not an object'); } $value = new EmptyValidator(); $this->iban = $value->fromObject($object->iban); } if (property_exists($object, 'length')) { if (!is_object($object->length)) { throw new UnexpectedValueException('value \'' . print_r($object->length, true) . '\' is not an object'); } $value = new LengthValidator(); $this->length = $value->fromObject($object->length); } if (property_exists($object, 'luhn')) { if (!is_object($object->luhn)) { throw new UnexpectedValueException('value \'' . print_r($object->luhn, true) . '\' is not an object'); } $value = new EmptyValidator(); $this->luhn = $value->fromObject($object->luhn); } if (property_exists($object, 'range')) { if (!is_object($object->range)) { throw new UnexpectedValueException('value \'' . print_r($object->range, true) . '\' is not an object'); } $value = new RangeValidator(); $this->range = $value->fromObject($object->range); } if (property_exists($object, 'regularExpression')) { if (!is_object($object->regularExpression)) { throw new UnexpectedValueException('value \'' . print_r($object->regularExpression, true) . '\' is not an object'); } $value = new RegularExpressionValidator(); $this->regularExpression = $value->fromObject($object->regularExpression); } if (property_exists($object, 'termsAndConditions')) { if (!is_object($object->termsAndConditions)) { throw new UnexpectedValueException('value \'' . print_r($object->termsAndConditions, true) . '\' is not an object'); } $value = new EmptyValidator(); $this->termsAndConditions = $value->fromObject($object->termsAndConditions); } return $this; } } Domain/PaymentLinkResponse.php 0000644 00000016302 15224675306 0012452 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentLinkResponse extends DataObject { /** * @var DateTime|null */ public ?DateTime $expirationDate = null; /** * @var bool|null */ public ?bool $isReusableLink = null; /** * @var string|null */ public ?string $paymentId = null; /** * @var PaymentLinkEvent[]|null */ public ?array $paymentLinkEvents = null; /** * @var string|null */ public ?string $paymentLinkId = null; /** * @var PaymentLinkOrderOutput|null */ public ?PaymentLinkOrderOutput $paymentLinkOrder = null; /** * @var string|null */ public ?string $recipientName = null; /** * @var string|null */ public ?string $redirectionUrl = null; /** * @var string|null */ public ?string $status = null; /** * @return DateTime|null */ public function getExpirationDate(): ?DateTime { return $this->expirationDate; } /** * @param DateTime|null $value */ public function setExpirationDate(?DateTime $value): void { $this->expirationDate = $value; } /** * @return bool|null */ public function getIsReusableLink(): ?bool { return $this->isReusableLink; } /** * @param bool|null $value */ public function setIsReusableLink(?bool $value): void { $this->isReusableLink = $value; } /** * @return string|null */ public function getPaymentId(): ?string { return $this->paymentId; } /** * @param string|null $value */ public function setPaymentId(?string $value): void { $this->paymentId = $value; } /** * @return PaymentLinkEvent[]|null */ public function getPaymentLinkEvents(): ?array { return $this->paymentLinkEvents; } /** * @param PaymentLinkEvent[]|null $value */ public function setPaymentLinkEvents(?array $value): void { $this->paymentLinkEvents = $value; } /** * @return string|null */ public function getPaymentLinkId(): ?string { return $this->paymentLinkId; } /** * @param string|null $value */ public function setPaymentLinkId(?string $value): void { $this->paymentLinkId = $value; } /** * @return PaymentLinkOrderOutput|null */ public function getPaymentLinkOrder(): ?PaymentLinkOrderOutput { return $this->paymentLinkOrder; } /** * @param PaymentLinkOrderOutput|null $value */ public function setPaymentLinkOrder(?PaymentLinkOrderOutput $value): void { $this->paymentLinkOrder = $value; } /** * @return string|null */ public function getRecipientName(): ?string { return $this->recipientName; } /** * @param string|null $value */ public function setRecipientName(?string $value): void { $this->recipientName = $value; } /** * @return string|null */ public function getRedirectionUrl(): ?string { return $this->redirectionUrl; } /** * @param string|null $value */ public function setRedirectionUrl(?string $value): void { $this->redirectionUrl = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->expirationDate)) { $object->expirationDate = $this->expirationDate->format('Y-m-d\\TH:i:s.vP'); } if (!is_null($this->isReusableLink)) { $object->isReusableLink = $this->isReusableLink; } if (!is_null($this->paymentId)) { $object->paymentId = $this->paymentId; } if (!is_null($this->paymentLinkEvents)) { $object->paymentLinkEvents = []; foreach ($this->paymentLinkEvents as $element) { if (!is_null($element)) { $object->paymentLinkEvents[] = $element->toObject(); } } } if (!is_null($this->paymentLinkId)) { $object->paymentLinkId = $this->paymentLinkId; } if (!is_null($this->paymentLinkOrder)) { $object->paymentLinkOrder = $this->paymentLinkOrder->toObject(); } if (!is_null($this->recipientName)) { $object->recipientName = $this->recipientName; } if (!is_null($this->redirectionUrl)) { $object->redirectionUrl = $this->redirectionUrl; } if (!is_null($this->status)) { $object->status = $this->status; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinkResponse { parent::fromObject($object); if (property_exists($object, 'expirationDate')) { $this->expirationDate = new DateTime($object->expirationDate); } if (property_exists($object, 'isReusableLink')) { $this->isReusableLink = $object->isReusableLink; } if (property_exists($object, 'paymentId')) { $this->paymentId = $object->paymentId; } if (property_exists($object, 'paymentLinkEvents')) { if (!is_array($object->paymentLinkEvents) && !is_object($object->paymentLinkEvents)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentLinkEvents, true) . '\' is not an array or object'); } $this->paymentLinkEvents = []; foreach ($object->paymentLinkEvents as $element) { $value = new PaymentLinkEvent(); $this->paymentLinkEvents[] = $value->fromObject($element); } } if (property_exists($object, 'paymentLinkId')) { $this->paymentLinkId = $object->paymentLinkId; } if (property_exists($object, 'paymentLinkOrder')) { if (!is_object($object->paymentLinkOrder)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentLinkOrder, true) . '\' is not an object'); } $value = new PaymentLinkOrderOutput(); $this->paymentLinkOrder = $value->fromObject($object->paymentLinkOrder); } if (property_exists($object, 'recipientName')) { $this->recipientName = $object->recipientName; } if (property_exists($object, 'redirectionUrl')) { $this->redirectionUrl = $object->redirectionUrl; } if (property_exists($object, 'status')) { $this->status = $object->status; } return $this; } } Domain/TokenResponse.php 0000644 00000013752 15224675306 0011305 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenResponse extends DataObject { /** * @var TokenCard|null */ public ?TokenCard $card = null; /** * @var TokenEWallet|null */ public ?TokenEWallet $eWallet = null; /** * @var ExternalTokenLinked|null */ public ?ExternalTokenLinked $externalTokenLinked = null; /** * @var string|null */ public ?string $id = null; /** * @var bool|null */ public ?bool $isTemporary = null; /** * @var NetworkTokenLinked|null */ public ?NetworkTokenLinked $networkTokenLinked = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return TokenCard|null */ public function getCard(): ?TokenCard { return $this->card; } /** * @param TokenCard|null $value */ public function setCard(?TokenCard $value): void { $this->card = $value; } /** * @return TokenEWallet|null */ public function getEWallet(): ?TokenEWallet { return $this->eWallet; } /** * @param TokenEWallet|null $value */ public function setEWallet(?TokenEWallet $value): void { $this->eWallet = $value; } /** * @return ExternalTokenLinked|null */ public function getExternalTokenLinked(): ?ExternalTokenLinked { return $this->externalTokenLinked; } /** * @param ExternalTokenLinked|null $value */ public function setExternalTokenLinked(?ExternalTokenLinked $value): void { $this->externalTokenLinked = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return bool|null */ public function getIsTemporary(): ?bool { return $this->isTemporary; } /** * @param bool|null $value */ public function setIsTemporary(?bool $value): void { $this->isTemporary = $value; } /** * @return NetworkTokenLinked|null */ public function getNetworkTokenLinked(): ?NetworkTokenLinked { return $this->networkTokenLinked; } /** * @param NetworkTokenLinked|null $value */ public function setNetworkTokenLinked(?NetworkTokenLinked $value): void { $this->networkTokenLinked = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->eWallet)) { $object->eWallet = $this->eWallet->toObject(); } if (!is_null($this->externalTokenLinked)) { $object->externalTokenLinked = $this->externalTokenLinked->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->isTemporary)) { $object->isTemporary = $this->isTemporary; } if (!is_null($this->networkTokenLinked)) { $object->networkTokenLinked = $this->networkTokenLinked->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenResponse { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new TokenCard(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'eWallet')) { if (!is_object($object->eWallet)) { throw new UnexpectedValueException('value \'' . print_r($object->eWallet, true) . '\' is not an object'); } $value = new TokenEWallet(); $this->eWallet = $value->fromObject($object->eWallet); } if (property_exists($object, 'externalTokenLinked')) { if (!is_object($object->externalTokenLinked)) { throw new UnexpectedValueException('value \'' . print_r($object->externalTokenLinked, true) . '\' is not an object'); } $value = new ExternalTokenLinked(); $this->externalTokenLinked = $value->fromObject($object->externalTokenLinked); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'isTemporary')) { $this->isTemporary = $object->isTemporary; } if (property_exists($object, 'networkTokenLinked')) { if (!is_object($object->networkTokenLinked)) { throw new UnexpectedValueException('value \'' . print_r($object->networkTokenLinked, true) . '\' is not an object'); } $value = new NetworkTokenLinked(); $this->networkTokenLinked = $value->fromObject($object->networkTokenLinked); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/OrderReferences.php 0000644 00000006401 15224675306 0011554 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OrderReferences extends DataObject { /** * @var string|null */ public ?string $descriptor = null; /** * @var string|null */ public ?string $merchantParameters = null; /** * @var string|null */ public ?string $merchantReference = null; /** * @var string|null */ public ?string $operationGroupReference = null; /** * @return string|null */ public function getDescriptor(): ?string { return $this->descriptor; } /** * @param string|null $value */ public function setDescriptor(?string $value): void { $this->descriptor = $value; } /** * @return string|null */ public function getMerchantParameters(): ?string { return $this->merchantParameters; } /** * @param string|null $value */ public function setMerchantParameters(?string $value): void { $this->merchantParameters = $value; } /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return string|null */ public function getOperationGroupReference(): ?string { return $this->operationGroupReference; } /** * @param string|null $value */ public function setOperationGroupReference(?string $value): void { $this->operationGroupReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->descriptor)) { $object->descriptor = $this->descriptor; } if (!is_null($this->merchantParameters)) { $object->merchantParameters = $this->merchantParameters; } if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->operationGroupReference)) { $object->operationGroupReference = $this->operationGroupReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OrderReferences { parent::fromObject($object); if (property_exists($object, 'descriptor')) { $this->descriptor = $object->descriptor; } if (property_exists($object, 'merchantParameters')) { $this->merchantParameters = $object->merchantParameters; } if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'operationGroupReference')) { $this->operationGroupReference = $object->operationGroupReference; } return $this; } } Domain/MerchantAction.php 0000644 00000012703 15224675306 0011400 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MerchantAction extends DataObject { /** * @var string|null */ public ?string $actionType = null; /** * @var MobileThreeDSecureChallengeParameters|null */ public ?MobileThreeDSecureChallengeParameters $mobileThreeDSecureChallengeParameters = null; /** * @var RedirectData|null */ public ?RedirectData $redirectData = null; /** * @var ShowFormData|null */ public ?ShowFormData $showFormData = null; /** * @var ShowInstructionsData|null */ public ?ShowInstructionsData $showInstructionsData = null; /** * @return string|null */ public function getActionType(): ?string { return $this->actionType; } /** * @param string|null $value */ public function setActionType(?string $value): void { $this->actionType = $value; } /** * @return MobileThreeDSecureChallengeParameters|null */ public function getMobileThreeDSecureChallengeParameters(): ?MobileThreeDSecureChallengeParameters { return $this->mobileThreeDSecureChallengeParameters; } /** * @param MobileThreeDSecureChallengeParameters|null $value */ public function setMobileThreeDSecureChallengeParameters(?MobileThreeDSecureChallengeParameters $value): void { $this->mobileThreeDSecureChallengeParameters = $value; } /** * @return RedirectData|null */ public function getRedirectData(): ?RedirectData { return $this->redirectData; } /** * @param RedirectData|null $value */ public function setRedirectData(?RedirectData $value): void { $this->redirectData = $value; } /** * @return ShowFormData|null */ public function getShowFormData(): ?ShowFormData { return $this->showFormData; } /** * @param ShowFormData|null $value */ public function setShowFormData(?ShowFormData $value): void { $this->showFormData = $value; } /** * @return ShowInstructionsData|null */ public function getShowInstructionsData(): ?ShowInstructionsData { return $this->showInstructionsData; } /** * @param ShowInstructionsData|null $value */ public function setShowInstructionsData(?ShowInstructionsData $value): void { $this->showInstructionsData = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->actionType)) { $object->actionType = $this->actionType; } if (!is_null($this->mobileThreeDSecureChallengeParameters)) { $object->mobileThreeDSecureChallengeParameters = $this->mobileThreeDSecureChallengeParameters->toObject(); } if (!is_null($this->redirectData)) { $object->redirectData = $this->redirectData->toObject(); } if (!is_null($this->showFormData)) { $object->showFormData = $this->showFormData->toObject(); } if (!is_null($this->showInstructionsData)) { $object->showInstructionsData = $this->showInstructionsData->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MerchantAction { parent::fromObject($object); if (property_exists($object, 'actionType')) { $this->actionType = $object->actionType; } if (property_exists($object, 'mobileThreeDSecureChallengeParameters')) { if (!is_object($object->mobileThreeDSecureChallengeParameters)) { throw new UnexpectedValueException('value \'' . print_r($object->mobileThreeDSecureChallengeParameters, true) . '\' is not an object'); } $value = new MobileThreeDSecureChallengeParameters(); $this->mobileThreeDSecureChallengeParameters = $value->fromObject($object->mobileThreeDSecureChallengeParameters); } if (property_exists($object, 'redirectData')) { if (!is_object($object->redirectData)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectData, true) . '\' is not an object'); } $value = new RedirectData(); $this->redirectData = $value->fromObject($object->redirectData); } if (property_exists($object, 'showFormData')) { if (!is_object($object->showFormData)) { throw new UnexpectedValueException('value \'' . print_r($object->showFormData, true) . '\' is not an object'); } $value = new ShowFormData(); $this->showFormData = $value->fromObject($object->showFormData); } if (property_exists($object, 'showInstructionsData')) { if (!is_object($object->showInstructionsData)) { throw new UnexpectedValueException('value \'' . print_r($object->showInstructionsData, true) . '\' is not an object'); } $value = new ShowInstructionsData(); $this->showInstructionsData = $value->fromObject($object->showInstructionsData); } return $this; } } Domain/SurchargeSpecificInput.php 0000644 00000004154 15224675306 0013113 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SurchargeSpecificInput extends DataObject { /** * @var string|null */ public ?string $mode = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $surchargeAmount = null; /** * @return string|null */ public function getMode(): ?string { return $this->mode; } /** * @param string|null $value */ public function setMode(?string $value): void { $this->mode = $value; } /** * @return AmountOfMoney|null */ public function getSurchargeAmount(): ?AmountOfMoney { return $this->surchargeAmount; } /** * @param AmountOfMoney|null $value */ public function setSurchargeAmount(?AmountOfMoney $value): void { $this->surchargeAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->mode)) { $object->mode = $this->mode; } if (!is_null($this->surchargeAmount)) { $object->surchargeAmount = $this->surchargeAmount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SurchargeSpecificInput { parent::fromObject($object); if (property_exists($object, 'mode')) { $this->mode = $object->mode; } if (property_exists($object, 'surchargeAmount')) { if (!is_object($object->surchargeAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->surchargeAmount = $value->fromObject($object->surchargeAmount); } return $this; } } Domain/CustomerAccountAuthentication.php 0000644 00000004501 15224675306 0014514 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerAccountAuthentication extends DataObject { /** * @var string|null */ public ?string $data = null; /** * @var string|null */ public ?string $method = null; /** * @var string|null */ public ?string $utcTimestamp = null; /** * @return string|null */ public function getData(): ?string { return $this->data; } /** * @param string|null $value */ public function setData(?string $value): void { $this->data = $value; } /** * @return string|null */ public function getMethod(): ?string { return $this->method; } /** * @param string|null $value */ public function setMethod(?string $value): void { $this->method = $value; } /** * @return string|null */ public function getUtcTimestamp(): ?string { return $this->utcTimestamp; } /** * @param string|null $value */ public function setUtcTimestamp(?string $value): void { $this->utcTimestamp = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->data)) { $object->data = $this->data; } if (!is_null($this->method)) { $object->method = $this->method; } if (!is_null($this->utcTimestamp)) { $object->utcTimestamp = $this->utcTimestamp; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerAccountAuthentication { parent::fromObject($object); if (property_exists($object, 'data')) { $this->data = $object->data; } if (property_exists($object, 'method')) { $this->method = $object->method; } if (property_exists($object, 'utcTimestamp')) { $this->utcTimestamp = $object->utcTimestamp; } return $this; } } Domain/RedirectPaymentProduct5403SpecificInput.php 0000644 00000002735 15224675306 0016147 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5403SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $completeRemainingPaymentAmount = null; /** * @return bool|null */ public function getCompleteRemainingPaymentAmount(): ?bool { return $this->completeRemainingPaymentAmount; } /** * @param bool|null $value */ public function setCompleteRemainingPaymentAmount(?bool $value): void { $this->completeRemainingPaymentAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->completeRemainingPaymentAmount)) { $object->completeRemainingPaymentAmount = $this->completeRemainingPaymentAmount; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5403SpecificInput { parent::fromObject($object); if (property_exists($object, 'completeRemainingPaymentAmount')) { $this->completeRemainingPaymentAmount = $object->completeRemainingPaymentAmount; } return $this; } } Domain/ExternalCardholderAuthenticationData.php 0000644 00000015232 15224675306 0015745 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ExternalCardholderAuthenticationData extends DataObject { /** * @var string|null */ public ?string $acsTransactionId = null; /** * @var string|null */ public ?string $appliedExemption = null; /** * @var string|null */ public ?string $cavv = null; /** * @var string|null */ public ?string $cavvAlgorithm = null; /** * @var string|null */ public ?string $directoryServerTransactionId = null; /** * @var int|null */ public ?int $eci = null; /** * @var string|null */ public ?string $flow = null; /** * @var int|null */ public ?int $schemeRiskScore = null; /** * @var string|null */ public ?string $threeDSecureVersion = null; /** * @var string|null */ public ?string $xid = null; /** * @return string|null */ public function getAcsTransactionId(): ?string { return $this->acsTransactionId; } /** * @param string|null $value */ public function setAcsTransactionId(?string $value): void { $this->acsTransactionId = $value; } /** * @return string|null */ public function getAppliedExemption(): ?string { return $this->appliedExemption; } /** * @param string|null $value */ public function setAppliedExemption(?string $value): void { $this->appliedExemption = $value; } /** * @return string|null */ public function getCavv(): ?string { return $this->cavv; } /** * @param string|null $value */ public function setCavv(?string $value): void { $this->cavv = $value; } /** * @return string|null */ public function getCavvAlgorithm(): ?string { return $this->cavvAlgorithm; } /** * @param string|null $value */ public function setCavvAlgorithm(?string $value): void { $this->cavvAlgorithm = $value; } /** * @return string|null */ public function getDirectoryServerTransactionId(): ?string { return $this->directoryServerTransactionId; } /** * @param string|null $value */ public function setDirectoryServerTransactionId(?string $value): void { $this->directoryServerTransactionId = $value; } /** * @return int|null */ public function getEci(): ?int { return $this->eci; } /** * @param int|null $value */ public function setEci(?int $value): void { $this->eci = $value; } /** * @return string|null */ public function getFlow(): ?string { return $this->flow; } /** * @param string|null $value */ public function setFlow(?string $value): void { $this->flow = $value; } /** * @return int|null */ public function getSchemeRiskScore(): ?int { return $this->schemeRiskScore; } /** * @param int|null $value */ public function setSchemeRiskScore(?int $value): void { $this->schemeRiskScore = $value; } /** * @return string|null */ public function getThreeDSecureVersion(): ?string { return $this->threeDSecureVersion; } /** * @param string|null $value */ public function setThreeDSecureVersion(?string $value): void { $this->threeDSecureVersion = $value; } /** * @return string|null */ public function getXid(): ?string { return $this->xid; } /** * @param string|null $value */ public function setXid(?string $value): void { $this->xid = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acsTransactionId)) { $object->acsTransactionId = $this->acsTransactionId; } if (!is_null($this->appliedExemption)) { $object->appliedExemption = $this->appliedExemption; } if (!is_null($this->cavv)) { $object->cavv = $this->cavv; } if (!is_null($this->cavvAlgorithm)) { $object->cavvAlgorithm = $this->cavvAlgorithm; } if (!is_null($this->directoryServerTransactionId)) { $object->directoryServerTransactionId = $this->directoryServerTransactionId; } if (!is_null($this->eci)) { $object->eci = $this->eci; } if (!is_null($this->flow)) { $object->flow = $this->flow; } if (!is_null($this->schemeRiskScore)) { $object->schemeRiskScore = $this->schemeRiskScore; } if (!is_null($this->threeDSecureVersion)) { $object->threeDSecureVersion = $this->threeDSecureVersion; } if (!is_null($this->xid)) { $object->xid = $this->xid; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ExternalCardholderAuthenticationData { parent::fromObject($object); if (property_exists($object, 'acsTransactionId')) { $this->acsTransactionId = $object->acsTransactionId; } if (property_exists($object, 'appliedExemption')) { $this->appliedExemption = $object->appliedExemption; } if (property_exists($object, 'cavv')) { $this->cavv = $object->cavv; } if (property_exists($object, 'cavvAlgorithm')) { $this->cavvAlgorithm = $object->cavvAlgorithm; } if (property_exists($object, 'directoryServerTransactionId')) { $this->directoryServerTransactionId = $object->directoryServerTransactionId; } if (property_exists($object, 'eci')) { $this->eci = $object->eci; } if (property_exists($object, 'flow')) { $this->flow = $object->flow; } if (property_exists($object, 'schemeRiskScore')) { $this->schemeRiskScore = $object->schemeRiskScore; } if (property_exists($object, 'threeDSecureVersion')) { $this->threeDSecureVersion = $object->threeDSecureVersion; } if (property_exists($object, 'xid')) { $this->xid = $object->xid; } return $this; } } Domain/ExternalTokenLinked.php 0000644 00000005274 15224675306 0012420 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ExternalTokenLinked extends DataObject { /** * @var string|null */ public ?string $ComputedToken = null; /** * @var string|null * @deprecated Use the field ComputedToken instead. */ public ?string $GTSComputedToken = null; /** * @var string|null */ public ?string $GeneratedToken = null; /** * @return string|null */ public function getComputedToken(): ?string { return $this->ComputedToken; } /** * @param string|null $value */ public function setComputedToken(?string $value): void { $this->ComputedToken = $value; } /** * @return string|null * @deprecated Use the field ComputedToken instead. */ public function getGTSComputedToken(): ?string { return $this->GTSComputedToken; } /** * @param string|null $value * @deprecated Use the field ComputedToken instead. */ public function setGTSComputedToken(?string $value): void { $this->GTSComputedToken = $value; } /** * @return string|null */ public function getGeneratedToken(): ?string { return $this->GeneratedToken; } /** * @param string|null $value */ public function setGeneratedToken(?string $value): void { $this->GeneratedToken = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->ComputedToken)) { $object->ComputedToken = $this->ComputedToken; } if (!is_null($this->GTSComputedToken)) { $object->GTSComputedToken = $this->GTSComputedToken; } if (!is_null($this->GeneratedToken)) { $object->GeneratedToken = $this->GeneratedToken; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ExternalTokenLinked { parent::fromObject($object); if (property_exists($object, 'ComputedToken')) { $this->ComputedToken = $object->ComputedToken; } if (property_exists($object, 'GTSComputedToken')) { $this->GTSComputedToken = $object->GTSComputedToken; } if (property_exists($object, 'GeneratedToken')) { $this->GeneratedToken = $object->GeneratedToken; } return $this; } } Domain/CustomerAccount.php 0000644 00000017310 15224675306 0011616 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerAccount extends DataObject { /** * @var CustomerAccountAuthentication|null */ public ?CustomerAccountAuthentication $authentication = null; /** * @var string|null */ public ?string $changeDate = null; /** * @var bool|null */ public ?bool $changedDuringCheckout = null; /** * @var string|null */ public ?string $createDate = null; /** * @var bool|null */ public ?bool $hadSuspiciousActivity = null; /** * @var string|null */ public ?string $passwordChangeDate = null; /** * @var bool|null */ public ?bool $passwordChangedDuringCheckout = null; /** * @var PaymentAccountOnFile|null */ public ?PaymentAccountOnFile $paymentAccountOnFile = null; /** * @var CustomerPaymentActivity|null */ public ?CustomerPaymentActivity $paymentActivity = null; /** * @return CustomerAccountAuthentication|null */ public function getAuthentication(): ?CustomerAccountAuthentication { return $this->authentication; } /** * @param CustomerAccountAuthentication|null $value */ public function setAuthentication(?CustomerAccountAuthentication $value): void { $this->authentication = $value; } /** * @return string|null */ public function getChangeDate(): ?string { return $this->changeDate; } /** * @param string|null $value */ public function setChangeDate(?string $value): void { $this->changeDate = $value; } /** * @return bool|null */ public function getChangedDuringCheckout(): ?bool { return $this->changedDuringCheckout; } /** * @param bool|null $value */ public function setChangedDuringCheckout(?bool $value): void { $this->changedDuringCheckout = $value; } /** * @return string|null */ public function getCreateDate(): ?string { return $this->createDate; } /** * @param string|null $value */ public function setCreateDate(?string $value): void { $this->createDate = $value; } /** * @return bool|null */ public function getHadSuspiciousActivity(): ?bool { return $this->hadSuspiciousActivity; } /** * @param bool|null $value */ public function setHadSuspiciousActivity(?bool $value): void { $this->hadSuspiciousActivity = $value; } /** * @return string|null */ public function getPasswordChangeDate(): ?string { return $this->passwordChangeDate; } /** * @param string|null $value */ public function setPasswordChangeDate(?string $value): void { $this->passwordChangeDate = $value; } /** * @return bool|null */ public function getPasswordChangedDuringCheckout(): ?bool { return $this->passwordChangedDuringCheckout; } /** * @param bool|null $value */ public function setPasswordChangedDuringCheckout(?bool $value): void { $this->passwordChangedDuringCheckout = $value; } /** * @return PaymentAccountOnFile|null */ public function getPaymentAccountOnFile(): ?PaymentAccountOnFile { return $this->paymentAccountOnFile; } /** * @param PaymentAccountOnFile|null $value */ public function setPaymentAccountOnFile(?PaymentAccountOnFile $value): void { $this->paymentAccountOnFile = $value; } /** * @return CustomerPaymentActivity|null */ public function getPaymentActivity(): ?CustomerPaymentActivity { return $this->paymentActivity; } /** * @param CustomerPaymentActivity|null $value */ public function setPaymentActivity(?CustomerPaymentActivity $value): void { $this->paymentActivity = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authentication)) { $object->authentication = $this->authentication->toObject(); } if (!is_null($this->changeDate)) { $object->changeDate = $this->changeDate; } if (!is_null($this->changedDuringCheckout)) { $object->changedDuringCheckout = $this->changedDuringCheckout; } if (!is_null($this->createDate)) { $object->createDate = $this->createDate; } if (!is_null($this->hadSuspiciousActivity)) { $object->hadSuspiciousActivity = $this->hadSuspiciousActivity; } if (!is_null($this->passwordChangeDate)) { $object->passwordChangeDate = $this->passwordChangeDate; } if (!is_null($this->passwordChangedDuringCheckout)) { $object->passwordChangedDuringCheckout = $this->passwordChangedDuringCheckout; } if (!is_null($this->paymentAccountOnFile)) { $object->paymentAccountOnFile = $this->paymentAccountOnFile->toObject(); } if (!is_null($this->paymentActivity)) { $object->paymentActivity = $this->paymentActivity->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerAccount { parent::fromObject($object); if (property_exists($object, 'authentication')) { if (!is_object($object->authentication)) { throw new UnexpectedValueException('value \'' . print_r($object->authentication, true) . '\' is not an object'); } $value = new CustomerAccountAuthentication(); $this->authentication = $value->fromObject($object->authentication); } if (property_exists($object, 'changeDate')) { $this->changeDate = $object->changeDate; } if (property_exists($object, 'changedDuringCheckout')) { $this->changedDuringCheckout = $object->changedDuringCheckout; } if (property_exists($object, 'createDate')) { $this->createDate = $object->createDate; } if (property_exists($object, 'hadSuspiciousActivity')) { $this->hadSuspiciousActivity = $object->hadSuspiciousActivity; } if (property_exists($object, 'passwordChangeDate')) { $this->passwordChangeDate = $object->passwordChangeDate; } if (property_exists($object, 'passwordChangedDuringCheckout')) { $this->passwordChangedDuringCheckout = $object->passwordChangedDuringCheckout; } if (property_exists($object, 'paymentAccountOnFile')) { if (!is_object($object->paymentAccountOnFile)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentAccountOnFile, true) . '\' is not an object'); } $value = new PaymentAccountOnFile(); $this->paymentAccountOnFile = $value->fromObject($object->paymentAccountOnFile); } if (property_exists($object, 'paymentActivity')) { if (!is_object($object->paymentActivity)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentActivity, true) . '\' is not an object'); } $value = new CustomerPaymentActivity(); $this->paymentActivity = $value->fromObject($object->paymentActivity); } return $this; } } Domain/PaymentDetailsResponse.php 0000644 00000013656 15224675306 0013153 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentDetailsResponse extends DataObject { /** * @var OperationOutput[]|null */ public ?array $Operations = null; /** * @var HostedCheckoutSpecificOutput|null */ public ?HostedCheckoutSpecificOutput $hostedCheckoutSpecificOutput = null; /** * @var string|null */ public ?string $id = null; /** * @var PaymentOutput|null */ public ?PaymentOutput $paymentOutput = null; /** * @var string|null */ public ?string $status = null; /** * @var PaymentStatusOutput|null */ public ?PaymentStatusOutput $statusOutput = null; /** * @return OperationOutput[]|null */ public function getOperations(): ?array { return $this->Operations; } /** * @param OperationOutput[]|null $value */ public function setOperations(?array $value): void { $this->Operations = $value; } /** * @return HostedCheckoutSpecificOutput|null */ public function getHostedCheckoutSpecificOutput(): ?HostedCheckoutSpecificOutput { return $this->hostedCheckoutSpecificOutput; } /** * @param HostedCheckoutSpecificOutput|null $value */ public function setHostedCheckoutSpecificOutput(?HostedCheckoutSpecificOutput $value): void { $this->hostedCheckoutSpecificOutput = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return PaymentOutput|null */ public function getPaymentOutput(): ?PaymentOutput { return $this->paymentOutput; } /** * @param PaymentOutput|null $value */ public function setPaymentOutput(?PaymentOutput $value): void { $this->paymentOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return PaymentStatusOutput|null */ public function getStatusOutput(): ?PaymentStatusOutput { return $this->statusOutput; } /** * @param PaymentStatusOutput|null $value */ public function setStatusOutput(?PaymentStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->Operations)) { $object->Operations = []; foreach ($this->Operations as $element) { if (!is_null($element)) { $object->Operations[] = $element->toObject(); } } } if (!is_null($this->hostedCheckoutSpecificOutput)) { $object->hostedCheckoutSpecificOutput = $this->hostedCheckoutSpecificOutput->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->paymentOutput)) { $object->paymentOutput = $this->paymentOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentDetailsResponse { parent::fromObject($object); if (property_exists($object, 'Operations')) { if (!is_array($object->Operations) && !is_object($object->Operations)) { throw new UnexpectedValueException('value \'' . print_r($object->Operations, true) . '\' is not an array or object'); } $this->Operations = []; foreach ($object->Operations as $element) { $value = new OperationOutput(); $this->Operations[] = $value->fromObject($element); } } if (property_exists($object, 'hostedCheckoutSpecificOutput')) { if (!is_object($object->hostedCheckoutSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->hostedCheckoutSpecificOutput, true) . '\' is not an object'); } $value = new HostedCheckoutSpecificOutput(); $this->hostedCheckoutSpecificOutput = $value->fromObject($object->hostedCheckoutSpecificOutput); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'paymentOutput')) { if (!is_object($object->paymentOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentOutput, true) . '\' is not an object'); } $value = new PaymentOutput(); $this->paymentOutput = $value->fromObject($object->paymentOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new PaymentStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PaymentProduct3013SpecificInput.php 0000644 00000005375 15224675306 0014463 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct3013SpecificInput extends DataObject { /** * @var string|null */ public ?string $marketNumber = null; /** * @var string|null */ public ?string $purchasingBuyerReference1 = null; /** * @var string|null */ public ?string $purchasingBuyerReference2 = null; /** * @return string|null */ public function getMarketNumber(): ?string { return $this->marketNumber; } /** * @param string|null $value */ public function setMarketNumber(?string $value): void { $this->marketNumber = $value; } /** * @return string|null */ public function getPurchasingBuyerReference1(): ?string { return $this->purchasingBuyerReference1; } /** * @param string|null $value */ public function setPurchasingBuyerReference1(?string $value): void { $this->purchasingBuyerReference1 = $value; } /** * @return string|null */ public function getPurchasingBuyerReference2(): ?string { return $this->purchasingBuyerReference2; } /** * @param string|null $value */ public function setPurchasingBuyerReference2(?string $value): void { $this->purchasingBuyerReference2 = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->marketNumber)) { $object->marketNumber = $this->marketNumber; } if (!is_null($this->purchasingBuyerReference1)) { $object->purchasingBuyerReference1 = $this->purchasingBuyerReference1; } if (!is_null($this->purchasingBuyerReference2)) { $object->purchasingBuyerReference2 = $this->purchasingBuyerReference2; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct3013SpecificInput { parent::fromObject($object); if (property_exists($object, 'marketNumber')) { $this->marketNumber = $object->marketNumber; } if (property_exists($object, 'purchasingBuyerReference1')) { $this->purchasingBuyerReference1 = $object->purchasingBuyerReference1; } if (property_exists($object, 'purchasingBuyerReference2')) { $this->purchasingBuyerReference2 = $object->purchasingBuyerReference2; } return $this; } } Domain/RefundResponse.php 0000644 00000006764 15224675306 0011455 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundResponse extends DataObject { /** * @var string|null */ public ?string $id = null; /** * @var RefundOutput|null */ public ?RefundOutput $refundOutput = null; /** * @var string|null */ public ?string $status = null; /** * @var OrderStatusOutput|null */ public ?OrderStatusOutput $statusOutput = null; /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return RefundOutput|null */ public function getRefundOutput(): ?RefundOutput { return $this->refundOutput; } /** * @param RefundOutput|null $value */ public function setRefundOutput(?RefundOutput $value): void { $this->refundOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return OrderStatusOutput|null */ public function getStatusOutput(): ?OrderStatusOutput { return $this->statusOutput; } /** * @param OrderStatusOutput|null $value */ public function setStatusOutput(?OrderStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->refundOutput)) { $object->refundOutput = $this->refundOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundResponse { parent::fromObject($object); if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'refundOutput')) { if (!is_object($object->refundOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->refundOutput, true) . '\' is not an object'); } $value = new RefundOutput(); $this->refundOutput = $value->fromObject($object->refundOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new OrderStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PaymentProduct5500SpecificOutput.php 0000644 00000006211 15224675306 0014655 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct5500SpecificOutput extends DataObject { /** * @var string|null */ public ?string $entityId = null; /** * @var string|null */ public ?string $paymentEndDate = null; /** * @var string|null */ public ?string $paymentReference = null; /** * @var string|null */ public ?string $paymentStartDate = null; /** * @return string|null */ public function getEntityId(): ?string { return $this->entityId; } /** * @param string|null $value */ public function setEntityId(?string $value): void { $this->entityId = $value; } /** * @return string|null */ public function getPaymentEndDate(): ?string { return $this->paymentEndDate; } /** * @param string|null $value */ public function setPaymentEndDate(?string $value): void { $this->paymentEndDate = $value; } /** * @return string|null */ public function getPaymentReference(): ?string { return $this->paymentReference; } /** * @param string|null $value */ public function setPaymentReference(?string $value): void { $this->paymentReference = $value; } /** * @return string|null */ public function getPaymentStartDate(): ?string { return $this->paymentStartDate; } /** * @param string|null $value */ public function setPaymentStartDate(?string $value): void { $this->paymentStartDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->entityId)) { $object->entityId = $this->entityId; } if (!is_null($this->paymentEndDate)) { $object->paymentEndDate = $this->paymentEndDate; } if (!is_null($this->paymentReference)) { $object->paymentReference = $this->paymentReference; } if (!is_null($this->paymentStartDate)) { $object->paymentStartDate = $this->paymentStartDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct5500SpecificOutput { parent::fromObject($object); if (property_exists($object, 'entityId')) { $this->entityId = $object->entityId; } if (property_exists($object, 'paymentEndDate')) { $this->paymentEndDate = $object->paymentEndDate; } if (property_exists($object, 'paymentReference')) { $this->paymentReference = $object->paymentReference; } if (property_exists($object, 'paymentStartDate')) { $this->paymentStartDate = $object->paymentStartDate; } return $this; } } Domain/GiftCardPurchase.php 0000644 00000004303 15224675306 0011654 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GiftCardPurchase extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var int|null */ public ?int $numberOfGiftCards = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return int|null */ public function getNumberOfGiftCards(): ?int { return $this->numberOfGiftCards; } /** * @param int|null $value */ public function setNumberOfGiftCards(?int $value): void { $this->numberOfGiftCards = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->numberOfGiftCards)) { $object->numberOfGiftCards = $this->numberOfGiftCards; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GiftCardPurchase { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'numberOfGiftCards')) { $this->numberOfGiftCards = $object->numberOfGiftCards; } return $this; } } Domain/CustomerToken.php 0000644 00000007146 15224675306 0011310 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CustomerToken extends DataObject { /** * @var Address|null */ public ?Address $billingAddress = null; /** * @var CompanyInformation|null */ public ?CompanyInformation $companyInformation = null; /** * @var PersonalInformationToken|null */ public ?PersonalInformationToken $personalInformation = null; /** * @return Address|null */ public function getBillingAddress(): ?Address { return $this->billingAddress; } /** * @param Address|null $value */ public function setBillingAddress(?Address $value): void { $this->billingAddress = $value; } /** * @return CompanyInformation|null */ public function getCompanyInformation(): ?CompanyInformation { return $this->companyInformation; } /** * @param CompanyInformation|null $value */ public function setCompanyInformation(?CompanyInformation $value): void { $this->companyInformation = $value; } /** * @return PersonalInformationToken|null */ public function getPersonalInformation(): ?PersonalInformationToken { return $this->personalInformation; } /** * @param PersonalInformationToken|null $value */ public function setPersonalInformation(?PersonalInformationToken $value): void { $this->personalInformation = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->billingAddress)) { $object->billingAddress = $this->billingAddress->toObject(); } if (!is_null($this->companyInformation)) { $object->companyInformation = $this->companyInformation->toObject(); } if (!is_null($this->personalInformation)) { $object->personalInformation = $this->personalInformation->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CustomerToken { parent::fromObject($object); if (property_exists($object, 'billingAddress')) { if (!is_object($object->billingAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->billingAddress, true) . '\' is not an object'); } $value = new Address(); $this->billingAddress = $value->fromObject($object->billingAddress); } if (property_exists($object, 'companyInformation')) { if (!is_object($object->companyInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->companyInformation, true) . '\' is not an object'); } $value = new CompanyInformation(); $this->companyInformation = $value->fromObject($object->companyInformation); } if (property_exists($object, 'personalInformation')) { if (!is_object($object->personalInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->personalInformation, true) . '\' is not an object'); } $value = new PersonalInformationToken(); $this->personalInformation = $value->fromObject($object->personalInformation); } return $this; } } Domain/BankAccountIban.php 0000644 00000002233 15224675306 0011460 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class BankAccountIban extends DataObject { /** * @var string|null */ public ?string $iban = null; /** * @return string|null */ public function getIban(): ?string { return $this->iban; } /** * @param string|null $value */ public function setIban(?string $value): void { $this->iban = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->iban)) { $object->iban = $this->iban; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): BankAccountIban { parent::fromObject($object); if (property_exists($object, 'iban')) { $this->iban = $object->iban; } return $this; } } Domain/ValueMappingElement.php 0000644 00000004771 15224675306 0012411 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ValueMappingElement extends DataObject { /** * @var PaymentProductFieldDisplayElement[]|null */ public ?array $displayElements = null; /** * @var string|null */ public ?string $value = null; /** * @return PaymentProductFieldDisplayElement[]|null */ public function getDisplayElements(): ?array { return $this->displayElements; } /** * @param PaymentProductFieldDisplayElement[]|null $value */ public function setDisplayElements(?array $value): void { $this->displayElements = $value; } /** * @return string|null */ public function getValue(): ?string { return $this->value; } /** * @param string|null $value */ public function setValue(?string $value): void { $this->value = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->displayElements)) { $object->displayElements = []; foreach ($this->displayElements as $element) { if (!is_null($element)) { $object->displayElements[] = $element->toObject(); } } } if (!is_null($this->value)) { $object->value = $this->value; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ValueMappingElement { parent::fromObject($object); if (property_exists($object, 'displayElements')) { if (!is_array($object->displayElements) && !is_object($object->displayElements)) { throw new UnexpectedValueException('value \'' . print_r($object->displayElements, true) . '\' is not an array or object'); } $this->displayElements = []; foreach ($object->displayElements as $element) { $value = new PaymentProductFieldDisplayElement(); $this->displayElements[] = $value->fromObject($element); } } if (property_exists($object, 'value')) { $this->value = $object->value; } return $this; } } Domain/CreatePaymentResponse.php 0000644 00000006655 15224675306 0012772 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatePaymentResponse extends DataObject { /** * @var PaymentCreationOutput|null */ public ?PaymentCreationOutput $creationOutput = null; /** * @var MerchantAction|null */ public ?MerchantAction $merchantAction = null; /** * @var PaymentResponse|null */ public ?PaymentResponse $payment = null; /** * @return PaymentCreationOutput|null */ public function getCreationOutput(): ?PaymentCreationOutput { return $this->creationOutput; } /** * @param PaymentCreationOutput|null $value */ public function setCreationOutput(?PaymentCreationOutput $value): void { $this->creationOutput = $value; } /** * @return MerchantAction|null */ public function getMerchantAction(): ?MerchantAction { return $this->merchantAction; } /** * @param MerchantAction|null $value */ public function setMerchantAction(?MerchantAction $value): void { $this->merchantAction = $value; } /** * @return PaymentResponse|null */ public function getPayment(): ?PaymentResponse { return $this->payment; } /** * @param PaymentResponse|null $value */ public function setPayment(?PaymentResponse $value): void { $this->payment = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->creationOutput)) { $object->creationOutput = $this->creationOutput->toObject(); } if (!is_null($this->merchantAction)) { $object->merchantAction = $this->merchantAction->toObject(); } if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatePaymentResponse { parent::fromObject($object); if (property_exists($object, 'creationOutput')) { if (!is_object($object->creationOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->creationOutput, true) . '\' is not an object'); } $value = new PaymentCreationOutput(); $this->creationOutput = $value->fromObject($object->creationOutput); } if (property_exists($object, 'merchantAction')) { if (!is_object($object->merchantAction)) { throw new UnexpectedValueException('value \'' . print_r($object->merchantAction, true) . '\' is not an object'); } $value = new MerchantAction(); $this->merchantAction = $value->fromObject($object->merchantAction); } if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } return $this; } } Domain/TestConnection.php 0000644 00000002257 15224675306 0011443 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TestConnection extends DataObject { /** * @var string|null */ public ?string $result = null; /** * @return string|null */ public function getResult(): ?string { return $this->result; } /** * @param string|null $value */ public function setResult(?string $value): void { $this->result = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->result)) { $object->result = $this->result; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TestConnection { parent::fromObject($object); if (property_exists($object, 'result')) { $this->result = $object->result; } return $this; } } Domain/RedirectPaymentProduct3203SpecificInput.php 0000644 00000002443 15224675306 0016137 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct3203SpecificInput extends DataObject { /** * @var string|null */ public ?string $checkoutType = null; /** * @return string|null */ public function getCheckoutType(): ?string { return $this->checkoutType; } /** * @param string|null $value */ public function setCheckoutType(?string $value): void { $this->checkoutType = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->checkoutType)) { $object->checkoutType = $this->checkoutType; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct3203SpecificInput { parent::fromObject($object); if (property_exists($object, 'checkoutType')) { $this->checkoutType = $object->checkoutType; } return $this; } } Domain/CreateHostedTokenizationResponse.php 0000644 00000012150 15224675306 0015165 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateHostedTokenizationResponse extends DataObject { /** * @var string[]|null */ public ?array $expiredCardTokens = null; /** * @var string|null */ public ?string $hostedTokenizationId = null; /** * @var string|null */ public ?string $hostedTokenizationUrl = null; /** * @var string[]|null */ public ?array $invalidTokens = null; /** * @var string|null * @deprecated Deprecated */ public ?string $partialRedirectUrl = null; /** * @return string[]|null */ public function getExpiredCardTokens(): ?array { return $this->expiredCardTokens; } /** * @param string[]|null $value */ public function setExpiredCardTokens(?array $value): void { $this->expiredCardTokens = $value; } /** * @return string|null */ public function getHostedTokenizationId(): ?string { return $this->hostedTokenizationId; } /** * @param string|null $value */ public function setHostedTokenizationId(?string $value): void { $this->hostedTokenizationId = $value; } /** * @return string|null */ public function getHostedTokenizationUrl(): ?string { return $this->hostedTokenizationUrl; } /** * @param string|null $value */ public function setHostedTokenizationUrl(?string $value): void { $this->hostedTokenizationUrl = $value; } /** * @return string[]|null */ public function getInvalidTokens(): ?array { return $this->invalidTokens; } /** * @param string[]|null $value */ public function setInvalidTokens(?array $value): void { $this->invalidTokens = $value; } /** * @return string|null * @deprecated Deprecated */ public function getPartialRedirectUrl(): ?string { return $this->partialRedirectUrl; } /** * @param string|null $value * @deprecated Deprecated */ public function setPartialRedirectUrl(?string $value): void { $this->partialRedirectUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->expiredCardTokens)) { $object->expiredCardTokens = []; foreach ($this->expiredCardTokens as $element) { if (!is_null($element)) { $object->expiredCardTokens[] = $element; } } } if (!is_null($this->hostedTokenizationId)) { $object->hostedTokenizationId = $this->hostedTokenizationId; } if (!is_null($this->hostedTokenizationUrl)) { $object->hostedTokenizationUrl = $this->hostedTokenizationUrl; } if (!is_null($this->invalidTokens)) { $object->invalidTokens = []; foreach ($this->invalidTokens as $element) { if (!is_null($element)) { $object->invalidTokens[] = $element; } } } if (!is_null($this->partialRedirectUrl)) { $object->partialRedirectUrl = $this->partialRedirectUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateHostedTokenizationResponse { parent::fromObject($object); if (property_exists($object, 'expiredCardTokens')) { if (!is_array($object->expiredCardTokens) && !is_object($object->expiredCardTokens)) { throw new UnexpectedValueException('value \'' . print_r($object->expiredCardTokens, true) . '\' is not an array or object'); } $this->expiredCardTokens = []; foreach ($object->expiredCardTokens as $element) { $this->expiredCardTokens[] = $element; } } if (property_exists($object, 'hostedTokenizationId')) { $this->hostedTokenizationId = $object->hostedTokenizationId; } if (property_exists($object, 'hostedTokenizationUrl')) { $this->hostedTokenizationUrl = $object->hostedTokenizationUrl; } if (property_exists($object, 'invalidTokens')) { if (!is_array($object->invalidTokens) && !is_object($object->invalidTokens)) { throw new UnexpectedValueException('value \'' . print_r($object->invalidTokens, true) . '\' is not an array or object'); } $this->invalidTokens = []; foreach ($object->invalidTokens as $element) { $this->invalidTokens[] = $element; } } if (property_exists($object, 'partialRedirectUrl')) { $this->partialRedirectUrl = $object->partialRedirectUrl; } return $this; } } Domain/RedirectPaymentProduct5410SpecificInput.php 0000644 00000003014 15224675306 0016134 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5410SpecificInput extends DataObject { /** * @var DateTime|null */ public ?DateTime $secondInstallmentPaymentDate = null; /** * @return DateTime|null */ public function getSecondInstallmentPaymentDate(): ?DateTime { return $this->secondInstallmentPaymentDate; } /** * @param DateTime|null $value */ public function setSecondInstallmentPaymentDate(?DateTime $value): void { $this->secondInstallmentPaymentDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->secondInstallmentPaymentDate)) { $object->secondInstallmentPaymentDate = $this->secondInstallmentPaymentDate->format('Y-m-d'); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5410SpecificInput { parent::fromObject($object); if (property_exists($object, 'secondInstallmentPaymentDate')) { $this->secondInstallmentPaymentDate = new DateTime($object->secondInstallmentPaymentDate); } return $this; } } Domain/MandatePersonalNameResponse.php 0000644 00000003431 15224675306 0014074 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandatePersonalNameResponse extends DataObject { /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $surname = null; /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->surname)) { $object->surname = $this->surname; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandatePersonalNameResponse { parent::fromObject($object); if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } return $this; } } Domain/Address.php 0000644 00000010775 15224675306 0010075 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Address extends DataObject { /** * @var string|null */ public ?string $additionalInfo = null; /** * @var string|null */ public ?string $city = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $houseNumber = null; /** * @var string|null */ public ?string $state = null; /** * @var string|null */ public ?string $street = null; /** * @var string|null */ public ?string $zip = null; /** * @return string|null */ public function getAdditionalInfo(): ?string { return $this->additionalInfo; } /** * @param string|null $value */ public function setAdditionalInfo(?string $value): void { $this->additionalInfo = $value; } /** * @return string|null */ public function getCity(): ?string { return $this->city; } /** * @param string|null $value */ public function setCity(?string $value): void { $this->city = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getHouseNumber(): ?string { return $this->houseNumber; } /** * @param string|null $value */ public function setHouseNumber(?string $value): void { $this->houseNumber = $value; } /** * @return string|null */ public function getState(): ?string { return $this->state; } /** * @param string|null $value */ public function setState(?string $value): void { $this->state = $value; } /** * @return string|null */ public function getStreet(): ?string { return $this->street; } /** * @param string|null $value */ public function setStreet(?string $value): void { $this->street = $value; } /** * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * @param string|null $value */ public function setZip(?string $value): void { $this->zip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->additionalInfo)) { $object->additionalInfo = $this->additionalInfo; } if (!is_null($this->city)) { $object->city = $this->city; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->houseNumber)) { $object->houseNumber = $this->houseNumber; } if (!is_null($this->state)) { $object->state = $this->state; } if (!is_null($this->street)) { $object->street = $this->street; } if (!is_null($this->zip)) { $object->zip = $this->zip; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Address { parent::fromObject($object); if (property_exists($object, 'additionalInfo')) { $this->additionalInfo = $object->additionalInfo; } if (property_exists($object, 'city')) { $this->city = $object->city; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'houseNumber')) { $this->houseNumber = $object->houseNumber; } if (property_exists($object, 'state')) { $this->state = $object->state; } if (property_exists($object, 'street')) { $this->street = $object->street; } if (property_exists($object, 'zip')) { $this->zip = $object->zip; } return $this; } } Domain/SubsequentPaymentProduct5001SpecificInput.php 0000644 00000002475 15224675306 0016537 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SubsequentPaymentProduct5001SpecificInput extends DataObject { /** * @var string|null */ public ?string $subsequentType = null; /** * @return string|null */ public function getSubsequentType(): ?string { return $this->subsequentType; } /** * @param string|null $value */ public function setSubsequentType(?string $value): void { $this->subsequentType = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->subsequentType)) { $object->subsequentType = $this->subsequentType; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SubsequentPaymentProduct5001SpecificInput { parent::fromObject($object); if (property_exists($object, 'subsequentType')) { $this->subsequentType = $object->subsequentType; } return $this; } } Domain/DecryptedPaymentData.php 0000644 00000006662 15224675306 0012563 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class DecryptedPaymentData extends DataObject { /** * @var string|null */ public ?string $cardholderName = null; /** * @var string|null */ public ?string $cryptogram = null; /** * @var string|null */ public ?string $dpan = null; /** * @var int|null */ public ?int $eci = null; /** * @var string|null */ public ?string $expiryDate = null; /** * @return string|null */ public function getCardholderName(): ?string { return $this->cardholderName; } /** * @param string|null $value */ public function setCardholderName(?string $value): void { $this->cardholderName = $value; } /** * @return string|null */ public function getCryptogram(): ?string { return $this->cryptogram; } /** * @param string|null $value */ public function setCryptogram(?string $value): void { $this->cryptogram = $value; } /** * @return string|null */ public function getDpan(): ?string { return $this->dpan; } /** * @param string|null $value */ public function setDpan(?string $value): void { $this->dpan = $value; } /** * @return int|null */ public function getEci(): ?int { return $this->eci; } /** * @param int|null $value */ public function setEci(?int $value): void { $this->eci = $value; } /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardholderName)) { $object->cardholderName = $this->cardholderName; } if (!is_null($this->cryptogram)) { $object->cryptogram = $this->cryptogram; } if (!is_null($this->dpan)) { $object->dpan = $this->dpan; } if (!is_null($this->eci)) { $object->eci = $this->eci; } if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DecryptedPaymentData { parent::fromObject($object); if (property_exists($object, 'cardholderName')) { $this->cardholderName = $object->cardholderName; } if (property_exists($object, 'cryptogram')) { $this->cryptogram = $object->cryptogram; } if (property_exists($object, 'dpan')) { $this->dpan = $object->dpan; } if (property_exists($object, 'eci')) { $this->eci = $object->eci; } if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } return $this; } } Domain/MobilePaymentProduct320SpecificInput.php 0000644 00000007204 15224675306 0015522 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobilePaymentProduct320SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var Product320Recurring|null */ public ?Product320Recurring $recurring = null; /** * @var GPayThreeDSecure|null */ public ?GPayThreeDSecure $threeDSecure = null; /** * @var bool|null */ public ?bool $tokenize = null; /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return Product320Recurring|null */ public function getRecurring(): ?Product320Recurring { return $this->recurring; } /** * @param Product320Recurring|null $value */ public function setRecurring(?Product320Recurring $value): void { $this->recurring = $value; } /** * @return GPayThreeDSecure|null */ public function getThreeDSecure(): ?GPayThreeDSecure { return $this->threeDSecure; } /** * @param GPayThreeDSecure|null $value */ public function setThreeDSecure(?GPayThreeDSecure $value): void { $this->threeDSecure = $value; } /** * @return bool|null */ public function getTokenize(): ?bool { return $this->tokenize; } /** * @param bool|null $value */ public function setTokenize(?bool $value): void { $this->tokenize = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->isRecurring)) { $object->isRecurring = $this->isRecurring; } if (!is_null($this->recurring)) { $object->recurring = $this->recurring->toObject(); } if (!is_null($this->threeDSecure)) { $object->threeDSecure = $this->threeDSecure->toObject(); } if (!is_null($this->tokenize)) { $object->tokenize = $this->tokenize; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobilePaymentProduct320SpecificInput { parent::fromObject($object); if (property_exists($object, 'isRecurring')) { $this->isRecurring = $object->isRecurring; } if (property_exists($object, 'recurring')) { if (!is_object($object->recurring)) { throw new UnexpectedValueException('value \'' . print_r($object->recurring, true) . '\' is not an object'); } $value = new Product320Recurring(); $this->recurring = $value->fromObject($object->recurring); } if (property_exists($object, 'threeDSecure')) { if (!is_object($object->threeDSecure)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecure, true) . '\' is not an object'); } $value = new GPayThreeDSecure(); $this->threeDSecure = $value->fromObject($object->threeDSecure); } if (property_exists($object, 'tokenize')) { $this->tokenize = $object->tokenize; } return $this; } } Domain/PaymentProductFieldFormElement.php 0000644 00000005137 15224675306 0014564 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldFormElement extends DataObject { /** * @var string|null */ public ?string $type = null; /** * @var ValueMappingElement[]|null * @deprecated This field is not used by any payment product */ public ?array $valueMapping = null; /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return ValueMappingElement[]|null * @deprecated This field is not used by any payment product */ public function getValueMapping(): ?array { return $this->valueMapping; } /** * @param ValueMappingElement[]|null $value * @deprecated This field is not used by any payment product */ public function setValueMapping(?array $value): void { $this->valueMapping = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->type)) { $object->type = $this->type; } if (!is_null($this->valueMapping)) { $object->valueMapping = []; foreach ($this->valueMapping as $element) { if (!is_null($element)) { $object->valueMapping[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldFormElement { parent::fromObject($object); if (property_exists($object, 'type')) { $this->type = $object->type; } if (property_exists($object, 'valueMapping')) { if (!is_array($object->valueMapping) && !is_object($object->valueMapping)) { throw new UnexpectedValueException('value \'' . print_r($object->valueMapping, true) . '\' is not an array or object'); } $this->valueMapping = []; foreach ($object->valueMapping as $element) { $value = new ValueMappingElement(); $this->valueMapping[] = $value->fromObject($element); } } return $this; } } Domain/GetHostedCheckoutResponse.php 0000644 00000004372 15224675306 0013577 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetHostedCheckoutResponse extends DataObject { /** * @var CreatedPaymentOutput|null */ public ?CreatedPaymentOutput $createdPaymentOutput = null; /** * @var string|null */ public ?string $status = null; /** * @return CreatedPaymentOutput|null */ public function getCreatedPaymentOutput(): ?CreatedPaymentOutput { return $this->createdPaymentOutput; } /** * @param CreatedPaymentOutput|null $value */ public function setCreatedPaymentOutput(?CreatedPaymentOutput $value): void { $this->createdPaymentOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->createdPaymentOutput)) { $object->createdPaymentOutput = $this->createdPaymentOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetHostedCheckoutResponse { parent::fromObject($object); if (property_exists($object, 'createdPaymentOutput')) { if (!is_object($object->createdPaymentOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->createdPaymentOutput, true) . '\' is not an object'); } $value = new CreatedPaymentOutput(); $this->createdPaymentOutput = $value->fromObject($object->createdPaymentOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } return $this; } } Domain/Discount.php 0000644 00000002221 15224675306 0010263 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Discount extends DataObject { /** * @var int|null */ public ?int $amount = null; /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amount)) { $object->amount = $this->amount; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Discount { parent::fromObject($object); if (property_exists($object, 'amount')) { $this->amount = $object->amount; } return $this; } } Domain/CancelPaymentResponse.php 0000644 00000003002 15224675306 0012733 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CancelPaymentResponse extends DataObject { /** * @var PaymentResponse|null */ public ?PaymentResponse $payment = null; /** * @return PaymentResponse|null */ public function getPayment(): ?PaymentResponse { return $this->payment; } /** * @param PaymentResponse|null $value */ public function setPayment(?PaymentResponse $value): void { $this->payment = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CancelPaymentResponse { parent::fromObject($object); if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } return $this; } } Domain/MandateAddress.php 0000644 00000006566 15224675306 0011372 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateAddress extends DataObject { /** * @var string|null */ public ?string $city = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $houseNumber = null; /** * @var string|null */ public ?string $street = null; /** * @var string|null */ public ?string $zip = null; /** * @return string|null */ public function getCity(): ?string { return $this->city; } /** * @param string|null $value */ public function setCity(?string $value): void { $this->city = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getHouseNumber(): ?string { return $this->houseNumber; } /** * @param string|null $value */ public function setHouseNumber(?string $value): void { $this->houseNumber = $value; } /** * @return string|null */ public function getStreet(): ?string { return $this->street; } /** * @param string|null $value */ public function setStreet(?string $value): void { $this->street = $value; } /** * @return string|null */ public function getZip(): ?string { return $this->zip; } /** * @param string|null $value */ public function setZip(?string $value): void { $this->zip = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->city)) { $object->city = $this->city; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->houseNumber)) { $object->houseNumber = $this->houseNumber; } if (!is_null($this->street)) { $object->street = $this->street; } if (!is_null($this->zip)) { $object->zip = $this->zip; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateAddress { parent::fromObject($object); if (property_exists($object, 'city')) { $this->city = $object->city; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'houseNumber')) { $this->houseNumber = $object->houseNumber; } if (property_exists($object, 'street')) { $this->street = $object->street; } if (property_exists($object, 'zip')) { $this->zip = $object->zip; } return $this; } } Domain/CreateTokenRequest.php 0000644 00000005532 15224675306 0012260 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateTokenRequest extends DataObject { /** * @var TokenCardSpecificInput|null */ public ?TokenCardSpecificInput $card = null; /** * @var string|null */ public ?string $encryptedCustomerInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return TokenCardSpecificInput|null */ public function getCard(): ?TokenCardSpecificInput { return $this->card; } /** * @param TokenCardSpecificInput|null $value */ public function setCard(?TokenCardSpecificInput $value): void { $this->card = $value; } /** * @return string|null */ public function getEncryptedCustomerInput(): ?string { return $this->encryptedCustomerInput; } /** * @param string|null $value */ public function setEncryptedCustomerInput(?string $value): void { $this->encryptedCustomerInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->encryptedCustomerInput)) { $object->encryptedCustomerInput = $this->encryptedCustomerInput; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateTokenRequest { parent::fromObject($object); if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new TokenCardSpecificInput(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'encryptedCustomerInput')) { $this->encryptedCustomerInput = $object->encryptedCustomerInput; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/ThreeDSecure.php 0000644 00000023547 15224675306 0011033 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ThreeDSecure extends DataObject { /** * @var int|null */ public ?int $authenticationAmount = null; /** * @var string|null */ public ?string $challengeCanvasSize = null; /** * @var string|null */ public ?string $challengeIndicator = null; /** * @var string|null */ public ?string $deviceChannel = null; /** * @var string|null */ public ?string $exemptionRequest = null; /** * @var ExternalCardholderAuthenticationData|null */ public ?ExternalCardholderAuthenticationData $externalCardholderAuthenticationData = null; /** * @var int|null */ public ?int $merchantFraudRate = null; /** * @var ThreeDSecureData|null */ public ?ThreeDSecureData $priorThreeDSecureData = null; /** * @var RedirectionData|null */ public ?RedirectionData $redirectionData = null; /** * @var bool|null */ public ?bool $secureCorporatePayment = null; /** * @var bool|null */ public ?bool $skipAuthentication = null; /** * @var bool|null */ public ?bool $skipSoftDecline = null; /** * @return int|null */ public function getAuthenticationAmount(): ?int { return $this->authenticationAmount; } /** * @param int|null $value */ public function setAuthenticationAmount(?int $value): void { $this->authenticationAmount = $value; } /** * @return string|null */ public function getChallengeCanvasSize(): ?string { return $this->challengeCanvasSize; } /** * @param string|null $value */ public function setChallengeCanvasSize(?string $value): void { $this->challengeCanvasSize = $value; } /** * @return string|null */ public function getChallengeIndicator(): ?string { return $this->challengeIndicator; } /** * @param string|null $value */ public function setChallengeIndicator(?string $value): void { $this->challengeIndicator = $value; } /** * @return string|null */ public function getDeviceChannel(): ?string { return $this->deviceChannel; } /** * @param string|null $value */ public function setDeviceChannel(?string $value): void { $this->deviceChannel = $value; } /** * @return string|null */ public function getExemptionRequest(): ?string { return $this->exemptionRequest; } /** * @param string|null $value */ public function setExemptionRequest(?string $value): void { $this->exemptionRequest = $value; } /** * @return ExternalCardholderAuthenticationData|null */ public function getExternalCardholderAuthenticationData(): ?ExternalCardholderAuthenticationData { return $this->externalCardholderAuthenticationData; } /** * @param ExternalCardholderAuthenticationData|null $value */ public function setExternalCardholderAuthenticationData(?ExternalCardholderAuthenticationData $value): void { $this->externalCardholderAuthenticationData = $value; } /** * @return int|null */ public function getMerchantFraudRate(): ?int { return $this->merchantFraudRate; } /** * @param int|null $value */ public function setMerchantFraudRate(?int $value): void { $this->merchantFraudRate = $value; } /** * @return ThreeDSecureData|null */ public function getPriorThreeDSecureData(): ?ThreeDSecureData { return $this->priorThreeDSecureData; } /** * @param ThreeDSecureData|null $value */ public function setPriorThreeDSecureData(?ThreeDSecureData $value): void { $this->priorThreeDSecureData = $value; } /** * @return RedirectionData|null */ public function getRedirectionData(): ?RedirectionData { return $this->redirectionData; } /** * @param RedirectionData|null $value */ public function setRedirectionData(?RedirectionData $value): void { $this->redirectionData = $value; } /** * @return bool|null */ public function getSecureCorporatePayment(): ?bool { return $this->secureCorporatePayment; } /** * @param bool|null $value */ public function setSecureCorporatePayment(?bool $value): void { $this->secureCorporatePayment = $value; } /** * @return bool|null */ public function getSkipAuthentication(): ?bool { return $this->skipAuthentication; } /** * @param bool|null $value */ public function setSkipAuthentication(?bool $value): void { $this->skipAuthentication = $value; } /** * @return bool|null */ public function getSkipSoftDecline(): ?bool { return $this->skipSoftDecline; } /** * @param bool|null $value */ public function setSkipSoftDecline(?bool $value): void { $this->skipSoftDecline = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authenticationAmount)) { $object->authenticationAmount = $this->authenticationAmount; } if (!is_null($this->challengeCanvasSize)) { $object->challengeCanvasSize = $this->challengeCanvasSize; } if (!is_null($this->challengeIndicator)) { $object->challengeIndicator = $this->challengeIndicator; } if (!is_null($this->deviceChannel)) { $object->deviceChannel = $this->deviceChannel; } if (!is_null($this->exemptionRequest)) { $object->exemptionRequest = $this->exemptionRequest; } if (!is_null($this->externalCardholderAuthenticationData)) { $object->externalCardholderAuthenticationData = $this->externalCardholderAuthenticationData->toObject(); } if (!is_null($this->merchantFraudRate)) { $object->merchantFraudRate = $this->merchantFraudRate; } if (!is_null($this->priorThreeDSecureData)) { $object->priorThreeDSecureData = $this->priorThreeDSecureData->toObject(); } if (!is_null($this->redirectionData)) { $object->redirectionData = $this->redirectionData->toObject(); } if (!is_null($this->secureCorporatePayment)) { $object->secureCorporatePayment = $this->secureCorporatePayment; } if (!is_null($this->skipAuthentication)) { $object->skipAuthentication = $this->skipAuthentication; } if (!is_null($this->skipSoftDecline)) { $object->skipSoftDecline = $this->skipSoftDecline; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ThreeDSecure { parent::fromObject($object); if (property_exists($object, 'authenticationAmount')) { $this->authenticationAmount = $object->authenticationAmount; } if (property_exists($object, 'challengeCanvasSize')) { $this->challengeCanvasSize = $object->challengeCanvasSize; } if (property_exists($object, 'challengeIndicator')) { $this->challengeIndicator = $object->challengeIndicator; } if (property_exists($object, 'deviceChannel')) { $this->deviceChannel = $object->deviceChannel; } if (property_exists($object, 'exemptionRequest')) { $this->exemptionRequest = $object->exemptionRequest; } if (property_exists($object, 'externalCardholderAuthenticationData')) { if (!is_object($object->externalCardholderAuthenticationData)) { throw new UnexpectedValueException('value \'' . print_r($object->externalCardholderAuthenticationData, true) . '\' is not an object'); } $value = new ExternalCardholderAuthenticationData(); $this->externalCardholderAuthenticationData = $value->fromObject($object->externalCardholderAuthenticationData); } if (property_exists($object, 'merchantFraudRate')) { $this->merchantFraudRate = $object->merchantFraudRate; } if (property_exists($object, 'priorThreeDSecureData')) { if (!is_object($object->priorThreeDSecureData)) { throw new UnexpectedValueException('value \'' . print_r($object->priorThreeDSecureData, true) . '\' is not an object'); } $value = new ThreeDSecureData(); $this->priorThreeDSecureData = $value->fromObject($object->priorThreeDSecureData); } if (property_exists($object, 'redirectionData')) { if (!is_object($object->redirectionData)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectionData, true) . '\' is not an object'); } $value = new RedirectionData(); $this->redirectionData = $value->fromObject($object->redirectionData); } if (property_exists($object, 'secureCorporatePayment')) { $this->secureCorporatePayment = $object->secureCorporatePayment; } if (property_exists($object, 'skipAuthentication')) { $this->skipAuthentication = $object->skipAuthentication; } if (property_exists($object, 'skipSoftDecline')) { $this->skipSoftDecline = $object->skipSoftDecline; } return $this; } } Domain/RedirectData.php 0000644 00000003447 15224675306 0011041 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectData extends DataObject { /** * @var string|null */ public ?string $RETURNMAC = null; /** * @var string|null */ public ?string $redirectURL = null; /** * @return string|null */ public function getRETURNMAC(): ?string { return $this->RETURNMAC; } /** * @param string|null $value */ public function setRETURNMAC(?string $value): void { $this->RETURNMAC = $value; } /** * @return string|null */ public function getRedirectURL(): ?string { return $this->redirectURL; } /** * @param string|null $value */ public function setRedirectURL(?string $value): void { $this->redirectURL = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->RETURNMAC)) { $object->RETURNMAC = $this->RETURNMAC; } if (!is_null($this->redirectURL)) { $object->redirectURL = $this->redirectURL; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectData { parent::fromObject($object); if (property_exists($object, 'RETURNMAC')) { $this->RETURNMAC = $object->RETURNMAC; } if (property_exists($object, 'redirectURL')) { $this->redirectURL = $object->redirectURL; } return $this; } } Domain/GPayThreeDSecure.php 0000644 00000010351 15224675306 0011601 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GPayThreeDSecure extends DataObject { /** * @var string|null */ public ?string $challengeCanvasSize = null; /** * @var string|null */ public ?string $challengeIndicator = null; /** * @var string|null */ public ?string $exemptionRequest = null; /** * @var RedirectionData|null */ public ?RedirectionData $redirectionData = null; /** * @var bool|null */ public ?bool $skipAuthentication = null; /** * @return string|null */ public function getChallengeCanvasSize(): ?string { return $this->challengeCanvasSize; } /** * @param string|null $value */ public function setChallengeCanvasSize(?string $value): void { $this->challengeCanvasSize = $value; } /** * @return string|null */ public function getChallengeIndicator(): ?string { return $this->challengeIndicator; } /** * @param string|null $value */ public function setChallengeIndicator(?string $value): void { $this->challengeIndicator = $value; } /** * @return string|null */ public function getExemptionRequest(): ?string { return $this->exemptionRequest; } /** * @param string|null $value */ public function setExemptionRequest(?string $value): void { $this->exemptionRequest = $value; } /** * @return RedirectionData|null */ public function getRedirectionData(): ?RedirectionData { return $this->redirectionData; } /** * @param RedirectionData|null $value */ public function setRedirectionData(?RedirectionData $value): void { $this->redirectionData = $value; } /** * @return bool|null */ public function getSkipAuthentication(): ?bool { return $this->skipAuthentication; } /** * @param bool|null $value */ public function setSkipAuthentication(?bool $value): void { $this->skipAuthentication = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->challengeCanvasSize)) { $object->challengeCanvasSize = $this->challengeCanvasSize; } if (!is_null($this->challengeIndicator)) { $object->challengeIndicator = $this->challengeIndicator; } if (!is_null($this->exemptionRequest)) { $object->exemptionRequest = $this->exemptionRequest; } if (!is_null($this->redirectionData)) { $object->redirectionData = $this->redirectionData->toObject(); } if (!is_null($this->skipAuthentication)) { $object->skipAuthentication = $this->skipAuthentication; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GPayThreeDSecure { parent::fromObject($object); if (property_exists($object, 'challengeCanvasSize')) { $this->challengeCanvasSize = $object->challengeCanvasSize; } if (property_exists($object, 'challengeIndicator')) { $this->challengeIndicator = $object->challengeIndicator; } if (property_exists($object, 'exemptionRequest')) { $this->exemptionRequest = $object->exemptionRequest; } if (property_exists($object, 'redirectionData')) { if (!is_object($object->redirectionData)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectionData, true) . '\' is not an object'); } $value = new RedirectionData(); $this->redirectionData = $value->fromObject($object->redirectionData); } if (property_exists($object, 'skipAuthentication')) { $this->skipAuthentication = $object->skipAuthentication; } return $this; } } Domain/ProductDirectory.php 0000644 00000003416 15224675306 0012007 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ProductDirectory extends DataObject { /** * @var DirectoryEntry[]|null */ public ?array $entries = null; /** * @return DirectoryEntry[]|null */ public function getEntries(): ?array { return $this->entries; } /** * @param DirectoryEntry[]|null $value */ public function setEntries(?array $value): void { $this->entries = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->entries)) { $object->entries = []; foreach ($this->entries as $element) { if (!is_null($element)) { $object->entries[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ProductDirectory { parent::fromObject($object); if (property_exists($object, 'entries')) { if (!is_array($object->entries) && !is_object($object->entries)) { throw new UnexpectedValueException('value \'' . print_r($object->entries, true) . '\' is not an array or object'); } $this->entries = []; foreach ($object->entries as $element) { $value = new DirectoryEntry(); $this->entries[] = $value->fromObject($element); } } return $this; } } Domain/CardPaymentMethodSpecificOutput.php 0000644 00000043747 15224675306 0014754 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardPaymentMethodSpecificOutput extends DataObject { /** * @var AcquirerInformation|null */ public ?AcquirerInformation $acquirerInformation = null; /** * @var int|null */ public ?int $authenticatedAmount = null; /** * @var string|null */ public ?string $authorisationCode = null; /** * @var CardEssentials|null */ public ?CardEssentials $card = null; /** * @var ClickToPay|null */ public ?ClickToPay $clickToPay = null; /** * @var string|null */ public ?string $cobrandSelectionIndicator = null; /** * @var CurrencyConversion|null */ public ?CurrencyConversion $currencyConversion = null; /** * @var ExternalTokenLinked|null */ public ?ExternalTokenLinked $externalTokenLinked = null; /** * @var CardFraudResults|null */ public ?CardFraudResults $fraudResults = null; /** * @var string|null */ public ?string $initialSchemeTransactionId = null; /** * @var NetworkTokenEssentials|null */ public ?NetworkTokenEssentials $networkTokenData = null; /** * @var string|null */ public ?string $paymentAccountReference = null; /** * @var string|null */ public ?string $paymentOption = null; /** * @var PaymentProduct3208SpecificOutput|null */ public ?PaymentProduct3208SpecificOutput $paymentProduct3208SpecificOutput = null; /** * @var PaymentProduct3209SpecificOutput|null */ public ?PaymentProduct3209SpecificOutput $paymentProduct3209SpecificOutput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var ReattemptInstructions|null */ public ?ReattemptInstructions $reattemptInstructions = null; /** * @var string|null */ public ?string $schemeReferenceData = null; /** * @var ThreeDSecureResults|null */ public ?ThreeDSecureResults $threeDSecureResults = null; /** * @var string|null */ public ?string $token = null; /** * @return AcquirerInformation|null */ public function getAcquirerInformation(): ?AcquirerInformation { return $this->acquirerInformation; } /** * @param AcquirerInformation|null $value */ public function setAcquirerInformation(?AcquirerInformation $value): void { $this->acquirerInformation = $value; } /** * @return int|null */ public function getAuthenticatedAmount(): ?int { return $this->authenticatedAmount; } /** * @param int|null $value */ public function setAuthenticatedAmount(?int $value): void { $this->authenticatedAmount = $value; } /** * @return string|null */ public function getAuthorisationCode(): ?string { return $this->authorisationCode; } /** * @param string|null $value */ public function setAuthorisationCode(?string $value): void { $this->authorisationCode = $value; } /** * @return CardEssentials|null */ public function getCard(): ?CardEssentials { return $this->card; } /** * @param CardEssentials|null $value */ public function setCard(?CardEssentials $value): void { $this->card = $value; } /** * @return ClickToPay|null */ public function getClickToPay(): ?ClickToPay { return $this->clickToPay; } /** * @param ClickToPay|null $value */ public function setClickToPay(?ClickToPay $value): void { $this->clickToPay = $value; } /** * @return string|null */ public function getCobrandSelectionIndicator(): ?string { return $this->cobrandSelectionIndicator; } /** * @param string|null $value */ public function setCobrandSelectionIndicator(?string $value): void { $this->cobrandSelectionIndicator = $value; } /** * @return CurrencyConversion|null */ public function getCurrencyConversion(): ?CurrencyConversion { return $this->currencyConversion; } /** * @param CurrencyConversion|null $value */ public function setCurrencyConversion(?CurrencyConversion $value): void { $this->currencyConversion = $value; } /** * @return ExternalTokenLinked|null */ public function getExternalTokenLinked(): ?ExternalTokenLinked { return $this->externalTokenLinked; } /** * @param ExternalTokenLinked|null $value */ public function setExternalTokenLinked(?ExternalTokenLinked $value): void { $this->externalTokenLinked = $value; } /** * @return CardFraudResults|null */ public function getFraudResults(): ?CardFraudResults { return $this->fraudResults; } /** * @param CardFraudResults|null $value */ public function setFraudResults(?CardFraudResults $value): void { $this->fraudResults = $value; } /** * @return string|null */ public function getInitialSchemeTransactionId(): ?string { return $this->initialSchemeTransactionId; } /** * @param string|null $value */ public function setInitialSchemeTransactionId(?string $value): void { $this->initialSchemeTransactionId = $value; } /** * @return NetworkTokenEssentials|null */ public function getNetworkTokenData(): ?NetworkTokenEssentials { return $this->networkTokenData; } /** * @param NetworkTokenEssentials|null $value */ public function setNetworkTokenData(?NetworkTokenEssentials $value): void { $this->networkTokenData = $value; } /** * @return string|null */ public function getPaymentAccountReference(): ?string { return $this->paymentAccountReference; } /** * @param string|null $value */ public function setPaymentAccountReference(?string $value): void { $this->paymentAccountReference = $value; } /** * @return string|null */ public function getPaymentOption(): ?string { return $this->paymentOption; } /** * @param string|null $value */ public function setPaymentOption(?string $value): void { $this->paymentOption = $value; } /** * @return PaymentProduct3208SpecificOutput|null */ public function getPaymentProduct3208SpecificOutput(): ?PaymentProduct3208SpecificOutput { return $this->paymentProduct3208SpecificOutput; } /** * @param PaymentProduct3208SpecificOutput|null $value */ public function setPaymentProduct3208SpecificOutput(?PaymentProduct3208SpecificOutput $value): void { $this->paymentProduct3208SpecificOutput = $value; } /** * @return PaymentProduct3209SpecificOutput|null */ public function getPaymentProduct3209SpecificOutput(): ?PaymentProduct3209SpecificOutput { return $this->paymentProduct3209SpecificOutput; } /** * @param PaymentProduct3209SpecificOutput|null $value */ public function setPaymentProduct3209SpecificOutput(?PaymentProduct3209SpecificOutput $value): void { $this->paymentProduct3209SpecificOutput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return ReattemptInstructions|null */ public function getReattemptInstructions(): ?ReattemptInstructions { return $this->reattemptInstructions; } /** * @param ReattemptInstructions|null $value */ public function setReattemptInstructions(?ReattemptInstructions $value): void { $this->reattemptInstructions = $value; } /** * @return string|null */ public function getSchemeReferenceData(): ?string { return $this->schemeReferenceData; } /** * @param string|null $value */ public function setSchemeReferenceData(?string $value): void { $this->schemeReferenceData = $value; } /** * @return ThreeDSecureResults|null */ public function getThreeDSecureResults(): ?ThreeDSecureResults { return $this->threeDSecureResults; } /** * @param ThreeDSecureResults|null $value */ public function setThreeDSecureResults(?ThreeDSecureResults $value): void { $this->threeDSecureResults = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acquirerInformation)) { $object->acquirerInformation = $this->acquirerInformation->toObject(); } if (!is_null($this->authenticatedAmount)) { $object->authenticatedAmount = $this->authenticatedAmount; } if (!is_null($this->authorisationCode)) { $object->authorisationCode = $this->authorisationCode; } if (!is_null($this->card)) { $object->card = $this->card->toObject(); } if (!is_null($this->clickToPay)) { $object->clickToPay = $this->clickToPay->toObject(); } if (!is_null($this->cobrandSelectionIndicator)) { $object->cobrandSelectionIndicator = $this->cobrandSelectionIndicator; } if (!is_null($this->currencyConversion)) { $object->currencyConversion = $this->currencyConversion->toObject(); } if (!is_null($this->externalTokenLinked)) { $object->externalTokenLinked = $this->externalTokenLinked->toObject(); } if (!is_null($this->fraudResults)) { $object->fraudResults = $this->fraudResults->toObject(); } if (!is_null($this->initialSchemeTransactionId)) { $object->initialSchemeTransactionId = $this->initialSchemeTransactionId; } if (!is_null($this->networkTokenData)) { $object->networkTokenData = $this->networkTokenData->toObject(); } if (!is_null($this->paymentAccountReference)) { $object->paymentAccountReference = $this->paymentAccountReference; } if (!is_null($this->paymentOption)) { $object->paymentOption = $this->paymentOption; } if (!is_null($this->paymentProduct3208SpecificOutput)) { $object->paymentProduct3208SpecificOutput = $this->paymentProduct3208SpecificOutput->toObject(); } if (!is_null($this->paymentProduct3209SpecificOutput)) { $object->paymentProduct3209SpecificOutput = $this->paymentProduct3209SpecificOutput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->reattemptInstructions)) { $object->reattemptInstructions = $this->reattemptInstructions->toObject(); } if (!is_null($this->schemeReferenceData)) { $object->schemeReferenceData = $this->schemeReferenceData; } if (!is_null($this->threeDSecureResults)) { $object->threeDSecureResults = $this->threeDSecureResults->toObject(); } if (!is_null($this->token)) { $object->token = $this->token; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardPaymentMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'acquirerInformation')) { if (!is_object($object->acquirerInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->acquirerInformation, true) . '\' is not an object'); } $value = new AcquirerInformation(); $this->acquirerInformation = $value->fromObject($object->acquirerInformation); } if (property_exists($object, 'authenticatedAmount')) { $this->authenticatedAmount = $object->authenticatedAmount; } if (property_exists($object, 'authorisationCode')) { $this->authorisationCode = $object->authorisationCode; } if (property_exists($object, 'card')) { if (!is_object($object->card)) { throw new UnexpectedValueException('value \'' . print_r($object->card, true) . '\' is not an object'); } $value = new CardEssentials(); $this->card = $value->fromObject($object->card); } if (property_exists($object, 'clickToPay')) { if (!is_object($object->clickToPay)) { throw new UnexpectedValueException('value \'' . print_r($object->clickToPay, true) . '\' is not an object'); } $value = new ClickToPay(); $this->clickToPay = $value->fromObject($object->clickToPay); } if (property_exists($object, 'cobrandSelectionIndicator')) { $this->cobrandSelectionIndicator = $object->cobrandSelectionIndicator; } if (property_exists($object, 'currencyConversion')) { if (!is_object($object->currencyConversion)) { throw new UnexpectedValueException('value \'' . print_r($object->currencyConversion, true) . '\' is not an object'); } $value = new CurrencyConversion(); $this->currencyConversion = $value->fromObject($object->currencyConversion); } if (property_exists($object, 'externalTokenLinked')) { if (!is_object($object->externalTokenLinked)) { throw new UnexpectedValueException('value \'' . print_r($object->externalTokenLinked, true) . '\' is not an object'); } $value = new ExternalTokenLinked(); $this->externalTokenLinked = $value->fromObject($object->externalTokenLinked); } if (property_exists($object, 'fraudResults')) { if (!is_object($object->fraudResults)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudResults, true) . '\' is not an object'); } $value = new CardFraudResults(); $this->fraudResults = $value->fromObject($object->fraudResults); } if (property_exists($object, 'initialSchemeTransactionId')) { $this->initialSchemeTransactionId = $object->initialSchemeTransactionId; } if (property_exists($object, 'networkTokenData')) { if (!is_object($object->networkTokenData)) { throw new UnexpectedValueException('value \'' . print_r($object->networkTokenData, true) . '\' is not an object'); } $value = new NetworkTokenEssentials(); $this->networkTokenData = $value->fromObject($object->networkTokenData); } if (property_exists($object, 'paymentAccountReference')) { $this->paymentAccountReference = $object->paymentAccountReference; } if (property_exists($object, 'paymentOption')) { $this->paymentOption = $object->paymentOption; } if (property_exists($object, 'paymentProduct3208SpecificOutput')) { if (!is_object($object->paymentProduct3208SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3208SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct3208SpecificOutput(); $this->paymentProduct3208SpecificOutput = $value->fromObject($object->paymentProduct3208SpecificOutput); } if (property_exists($object, 'paymentProduct3209SpecificOutput')) { if (!is_object($object->paymentProduct3209SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3209SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct3209SpecificOutput(); $this->paymentProduct3209SpecificOutput = $value->fromObject($object->paymentProduct3209SpecificOutput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'reattemptInstructions')) { if (!is_object($object->reattemptInstructions)) { throw new UnexpectedValueException('value \'' . print_r($object->reattemptInstructions, true) . '\' is not an object'); } $value = new ReattemptInstructions(); $this->reattemptInstructions = $value->fromObject($object->reattemptInstructions); } if (property_exists($object, 'schemeReferenceData')) { $this->schemeReferenceData = $object->schemeReferenceData; } if (property_exists($object, 'threeDSecureResults')) { if (!is_object($object->threeDSecureResults)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecureResults, true) . '\' is not an object'); } $value = new ThreeDSecureResults(); $this->threeDSecureResults = $value->fromObject($object->threeDSecureResults); } if (property_exists($object, 'token')) { $this->token = $object->token; } return $this; } } Domain/SepaDirectDebitPaymentMethodSpecificOutput.php 0000644 00000006751 15224675306 0017070 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SepaDirectDebitPaymentMethodSpecificOutput extends DataObject { /** * @var FraudResults|null */ public ?FraudResults $fraudResults = null; /** * @var PaymentProduct771SpecificOutput|null */ public ?PaymentProduct771SpecificOutput $paymentProduct771SpecificOutput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return FraudResults|null */ public function getFraudResults(): ?FraudResults { return $this->fraudResults; } /** * @param FraudResults|null $value */ public function setFraudResults(?FraudResults $value): void { $this->fraudResults = $value; } /** * @return PaymentProduct771SpecificOutput|null */ public function getPaymentProduct771SpecificOutput(): ?PaymentProduct771SpecificOutput { return $this->paymentProduct771SpecificOutput; } /** * @param PaymentProduct771SpecificOutput|null $value */ public function setPaymentProduct771SpecificOutput(?PaymentProduct771SpecificOutput $value): void { $this->paymentProduct771SpecificOutput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->fraudResults)) { $object->fraudResults = $this->fraudResults->toObject(); } if (!is_null($this->paymentProduct771SpecificOutput)) { $object->paymentProduct771SpecificOutput = $this->paymentProduct771SpecificOutput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SepaDirectDebitPaymentMethodSpecificOutput { parent::fromObject($object); if (property_exists($object, 'fraudResults')) { if (!is_object($object->fraudResults)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudResults, true) . '\' is not an object'); } $value = new FraudResults(); $this->fraudResults = $value->fromObject($object->fraudResults); } if (property_exists($object, 'paymentProduct771SpecificOutput')) { if (!is_object($object->paymentProduct771SpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct771SpecificOutput, true) . '\' is not an object'); } $value = new PaymentProduct771SpecificOutput(); $this->paymentProduct771SpecificOutput = $value->fromObject($object->paymentProduct771SpecificOutput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/MobileThreeDSecureChallengeParameters.php 0000644 00000006572 15224675306 0016011 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MobileThreeDSecureChallengeParameters extends DataObject { /** * @var string|null */ public ?string $acsReferenceNumber = null; /** * @var string|null */ public ?string $acsSignedContent = null; /** * @var string|null */ public ?string $acsTransactionId = null; /** * @var string|null */ public ?string $threeDServerTransactionId = null; /** * @return string|null */ public function getAcsReferenceNumber(): ?string { return $this->acsReferenceNumber; } /** * @param string|null $value */ public function setAcsReferenceNumber(?string $value): void { $this->acsReferenceNumber = $value; } /** * @return string|null */ public function getAcsSignedContent(): ?string { return $this->acsSignedContent; } /** * @param string|null $value */ public function setAcsSignedContent(?string $value): void { $this->acsSignedContent = $value; } /** * @return string|null */ public function getAcsTransactionId(): ?string { return $this->acsTransactionId; } /** * @param string|null $value */ public function setAcsTransactionId(?string $value): void { $this->acsTransactionId = $value; } /** * @return string|null */ public function getThreeDServerTransactionId(): ?string { return $this->threeDServerTransactionId; } /** * @param string|null $value */ public function setThreeDServerTransactionId(?string $value): void { $this->threeDServerTransactionId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->acsReferenceNumber)) { $object->acsReferenceNumber = $this->acsReferenceNumber; } if (!is_null($this->acsSignedContent)) { $object->acsSignedContent = $this->acsSignedContent; } if (!is_null($this->acsTransactionId)) { $object->acsTransactionId = $this->acsTransactionId; } if (!is_null($this->threeDServerTransactionId)) { $object->threeDServerTransactionId = $this->threeDServerTransactionId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MobileThreeDSecureChallengeParameters { parent::fromObject($object); if (property_exists($object, 'acsReferenceNumber')) { $this->acsReferenceNumber = $object->acsReferenceNumber; } if (property_exists($object, 'acsSignedContent')) { $this->acsSignedContent = $object->acsSignedContent; } if (property_exists($object, 'acsTransactionId')) { $this->acsTransactionId = $object->acsTransactionId; } if (property_exists($object, 'threeDServerTransactionId')) { $this->threeDServerTransactionId = $object->threeDServerTransactionId; } return $this; } } Domain/CancelPaymentRequest.php 0000644 00000006265 15224675306 0012603 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CancelPaymentRequest extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var bool|null */ public ?bool $isFinal = null; /** * @var OperationPaymentReferences|null */ public ?OperationPaymentReferences $operationReferences = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return bool|null */ public function getIsFinal(): ?bool { return $this->isFinal; } /** * @param bool|null $value */ public function setIsFinal(?bool $value): void { $this->isFinal = $value; } /** * @return OperationPaymentReferences|null */ public function getOperationReferences(): ?OperationPaymentReferences { return $this->operationReferences; } /** * @param OperationPaymentReferences|null $value */ public function setOperationReferences(?OperationPaymentReferences $value): void { $this->operationReferences = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->isFinal)) { $object->isFinal = $this->isFinal; } if (!is_null($this->operationReferences)) { $object->operationReferences = $this->operationReferences->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CancelPaymentRequest { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'isFinal')) { $this->isFinal = $object->isFinal; } if (property_exists($object, 'operationReferences')) { if (!is_object($object->operationReferences)) { throw new UnexpectedValueException('value \'' . print_r($object->operationReferences, true) . '\' is not an object'); } $value = new OperationPaymentReferences(); $this->operationReferences = $value->fromObject($object->operationReferences); } return $this; } } Domain/PaymentProduct302SpecificData.php 0000644 00000003321 15224675306 0014140 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct302SpecificData extends DataObject { /** * @var string[]|null */ public ?array $networks = null; /** * @return string[]|null */ public function getNetworks(): ?array { return $this->networks; } /** * @param string[]|null $value */ public function setNetworks(?array $value): void { $this->networks = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->networks)) { $object->networks = []; foreach ($this->networks as $element) { if (!is_null($element)) { $object->networks[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct302SpecificData { parent::fromObject($object); if (property_exists($object, 'networks')) { if (!is_array($object->networks) && !is_object($object->networks)) { throw new UnexpectedValueException('value \'' . print_r($object->networks, true) . '\' is not an array or object'); } $this->networks = []; foreach ($object->networks as $element) { $this->networks[] = $element; } } return $this; } } Domain/TokenCardSpecificInput.php 0000644 00000002663 15224675306 0013045 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenCardSpecificInput extends DataObject { /** * @var TokenData|null */ public ?TokenData $data = null; /** * @return TokenData|null */ public function getData(): ?TokenData { return $this->data; } /** * @param TokenData|null $value */ public function setData(?TokenData $value): void { $this->data = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->data)) { $object->data = $this->data->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenCardSpecificInput { parent::fromObject($object); if (property_exists($object, 'data')) { if (!is_object($object->data)) { throw new UnexpectedValueException('value \'' . print_r($object->data, true) . '\' is not an object'); } $value = new TokenData(); $this->data = $value->fromObject($object->data); } return $this; } } Domain/CreditCardValidationRulesHostedTokenization.php 0000644 00000004242 15224675306 0017300 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreditCardValidationRulesHostedTokenization extends DataObject { /** * @var bool|null */ public ?bool $cvvMandatoryForExistingToken = null; /** * @var bool|null */ public ?bool $cvvMandatoryForNewToken = null; /** * @return bool|null */ public function getCvvMandatoryForExistingToken(): ?bool { return $this->cvvMandatoryForExistingToken; } /** * @param bool|null $value */ public function setCvvMandatoryForExistingToken(?bool $value): void { $this->cvvMandatoryForExistingToken = $value; } /** * @return bool|null */ public function getCvvMandatoryForNewToken(): ?bool { return $this->cvvMandatoryForNewToken; } /** * @param bool|null $value */ public function setCvvMandatoryForNewToken(?bool $value): void { $this->cvvMandatoryForNewToken = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cvvMandatoryForExistingToken)) { $object->cvvMandatoryForExistingToken = $this->cvvMandatoryForExistingToken; } if (!is_null($this->cvvMandatoryForNewToken)) { $object->cvvMandatoryForNewToken = $this->cvvMandatoryForNewToken; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreditCardValidationRulesHostedTokenization { parent::fromObject($object); if (property_exists($object, 'cvvMandatoryForExistingToken')) { $this->cvvMandatoryForExistingToken = $object->cvvMandatoryForExistingToken; } if (property_exists($object, 'cvvMandatoryForNewToken')) { $this->cvvMandatoryForNewToken = $object->cvvMandatoryForNewToken; } return $this; } } Domain/PaymentCreationOutput.php 0000644 00000006120 15224675306 0013020 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentCreationOutput extends DataObject { /** * @var string|null */ public ?string $externalReference = null; /** * @var bool|null */ public ?bool $isNewToken = null; /** * @var string|null */ public ?string $token = null; /** * @var bool|null */ public ?bool $tokenizationSucceeded = null; /** * @return string|null */ public function getExternalReference(): ?string { return $this->externalReference; } /** * @param string|null $value */ public function setExternalReference(?string $value): void { $this->externalReference = $value; } /** * @return bool|null */ public function getIsNewToken(): ?bool { return $this->isNewToken; } /** * @param bool|null $value */ public function setIsNewToken(?bool $value): void { $this->isNewToken = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return bool|null */ public function getTokenizationSucceeded(): ?bool { return $this->tokenizationSucceeded; } /** * @param bool|null $value */ public function setTokenizationSucceeded(?bool $value): void { $this->tokenizationSucceeded = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->externalReference)) { $object->externalReference = $this->externalReference; } if (!is_null($this->isNewToken)) { $object->isNewToken = $this->isNewToken; } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->tokenizationSucceeded)) { $object->tokenizationSucceeded = $this->tokenizationSucceeded; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentCreationOutput { parent::fromObject($object); if (property_exists($object, 'externalReference')) { $this->externalReference = $object->externalReference; } if (property_exists($object, 'isNewToken')) { $this->isNewToken = $object->isNewToken; } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'tokenizationSucceeded')) { $this->tokenizationSucceeded = $object->tokenizationSucceeded; } return $this; } } Domain/ShippingMethod.php 0000644 00000005335 15224675306 0011426 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ShippingMethod extends DataObject { /** * @var string|null */ public ?string $details = null; /** * @var string|null */ public ?string $name = null; /** * @var int|null */ public ?int $speed = null; /** * @var string|null */ public ?string $type = null; /** * @return string|null */ public function getDetails(): ?string { return $this->details; } /** * @param string|null $value */ public function setDetails(?string $value): void { $this->details = $value; } /** * @return string|null */ public function getName(): ?string { return $this->name; } /** * @param string|null $value */ public function setName(?string $value): void { $this->name = $value; } /** * @return int|null */ public function getSpeed(): ?int { return $this->speed; } /** * @param int|null $value */ public function setSpeed(?int $value): void { $this->speed = $value; } /** * @return string|null */ public function getType(): ?string { return $this->type; } /** * @param string|null $value */ public function setType(?string $value): void { $this->type = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->details)) { $object->details = $this->details; } if (!is_null($this->name)) { $object->name = $this->name; } if (!is_null($this->speed)) { $object->speed = $this->speed; } if (!is_null($this->type)) { $object->type = $this->type; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ShippingMethod { parent::fromObject($object); if (property_exists($object, 'details')) { $this->details = $object->details; } if (property_exists($object, 'name')) { $this->name = $object->name; } if (property_exists($object, 'speed')) { $this->speed = $object->speed; } if (property_exists($object, 'type')) { $this->type = $object->type; } return $this; } } Domain/SurchargeSpecificOutput.php 0000644 00000006027 15224675306 0013315 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SurchargeSpecificOutput extends DataObject { /** * @var string|null */ public ?string $mode = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $surchargeAmount = null; /** * @var SurchargeRate|null */ public ?SurchargeRate $surchargeRate = null; /** * @return string|null */ public function getMode(): ?string { return $this->mode; } /** * @param string|null $value */ public function setMode(?string $value): void { $this->mode = $value; } /** * @return AmountOfMoney|null */ public function getSurchargeAmount(): ?AmountOfMoney { return $this->surchargeAmount; } /** * @param AmountOfMoney|null $value */ public function setSurchargeAmount(?AmountOfMoney $value): void { $this->surchargeAmount = $value; } /** * @return SurchargeRate|null */ public function getSurchargeRate(): ?SurchargeRate { return $this->surchargeRate; } /** * @param SurchargeRate|null $value */ public function setSurchargeRate(?SurchargeRate $value): void { $this->surchargeRate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->mode)) { $object->mode = $this->mode; } if (!is_null($this->surchargeAmount)) { $object->surchargeAmount = $this->surchargeAmount->toObject(); } if (!is_null($this->surchargeRate)) { $object->surchargeRate = $this->surchargeRate->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SurchargeSpecificOutput { parent::fromObject($object); if (property_exists($object, 'mode')) { $this->mode = $object->mode; } if (property_exists($object, 'surchargeAmount')) { if (!is_object($object->surchargeAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->surchargeAmount = $value->fromObject($object->surchargeAmount); } if (property_exists($object, 'surchargeRate')) { if (!is_object($object->surchargeRate)) { throw new UnexpectedValueException('value \'' . print_r($object->surchargeRate, true) . '\' is not an object'); } $value = new SurchargeRate(); $this->surchargeRate = $value->fromObject($object->surchargeRate); } return $this; } } Domain/GetPaymentProductsResponse.php 0000644 00000003642 15224675306 0014023 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetPaymentProductsResponse extends DataObject { /** * @var PaymentProduct[]|null */ public ?array $paymentProducts = null; /** * @return PaymentProduct[]|null */ public function getPaymentProducts(): ?array { return $this->paymentProducts; } /** * @param PaymentProduct[]|null $value */ public function setPaymentProducts(?array $value): void { $this->paymentProducts = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentProducts)) { $object->paymentProducts = []; foreach ($this->paymentProducts as $element) { if (!is_null($element)) { $object->paymentProducts[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetPaymentProductsResponse { parent::fromObject($object); if (property_exists($object, 'paymentProducts')) { if (!is_array($object->paymentProducts) && !is_object($object->paymentProducts)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProducts, true) . '\' is not an array or object'); } $this->paymentProducts = []; foreach ($object->paymentProducts as $element) { $value = new PaymentProduct(); $this->paymentProducts[] = $value->fromObject($element); } } return $this; } } Domain/RateDetails.php 0000644 00000007250 15224675306 0010703 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RateDetails extends DataObject { /** * @var float|null */ public ?float $exchangeRate = null; /** * @var float|null */ public ?float $invertedExchangeRate = null; /** * @var float|null */ public ?float $markUpRate = null; /** * @var string|null */ public ?string $quotationDateTime = null; /** * @var string|null */ public ?string $source = null; /** * @return float|null */ public function getExchangeRate(): ?float { return $this->exchangeRate; } /** * @param float|null $value */ public function setExchangeRate(?float $value): void { $this->exchangeRate = $value; } /** * @return float|null */ public function getInvertedExchangeRate(): ?float { return $this->invertedExchangeRate; } /** * @param float|null $value */ public function setInvertedExchangeRate(?float $value): void { $this->invertedExchangeRate = $value; } /** * @return float|null */ public function getMarkUpRate(): ?float { return $this->markUpRate; } /** * @param float|null $value */ public function setMarkUpRate(?float $value): void { $this->markUpRate = $value; } /** * @return string|null */ public function getQuotationDateTime(): ?string { return $this->quotationDateTime; } /** * @param string|null $value */ public function setQuotationDateTime(?string $value): void { $this->quotationDateTime = $value; } /** * @return string|null */ public function getSource(): ?string { return $this->source; } /** * @param string|null $value */ public function setSource(?string $value): void { $this->source = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->exchangeRate)) { $object->exchangeRate = $this->exchangeRate; } if (!is_null($this->invertedExchangeRate)) { $object->invertedExchangeRate = $this->invertedExchangeRate; } if (!is_null($this->markUpRate)) { $object->markUpRate = $this->markUpRate; } if (!is_null($this->quotationDateTime)) { $object->quotationDateTime = $this->quotationDateTime; } if (!is_null($this->source)) { $object->source = $this->source; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RateDetails { parent::fromObject($object); if (property_exists($object, 'exchangeRate')) { $this->exchangeRate = $object->exchangeRate; } if (property_exists($object, 'invertedExchangeRate')) { $this->invertedExchangeRate = $object->invertedExchangeRate; } if (property_exists($object, 'markUpRate')) { $this->markUpRate = $object->markUpRate; } if (property_exists($object, 'quotationDateTime')) { $this->quotationDateTime = $object->quotationDateTime; } if (property_exists($object, 'source')) { $this->source = $object->source; } return $this; } } Domain/RefundPaymentProduct840CustomerAccount.php 0000644 00000005174 15224675306 0016122 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RefundPaymentProduct840CustomerAccount extends DataObject { /** * @var string|null */ public ?string $customerAccountStatus = null; /** * @var string|null */ public ?string $customerAddressStatus = null; /** * @var string|null */ public ?string $payerId = null; /** * @return string|null */ public function getCustomerAccountStatus(): ?string { return $this->customerAccountStatus; } /** * @param string|null $value */ public function setCustomerAccountStatus(?string $value): void { $this->customerAccountStatus = $value; } /** * @return string|null */ public function getCustomerAddressStatus(): ?string { return $this->customerAddressStatus; } /** * @param string|null $value */ public function setCustomerAddressStatus(?string $value): void { $this->customerAddressStatus = $value; } /** * @return string|null */ public function getPayerId(): ?string { return $this->payerId; } /** * @param string|null $value */ public function setPayerId(?string $value): void { $this->payerId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->customerAccountStatus)) { $object->customerAccountStatus = $this->customerAccountStatus; } if (!is_null($this->customerAddressStatus)) { $object->customerAddressStatus = $this->customerAddressStatus; } if (!is_null($this->payerId)) { $object->payerId = $this->payerId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RefundPaymentProduct840CustomerAccount { parent::fromObject($object); if (property_exists($object, 'customerAccountStatus')) { $this->customerAccountStatus = $object->customerAccountStatus; } if (property_exists($object, 'customerAddressStatus')) { $this->customerAddressStatus = $object->customerAddressStatus; } if (property_exists($object, 'payerId')) { $this->payerId = $object->payerId; } return $this; } } Domain/PaymentProduct350.php 0000644 00000003665 15224675306 0011716 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct350 extends DataObject { /** * @var string|null */ public ?string $appSwitchLink = null; /** * @var string|null */ public ?string $paymentRequestToken = null; /** * @return string|null */ public function getAppSwitchLink(): ?string { return $this->appSwitchLink; } /** * @param string|null $value */ public function setAppSwitchLink(?string $value): void { $this->appSwitchLink = $value; } /** * @return string|null */ public function getPaymentRequestToken(): ?string { return $this->paymentRequestToken; } /** * @param string|null $value */ public function setPaymentRequestToken(?string $value): void { $this->paymentRequestToken = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->appSwitchLink)) { $object->appSwitchLink = $this->appSwitchLink; } if (!is_null($this->paymentRequestToken)) { $object->paymentRequestToken = $this->paymentRequestToken; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct350 { parent::fromObject($object); if (property_exists($object, 'appSwitchLink')) { $this->appSwitchLink = $object->appSwitchLink; } if (property_exists($object, 'paymentRequestToken')) { $this->paymentRequestToken = $object->paymentRequestToken; } return $this; } } Domain/TokenEWallet.php 0000644 00000004651 15224675306 0011042 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenEWallet extends DataObject { /** * @var string|null * @deprecated This field is not used by any payment product An alias for the token. This can be used to visually represent the token. */ public ?string $alias = null; /** * @var CustomerToken|null */ public ?CustomerToken $customer = null; /** * @return string|null * @deprecated This field is not used by any payment product An alias for the token. This can be used to visually represent the token. */ public function getAlias(): ?string { return $this->alias; } /** * @param string|null $value * @deprecated This field is not used by any payment product An alias for the token. This can be used to visually represent the token. */ public function setAlias(?string $value): void { $this->alias = $value; } /** * @return CustomerToken|null */ public function getCustomer(): ?CustomerToken { return $this->customer; } /** * @param CustomerToken|null $value */ public function setCustomer(?CustomerToken $value): void { $this->customer = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alias)) { $object->alias = $this->alias; } if (!is_null($this->customer)) { $object->customer = $this->customer->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenEWallet { parent::fromObject($object); if (property_exists($object, 'alias')) { $this->alias = $object->alias; } if (property_exists($object, 'customer')) { if (!is_object($object->customer)) { throw new UnexpectedValueException('value \'' . print_r($object->customer, true) . '\' is not an object'); } $value = new CustomerToken(); $this->customer = $value->fromObject($object->customer); } return $this; } } Domain/CreatePaymentLinkRequest.php 0000644 00000037532 15224675306 0013440 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use DateTime; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreatePaymentLinkRequest extends DataObject { /** * @var CardPaymentMethodSpecificInputBase|null */ public ?CardPaymentMethodSpecificInputBase $cardPaymentMethodSpecificInput = null; /** * @var string|null * @deprecated A note related to the created payment link. Use paymentLinkSpecificInput/description instead. */ public ?string $description = null; /** * @var DateTime|null * @deprecated The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead. */ public ?DateTime $expirationDate = null; /** * @var Feedbacks|null */ public ?Feedbacks $feedbacks = null; /** * @var FraudFields|null */ public ?FraudFields $fraudFields = null; /** * @var HostedCheckoutSpecificInput|null */ public ?HostedCheckoutSpecificInput $hostedCheckoutSpecificInput = null; /** * @var bool|null */ public ?bool $isReusableLink = null; /** * @var MobilePaymentMethodHostedCheckoutSpecificInput|null */ public ?MobilePaymentMethodHostedCheckoutSpecificInput $mobilePaymentMethodSpecificInput = null; /** * @var Order|null */ public ?Order $order = null; /** * @var PaymentLinkOrderInput|null */ public ?PaymentLinkOrderInput $paymentLinkOrder = null; /** * @var PaymentLinkSpecificInput|null */ public ?PaymentLinkSpecificInput $paymentLinkSpecificInput = null; /** * @var string|null * @deprecated The payment link recipient name. Use paymentLinkSpecificInput/recipientName instead. */ public ?string $recipientName = null; /** * @var RedirectPaymentMethodSpecificInput|null */ public ?RedirectPaymentMethodSpecificInput $redirectPaymentMethodSpecificInput = null; /** * @var SepaDirectDebitPaymentMethodSpecificInputBase|null */ public ?SepaDirectDebitPaymentMethodSpecificInputBase $sepaDirectDebitPaymentMethodSpecificInput = null; /** * @return CardPaymentMethodSpecificInputBase|null */ public function getCardPaymentMethodSpecificInput(): ?CardPaymentMethodSpecificInputBase { return $this->cardPaymentMethodSpecificInput; } /** * @param CardPaymentMethodSpecificInputBase|null $value */ public function setCardPaymentMethodSpecificInput(?CardPaymentMethodSpecificInputBase $value): void { $this->cardPaymentMethodSpecificInput = $value; } /** * @return string|null * @deprecated A note related to the created payment link. Use paymentLinkSpecificInput/description instead. */ public function getDescription(): ?string { return $this->description; } /** * @param string|null $value * @deprecated A note related to the created payment link. Use paymentLinkSpecificInput/description instead. */ public function setDescription(?string $value): void { $this->description = $value; } /** * @return DateTime|null * @deprecated The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead. */ public function getExpirationDate(): ?DateTime { return $this->expirationDate; } /** * @param DateTime|null $value * @deprecated The date after which the payment link will not be usable to complete the payment. The date sent cannot be more than 6 months in the future or a past date. It must also contain the UTC offset. Use paymentLinkSpecificInput/expirationDate instead. */ public function setExpirationDate(?DateTime $value): void { $this->expirationDate = $value; } /** * @return Feedbacks|null */ public function getFeedbacks(): ?Feedbacks { return $this->feedbacks; } /** * @param Feedbacks|null $value */ public function setFeedbacks(?Feedbacks $value): void { $this->feedbacks = $value; } /** * @return FraudFields|null */ public function getFraudFields(): ?FraudFields { return $this->fraudFields; } /** * @param FraudFields|null $value */ public function setFraudFields(?FraudFields $value): void { $this->fraudFields = $value; } /** * @return HostedCheckoutSpecificInput|null */ public function getHostedCheckoutSpecificInput(): ?HostedCheckoutSpecificInput { return $this->hostedCheckoutSpecificInput; } /** * @param HostedCheckoutSpecificInput|null $value */ public function setHostedCheckoutSpecificInput(?HostedCheckoutSpecificInput $value): void { $this->hostedCheckoutSpecificInput = $value; } /** * @return bool|null */ public function getIsReusableLink(): ?bool { return $this->isReusableLink; } /** * @param bool|null $value */ public function setIsReusableLink(?bool $value): void { $this->isReusableLink = $value; } /** * @return MobilePaymentMethodHostedCheckoutSpecificInput|null */ public function getMobilePaymentMethodSpecificInput(): ?MobilePaymentMethodHostedCheckoutSpecificInput { return $this->mobilePaymentMethodSpecificInput; } /** * @param MobilePaymentMethodHostedCheckoutSpecificInput|null $value */ public function setMobilePaymentMethodSpecificInput(?MobilePaymentMethodHostedCheckoutSpecificInput $value): void { $this->mobilePaymentMethodSpecificInput = $value; } /** * @return Order|null */ public function getOrder(): ?Order { return $this->order; } /** * @param Order|null $value */ public function setOrder(?Order $value): void { $this->order = $value; } /** * @return PaymentLinkOrderInput|null */ public function getPaymentLinkOrder(): ?PaymentLinkOrderInput { return $this->paymentLinkOrder; } /** * @param PaymentLinkOrderInput|null $value */ public function setPaymentLinkOrder(?PaymentLinkOrderInput $value): void { $this->paymentLinkOrder = $value; } /** * @return PaymentLinkSpecificInput|null */ public function getPaymentLinkSpecificInput(): ?PaymentLinkSpecificInput { return $this->paymentLinkSpecificInput; } /** * @param PaymentLinkSpecificInput|null $value */ public function setPaymentLinkSpecificInput(?PaymentLinkSpecificInput $value): void { $this->paymentLinkSpecificInput = $value; } /** * @return string|null * @deprecated The payment link recipient name. Use paymentLinkSpecificInput/recipientName instead. */ public function getRecipientName(): ?string { return $this->recipientName; } /** * @param string|null $value * @deprecated The payment link recipient name. Use paymentLinkSpecificInput/recipientName instead. */ public function setRecipientName(?string $value): void { $this->recipientName = $value; } /** * @return RedirectPaymentMethodSpecificInput|null */ public function getRedirectPaymentMethodSpecificInput(): ?RedirectPaymentMethodSpecificInput { return $this->redirectPaymentMethodSpecificInput; } /** * @param RedirectPaymentMethodSpecificInput|null $value */ public function setRedirectPaymentMethodSpecificInput(?RedirectPaymentMethodSpecificInput $value): void { $this->redirectPaymentMethodSpecificInput = $value; } /** * @return SepaDirectDebitPaymentMethodSpecificInputBase|null */ public function getSepaDirectDebitPaymentMethodSpecificInput(): ?SepaDirectDebitPaymentMethodSpecificInputBase { return $this->sepaDirectDebitPaymentMethodSpecificInput; } /** * @param SepaDirectDebitPaymentMethodSpecificInputBase|null $value */ public function setSepaDirectDebitPaymentMethodSpecificInput(?SepaDirectDebitPaymentMethodSpecificInputBase $value): void { $this->sepaDirectDebitPaymentMethodSpecificInput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardPaymentMethodSpecificInput)) { $object->cardPaymentMethodSpecificInput = $this->cardPaymentMethodSpecificInput->toObject(); } if (!is_null($this->description)) { $object->description = $this->description; } if (!is_null($this->expirationDate)) { $object->expirationDate = $this->expirationDate->format('Y-m-d\\TH:i:s.vP'); } if (!is_null($this->feedbacks)) { $object->feedbacks = $this->feedbacks->toObject(); } if (!is_null($this->fraudFields)) { $object->fraudFields = $this->fraudFields->toObject(); } if (!is_null($this->hostedCheckoutSpecificInput)) { $object->hostedCheckoutSpecificInput = $this->hostedCheckoutSpecificInput->toObject(); } if (!is_null($this->isReusableLink)) { $object->isReusableLink = $this->isReusableLink; } if (!is_null($this->mobilePaymentMethodSpecificInput)) { $object->mobilePaymentMethodSpecificInput = $this->mobilePaymentMethodSpecificInput->toObject(); } if (!is_null($this->order)) { $object->order = $this->order->toObject(); } if (!is_null($this->paymentLinkOrder)) { $object->paymentLinkOrder = $this->paymentLinkOrder->toObject(); } if (!is_null($this->paymentLinkSpecificInput)) { $object->paymentLinkSpecificInput = $this->paymentLinkSpecificInput->toObject(); } if (!is_null($this->recipientName)) { $object->recipientName = $this->recipientName; } if (!is_null($this->redirectPaymentMethodSpecificInput)) { $object->redirectPaymentMethodSpecificInput = $this->redirectPaymentMethodSpecificInput->toObject(); } if (!is_null($this->sepaDirectDebitPaymentMethodSpecificInput)) { $object->sepaDirectDebitPaymentMethodSpecificInput = $this->sepaDirectDebitPaymentMethodSpecificInput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreatePaymentLinkRequest { parent::fromObject($object); if (property_exists($object, 'cardPaymentMethodSpecificInput')) { if (!is_object($object->cardPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->cardPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new CardPaymentMethodSpecificInputBase(); $this->cardPaymentMethodSpecificInput = $value->fromObject($object->cardPaymentMethodSpecificInput); } if (property_exists($object, 'description')) { $this->description = $object->description; } if (property_exists($object, 'expirationDate')) { $this->expirationDate = new DateTime($object->expirationDate); } if (property_exists($object, 'feedbacks')) { if (!is_object($object->feedbacks)) { throw new UnexpectedValueException('value \'' . print_r($object->feedbacks, true) . '\' is not an object'); } $value = new Feedbacks(); $this->feedbacks = $value->fromObject($object->feedbacks); } if (property_exists($object, 'fraudFields')) { if (!is_object($object->fraudFields)) { throw new UnexpectedValueException('value \'' . print_r($object->fraudFields, true) . '\' is not an object'); } $value = new FraudFields(); $this->fraudFields = $value->fromObject($object->fraudFields); } if (property_exists($object, 'hostedCheckoutSpecificInput')) { if (!is_object($object->hostedCheckoutSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->hostedCheckoutSpecificInput, true) . '\' is not an object'); } $value = new HostedCheckoutSpecificInput(); $this->hostedCheckoutSpecificInput = $value->fromObject($object->hostedCheckoutSpecificInput); } if (property_exists($object, 'isReusableLink')) { $this->isReusableLink = $object->isReusableLink; } if (property_exists($object, 'mobilePaymentMethodSpecificInput')) { if (!is_object($object->mobilePaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->mobilePaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new MobilePaymentMethodHostedCheckoutSpecificInput(); $this->mobilePaymentMethodSpecificInput = $value->fromObject($object->mobilePaymentMethodSpecificInput); } if (property_exists($object, 'order')) { if (!is_object($object->order)) { throw new UnexpectedValueException('value \'' . print_r($object->order, true) . '\' is not an object'); } $value = new Order(); $this->order = $value->fromObject($object->order); } if (property_exists($object, 'paymentLinkOrder')) { if (!is_object($object->paymentLinkOrder)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentLinkOrder, true) . '\' is not an object'); } $value = new PaymentLinkOrderInput(); $this->paymentLinkOrder = $value->fromObject($object->paymentLinkOrder); } if (property_exists($object, 'paymentLinkSpecificInput')) { if (!is_object($object->paymentLinkSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentLinkSpecificInput, true) . '\' is not an object'); } $value = new PaymentLinkSpecificInput(); $this->paymentLinkSpecificInput = $value->fromObject($object->paymentLinkSpecificInput); } if (property_exists($object, 'recipientName')) { $this->recipientName = $object->recipientName; } if (property_exists($object, 'redirectPaymentMethodSpecificInput')) { if (!is_object($object->redirectPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentMethodSpecificInput(); $this->redirectPaymentMethodSpecificInput = $value->fromObject($object->redirectPaymentMethodSpecificInput); } if (property_exists($object, 'sepaDirectDebitPaymentMethodSpecificInput')) { if (!is_object($object->sepaDirectDebitPaymentMethodSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->sepaDirectDebitPaymentMethodSpecificInput, true) . '\' is not an object'); } $value = new SepaDirectDebitPaymentMethodSpecificInputBase(); $this->sepaDirectDebitPaymentMethodSpecificInput = $value->fromObject($object->sepaDirectDebitPaymentMethodSpecificInput); } return $this; } } Domain/Feedbacks.php 0000644 00000005233 15224675306 0010350 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Feedbacks extends DataObject { /** * @var string|null * @deprecated The URL where the webhook will be dispatched for all status change events related to this payment. */ public ?string $webhookUrl = null; /** * @var string[]|null */ public ?array $webhooksUrls = null; /** * @return string|null * @deprecated The URL where the webhook will be dispatched for all status change events related to this payment. */ public function getWebhookUrl(): ?string { return $this->webhookUrl; } /** * @param string|null $value * @deprecated The URL where the webhook will be dispatched for all status change events related to this payment. */ public function setWebhookUrl(?string $value): void { $this->webhookUrl = $value; } /** * @return string[]|null */ public function getWebhooksUrls(): ?array { return $this->webhooksUrls; } /** * @param string[]|null $value */ public function setWebhooksUrls(?array $value): void { $this->webhooksUrls = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->webhookUrl)) { $object->webhookUrl = $this->webhookUrl; } if (!is_null($this->webhooksUrls)) { $object->webhooksUrls = []; foreach ($this->webhooksUrls as $element) { if (!is_null($element)) { $object->webhooksUrls[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Feedbacks { parent::fromObject($object); if (property_exists($object, 'webhookUrl')) { $this->webhookUrl = $object->webhookUrl; } if (property_exists($object, 'webhooksUrls')) { if (!is_array($object->webhooksUrls) && !is_object($object->webhooksUrls)) { throw new UnexpectedValueException('value \'' . print_r($object->webhooksUrls, true) . '\' is not an array or object'); } $this->webhooksUrls = []; foreach ($object->webhooksUrls as $element) { $this->webhooksUrls[] = $element; } } return $this; } } Domain/DccProposal.php 0000644 00000011003 15224675306 0010702 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class DccProposal extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $baseAmount = null; /** * @var string|null */ public ?string $disclaimerDisplay = null; /** * @var string|null */ public ?string $disclaimerReceipt = null; /** * @var RateDetails|null */ public ?RateDetails $rate = null; /** * @var AmountOfMoney|null */ public ?AmountOfMoney $targetAmount = null; /** * @return AmountOfMoney|null */ public function getBaseAmount(): ?AmountOfMoney { return $this->baseAmount; } /** * @param AmountOfMoney|null $value */ public function setBaseAmount(?AmountOfMoney $value): void { $this->baseAmount = $value; } /** * @return string|null */ public function getDisclaimerDisplay(): ?string { return $this->disclaimerDisplay; } /** * @param string|null $value */ public function setDisclaimerDisplay(?string $value): void { $this->disclaimerDisplay = $value; } /** * @return string|null */ public function getDisclaimerReceipt(): ?string { return $this->disclaimerReceipt; } /** * @param string|null $value */ public function setDisclaimerReceipt(?string $value): void { $this->disclaimerReceipt = $value; } /** * @return RateDetails|null */ public function getRate(): ?RateDetails { return $this->rate; } /** * @param RateDetails|null $value */ public function setRate(?RateDetails $value): void { $this->rate = $value; } /** * @return AmountOfMoney|null */ public function getTargetAmount(): ?AmountOfMoney { return $this->targetAmount; } /** * @param AmountOfMoney|null $value */ public function setTargetAmount(?AmountOfMoney $value): void { $this->targetAmount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->baseAmount)) { $object->baseAmount = $this->baseAmount->toObject(); } if (!is_null($this->disclaimerDisplay)) { $object->disclaimerDisplay = $this->disclaimerDisplay; } if (!is_null($this->disclaimerReceipt)) { $object->disclaimerReceipt = $this->disclaimerReceipt; } if (!is_null($this->rate)) { $object->rate = $this->rate->toObject(); } if (!is_null($this->targetAmount)) { $object->targetAmount = $this->targetAmount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): DccProposal { parent::fromObject($object); if (property_exists($object, 'baseAmount')) { if (!is_object($object->baseAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->baseAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->baseAmount = $value->fromObject($object->baseAmount); } if (property_exists($object, 'disclaimerDisplay')) { $this->disclaimerDisplay = $object->disclaimerDisplay; } if (property_exists($object, 'disclaimerReceipt')) { $this->disclaimerReceipt = $object->disclaimerReceipt; } if (property_exists($object, 'rate')) { if (!is_object($object->rate)) { throw new UnexpectedValueException('value \'' . print_r($object->rate, true) . '\' is not an object'); } $value = new RateDetails(); $this->rate = $value->fromObject($object->rate); } if (property_exists($object, 'targetAmount')) { if (!is_object($object->targetAmount)) { throw new UnexpectedValueException('value \'' . print_r($object->targetAmount, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->targetAmount = $value->fromObject($object->targetAmount); } return $this; } } Domain/ShowInstructionsData.php 0000644 00000002321 15224675306 0012633 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ShowInstructionsData extends DataObject { /** * @var string|null */ public ?string $showData = null; /** * @return string|null */ public function getShowData(): ?string { return $this->showData; } /** * @param string|null $value */ public function setShowData(?string $value): void { $this->showData = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->showData)) { $object->showData = $this->showData; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ShowInstructionsData { parent::fromObject($object); if (property_exists($object, 'showData')) { $this->showData = $object->showData; } return $this; } } Domain/NetworkTokenData.php 0000644 00000010415 15224675306 0011723 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class NetworkTokenData extends DataObject { /** * @var string|null */ public ?string $cardholderName = null; /** * @var string|null */ public ?string $cryptogram = null; /** * @var int|null */ public ?int $eci = null; /** * @var string|null */ public ?string $networkToken = null; /** * @var string|null */ public ?string $schemeTokenRequestorId = null; /** * @var string|null */ public ?string $tokenExpiryDate = null; /** * @return string|null */ public function getCardholderName(): ?string { return $this->cardholderName; } /** * @param string|null $value */ public function setCardholderName(?string $value): void { $this->cardholderName = $value; } /** * @return string|null */ public function getCryptogram(): ?string { return $this->cryptogram; } /** * @param string|null $value */ public function setCryptogram(?string $value): void { $this->cryptogram = $value; } /** * @return int|null */ public function getEci(): ?int { return $this->eci; } /** * @param int|null $value */ public function setEci(?int $value): void { $this->eci = $value; } /** * @return string|null */ public function getNetworkToken(): ?string { return $this->networkToken; } /** * @param string|null $value */ public function setNetworkToken(?string $value): void { $this->networkToken = $value; } /** * @return string|null */ public function getSchemeTokenRequestorId(): ?string { return $this->schemeTokenRequestorId; } /** * @param string|null $value */ public function setSchemeTokenRequestorId(?string $value): void { $this->schemeTokenRequestorId = $value; } /** * @return string|null */ public function getTokenExpiryDate(): ?string { return $this->tokenExpiryDate; } /** * @param string|null $value */ public function setTokenExpiryDate(?string $value): void { $this->tokenExpiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardholderName)) { $object->cardholderName = $this->cardholderName; } if (!is_null($this->cryptogram)) { $object->cryptogram = $this->cryptogram; } if (!is_null($this->eci)) { $object->eci = $this->eci; } if (!is_null($this->networkToken)) { $object->networkToken = $this->networkToken; } if (!is_null($this->schemeTokenRequestorId)) { $object->schemeTokenRequestorId = $this->schemeTokenRequestorId; } if (!is_null($this->tokenExpiryDate)) { $object->tokenExpiryDate = $this->tokenExpiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): NetworkTokenData { parent::fromObject($object); if (property_exists($object, 'cardholderName')) { $this->cardholderName = $object->cardholderName; } if (property_exists($object, 'cryptogram')) { $this->cryptogram = $object->cryptogram; } if (property_exists($object, 'eci')) { $this->eci = $object->eci; } if (property_exists($object, 'networkToken')) { $this->networkToken = $object->networkToken; } if (property_exists($object, 'schemeTokenRequestorId')) { $this->schemeTokenRequestorId = $object->schemeTokenRequestorId; } if (property_exists($object, 'tokenExpiryDate')) { $this->tokenExpiryDate = $object->tokenExpiryDate; } return $this; } } Domain/PersonalInformationToken.php 0000644 00000002757 15224675306 0013503 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PersonalInformationToken extends DataObject { /** * @var PersonalNameToken|null */ public ?PersonalNameToken $name = null; /** * @return PersonalNameToken|null */ public function getName(): ?PersonalNameToken { return $this->name; } /** * @param PersonalNameToken|null $value */ public function setName(?PersonalNameToken $value): void { $this->name = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->name)) { $object->name = $this->name->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PersonalInformationToken { parent::fromObject($object); if (property_exists($object, 'name')) { if (!is_object($object->name)) { throw new UnexpectedValueException('value \'' . print_r($object->name, true) . '\' is not an object'); } $value = new PersonalNameToken(); $this->name = $value->fromObject($object->name); } return $this; } } Domain/PaymentProduct840CustomerAccount.php 0000644 00000012737 15224675306 0014761 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProduct840CustomerAccount extends DataObject { /** * @var string|null */ public ?string $accountId = null; /** * @var string|null */ public ?string $companyName = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $customerAccountStatus = null; /** * @var string|null */ public ?string $customerAddressStatus = null; /** * @var string|null */ public ?string $firstName = null; /** * @var string|null */ public ?string $payerId = null; /** * @var string|null */ public ?string $surname = null; /** * @return string|null */ public function getAccountId(): ?string { return $this->accountId; } /** * @param string|null $value */ public function setAccountId(?string $value): void { $this->accountId = $value; } /** * @return string|null */ public function getCompanyName(): ?string { return $this->companyName; } /** * @param string|null $value */ public function setCompanyName(?string $value): void { $this->companyName = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCustomerAccountStatus(): ?string { return $this->customerAccountStatus; } /** * @param string|null $value */ public function setCustomerAccountStatus(?string $value): void { $this->customerAccountStatus = $value; } /** * @return string|null */ public function getCustomerAddressStatus(): ?string { return $this->customerAddressStatus; } /** * @param string|null $value */ public function setCustomerAddressStatus(?string $value): void { $this->customerAddressStatus = $value; } /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @param string|null $value */ public function setFirstName(?string $value): void { $this->firstName = $value; } /** * @return string|null */ public function getPayerId(): ?string { return $this->payerId; } /** * @param string|null $value */ public function setPayerId(?string $value): void { $this->payerId = $value; } /** * @return string|null */ public function getSurname(): ?string { return $this->surname; } /** * @param string|null $value */ public function setSurname(?string $value): void { $this->surname = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->accountId)) { $object->accountId = $this->accountId; } if (!is_null($this->companyName)) { $object->companyName = $this->companyName; } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->customerAccountStatus)) { $object->customerAccountStatus = $this->customerAccountStatus; } if (!is_null($this->customerAddressStatus)) { $object->customerAddressStatus = $this->customerAddressStatus; } if (!is_null($this->firstName)) { $object->firstName = $this->firstName; } if (!is_null($this->payerId)) { $object->payerId = $this->payerId; } if (!is_null($this->surname)) { $object->surname = $this->surname; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProduct840CustomerAccount { parent::fromObject($object); if (property_exists($object, 'accountId')) { $this->accountId = $object->accountId; } if (property_exists($object, 'companyName')) { $this->companyName = $object->companyName; } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'customerAccountStatus')) { $this->customerAccountStatus = $object->customerAccountStatus; } if (property_exists($object, 'customerAddressStatus')) { $this->customerAddressStatus = $object->customerAddressStatus; } if (property_exists($object, 'firstName')) { $this->firstName = $object->firstName; } if (property_exists($object, 'payerId')) { $this->payerId = $object->payerId; } if (property_exists($object, 'surname')) { $this->surname = $object->surname; } return $this; } } Domain/SubsequentCardPaymentMethodSpecificInput.php 0000644 00000011310 15224675306 0016607 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SubsequentCardPaymentMethodSpecificInput extends DataObject { /** * @var string|null */ public ?string $authorizationMode = null; /** * @var int|null */ public ?int $paymentNumber = null; /** * @var string|null * @deprecated Deprecated */ public ?string $schemeReferenceData = null; /** * @var string|null */ public ?string $subsequentType = null; /** * @var string|null * @deprecated ID of the token to use to create the payment. */ public ?string $token = null; /** * @var string|null */ public ?string $transactionChannel = null; /** * @return string|null */ public function getAuthorizationMode(): ?string { return $this->authorizationMode; } /** * @param string|null $value */ public function setAuthorizationMode(?string $value): void { $this->authorizationMode = $value; } /** * @return int|null */ public function getPaymentNumber(): ?int { return $this->paymentNumber; } /** * @param int|null $value */ public function setPaymentNumber(?int $value): void { $this->paymentNumber = $value; } /** * @return string|null * @deprecated Deprecated */ public function getSchemeReferenceData(): ?string { return $this->schemeReferenceData; } /** * @param string|null $value * @deprecated Deprecated */ public function setSchemeReferenceData(?string $value): void { $this->schemeReferenceData = $value; } /** * @return string|null */ public function getSubsequentType(): ?string { return $this->subsequentType; } /** * @param string|null $value */ public function setSubsequentType(?string $value): void { $this->subsequentType = $value; } /** * @return string|null * @deprecated ID of the token to use to create the payment. */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value * @deprecated ID of the token to use to create the payment. */ public function setToken(?string $value): void { $this->token = $value; } /** * @return string|null */ public function getTransactionChannel(): ?string { return $this->transactionChannel; } /** * @param string|null $value */ public function setTransactionChannel(?string $value): void { $this->transactionChannel = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->authorizationMode)) { $object->authorizationMode = $this->authorizationMode; } if (!is_null($this->paymentNumber)) { $object->paymentNumber = $this->paymentNumber; } if (!is_null($this->schemeReferenceData)) { $object->schemeReferenceData = $this->schemeReferenceData; } if (!is_null($this->subsequentType)) { $object->subsequentType = $this->subsequentType; } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->transactionChannel)) { $object->transactionChannel = $this->transactionChannel; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SubsequentCardPaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'authorizationMode')) { $this->authorizationMode = $object->authorizationMode; } if (property_exists($object, 'paymentNumber')) { $this->paymentNumber = $object->paymentNumber; } if (property_exists($object, 'schemeReferenceData')) { $this->schemeReferenceData = $object->schemeReferenceData; } if (property_exists($object, 'subsequentType')) { $this->subsequentType = $object->subsequentType; } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'transactionChannel')) { $this->transactionChannel = $object->transactionChannel; } return $this; } } Domain/LineItem.php 0000644 00000010533 15224675306 0010206 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class LineItem extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var LineItemInvoiceData|null */ public ?LineItemInvoiceData $invoiceData = null; /** * @var OrderLineDetails|null */ public ?OrderLineDetails $orderLineDetails = null; /** * @var OtherDetails|null */ public ?OtherDetails $otherDetails = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return LineItemInvoiceData|null */ public function getInvoiceData(): ?LineItemInvoiceData { return $this->invoiceData; } /** * @param LineItemInvoiceData|null $value */ public function setInvoiceData(?LineItemInvoiceData $value): void { $this->invoiceData = $value; } /** * @return OrderLineDetails|null */ public function getOrderLineDetails(): ?OrderLineDetails { return $this->orderLineDetails; } /** * @param OrderLineDetails|null $value */ public function setOrderLineDetails(?OrderLineDetails $value): void { $this->orderLineDetails = $value; } /** * @return OtherDetails|null */ public function getOtherDetails(): ?OtherDetails { return $this->otherDetails; } /** * @param OtherDetails|null $value */ public function setOtherDetails(?OtherDetails $value): void { $this->otherDetails = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->invoiceData)) { $object->invoiceData = $this->invoiceData->toObject(); } if (!is_null($this->orderLineDetails)) { $object->orderLineDetails = $this->orderLineDetails->toObject(); } if (!is_null($this->otherDetails)) { $object->otherDetails = $this->otherDetails->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): LineItem { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'invoiceData')) { if (!is_object($object->invoiceData)) { throw new UnexpectedValueException('value \'' . print_r($object->invoiceData, true) . '\' is not an object'); } $value = new LineItemInvoiceData(); $this->invoiceData = $value->fromObject($object->invoiceData); } if (property_exists($object, 'orderLineDetails')) { if (!is_object($object->orderLineDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->orderLineDetails, true) . '\' is not an object'); } $value = new OrderLineDetails(); $this->orderLineDetails = $value->fromObject($object->orderLineDetails); } if (property_exists($object, 'otherDetails')) { if (!is_object($object->otherDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->otherDetails, true) . '\' is not an object'); } $value = new OtherDetails(); $this->otherDetails = $value->fromObject($object->otherDetails); } return $this; } } Domain/FraudResults.php 0000644 00000002457 15224675306 0011131 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class FraudResults extends DataObject { /** * @var string|null */ public ?string $fraudServiceResult = null; /** * @return string|null */ public function getFraudServiceResult(): ?string { return $this->fraudServiceResult; } /** * @param string|null $value */ public function setFraudServiceResult(?string $value): void { $this->fraudServiceResult = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->fraudServiceResult)) { $object->fraudServiceResult = $this->fraudServiceResult; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): FraudResults { parent::fromObject($object); if (property_exists($object, 'fraudServiceResult')) { $this->fraudServiceResult = $object->fraudServiceResult; } return $this; } } Domain/RedirectPaymentMethodSpecificInput.php 0000644 00000056030 15224675306 0015430 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentMethodSpecificInput extends DataObject { /** * @var string|null */ public ?string $paymentOption = null; /** * @var RedirectPaymentProduct3203SpecificInput|null */ public ?RedirectPaymentProduct3203SpecificInput $paymentProduct3203SpecificInput = null; /** * @var RedirectPaymentProduct3204SpecificInput|null */ public ?RedirectPaymentProduct3204SpecificInput $paymentProduct3204SpecificInput = null; /** * @var RedirectPaymentProduct3302SpecificInput|null */ public ?RedirectPaymentProduct3302SpecificInput $paymentProduct3302SpecificInput = null; /** * @var RedirectPaymentProduct3306SpecificInput|null */ public ?RedirectPaymentProduct3306SpecificInput $paymentProduct3306SpecificInput = null; /** * @var RedirectPaymentProduct5001SpecificInput|null */ public ?RedirectPaymentProduct5001SpecificInput $paymentProduct5001SpecificInput = null; /** * @var RedirectPaymentProduct5300SpecificInput|null */ public ?RedirectPaymentProduct5300SpecificInput $paymentProduct5300SpecificInput = null; /** * @var RedirectPaymentProduct5402SpecificInput|null */ public ?RedirectPaymentProduct5402SpecificInput $paymentProduct5402SpecificInput = null; /** * @var RedirectPaymentProduct5403SpecificInput|null */ public ?RedirectPaymentProduct5403SpecificInput $paymentProduct5403SpecificInput = null; /** * @var RedirectPaymentProduct5406SpecificInput|null */ public ?RedirectPaymentProduct5406SpecificInput $paymentProduct5406SpecificInput = null; /** * @var RedirectPaymentProduct5408SpecificInput|null */ public ?RedirectPaymentProduct5408SpecificInput $paymentProduct5408SpecificInput = null; /** * @var RedirectPaymentProduct5410SpecificInput|null */ public ?RedirectPaymentProduct5410SpecificInput $paymentProduct5410SpecificInput = null; /** * @var RedirectPaymentProduct5412SpecificInput|null */ public ?RedirectPaymentProduct5412SpecificInput $paymentProduct5412SpecificInput = null; /** * @var RedirectPaymentProduct809SpecificInput|null */ public ?RedirectPaymentProduct809SpecificInput $paymentProduct809SpecificInput = null; /** * @var RedirectPaymentProduct840SpecificInput|null */ public ?RedirectPaymentProduct840SpecificInput $paymentProduct840SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var RedirectionData|null */ public ?RedirectionData $redirectionData = null; /** * @var bool|null */ public ?bool $requiresApproval = null; /** * @var string|null */ public ?string $token = null; /** * @var bool|null */ public ?bool $tokenize = null; /** * @return string|null */ public function getPaymentOption(): ?string { return $this->paymentOption; } /** * @param string|null $value */ public function setPaymentOption(?string $value): void { $this->paymentOption = $value; } /** * @return RedirectPaymentProduct3203SpecificInput|null */ public function getPaymentProduct3203SpecificInput(): ?RedirectPaymentProduct3203SpecificInput { return $this->paymentProduct3203SpecificInput; } /** * @param RedirectPaymentProduct3203SpecificInput|null $value */ public function setPaymentProduct3203SpecificInput(?RedirectPaymentProduct3203SpecificInput $value): void { $this->paymentProduct3203SpecificInput = $value; } /** * @return RedirectPaymentProduct3204SpecificInput|null */ public function getPaymentProduct3204SpecificInput(): ?RedirectPaymentProduct3204SpecificInput { return $this->paymentProduct3204SpecificInput; } /** * @param RedirectPaymentProduct3204SpecificInput|null $value */ public function setPaymentProduct3204SpecificInput(?RedirectPaymentProduct3204SpecificInput $value): void { $this->paymentProduct3204SpecificInput = $value; } /** * @return RedirectPaymentProduct3302SpecificInput|null */ public function getPaymentProduct3302SpecificInput(): ?RedirectPaymentProduct3302SpecificInput { return $this->paymentProduct3302SpecificInput; } /** * @param RedirectPaymentProduct3302SpecificInput|null $value */ public function setPaymentProduct3302SpecificInput(?RedirectPaymentProduct3302SpecificInput $value): void { $this->paymentProduct3302SpecificInput = $value; } /** * @return RedirectPaymentProduct3306SpecificInput|null */ public function getPaymentProduct3306SpecificInput(): ?RedirectPaymentProduct3306SpecificInput { return $this->paymentProduct3306SpecificInput; } /** * @param RedirectPaymentProduct3306SpecificInput|null $value */ public function setPaymentProduct3306SpecificInput(?RedirectPaymentProduct3306SpecificInput $value): void { $this->paymentProduct3306SpecificInput = $value; } /** * @return RedirectPaymentProduct5001SpecificInput|null */ public function getPaymentProduct5001SpecificInput(): ?RedirectPaymentProduct5001SpecificInput { return $this->paymentProduct5001SpecificInput; } /** * @param RedirectPaymentProduct5001SpecificInput|null $value */ public function setPaymentProduct5001SpecificInput(?RedirectPaymentProduct5001SpecificInput $value): void { $this->paymentProduct5001SpecificInput = $value; } /** * @return RedirectPaymentProduct5300SpecificInput|null */ public function getPaymentProduct5300SpecificInput(): ?RedirectPaymentProduct5300SpecificInput { return $this->paymentProduct5300SpecificInput; } /** * @param RedirectPaymentProduct5300SpecificInput|null $value */ public function setPaymentProduct5300SpecificInput(?RedirectPaymentProduct5300SpecificInput $value): void { $this->paymentProduct5300SpecificInput = $value; } /** * @return RedirectPaymentProduct5402SpecificInput|null */ public function getPaymentProduct5402SpecificInput(): ?RedirectPaymentProduct5402SpecificInput { return $this->paymentProduct5402SpecificInput; } /** * @param RedirectPaymentProduct5402SpecificInput|null $value */ public function setPaymentProduct5402SpecificInput(?RedirectPaymentProduct5402SpecificInput $value): void { $this->paymentProduct5402SpecificInput = $value; } /** * @return RedirectPaymentProduct5403SpecificInput|null */ public function getPaymentProduct5403SpecificInput(): ?RedirectPaymentProduct5403SpecificInput { return $this->paymentProduct5403SpecificInput; } /** * @param RedirectPaymentProduct5403SpecificInput|null $value */ public function setPaymentProduct5403SpecificInput(?RedirectPaymentProduct5403SpecificInput $value): void { $this->paymentProduct5403SpecificInput = $value; } /** * @return RedirectPaymentProduct5406SpecificInput|null */ public function getPaymentProduct5406SpecificInput(): ?RedirectPaymentProduct5406SpecificInput { return $this->paymentProduct5406SpecificInput; } /** * @param RedirectPaymentProduct5406SpecificInput|null $value */ public function setPaymentProduct5406SpecificInput(?RedirectPaymentProduct5406SpecificInput $value): void { $this->paymentProduct5406SpecificInput = $value; } /** * @return RedirectPaymentProduct5408SpecificInput|null */ public function getPaymentProduct5408SpecificInput(): ?RedirectPaymentProduct5408SpecificInput { return $this->paymentProduct5408SpecificInput; } /** * @param RedirectPaymentProduct5408SpecificInput|null $value */ public function setPaymentProduct5408SpecificInput(?RedirectPaymentProduct5408SpecificInput $value): void { $this->paymentProduct5408SpecificInput = $value; } /** * @return RedirectPaymentProduct5410SpecificInput|null */ public function getPaymentProduct5410SpecificInput(): ?RedirectPaymentProduct5410SpecificInput { return $this->paymentProduct5410SpecificInput; } /** * @param RedirectPaymentProduct5410SpecificInput|null $value */ public function setPaymentProduct5410SpecificInput(?RedirectPaymentProduct5410SpecificInput $value): void { $this->paymentProduct5410SpecificInput = $value; } /** * @return RedirectPaymentProduct5412SpecificInput|null */ public function getPaymentProduct5412SpecificInput(): ?RedirectPaymentProduct5412SpecificInput { return $this->paymentProduct5412SpecificInput; } /** * @param RedirectPaymentProduct5412SpecificInput|null $value */ public function setPaymentProduct5412SpecificInput(?RedirectPaymentProduct5412SpecificInput $value): void { $this->paymentProduct5412SpecificInput = $value; } /** * @return RedirectPaymentProduct809SpecificInput|null */ public function getPaymentProduct809SpecificInput(): ?RedirectPaymentProduct809SpecificInput { return $this->paymentProduct809SpecificInput; } /** * @param RedirectPaymentProduct809SpecificInput|null $value */ public function setPaymentProduct809SpecificInput(?RedirectPaymentProduct809SpecificInput $value): void { $this->paymentProduct809SpecificInput = $value; } /** * @return RedirectPaymentProduct840SpecificInput|null */ public function getPaymentProduct840SpecificInput(): ?RedirectPaymentProduct840SpecificInput { return $this->paymentProduct840SpecificInput; } /** * @param RedirectPaymentProduct840SpecificInput|null $value */ public function setPaymentProduct840SpecificInput(?RedirectPaymentProduct840SpecificInput $value): void { $this->paymentProduct840SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return RedirectionData|null */ public function getRedirectionData(): ?RedirectionData { return $this->redirectionData; } /** * @param RedirectionData|null $value */ public function setRedirectionData(?RedirectionData $value): void { $this->redirectionData = $value; } /** * @return bool|null */ public function getRequiresApproval(): ?bool { return $this->requiresApproval; } /** * @param bool|null $value */ public function setRequiresApproval(?bool $value): void { $this->requiresApproval = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return bool|null */ public function getTokenize(): ?bool { return $this->tokenize; } /** * @param bool|null $value */ public function setTokenize(?bool $value): void { $this->tokenize = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->paymentOption)) { $object->paymentOption = $this->paymentOption; } if (!is_null($this->paymentProduct3203SpecificInput)) { $object->paymentProduct3203SpecificInput = $this->paymentProduct3203SpecificInput->toObject(); } if (!is_null($this->paymentProduct3204SpecificInput)) { $object->paymentProduct3204SpecificInput = $this->paymentProduct3204SpecificInput->toObject(); } if (!is_null($this->paymentProduct3302SpecificInput)) { $object->paymentProduct3302SpecificInput = $this->paymentProduct3302SpecificInput->toObject(); } if (!is_null($this->paymentProduct3306SpecificInput)) { $object->paymentProduct3306SpecificInput = $this->paymentProduct3306SpecificInput->toObject(); } if (!is_null($this->paymentProduct5001SpecificInput)) { $object->paymentProduct5001SpecificInput = $this->paymentProduct5001SpecificInput->toObject(); } if (!is_null($this->paymentProduct5300SpecificInput)) { $object->paymentProduct5300SpecificInput = $this->paymentProduct5300SpecificInput->toObject(); } if (!is_null($this->paymentProduct5402SpecificInput)) { $object->paymentProduct5402SpecificInput = $this->paymentProduct5402SpecificInput->toObject(); } if (!is_null($this->paymentProduct5403SpecificInput)) { $object->paymentProduct5403SpecificInput = $this->paymentProduct5403SpecificInput->toObject(); } if (!is_null($this->paymentProduct5406SpecificInput)) { $object->paymentProduct5406SpecificInput = $this->paymentProduct5406SpecificInput->toObject(); } if (!is_null($this->paymentProduct5408SpecificInput)) { $object->paymentProduct5408SpecificInput = $this->paymentProduct5408SpecificInput->toObject(); } if (!is_null($this->paymentProduct5410SpecificInput)) { $object->paymentProduct5410SpecificInput = $this->paymentProduct5410SpecificInput->toObject(); } if (!is_null($this->paymentProduct5412SpecificInput)) { $object->paymentProduct5412SpecificInput = $this->paymentProduct5412SpecificInput->toObject(); } if (!is_null($this->paymentProduct809SpecificInput)) { $object->paymentProduct809SpecificInput = $this->paymentProduct809SpecificInput->toObject(); } if (!is_null($this->paymentProduct840SpecificInput)) { $object->paymentProduct840SpecificInput = $this->paymentProduct840SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->redirectionData)) { $object->redirectionData = $this->redirectionData->toObject(); } if (!is_null($this->requiresApproval)) { $object->requiresApproval = $this->requiresApproval; } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->tokenize)) { $object->tokenize = $this->tokenize; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentMethodSpecificInput { parent::fromObject($object); if (property_exists($object, 'paymentOption')) { $this->paymentOption = $object->paymentOption; } if (property_exists($object, 'paymentProduct3203SpecificInput')) { if (!is_object($object->paymentProduct3203SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3203SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct3203SpecificInput(); $this->paymentProduct3203SpecificInput = $value->fromObject($object->paymentProduct3203SpecificInput); } if (property_exists($object, 'paymentProduct3204SpecificInput')) { if (!is_object($object->paymentProduct3204SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3204SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct3204SpecificInput(); $this->paymentProduct3204SpecificInput = $value->fromObject($object->paymentProduct3204SpecificInput); } if (property_exists($object, 'paymentProduct3302SpecificInput')) { if (!is_object($object->paymentProduct3302SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3302SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct3302SpecificInput(); $this->paymentProduct3302SpecificInput = $value->fromObject($object->paymentProduct3302SpecificInput); } if (property_exists($object, 'paymentProduct3306SpecificInput')) { if (!is_object($object->paymentProduct3306SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3306SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct3306SpecificInput(); $this->paymentProduct3306SpecificInput = $value->fromObject($object->paymentProduct3306SpecificInput); } if (property_exists($object, 'paymentProduct5001SpecificInput')) { if (!is_object($object->paymentProduct5001SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5001SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5001SpecificInput(); $this->paymentProduct5001SpecificInput = $value->fromObject($object->paymentProduct5001SpecificInput); } if (property_exists($object, 'paymentProduct5300SpecificInput')) { if (!is_object($object->paymentProduct5300SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5300SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5300SpecificInput(); $this->paymentProduct5300SpecificInput = $value->fromObject($object->paymentProduct5300SpecificInput); } if (property_exists($object, 'paymentProduct5402SpecificInput')) { if (!is_object($object->paymentProduct5402SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5402SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5402SpecificInput(); $this->paymentProduct5402SpecificInput = $value->fromObject($object->paymentProduct5402SpecificInput); } if (property_exists($object, 'paymentProduct5403SpecificInput')) { if (!is_object($object->paymentProduct5403SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5403SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5403SpecificInput(); $this->paymentProduct5403SpecificInput = $value->fromObject($object->paymentProduct5403SpecificInput); } if (property_exists($object, 'paymentProduct5406SpecificInput')) { if (!is_object($object->paymentProduct5406SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5406SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5406SpecificInput(); $this->paymentProduct5406SpecificInput = $value->fromObject($object->paymentProduct5406SpecificInput); } if (property_exists($object, 'paymentProduct5408SpecificInput')) { if (!is_object($object->paymentProduct5408SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5408SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5408SpecificInput(); $this->paymentProduct5408SpecificInput = $value->fromObject($object->paymentProduct5408SpecificInput); } if (property_exists($object, 'paymentProduct5410SpecificInput')) { if (!is_object($object->paymentProduct5410SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5410SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5410SpecificInput(); $this->paymentProduct5410SpecificInput = $value->fromObject($object->paymentProduct5410SpecificInput); } if (property_exists($object, 'paymentProduct5412SpecificInput')) { if (!is_object($object->paymentProduct5412SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5412SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct5412SpecificInput(); $this->paymentProduct5412SpecificInput = $value->fromObject($object->paymentProduct5412SpecificInput); } if (property_exists($object, 'paymentProduct809SpecificInput')) { if (!is_object($object->paymentProduct809SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct809SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct809SpecificInput(); $this->paymentProduct809SpecificInput = $value->fromObject($object->paymentProduct809SpecificInput); } if (property_exists($object, 'paymentProduct840SpecificInput')) { if (!is_object($object->paymentProduct840SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct840SpecificInput, true) . '\' is not an object'); } $value = new RedirectPaymentProduct840SpecificInput(); $this->paymentProduct840SpecificInput = $value->fromObject($object->paymentProduct840SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'redirectionData')) { if (!is_object($object->redirectionData)) { throw new UnexpectedValueException('value \'' . print_r($object->redirectionData, true) . '\' is not an object'); } $value = new RedirectionData(); $this->redirectionData = $value->fromObject($object->redirectionData); } if (property_exists($object, 'requiresApproval')) { $this->requiresApproval = $object->requiresApproval; } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'tokenize')) { $this->tokenize = $object->tokenize; } return $this; } } Domain/RevokeMandateRequest.php 0000644 00000002451 15224675306 0012576 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RevokeMandateRequest extends DataObject { /** * @var string|null */ public ?string $revocationReason = null; /** * @return string|null */ public function getRevocationReason(): ?string { return $this->revocationReason; } /** * @param string|null $value */ public function setRevocationReason(?string $value): void { $this->revocationReason = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->revocationReason)) { $object->revocationReason = $this->revocationReason; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RevokeMandateRequest { parent::fromObject($object); if (property_exists($object, 'revocationReason')) { $this->revocationReason = $object->revocationReason; } return $this; } } Domain/PaymentLinksResponse.php 0000644 00000003572 15224675306 0012642 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentLinksResponse extends DataObject { /** * @var PaymentLinkResponse[]|null */ public ?array $PaymentLinks = null; /** * @return PaymentLinkResponse[]|null */ public function getPaymentLinks(): ?array { return $this->PaymentLinks; } /** * @param PaymentLinkResponse[]|null $value */ public function setPaymentLinks(?array $value): void { $this->PaymentLinks = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->PaymentLinks)) { $object->PaymentLinks = []; foreach ($this->PaymentLinks as $element) { if (!is_null($element)) { $object->PaymentLinks[] = $element->toObject(); } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentLinksResponse { parent::fromObject($object); if (property_exists($object, 'PaymentLinks')) { if (!is_array($object->PaymentLinks) && !is_object($object->PaymentLinks)) { throw new UnexpectedValueException('value \'' . print_r($object->PaymentLinks, true) . '\' is not an array or object'); } $this->PaymentLinks = []; foreach ($object->PaymentLinks as $element) { $value = new PaymentLinkResponse(); $this->PaymentLinks[] = $value->fromObject($element); } } return $this; } } Domain/ClickToPay.php 0000644 00000002452 15224675306 0010503 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ClickToPay extends DataObject { /** * @var bool|null */ public ?bool $IsClickToPayPayment = null; /** * @return bool|null */ public function getIsClickToPayPayment(): ?bool { return $this->IsClickToPayPayment; } /** * @param bool|null $value */ public function setIsClickToPayPayment(?bool $value): void { $this->IsClickToPayPayment = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->IsClickToPayPayment)) { $object->IsClickToPayPayment = $this->IsClickToPayPayment; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ClickToPay { parent::fromObject($object); if (property_exists($object, 'IsClickToPayPayment')) { $this->IsClickToPayPayment = $object->IsClickToPayPayment; } return $this; } } Domain/PendingAuthentication.php 0000644 00000002351 15224675306 0012763 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PendingAuthentication extends DataObject { /** * @var string|null */ public ?string $pollingUrl = null; /** * @return string|null */ public function getPollingUrl(): ?string { return $this->pollingUrl; } /** * @param string|null $value */ public function setPollingUrl(?string $value): void { $this->pollingUrl = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->pollingUrl)) { $object->pollingUrl = $this->pollingUrl; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PendingAuthentication { parent::fromObject($object); if (property_exists($object, 'pollingUrl')) { $this->pollingUrl = $object->pollingUrl; } return $this; } } Domain/TokenCard.php 0000644 00000003716 15224675306 0010357 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class TokenCard extends DataObject { /** * @var string|null */ public ?string $alias = null; /** * @var TokenCardData|null */ public ?TokenCardData $data = null; /** * @return string|null */ public function getAlias(): ?string { return $this->alias; } /** * @param string|null $value */ public function setAlias(?string $value): void { $this->alias = $value; } /** * @return TokenCardData|null */ public function getData(): ?TokenCardData { return $this->data; } /** * @param TokenCardData|null $value */ public function setData(?TokenCardData $value): void { $this->data = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->alias)) { $object->alias = $this->alias; } if (!is_null($this->data)) { $object->data = $this->data->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): TokenCard { parent::fromObject($object); if (property_exists($object, 'alias')) { $this->alias = $object->alias; } if (property_exists($object, 'data')) { if (!is_object($object->data)) { throw new UnexpectedValueException('value \'' . print_r($object->data, true) . '\' is not an object'); } $value = new TokenCardData(); $this->data = $value->fromObject($object->data); } return $this; } } Domain/CompletePaymentResponse.php 0000644 00000006661 15224675306 0013334 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CompletePaymentResponse extends DataObject { /** * @var PaymentCreationOutput|null */ public ?PaymentCreationOutput $creationOutput = null; /** * @var MerchantAction|null */ public ?MerchantAction $merchantAction = null; /** * @var PaymentResponse|null */ public ?PaymentResponse $payment = null; /** * @return PaymentCreationOutput|null */ public function getCreationOutput(): ?PaymentCreationOutput { return $this->creationOutput; } /** * @param PaymentCreationOutput|null $value */ public function setCreationOutput(?PaymentCreationOutput $value): void { $this->creationOutput = $value; } /** * @return MerchantAction|null */ public function getMerchantAction(): ?MerchantAction { return $this->merchantAction; } /** * @param MerchantAction|null $value */ public function setMerchantAction(?MerchantAction $value): void { $this->merchantAction = $value; } /** * @return PaymentResponse|null */ public function getPayment(): ?PaymentResponse { return $this->payment; } /** * @param PaymentResponse|null $value */ public function setPayment(?PaymentResponse $value): void { $this->payment = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->creationOutput)) { $object->creationOutput = $this->creationOutput->toObject(); } if (!is_null($this->merchantAction)) { $object->merchantAction = $this->merchantAction->toObject(); } if (!is_null($this->payment)) { $object->payment = $this->payment->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CompletePaymentResponse { parent::fromObject($object); if (property_exists($object, 'creationOutput')) { if (!is_object($object->creationOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->creationOutput, true) . '\' is not an object'); } $value = new PaymentCreationOutput(); $this->creationOutput = $value->fromObject($object->creationOutput); } if (property_exists($object, 'merchantAction')) { if (!is_object($object->merchantAction)) { throw new UnexpectedValueException('value \'' . print_r($object->merchantAction, true) . '\' is not an object'); } $value = new MerchantAction(); $this->merchantAction = $value->fromObject($object->merchantAction); } if (property_exists($object, 'payment')) { if (!is_object($object->payment)) { throw new UnexpectedValueException('value \'' . print_r($object->payment, true) . '\' is not an object'); } $value = new PaymentResponse(); $this->payment = $value->fromObject($object->payment); } return $this; } } Domain/MandateCustomer.php 0000644 00000012266 15224675306 0011600 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateCustomer extends DataObject { /** * @var BankAccountIban|null */ public ?BankAccountIban $bankAccountIban = null; /** * @var string|null */ public ?string $companyName = null; /** * @var MandateContactDetails|null */ public ?MandateContactDetails $contactDetails = null; /** * @var MandateAddress|null */ public ?MandateAddress $mandateAddress = null; /** * @var MandatePersonalInformation|null */ public ?MandatePersonalInformation $personalInformation = null; /** * @return BankAccountIban|null */ public function getBankAccountIban(): ?BankAccountIban { return $this->bankAccountIban; } /** * @param BankAccountIban|null $value */ public function setBankAccountIban(?BankAccountIban $value): void { $this->bankAccountIban = $value; } /** * @return string|null */ public function getCompanyName(): ?string { return $this->companyName; } /** * @param string|null $value */ public function setCompanyName(?string $value): void { $this->companyName = $value; } /** * @return MandateContactDetails|null */ public function getContactDetails(): ?MandateContactDetails { return $this->contactDetails; } /** * @param MandateContactDetails|null $value */ public function setContactDetails(?MandateContactDetails $value): void { $this->contactDetails = $value; } /** * @return MandateAddress|null */ public function getMandateAddress(): ?MandateAddress { return $this->mandateAddress; } /** * @param MandateAddress|null $value */ public function setMandateAddress(?MandateAddress $value): void { $this->mandateAddress = $value; } /** * @return MandatePersonalInformation|null */ public function getPersonalInformation(): ?MandatePersonalInformation { return $this->personalInformation; } /** * @param MandatePersonalInformation|null $value */ public function setPersonalInformation(?MandatePersonalInformation $value): void { $this->personalInformation = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bankAccountIban)) { $object->bankAccountIban = $this->bankAccountIban->toObject(); } if (!is_null($this->companyName)) { $object->companyName = $this->companyName; } if (!is_null($this->contactDetails)) { $object->contactDetails = $this->contactDetails->toObject(); } if (!is_null($this->mandateAddress)) { $object->mandateAddress = $this->mandateAddress->toObject(); } if (!is_null($this->personalInformation)) { $object->personalInformation = $this->personalInformation->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateCustomer { parent::fromObject($object); if (property_exists($object, 'bankAccountIban')) { if (!is_object($object->bankAccountIban)) { throw new UnexpectedValueException('value \'' . print_r($object->bankAccountIban, true) . '\' is not an object'); } $value = new BankAccountIban(); $this->bankAccountIban = $value->fromObject($object->bankAccountIban); } if (property_exists($object, 'companyName')) { $this->companyName = $object->companyName; } if (property_exists($object, 'contactDetails')) { if (!is_object($object->contactDetails)) { throw new UnexpectedValueException('value \'' . print_r($object->contactDetails, true) . '\' is not an object'); } $value = new MandateContactDetails(); $this->contactDetails = $value->fromObject($object->contactDetails); } if (property_exists($object, 'mandateAddress')) { if (!is_object($object->mandateAddress)) { throw new UnexpectedValueException('value \'' . print_r($object->mandateAddress, true) . '\' is not an object'); } $value = new MandateAddress(); $this->mandateAddress = $value->fromObject($object->mandateAddress); } if (property_exists($object, 'personalInformation')) { if (!is_object($object->personalInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->personalInformation, true) . '\' is not an object'); } $value = new MandatePersonalInformation(); $this->personalInformation = $value->fromObject($object->personalInformation); } return $this; } } Domain/ShoppingCart.php 0000644 00000014555 15224675306 0011111 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class ShoppingCart extends DataObject { /** * @var AmountBreakdown[]|null * @deprecated Use order.shipping.shippingCost for shipping cost. Other amounts are not used. Determines how the total amount is split into amount types */ public ?array $amountBreakdown = null; /** * @var GiftCardPurchase|null */ public ?GiftCardPurchase $giftCardPurchase = null; /** * @var bool|null */ public ?bool $isPreOrder = null; /** * @var LineItem[]|null */ public ?array $items = null; /** * @var string|null */ public ?string $preOrderItemAvailabilityDate = null; /** * @var bool|null */ public ?bool $reOrderIndicator = null; /** * @return AmountBreakdown[]|null * @deprecated Use order.shipping.shippingCost for shipping cost. Other amounts are not used. Determines how the total amount is split into amount types */ public function getAmountBreakdown(): ?array { return $this->amountBreakdown; } /** * @param AmountBreakdown[]|null $value * @deprecated Use order.shipping.shippingCost for shipping cost. Other amounts are not used. Determines how the total amount is split into amount types */ public function setAmountBreakdown(?array $value): void { $this->amountBreakdown = $value; } /** * @return GiftCardPurchase|null */ public function getGiftCardPurchase(): ?GiftCardPurchase { return $this->giftCardPurchase; } /** * @param GiftCardPurchase|null $value */ public function setGiftCardPurchase(?GiftCardPurchase $value): void { $this->giftCardPurchase = $value; } /** * @return bool|null */ public function getIsPreOrder(): ?bool { return $this->isPreOrder; } /** * @param bool|null $value */ public function setIsPreOrder(?bool $value): void { $this->isPreOrder = $value; } /** * @return LineItem[]|null */ public function getItems(): ?array { return $this->items; } /** * @param LineItem[]|null $value */ public function setItems(?array $value): void { $this->items = $value; } /** * @return string|null */ public function getPreOrderItemAvailabilityDate(): ?string { return $this->preOrderItemAvailabilityDate; } /** * @param string|null $value */ public function setPreOrderItemAvailabilityDate(?string $value): void { $this->preOrderItemAvailabilityDate = $value; } /** * @return bool|null */ public function getReOrderIndicator(): ?bool { return $this->reOrderIndicator; } /** * @param bool|null $value */ public function setReOrderIndicator(?bool $value): void { $this->reOrderIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountBreakdown)) { $object->amountBreakdown = []; foreach ($this->amountBreakdown as $element) { if (!is_null($element)) { $object->amountBreakdown[] = $element->toObject(); } } } if (!is_null($this->giftCardPurchase)) { $object->giftCardPurchase = $this->giftCardPurchase->toObject(); } if (!is_null($this->isPreOrder)) { $object->isPreOrder = $this->isPreOrder; } if (!is_null($this->items)) { $object->items = []; foreach ($this->items as $element) { if (!is_null($element)) { $object->items[] = $element->toObject(); } } } if (!is_null($this->preOrderItemAvailabilityDate)) { $object->preOrderItemAvailabilityDate = $this->preOrderItemAvailabilityDate; } if (!is_null($this->reOrderIndicator)) { $object->reOrderIndicator = $this->reOrderIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): ShoppingCart { parent::fromObject($object); if (property_exists($object, 'amountBreakdown')) { if (!is_array($object->amountBreakdown) && !is_object($object->amountBreakdown)) { throw new UnexpectedValueException('value \'' . print_r($object->amountBreakdown, true) . '\' is not an array or object'); } $this->amountBreakdown = []; foreach ($object->amountBreakdown as $element) { $value = new AmountBreakdown(); $this->amountBreakdown[] = $value->fromObject($element); } } if (property_exists($object, 'giftCardPurchase')) { if (!is_object($object->giftCardPurchase)) { throw new UnexpectedValueException('value \'' . print_r($object->giftCardPurchase, true) . '\' is not an object'); } $value = new GiftCardPurchase(); $this->giftCardPurchase = $value->fromObject($object->giftCardPurchase); } if (property_exists($object, 'isPreOrder')) { $this->isPreOrder = $object->isPreOrder; } if (property_exists($object, 'items')) { if (!is_array($object->items) && !is_object($object->items)) { throw new UnexpectedValueException('value \'' . print_r($object->items, true) . '\' is not an array or object'); } $this->items = []; foreach ($object->items as $element) { $value = new LineItem(); $this->items[] = $value->fromObject($element); } } if (property_exists($object, 'preOrderItemAvailabilityDate')) { $this->preOrderItemAvailabilityDate = $object->preOrderItemAvailabilityDate; } if (property_exists($object, 'reOrderIndicator')) { $this->reOrderIndicator = $object->reOrderIndicator; } return $this; } } Domain/GetIINDetailsRequest.php 0000644 00000004127 15224675306 0012440 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class GetIINDetailsRequest extends DataObject { /** * @var string|null */ public ?string $bin = null; /** * @var PaymentContext|null */ public ?PaymentContext $paymentContext = null; /** * @return string|null */ public function getBin(): ?string { return $this->bin; } /** * @param string|null $value */ public function setBin(?string $value): void { $this->bin = $value; } /** * @return PaymentContext|null */ public function getPaymentContext(): ?PaymentContext { return $this->paymentContext; } /** * @param PaymentContext|null $value */ public function setPaymentContext(?PaymentContext $value): void { $this->paymentContext = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->bin)) { $object->bin = $this->bin; } if (!is_null($this->paymentContext)) { $object->paymentContext = $this->paymentContext->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): GetIINDetailsRequest { parent::fromObject($object); if (property_exists($object, 'bin')) { $this->bin = $object->bin; } if (property_exists($object, 'paymentContext')) { if (!is_object($object->paymentContext)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentContext, true) . '\' is not an object'); } $value = new PaymentContext(); $this->paymentContext = $value->fromObject($object->paymentContext); } return $this; } } Domain/MandateContactDetails.php 0000644 00000002377 15224675306 0012702 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class MandateContactDetails extends DataObject { /** * @var string|null */ public ?string $emailAddress = null; /** * @return string|null */ public function getEmailAddress(): ?string { return $this->emailAddress; } /** * @param string|null $value */ public function setEmailAddress(?string $value): void { $this->emailAddress = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->emailAddress)) { $object->emailAddress = $this->emailAddress; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): MandateContactDetails { parent::fromObject($object); if (property_exists($object, 'emailAddress')) { $this->emailAddress = $object->emailAddress; } return $this; } } Domain/RedirectPaymentProduct5412SpecificInput.php 0000644 00000003664 15224675306 0016151 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5412SpecificInput extends DataObject { /** * @var bool|null */ public ?bool $adjustableAmount = null; /** * @var string|null */ public ?string $beneficiaryId = null; /** * @return bool|null */ public function getAdjustableAmount(): ?bool { return $this->adjustableAmount; } /** * @param bool|null $value */ public function setAdjustableAmount(?bool $value): void { $this->adjustableAmount = $value; } /** * @return string|null */ public function getBeneficiaryId(): ?string { return $this->beneficiaryId; } /** * @param string|null $value */ public function setBeneficiaryId(?string $value): void { $this->beneficiaryId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->adjustableAmount)) { $object->adjustableAmount = $this->adjustableAmount; } if (!is_null($this->beneficiaryId)) { $object->beneficiaryId = $this->beneficiaryId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5412SpecificInput { parent::fromObject($object); if (property_exists($object, 'adjustableAmount')) { $this->adjustableAmount = $object->adjustableAmount; } if (property_exists($object, 'beneficiaryId')) { $this->beneficiaryId = $object->beneficiaryId; } return $this; } } Domain/OperationPaymentReferences.php 0000644 00000004037 15224675306 0014002 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OperationPaymentReferences extends DataObject { /** * @var string|null */ public ?string $merchantReference = null; /** * @var string|null */ public ?string $operationGroupReference = null; /** * @return string|null */ public function getMerchantReference(): ?string { return $this->merchantReference; } /** * @param string|null $value */ public function setMerchantReference(?string $value): void { $this->merchantReference = $value; } /** * @return string|null */ public function getOperationGroupReference(): ?string { return $this->operationGroupReference; } /** * @param string|null $value */ public function setOperationGroupReference(?string $value): void { $this->operationGroupReference = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->merchantReference)) { $object->merchantReference = $this->merchantReference; } if (!is_null($this->operationGroupReference)) { $object->operationGroupReference = $this->operationGroupReference; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OperationPaymentReferences { parent::fromObject($object); if (property_exists($object, 'merchantReference')) { $this->merchantReference = $object->merchantReference; } if (property_exists($object, 'operationGroupReference')) { $this->operationGroupReference = $object->operationGroupReference; } return $this; } } Domain/PaymentProductFiltersHostedCheckout.php 0000644 00000004764 15224675306 0015655 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFiltersHostedCheckout extends DataObject { /** * @var PaymentProductFilter|null */ public ?PaymentProductFilter $exclude = null; /** * @var PaymentProductFilter|null */ public ?PaymentProductFilter $restrictTo = null; /** * @return PaymentProductFilter|null */ public function getExclude(): ?PaymentProductFilter { return $this->exclude; } /** * @param PaymentProductFilter|null $value */ public function setExclude(?PaymentProductFilter $value): void { $this->exclude = $value; } /** * @return PaymentProductFilter|null */ public function getRestrictTo(): ?PaymentProductFilter { return $this->restrictTo; } /** * @param PaymentProductFilter|null $value */ public function setRestrictTo(?PaymentProductFilter $value): void { $this->restrictTo = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->exclude)) { $object->exclude = $this->exclude->toObject(); } if (!is_null($this->restrictTo)) { $object->restrictTo = $this->restrictTo->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFiltersHostedCheckout { parent::fromObject($object); if (property_exists($object, 'exclude')) { if (!is_object($object->exclude)) { throw new UnexpectedValueException('value \'' . print_r($object->exclude, true) . '\' is not an object'); } $value = new PaymentProductFilter(); $this->exclude = $value->fromObject($object->exclude); } if (property_exists($object, 'restrictTo')) { if (!is_object($object->restrictTo)) { throw new UnexpectedValueException('value \'' . print_r($object->restrictTo, true) . '\' is not an object'); } $value = new PaymentProductFilter(); $this->restrictTo = $value->fromObject($object->restrictTo); } return $this; } } Domain/CardPaymentMethodSpecificInputBase.php 0000644 00000045204 15224675306 0015334 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardPaymentMethodSpecificInputBase extends DataObject { /** * @var bool|null */ public ?bool $allowDynamicLinking = null; /** * @var string|null */ public ?string $authorizationMode = null; /** * @var CurrencyConversionSpecificInput|null */ public ?CurrencyConversionSpecificInput $currencyConversionSpecificInput = null; /** * @var string|null */ public ?string $initialSchemeTransactionId = null; /** * @var MultiplePaymentInformation|null */ public ?MultiplePaymentInformation $multiplePaymentInformation = null; /** * @var PaymentProduct130SpecificInput|null */ public ?PaymentProduct130SpecificInput $paymentProduct130SpecificInput = null; /** * @var PaymentProduct3012SpecificInput|null */ public ?PaymentProduct3012SpecificInput $paymentProduct3012SpecificInput = null; /** * @var PaymentProduct3013SpecificInput|null */ public ?PaymentProduct3013SpecificInput $paymentProduct3013SpecificInput = null; /** * @var PaymentProduct3208SpecificInput|null */ public ?PaymentProduct3208SpecificInput $paymentProduct3208SpecificInput = null; /** * @var PaymentProduct3209SpecificInput|null */ public ?PaymentProduct3209SpecificInput $paymentProduct3209SpecificInput = null; /** * @var PaymentProduct5100SpecificInput|null */ public ?PaymentProduct5100SpecificInput $paymentProduct5100SpecificInput = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @var CardRecurrenceDetails|null */ public ?CardRecurrenceDetails $recurring = null; /** * @var ThreeDSecureBase|null */ public ?ThreeDSecureBase $threeDSecure = null; /** * @var string|null */ public ?string $token = null; /** * @var bool|null */ public ?bool $tokenize = null; /** * @var string|null */ public ?string $transactionChannel = null; /** * @var string|null */ public ?string $unscheduledCardOnFileRequestor = null; /** * @var string|null */ public ?string $unscheduledCardOnFileSequenceIndicator = null; /** * @return bool|null */ public function getAllowDynamicLinking(): ?bool { return $this->allowDynamicLinking; } /** * @param bool|null $value */ public function setAllowDynamicLinking(?bool $value): void { $this->allowDynamicLinking = $value; } /** * @return string|null */ public function getAuthorizationMode(): ?string { return $this->authorizationMode; } /** * @param string|null $value */ public function setAuthorizationMode(?string $value): void { $this->authorizationMode = $value; } /** * @return CurrencyConversionSpecificInput|null */ public function getCurrencyConversionSpecificInput(): ?CurrencyConversionSpecificInput { return $this->currencyConversionSpecificInput; } /** * @param CurrencyConversionSpecificInput|null $value */ public function setCurrencyConversionSpecificInput(?CurrencyConversionSpecificInput $value): void { $this->currencyConversionSpecificInput = $value; } /** * @return string|null */ public function getInitialSchemeTransactionId(): ?string { return $this->initialSchemeTransactionId; } /** * @param string|null $value */ public function setInitialSchemeTransactionId(?string $value): void { $this->initialSchemeTransactionId = $value; } /** * @return MultiplePaymentInformation|null */ public function getMultiplePaymentInformation(): ?MultiplePaymentInformation { return $this->multiplePaymentInformation; } /** * @param MultiplePaymentInformation|null $value */ public function setMultiplePaymentInformation(?MultiplePaymentInformation $value): void { $this->multiplePaymentInformation = $value; } /** * @return PaymentProduct130SpecificInput|null */ public function getPaymentProduct130SpecificInput(): ?PaymentProduct130SpecificInput { return $this->paymentProduct130SpecificInput; } /** * @param PaymentProduct130SpecificInput|null $value */ public function setPaymentProduct130SpecificInput(?PaymentProduct130SpecificInput $value): void { $this->paymentProduct130SpecificInput = $value; } /** * @return PaymentProduct3012SpecificInput|null */ public function getPaymentProduct3012SpecificInput(): ?PaymentProduct3012SpecificInput { return $this->paymentProduct3012SpecificInput; } /** * @param PaymentProduct3012SpecificInput|null $value */ public function setPaymentProduct3012SpecificInput(?PaymentProduct3012SpecificInput $value): void { $this->paymentProduct3012SpecificInput = $value; } /** * @return PaymentProduct3013SpecificInput|null */ public function getPaymentProduct3013SpecificInput(): ?PaymentProduct3013SpecificInput { return $this->paymentProduct3013SpecificInput; } /** * @param PaymentProduct3013SpecificInput|null $value */ public function setPaymentProduct3013SpecificInput(?PaymentProduct3013SpecificInput $value): void { $this->paymentProduct3013SpecificInput = $value; } /** * @return PaymentProduct3208SpecificInput|null */ public function getPaymentProduct3208SpecificInput(): ?PaymentProduct3208SpecificInput { return $this->paymentProduct3208SpecificInput; } /** * @param PaymentProduct3208SpecificInput|null $value */ public function setPaymentProduct3208SpecificInput(?PaymentProduct3208SpecificInput $value): void { $this->paymentProduct3208SpecificInput = $value; } /** * @return PaymentProduct3209SpecificInput|null */ public function getPaymentProduct3209SpecificInput(): ?PaymentProduct3209SpecificInput { return $this->paymentProduct3209SpecificInput; } /** * @param PaymentProduct3209SpecificInput|null $value */ public function setPaymentProduct3209SpecificInput(?PaymentProduct3209SpecificInput $value): void { $this->paymentProduct3209SpecificInput = $value; } /** * @return PaymentProduct5100SpecificInput|null */ public function getPaymentProduct5100SpecificInput(): ?PaymentProduct5100SpecificInput { return $this->paymentProduct5100SpecificInput; } /** * @param PaymentProduct5100SpecificInput|null $value */ public function setPaymentProduct5100SpecificInput(?PaymentProduct5100SpecificInput $value): void { $this->paymentProduct5100SpecificInput = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return CardRecurrenceDetails|null */ public function getRecurring(): ?CardRecurrenceDetails { return $this->recurring; } /** * @param CardRecurrenceDetails|null $value */ public function setRecurring(?CardRecurrenceDetails $value): void { $this->recurring = $value; } /** * @return ThreeDSecureBase|null */ public function getThreeDSecure(): ?ThreeDSecureBase { return $this->threeDSecure; } /** * @param ThreeDSecureBase|null $value */ public function setThreeDSecure(?ThreeDSecureBase $value): void { $this->threeDSecure = $value; } /** * @return string|null */ public function getToken(): ?string { return $this->token; } /** * @param string|null $value */ public function setToken(?string $value): void { $this->token = $value; } /** * @return bool|null */ public function getTokenize(): ?bool { return $this->tokenize; } /** * @param bool|null $value */ public function setTokenize(?bool $value): void { $this->tokenize = $value; } /** * @return string|null */ public function getTransactionChannel(): ?string { return $this->transactionChannel; } /** * @param string|null $value */ public function setTransactionChannel(?string $value): void { $this->transactionChannel = $value; } /** * @return string|null */ public function getUnscheduledCardOnFileRequestor(): ?string { return $this->unscheduledCardOnFileRequestor; } /** * @param string|null $value */ public function setUnscheduledCardOnFileRequestor(?string $value): void { $this->unscheduledCardOnFileRequestor = $value; } /** * @return string|null */ public function getUnscheduledCardOnFileSequenceIndicator(): ?string { return $this->unscheduledCardOnFileSequenceIndicator; } /** * @param string|null $value */ public function setUnscheduledCardOnFileSequenceIndicator(?string $value): void { $this->unscheduledCardOnFileSequenceIndicator = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->allowDynamicLinking)) { $object->allowDynamicLinking = $this->allowDynamicLinking; } if (!is_null($this->authorizationMode)) { $object->authorizationMode = $this->authorizationMode; } if (!is_null($this->currencyConversionSpecificInput)) { $object->currencyConversionSpecificInput = $this->currencyConversionSpecificInput->toObject(); } if (!is_null($this->initialSchemeTransactionId)) { $object->initialSchemeTransactionId = $this->initialSchemeTransactionId; } if (!is_null($this->multiplePaymentInformation)) { $object->multiplePaymentInformation = $this->multiplePaymentInformation->toObject(); } if (!is_null($this->paymentProduct130SpecificInput)) { $object->paymentProduct130SpecificInput = $this->paymentProduct130SpecificInput->toObject(); } if (!is_null($this->paymentProduct3012SpecificInput)) { $object->paymentProduct3012SpecificInput = $this->paymentProduct3012SpecificInput->toObject(); } if (!is_null($this->paymentProduct3013SpecificInput)) { $object->paymentProduct3013SpecificInput = $this->paymentProduct3013SpecificInput->toObject(); } if (!is_null($this->paymentProduct3208SpecificInput)) { $object->paymentProduct3208SpecificInput = $this->paymentProduct3208SpecificInput->toObject(); } if (!is_null($this->paymentProduct3209SpecificInput)) { $object->paymentProduct3209SpecificInput = $this->paymentProduct3209SpecificInput->toObject(); } if (!is_null($this->paymentProduct5100SpecificInput)) { $object->paymentProduct5100SpecificInput = $this->paymentProduct5100SpecificInput->toObject(); } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } if (!is_null($this->recurring)) { $object->recurring = $this->recurring->toObject(); } if (!is_null($this->threeDSecure)) { $object->threeDSecure = $this->threeDSecure->toObject(); } if (!is_null($this->token)) { $object->token = $this->token; } if (!is_null($this->tokenize)) { $object->tokenize = $this->tokenize; } if (!is_null($this->transactionChannel)) { $object->transactionChannel = $this->transactionChannel; } if (!is_null($this->unscheduledCardOnFileRequestor)) { $object->unscheduledCardOnFileRequestor = $this->unscheduledCardOnFileRequestor; } if (!is_null($this->unscheduledCardOnFileSequenceIndicator)) { $object->unscheduledCardOnFileSequenceIndicator = $this->unscheduledCardOnFileSequenceIndicator; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardPaymentMethodSpecificInputBase { parent::fromObject($object); if (property_exists($object, 'allowDynamicLinking')) { $this->allowDynamicLinking = $object->allowDynamicLinking; } if (property_exists($object, 'authorizationMode')) { $this->authorizationMode = $object->authorizationMode; } if (property_exists($object, 'currencyConversionSpecificInput')) { if (!is_object($object->currencyConversionSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->currencyConversionSpecificInput, true) . '\' is not an object'); } $value = new CurrencyConversionSpecificInput(); $this->currencyConversionSpecificInput = $value->fromObject($object->currencyConversionSpecificInput); } if (property_exists($object, 'initialSchemeTransactionId')) { $this->initialSchemeTransactionId = $object->initialSchemeTransactionId; } if (property_exists($object, 'multiplePaymentInformation')) { if (!is_object($object->multiplePaymentInformation)) { throw new UnexpectedValueException('value \'' . print_r($object->multiplePaymentInformation, true) . '\' is not an object'); } $value = new MultiplePaymentInformation(); $this->multiplePaymentInformation = $value->fromObject($object->multiplePaymentInformation); } if (property_exists($object, 'paymentProduct130SpecificInput')) { if (!is_object($object->paymentProduct130SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct130SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct130SpecificInput(); $this->paymentProduct130SpecificInput = $value->fromObject($object->paymentProduct130SpecificInput); } if (property_exists($object, 'paymentProduct3012SpecificInput')) { if (!is_object($object->paymentProduct3012SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3012SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3012SpecificInput(); $this->paymentProduct3012SpecificInput = $value->fromObject($object->paymentProduct3012SpecificInput); } if (property_exists($object, 'paymentProduct3013SpecificInput')) { if (!is_object($object->paymentProduct3013SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3013SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3013SpecificInput(); $this->paymentProduct3013SpecificInput = $value->fromObject($object->paymentProduct3013SpecificInput); } if (property_exists($object, 'paymentProduct3208SpecificInput')) { if (!is_object($object->paymentProduct3208SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3208SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3208SpecificInput(); $this->paymentProduct3208SpecificInput = $value->fromObject($object->paymentProduct3208SpecificInput); } if (property_exists($object, 'paymentProduct3209SpecificInput')) { if (!is_object($object->paymentProduct3209SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct3209SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct3209SpecificInput(); $this->paymentProduct3209SpecificInput = $value->fromObject($object->paymentProduct3209SpecificInput); } if (property_exists($object, 'paymentProduct5100SpecificInput')) { if (!is_object($object->paymentProduct5100SpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProduct5100SpecificInput, true) . '\' is not an object'); } $value = new PaymentProduct5100SpecificInput(); $this->paymentProduct5100SpecificInput = $value->fromObject($object->paymentProduct5100SpecificInput); } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } if (property_exists($object, 'recurring')) { if (!is_object($object->recurring)) { throw new UnexpectedValueException('value \'' . print_r($object->recurring, true) . '\' is not an object'); } $value = new CardRecurrenceDetails(); $this->recurring = $value->fromObject($object->recurring); } if (property_exists($object, 'threeDSecure')) { if (!is_object($object->threeDSecure)) { throw new UnexpectedValueException('value \'' . print_r($object->threeDSecure, true) . '\' is not an object'); } $value = new ThreeDSecureBase(); $this->threeDSecure = $value->fromObject($object->threeDSecure); } if (property_exists($object, 'token')) { $this->token = $object->token; } if (property_exists($object, 'tokenize')) { $this->tokenize = $object->tokenize; } if (property_exists($object, 'transactionChannel')) { $this->transactionChannel = $object->transactionChannel; } if (property_exists($object, 'unscheduledCardOnFileRequestor')) { $this->unscheduledCardOnFileRequestor = $object->unscheduledCardOnFileRequestor; } if (property_exists($object, 'unscheduledCardOnFileSequenceIndicator')) { $this->unscheduledCardOnFileSequenceIndicator = $object->unscheduledCardOnFileSequenceIndicator; } return $this; } } Domain/CurrencyConversionResult.php 0000644 00000003451 15224675306 0013540 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversionResult extends DataObject { /** * @var string|null */ public ?string $result = null; /** * @var string|null */ public ?string $resultReason = null; /** * @return string|null */ public function getResult(): ?string { return $this->result; } /** * @param string|null $value */ public function setResult(?string $value): void { $this->result = $value; } /** * @return string|null */ public function getResultReason(): ?string { return $this->resultReason; } /** * @param string|null $value */ public function setResultReason(?string $value): void { $this->resultReason = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->result)) { $object->result = $this->result; } if (!is_null($this->resultReason)) { $object->resultReason = $this->resultReason; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversionResult { parent::fromObject($object); if (property_exists($object, 'result')) { $this->result = $object->result; } if (property_exists($object, 'resultReason')) { $this->resultReason = $object->resultReason; } return $this; } } Domain/CaptureResponse.php 0000644 00000007030 15224675306 0011620 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CaptureResponse extends DataObject { /** * @var CaptureOutput|null */ public ?CaptureOutput $captureOutput = null; /** * @var string|null */ public ?string $id = null; /** * @var string|null */ public ?string $status = null; /** * @var CaptureStatusOutput|null */ public ?CaptureStatusOutput $statusOutput = null; /** * @return CaptureOutput|null */ public function getCaptureOutput(): ?CaptureOutput { return $this->captureOutput; } /** * @param CaptureOutput|null $value */ public function setCaptureOutput(?CaptureOutput $value): void { $this->captureOutput = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return CaptureStatusOutput|null */ public function getStatusOutput(): ?CaptureStatusOutput { return $this->statusOutput; } /** * @param CaptureStatusOutput|null $value */ public function setStatusOutput(?CaptureStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->captureOutput)) { $object->captureOutput = $this->captureOutput->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CaptureResponse { parent::fromObject($object); if (property_exists($object, 'captureOutput')) { if (!is_object($object->captureOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->captureOutput, true) . '\' is not an object'); } $value = new CaptureOutput(); $this->captureOutput = $value->fromObject($object->captureOutput); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new CaptureStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PaymentResponse.php 0000644 00000011355 15224675306 0011637 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentResponse extends DataObject { /** * @var HostedCheckoutSpecificOutput|null */ public ?HostedCheckoutSpecificOutput $hostedCheckoutSpecificOutput = null; /** * @var string|null */ public ?string $id = null; /** * @var PaymentOutput|null */ public ?PaymentOutput $paymentOutput = null; /** * @var string|null */ public ?string $status = null; /** * @var PaymentStatusOutput|null */ public ?PaymentStatusOutput $statusOutput = null; /** * @return HostedCheckoutSpecificOutput|null */ public function getHostedCheckoutSpecificOutput(): ?HostedCheckoutSpecificOutput { return $this->hostedCheckoutSpecificOutput; } /** * @param HostedCheckoutSpecificOutput|null $value */ public function setHostedCheckoutSpecificOutput(?HostedCheckoutSpecificOutput $value): void { $this->hostedCheckoutSpecificOutput = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return PaymentOutput|null */ public function getPaymentOutput(): ?PaymentOutput { return $this->paymentOutput; } /** * @param PaymentOutput|null $value */ public function setPaymentOutput(?PaymentOutput $value): void { $this->paymentOutput = $value; } /** * @return string|null */ public function getStatus(): ?string { return $this->status; } /** * @param string|null $value */ public function setStatus(?string $value): void { $this->status = $value; } /** * @return PaymentStatusOutput|null */ public function getStatusOutput(): ?PaymentStatusOutput { return $this->statusOutput; } /** * @param PaymentStatusOutput|null $value */ public function setStatusOutput(?PaymentStatusOutput $value): void { $this->statusOutput = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->hostedCheckoutSpecificOutput)) { $object->hostedCheckoutSpecificOutput = $this->hostedCheckoutSpecificOutput->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->paymentOutput)) { $object->paymentOutput = $this->paymentOutput->toObject(); } if (!is_null($this->status)) { $object->status = $this->status; } if (!is_null($this->statusOutput)) { $object->statusOutput = $this->statusOutput->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentResponse { parent::fromObject($object); if (property_exists($object, 'hostedCheckoutSpecificOutput')) { if (!is_object($object->hostedCheckoutSpecificOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->hostedCheckoutSpecificOutput, true) . '\' is not an object'); } $value = new HostedCheckoutSpecificOutput(); $this->hostedCheckoutSpecificOutput = $value->fromObject($object->hostedCheckoutSpecificOutput); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'paymentOutput')) { if (!is_object($object->paymentOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentOutput, true) . '\' is not an object'); } $value = new PaymentOutput(); $this->paymentOutput = $value->fromObject($object->paymentOutput); } if (property_exists($object, 'status')) { $this->status = $object->status; } if (property_exists($object, 'statusOutput')) { if (!is_object($object->statusOutput)) { throw new UnexpectedValueException('value \'' . print_r($object->statusOutput, true) . '\' is not an object'); } $value = new PaymentStatusOutput(); $this->statusOutput = $value->fromObject($object->statusOutput); } return $this; } } Domain/PayoutStatusOutput.php 0000644 00000004662 15224675306 0012414 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PayoutStatusOutput extends DataObject { /** * @var bool|null */ public ?bool $isCancellable = null; /** * @var string|null */ public ?string $statusCategory = null; /** * @var int|null */ public ?int $statusCode = null; /** * @return bool|null */ public function getIsCancellable(): ?bool { return $this->isCancellable; } /** * @param bool|null $value */ public function setIsCancellable(?bool $value): void { $this->isCancellable = $value; } /** * @return string|null */ public function getStatusCategory(): ?string { return $this->statusCategory; } /** * @param string|null $value */ public function setStatusCategory(?string $value): void { $this->statusCategory = $value; } /** * @return int|null */ public function getStatusCode(): ?int { return $this->statusCode; } /** * @param int|null $value */ public function setStatusCode(?int $value): void { $this->statusCode = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->isCancellable)) { $object->isCancellable = $this->isCancellable; } if (!is_null($this->statusCategory)) { $object->statusCategory = $this->statusCategory; } if (!is_null($this->statusCode)) { $object->statusCode = $this->statusCode; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PayoutStatusOutput { parent::fromObject($object); if (property_exists($object, 'isCancellable')) { $this->isCancellable = $object->isCancellable; } if (property_exists($object, 'statusCategory')) { $this->statusCategory = $object->statusCategory; } if (property_exists($object, 'statusCode')) { $this->statusCode = $object->statusCode; } return $this; } } Domain/RedirectPaymentProduct5406SpecificInput.php 0000644 00000003336 15224675306 0016150 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class RedirectPaymentProduct5406SpecificInput extends DataObject { /** * @var CustomerBankAccount|null */ public ?CustomerBankAccount $customerBankAccount = null; /** * @return CustomerBankAccount|null */ public function getCustomerBankAccount(): ?CustomerBankAccount { return $this->customerBankAccount; } /** * @param CustomerBankAccount|null $value */ public function setCustomerBankAccount(?CustomerBankAccount $value): void { $this->customerBankAccount = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->customerBankAccount)) { $object->customerBankAccount = $this->customerBankAccount->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): RedirectPaymentProduct5406SpecificInput { parent::fromObject($object); if (property_exists($object, 'customerBankAccount')) { if (!is_object($object->customerBankAccount)) { throw new UnexpectedValueException('value \'' . print_r($object->customerBankAccount, true) . '\' is not an object'); } $value = new CustomerBankAccount(); $this->customerBankAccount = $value->fromObject($object->customerBankAccount); } return $this; } } Domain/Card.php 0000644 00000005626 15224675306 0007360 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class Card extends DataObject { /** * @var string|null */ public ?string $cardNumber = null; /** * @var string|null */ public ?string $cardholderName = null; /** * @var string|null */ public ?string $cvv = null; /** * @var string|null */ public ?string $expiryDate = null; /** * @return string|null */ public function getCardNumber(): ?string { return $this->cardNumber; } /** * @param string|null $value */ public function setCardNumber(?string $value): void { $this->cardNumber = $value; } /** * @return string|null */ public function getCardholderName(): ?string { return $this->cardholderName; } /** * @param string|null $value */ public function setCardholderName(?string $value): void { $this->cardholderName = $value; } /** * @return string|null */ public function getCvv(): ?string { return $this->cvv; } /** * @param string|null $value */ public function setCvv(?string $value): void { $this->cvv = $value; } /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardNumber)) { $object->cardNumber = $this->cardNumber; } if (!is_null($this->cardholderName)) { $object->cardholderName = $this->cardholderName; } if (!is_null($this->cvv)) { $object->cvv = $this->cvv; } if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): Card { parent::fromObject($object); if (property_exists($object, 'cardNumber')) { $this->cardNumber = $object->cardNumber; } if (property_exists($object, 'cardholderName')) { $this->cardholderName = $object->cardholderName; } if (property_exists($object, 'cvv')) { $this->cvv = $object->cvv; } if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } return $this; } } Domain/SessionRequest.php 0000644 00000003223 15224675306 0011472 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class SessionRequest extends DataObject { /** * @var string[]|null */ public ?array $tokens = null; /** * @return string[]|null */ public function getTokens(): ?array { return $this->tokens; } /** * @param string[]|null $value */ public function setTokens(?array $value): void { $this->tokens = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->tokens)) { $object->tokens = []; foreach ($this->tokens as $element) { if (!is_null($element)) { $object->tokens[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): SessionRequest { parent::fromObject($object); if (property_exists($object, 'tokens')) { if (!is_array($object->tokens) && !is_object($object->tokens)) { throw new UnexpectedValueException('value \'' . print_r($object->tokens, true) . '\' is not an array or object'); } $this->tokens = []; foreach ($object->tokens as $element) { $this->tokens[] = $element; } } return $this; } } Domain/AccountOnFile.php 0000644 00000007700 15224675306 0011173 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class AccountOnFile extends DataObject { /** * @var AccountOnFileAttribute[]|null */ public ?array $attributes = null; /** * @var AccountOnFileDisplayHints|null */ public ?AccountOnFileDisplayHints $displayHints = null; /** * @var string|null */ public ?string $id = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return AccountOnFileAttribute[]|null */ public function getAttributes(): ?array { return $this->attributes; } /** * @param AccountOnFileAttribute[]|null $value */ public function setAttributes(?array $value): void { $this->attributes = $value; } /** * @return AccountOnFileDisplayHints|null */ public function getDisplayHints(): ?AccountOnFileDisplayHints { return $this->displayHints; } /** * @param AccountOnFileDisplayHints|null $value */ public function setDisplayHints(?AccountOnFileDisplayHints $value): void { $this->displayHints = $value; } /** * @return string|null */ public function getId(): ?string { return $this->id; } /** * @param string|null $value */ public function setId(?string $value): void { $this->id = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->attributes)) { $object->attributes = []; foreach ($this->attributes as $element) { if (!is_null($element)) { $object->attributes[] = $element->toObject(); } } } if (!is_null($this->displayHints)) { $object->displayHints = $this->displayHints->toObject(); } if (!is_null($this->id)) { $object->id = $this->id; } if (!is_null($this->paymentProductId)) { $object->paymentProductId = $this->paymentProductId; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): AccountOnFile { parent::fromObject($object); if (property_exists($object, 'attributes')) { if (!is_array($object->attributes) && !is_object($object->attributes)) { throw new UnexpectedValueException('value \'' . print_r($object->attributes, true) . '\' is not an array or object'); } $this->attributes = []; foreach ($object->attributes as $element) { $value = new AccountOnFileAttribute(); $this->attributes[] = $value->fromObject($element); } } if (property_exists($object, 'displayHints')) { if (!is_object($object->displayHints)) { throw new UnexpectedValueException('value \'' . print_r($object->displayHints, true) . '\' is not an object'); } $value = new AccountOnFileDisplayHints(); $this->displayHints = $value->fromObject($object->displayHints); } if (property_exists($object, 'id')) { $this->id = $object->id; } if (property_exists($object, 'paymentProductId')) { $this->paymentProductId = $object->paymentProductId; } return $this; } } Domain/OtherDetails.php 0000644 00000003421 15224675306 0011065 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class OtherDetails extends DataObject { /** * @var string|null */ public ?string $metaData = null; /** * @var string|null */ public ?string $travelData = null; /** * @return string|null */ public function getMetaData(): ?string { return $this->metaData; } /** * @param string|null $value */ public function setMetaData(?string $value): void { $this->metaData = $value; } /** * @return string|null */ public function getTravelData(): ?string { return $this->travelData; } /** * @param string|null $value */ public function setTravelData(?string $value): void { $this->travelData = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->metaData)) { $object->metaData = $this->metaData; } if (!is_null($this->travelData)) { $object->travelData = $this->travelData; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): OtherDetails { parent::fromObject($object); if (property_exists($object, 'metaData')) { $this->metaData = $object->metaData; } if (property_exists($object, 'travelData')) { $this->travelData = $object->travelData; } return $this; } } Domain/CurrencyConversionResponse.php 0000644 00000005776 15224675306 0014074 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CurrencyConversionResponse extends DataObject { /** * @var string|null */ public ?string $dccSessionId = null; /** * @var DccProposal|null */ public ?DccProposal $proposal = null; /** * @var CurrencyConversionResult|null */ public ?CurrencyConversionResult $result = null; /** * @return string|null */ public function getDccSessionId(): ?string { return $this->dccSessionId; } /** * @param string|null $value */ public function setDccSessionId(?string $value): void { $this->dccSessionId = $value; } /** * @return DccProposal|null */ public function getProposal(): ?DccProposal { return $this->proposal; } /** * @param DccProposal|null $value */ public function setProposal(?DccProposal $value): void { $this->proposal = $value; } /** * @return CurrencyConversionResult|null */ public function getResult(): ?CurrencyConversionResult { return $this->result; } /** * @param CurrencyConversionResult|null $value */ public function setResult(?CurrencyConversionResult $value): void { $this->result = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->dccSessionId)) { $object->dccSessionId = $this->dccSessionId; } if (!is_null($this->proposal)) { $object->proposal = $this->proposal->toObject(); } if (!is_null($this->result)) { $object->result = $this->result->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CurrencyConversionResponse { parent::fromObject($object); if (property_exists($object, 'dccSessionId')) { $this->dccSessionId = $object->dccSessionId; } if (property_exists($object, 'proposal')) { if (!is_object($object->proposal)) { throw new UnexpectedValueException('value \'' . print_r($object->proposal, true) . '\' is not an object'); } $value = new DccProposal(); $this->proposal = $value->fromObject($object->proposal); } if (property_exists($object, 'result')) { if (!is_object($object->result)) { throw new UnexpectedValueException('value \'' . print_r($object->result, true) . '\' is not an object'); } $value = new CurrencyConversionResult(); $this->result = $value->fromObject($object->result); } return $this; } } Domain/BrowserData.php 0000644 00000007144 15224675306 0010721 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class BrowserData extends DataObject { /** * @var int|null */ public ?int $colorDepth = null; /** * @var bool|null */ public ?bool $javaEnabled = null; /** * @var bool|null */ public ?bool $javaScriptEnabled = null; /** * @var string|null */ public ?string $screenHeight = null; /** * @var string|null */ public ?string $screenWidth = null; /** * @return int|null */ public function getColorDepth(): ?int { return $this->colorDepth; } /** * @param int|null $value */ public function setColorDepth(?int $value): void { $this->colorDepth = $value; } /** * @return bool|null */ public function getJavaEnabled(): ?bool { return $this->javaEnabled; } /** * @param bool|null $value */ public function setJavaEnabled(?bool $value): void { $this->javaEnabled = $value; } /** * @return bool|null */ public function getJavaScriptEnabled(): ?bool { return $this->javaScriptEnabled; } /** * @param bool|null $value */ public function setJavaScriptEnabled(?bool $value): void { $this->javaScriptEnabled = $value; } /** * @return string|null */ public function getScreenHeight(): ?string { return $this->screenHeight; } /** * @param string|null $value */ public function setScreenHeight(?string $value): void { $this->screenHeight = $value; } /** * @return string|null */ public function getScreenWidth(): ?string { return $this->screenWidth; } /** * @param string|null $value */ public function setScreenWidth(?string $value): void { $this->screenWidth = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->colorDepth)) { $object->colorDepth = $this->colorDepth; } if (!is_null($this->javaEnabled)) { $object->javaEnabled = $this->javaEnabled; } if (!is_null($this->javaScriptEnabled)) { $object->javaScriptEnabled = $this->javaScriptEnabled; } if (!is_null($this->screenHeight)) { $object->screenHeight = $this->screenHeight; } if (!is_null($this->screenWidth)) { $object->screenWidth = $this->screenWidth; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): BrowserData { parent::fromObject($object); if (property_exists($object, 'colorDepth')) { $this->colorDepth = $object->colorDepth; } if (property_exists($object, 'javaEnabled')) { $this->javaEnabled = $object->javaEnabled; } if (property_exists($object, 'javaScriptEnabled')) { $this->javaScriptEnabled = $object->javaScriptEnabled; } if (property_exists($object, 'screenHeight')) { $this->screenHeight = $object->screenHeight; } if (property_exists($object, 'screenWidth')) { $this->screenWidth = $object->screenWidth; } return $this; } } Domain/PaymentProductFieldDataRestrictions.php 0000644 00000004353 15224675306 0015630 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentProductFieldDataRestrictions extends DataObject { /** * @var bool|null */ public ?bool $isRequired = null; /** * @var PaymentProductFieldValidators|null */ public ?PaymentProductFieldValidators $validators = null; /** * @return bool|null */ public function getIsRequired(): ?bool { return $this->isRequired; } /** * @param bool|null $value */ public function setIsRequired(?bool $value): void { $this->isRequired = $value; } /** * @return PaymentProductFieldValidators|null */ public function getValidators(): ?PaymentProductFieldValidators { return $this->validators; } /** * @param PaymentProductFieldValidators|null $value */ public function setValidators(?PaymentProductFieldValidators $value): void { $this->validators = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->isRequired)) { $object->isRequired = $this->isRequired; } if (!is_null($this->validators)) { $object->validators = $this->validators->toObject(); } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentProductFieldDataRestrictions { parent::fromObject($object); if (property_exists($object, 'isRequired')) { $this->isRequired = $object->isRequired; } if (property_exists($object, 'validators')) { if (!is_object($object->validators)) { throw new UnexpectedValueException('value \'' . print_r($object->validators, true) . '\' is not an object'); } $value = new PaymentProductFieldValidators(); $this->validators = $value->fromObject($object->validators); } return $this; } } Domain/CreateHostedTokenizationRequest.php 0000644 00000012566 15224675306 0015032 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreateHostedTokenizationRequest extends DataObject { /** * @var bool|null */ public ?bool $askConsumerConsent = null; /** * @var CreditCardSpecificInputHostedTokenization|null */ public ?CreditCardSpecificInputHostedTokenization $creditCardSpecificInput = null; /** * @var string|null */ public ?string $locale = null; /** * @var PaymentProductFiltersHostedTokenization|null */ public ?PaymentProductFiltersHostedTokenization $paymentProductFilters = null; /** * @var string|null */ public ?string $tokens = null; /** * @var string|null */ public ?string $variant = null; /** * @return bool|null */ public function getAskConsumerConsent(): ?bool { return $this->askConsumerConsent; } /** * @param bool|null $value */ public function setAskConsumerConsent(?bool $value): void { $this->askConsumerConsent = $value; } /** * @return CreditCardSpecificInputHostedTokenization|null */ public function getCreditCardSpecificInput(): ?CreditCardSpecificInputHostedTokenization { return $this->creditCardSpecificInput; } /** * @param CreditCardSpecificInputHostedTokenization|null $value */ public function setCreditCardSpecificInput(?CreditCardSpecificInputHostedTokenization $value): void { $this->creditCardSpecificInput = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return PaymentProductFiltersHostedTokenization|null */ public function getPaymentProductFilters(): ?PaymentProductFiltersHostedTokenization { return $this->paymentProductFilters; } /** * @param PaymentProductFiltersHostedTokenization|null $value */ public function setPaymentProductFilters(?PaymentProductFiltersHostedTokenization $value): void { $this->paymentProductFilters = $value; } /** * @return string|null */ public function getTokens(): ?string { return $this->tokens; } /** * @param string|null $value */ public function setTokens(?string $value): void { $this->tokens = $value; } /** * @return string|null */ public function getVariant(): ?string { return $this->variant; } /** * @param string|null $value */ public function setVariant(?string $value): void { $this->variant = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->askConsumerConsent)) { $object->askConsumerConsent = $this->askConsumerConsent; } if (!is_null($this->creditCardSpecificInput)) { $object->creditCardSpecificInput = $this->creditCardSpecificInput->toObject(); } if (!is_null($this->locale)) { $object->locale = $this->locale; } if (!is_null($this->paymentProductFilters)) { $object->paymentProductFilters = $this->paymentProductFilters->toObject(); } if (!is_null($this->tokens)) { $object->tokens = $this->tokens; } if (!is_null($this->variant)) { $object->variant = $this->variant; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreateHostedTokenizationRequest { parent::fromObject($object); if (property_exists($object, 'askConsumerConsent')) { $this->askConsumerConsent = $object->askConsumerConsent; } if (property_exists($object, 'creditCardSpecificInput')) { if (!is_object($object->creditCardSpecificInput)) { throw new UnexpectedValueException('value \'' . print_r($object->creditCardSpecificInput, true) . '\' is not an object'); } $value = new CreditCardSpecificInputHostedTokenization(); $this->creditCardSpecificInput = $value->fromObject($object->creditCardSpecificInput); } if (property_exists($object, 'locale')) { $this->locale = $object->locale; } if (property_exists($object, 'paymentProductFilters')) { if (!is_object($object->paymentProductFilters)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProductFilters, true) . '\' is not an object'); } $value = new PaymentProductFiltersHostedTokenization(); $this->paymentProductFilters = $value->fromObject($object->paymentProductFilters); } if (property_exists($object, 'tokens')) { $this->tokens = $object->tokens; } if (property_exists($object, 'variant')) { $this->variant = $object->variant; } return $this; } } Domain/CardWithoutCvv.php 0000644 00000004647 15224675306 0011425 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CardWithoutCvv extends DataObject { /** * @var string|null */ public ?string $cardNumber = null; /** * @var string|null */ public ?string $cardholderName = null; /** * @var string|null */ public ?string $expiryDate = null; /** * @return string|null */ public function getCardNumber(): ?string { return $this->cardNumber; } /** * @param string|null $value */ public function setCardNumber(?string $value): void { $this->cardNumber = $value; } /** * @return string|null */ public function getCardholderName(): ?string { return $this->cardholderName; } /** * @param string|null $value */ public function setCardholderName(?string $value): void { $this->cardholderName = $value; } /** * @return string|null */ public function getExpiryDate(): ?string { return $this->expiryDate; } /** * @param string|null $value */ public function setExpiryDate(?string $value): void { $this->expiryDate = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->cardNumber)) { $object->cardNumber = $this->cardNumber; } if (!is_null($this->cardholderName)) { $object->cardholderName = $this->cardholderName; } if (!is_null($this->expiryDate)) { $object->expiryDate = $this->expiryDate; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CardWithoutCvv { parent::fromObject($object); if (property_exists($object, 'cardNumber')) { $this->cardNumber = $object->cardNumber; } if (property_exists($object, 'cardholderName')) { $this->cardholderName = $object->cardholderName; } if (property_exists($object, 'expiryDate')) { $this->expiryDate = $object->expiryDate; } return $this; } } Domain/PaymentContext.php 0000644 00000005336 15224675306 0011467 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class PaymentContext extends DataObject { /** * @var AmountOfMoney|null */ public ?AmountOfMoney $amountOfMoney = null; /** * @var string|null */ public ?string $countryCode = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @return AmountOfMoney|null */ public function getAmountOfMoney(): ?AmountOfMoney { return $this->amountOfMoney; } /** * @param AmountOfMoney|null $value */ public function setAmountOfMoney(?AmountOfMoney $value): void { $this->amountOfMoney = $value; } /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->amountOfMoney)) { $object->amountOfMoney = $this->amountOfMoney->toObject(); } if (!is_null($this->countryCode)) { $object->countryCode = $this->countryCode; } if (!is_null($this->isRecurring)) { $object->isRecurring = $this->isRecurring; } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): PaymentContext { parent::fromObject($object); if (property_exists($object, 'amountOfMoney')) { if (!is_object($object->amountOfMoney)) { throw new UnexpectedValueException('value \'' . print_r($object->amountOfMoney, true) . '\' is not an object'); } $value = new AmountOfMoney(); $this->amountOfMoney = $value->fromObject($object->amountOfMoney); } if (property_exists($object, 'countryCode')) { $this->countryCode = $object->countryCode; } if (property_exists($object, 'isRecurring')) { $this->isRecurring = $object->isRecurring; } return $this; } } Domain/CreditCardSpecificInputHostedTokenization.php 0000644 00000006265 15224675306 0016747 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Domain; use App\Libs\Sdk\Domain\DataObject; use UnexpectedValueException; /** * @package OnlinePayments\Sdk\Domain */ class CreditCardSpecificInputHostedTokenization extends DataObject { /** * @var CreditCardValidationRulesHostedTokenization|null */ public ?CreditCardValidationRulesHostedTokenization $ValidationRules = null; /** * @var int[]|null */ public ?array $paymentProductPreferredOrder = null; /** * @return CreditCardValidationRulesHostedTokenization|null */ public function getValidationRules(): ?CreditCardValidationRulesHostedTokenization { return $this->ValidationRules; } /** * @param CreditCardValidationRulesHostedTokenization|null $value */ public function setValidationRules(?CreditCardValidationRulesHostedTokenization $value): void { $this->ValidationRules = $value; } /** * @return int[]|null */ public function getPaymentProductPreferredOrder(): ?array { return $this->paymentProductPreferredOrder; } /** * @param int[]|null $value */ public function setPaymentProductPreferredOrder(?array $value): void { $this->paymentProductPreferredOrder = $value; } /** * @return object */ public function toObject(): object { $object = parent::toObject(); if (!is_null($this->ValidationRules)) { $object->ValidationRules = $this->ValidationRules->toObject(); } if (!is_null($this->paymentProductPreferredOrder)) { $object->paymentProductPreferredOrder = []; foreach ($this->paymentProductPreferredOrder as $element) { if (!is_null($element)) { $object->paymentProductPreferredOrder[] = $element; } } } return $object; } /** * @param object $object * @return $this * @throws UnexpectedValueException */ public function fromObject(object $object): CreditCardSpecificInputHostedTokenization { parent::fromObject($object); if (property_exists($object, 'ValidationRules')) { if (!is_object($object->ValidationRules)) { throw new UnexpectedValueException('value \'' . print_r($object->ValidationRules, true) . '\' is not an object'); } $value = new CreditCardValidationRulesHostedTokenization(); $this->ValidationRules = $value->fromObject($object->ValidationRules); } if (property_exists($object, 'paymentProductPreferredOrder')) { if (!is_array($object->paymentProductPreferredOrder) && !is_object($object->paymentProductPreferredOrder)) { throw new UnexpectedValueException('value \'' . print_r($object->paymentProductPreferredOrder, true) . '\' is not an array or object'); } $this->paymentProductPreferredOrder = []; foreach ($object->paymentProductPreferredOrder as $element) { $this->paymentProductPreferredOrder[] = $element; } } return $this; } } DeclinedRefundException.php 0000644 00000003232 15224675306 0012021 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Domain\RefundErrorResponse; use App\Libs\OnlinePayments\Sdk\Domain\RefundResponse; use App\Libs\Sdk\Domain\DataObject; /** * Class DeclinedRefundException * * @package OnlinePayments\Sdk */ class DeclinedRefundException extends ResponseException { /** * @param int $httpStatusCode * @param DataObject $response * @param string|null $message */ public function __construct(int $httpStatusCode, DataObject $response, ?string $message = null) { if (is_null($message)) { $message = DeclinedRefundException::buildMessage($response); } parent::__construct($httpStatusCode, $response, $message); } private static function buildMessage(DataObject $response): string { if ($response instanceof RefundErrorResponse && $response->refundResult != null) { $refundResult = $response->refundResult; return "declined refund '$refundResult->id' with status '$refundResult->status'"; } return 'the payment platform returned a declined refund response'; } /** * @return RefundResponse */ public function getRefundResponse() { $responseVariables = get_object_vars($this->getResponse()); if (!array_key_exists('refundResult', $responseVariables)) { return new RefundResponse(); } $refundResult = $responseVariables['refundResult']; if (!($refundResult instanceof RefundResponse)) { return new RefundResponse(); } return $refundResult; } } Merchant/Services/ServicesClientInterface.php 0000644 00000006437 15224675306 0015370 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Services; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CalculateSurchargeRequest; use App\Libs\OnlinePayments\Sdk\Domain\CalculateSurchargeResponse; use App\Libs\OnlinePayments\Sdk\Domain\CurrencyConversionRequest; use App\Libs\OnlinePayments\Sdk\Domain\CurrencyConversionResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetIINDetailsRequest; use App\Libs\OnlinePayments\Sdk\Domain\GetIINDetailsResponse; use App\Libs\OnlinePayments\Sdk\Domain\TestConnection; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Services client interface. */ interface ServicesClientInterface { /** * Resource /v2/{merchantId}/services/testconnection - Test connection * * @param CallContext|null $callContext * @return TestConnection * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function testConnection(?CallContext $callContext = null): TestConnection; /** * Resource /v2/{merchantId}/services/getIINdetails - Get IIN details * * @param GetIINDetailsRequest $body * @param CallContext|null $callContext * @return GetIINDetailsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getIINDetails(GetIINDetailsRequest $body, ?CallContext $callContext = null): GetIINDetailsResponse; /** * Resource /v2/{merchantId}/services/dccrate - Get currency conversion quote * * @param CurrencyConversionRequest $body * @param CallContext|null $callContext * @return CurrencyConversionResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getDccRateInquiry(CurrencyConversionRequest $body, ?CallContext $callContext = null): CurrencyConversionResponse; /** * Resource /v2/{merchantId}/services/surchargecalculation - Surcharge Calculation * * @param CalculateSurchargeRequest $body * @param CallContext|null $callContext * @return CalculateSurchargeResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function surchargeCalculation(CalculateSurchargeRequest $body, ?CallContext $callContext = null): CalculateSurchargeResponse; } Merchant/Services/ServicesClient.php 0000644 00000012346 15224675306 0013543 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Services; use App\Libs\OnlinePayments\Sdk\Domain\CalculateSurchargeRequest; use App\Libs\OnlinePayments\Sdk\Domain\CalculateSurchargeResponse; use App\Libs\OnlinePayments\Sdk\Domain\CurrencyConversionRequest; use App\Libs\OnlinePayments\Sdk\Domain\CurrencyConversionResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetIINDetailsRequest; use App\Libs\OnlinePayments\Sdk\Domain\GetIINDetailsResponse; use App\Libs\OnlinePayments\Sdk\Domain\TestConnection; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Services client. */ class ServicesClient extends ApiResource implements ServicesClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function testConnection(?CallContext $callContext = null): TestConnection { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\TestConnection'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/services/testconnection'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getIINDetails(GetIINDetailsRequest $body, ?CallContext $callContext = null): GetIINDetailsResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetIINDetailsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/services/getIINdetails'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getDccRateInquiry(CurrencyConversionRequest $body, ?CallContext $callContext = null): CurrencyConversionResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CurrencyConversionResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/services/dccrate'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function surchargeCalculation(CalculateSurchargeRequest $body, ?CallContext $callContext = null): CalculateSurchargeResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CalculateSurchargeResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/services/surchargecalculation'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Refunds/RefundsClientInterface.php 0000644 00000002265 15224675306 0015031 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Refunds; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\RefundsResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Refunds client interface. */ interface RefundsClientInterface { /** * Resource /v2/{merchantId}/payments/{paymentId}/refunds - Get refunds of payment * * @param string $paymentId * @param CallContext|null $callContext * @return RefundsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getRefunds(string $paymentId, ?CallContext $callContext = null): RefundsResponse; } Merchant/Refunds/RefundsClient.php 0000644 00000003602 15224675306 0013204 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Refunds; use App\Libs\OnlinePayments\Sdk\Domain\RefundsResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Refunds client. */ class RefundsClient extends ApiResource implements RefundsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getRefunds(string $paymentId, ?CallContext $callContext = null): RefundsResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\RefundsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/refunds'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Webhooks/WebhooksClient.php 0000644 00000005616 15224675306 0013541 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Webhooks; use App\Libs\OnlinePayments\Sdk\Domain\SendTestRequest; use App\Libs\OnlinePayments\Sdk\Domain\ValidateCredentialsRequest; use App\Libs\OnlinePayments\Sdk\Domain\ValidateCredentialsResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Webhooks client. */ class WebhooksClient extends ApiResource implements WebhooksClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function validateWebhookCredentials(ValidateCredentialsRequest $body, ?CallContext $callContext = null): ValidateCredentialsResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ValidateCredentialsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/webhooks/validateCredentials'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function sendTestWebhook(SendTestRequest $body, ?CallContext $callContext = null): void { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/webhooks/sendtest'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Webhooks/WebhooksClientInterface.php 0000644 00000003626 15224675306 0015361 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Webhooks; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\SendTestRequest; use App\Libs\OnlinePayments\Sdk\Domain\ValidateCredentialsRequest; use App\Libs\OnlinePayments\Sdk\Domain\ValidateCredentialsResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Webhooks client interface. */ interface WebhooksClientInterface { /** * Resource /v2/{merchantId}/webhooks/validateCredentials - Validate credentials * * @param ValidateCredentialsRequest $body * @param CallContext|null $callContext * @return ValidateCredentialsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function validateWebhookCredentials(ValidateCredentialsRequest $body, ?CallContext $callContext = null): ValidateCredentialsResponse; /** * Resource /v2/{merchantId}/webhooks/sendtest - Send test * * @param SendTestRequest $body * @param CallContext|null $callContext * @return null * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function sendTestWebhook(SendTestRequest $body, ?CallContext $callContext = null): void; } Merchant/PrivacyPolicy/PrivacyPolicyClient.php 0000644 00000003621 15224675306 0015563 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy; use App\Libs\OnlinePayments\Sdk\Domain\GetPrivacyPolicyResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * PrivacyPolicy client. */ class PrivacyPolicyClient extends ApiResource implements PrivacyPolicyClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getPrivacyPolicy(GetPrivacyPolicyParams $query, ?CallContext $callContext = null): GetPrivacyPolicyResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetPrivacyPolicyResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/services/privacypolicy'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/PrivacyPolicy/PrivacyPolicyClientInterface.php 0000644 00000002366 15224675306 0017411 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\GetPrivacyPolicyResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * PrivacyPolicy client interface. */ interface PrivacyPolicyClientInterface { /** * Resource /v2/{merchantId}/services/privacypolicy - Get Privacy Policy * * @param GetPrivacyPolicyParams $query * @param CallContext|null $callContext * @return GetPrivacyPolicyResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPrivacyPolicy(GetPrivacyPolicyParams $query, ?CallContext $callContext = null): GetPrivacyPolicyResponse; } Merchant/PrivacyPolicy/GetPrivacyPolicyParams.php 0000644 00000002574 15224675306 0016236 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get Privacy Policy * * @package OnlinePayments\Sdk\Merchant\PrivacyPolicy */ class GetPrivacyPolicyParams extends RequestObject { /** * @var string|null */ public ?string $locale = null; /** * @var int|null */ public ?int $paymentProductId = null; /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return int|null */ public function getPaymentProductId(): ?int { return $this->paymentProductId; } /** * @param int|null $value */ public function setPaymentProductId(?int $value): void { $this->paymentProductId = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->locale != null) { $array['locale'] = $this->locale; } if ($this->paymentProductId != null) { $array['paymentProductId'] = $this->paymentProductId; } return $array; } } Merchant/Mandates/MandatesClient.php 0000644 00000014613 15224675306 0013464 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Mandates; use App\Libs\OnlinePayments\Sdk\Domain\CreateMandateRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateMandateResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse; use App\Libs\OnlinePayments\Sdk\Domain\RevokeMandateRequest; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Mandates client. */ class MandatesClient extends ApiResource implements MandatesClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function createMandate(CreateMandateRequest $body, ?CallContext $callContext = null): CreateMandateResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CreateMandateResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/mandates'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse { $this->context['uniqueMandateReference'] = $uniqueMandateReference; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/mandates/{uniqueMandateReference}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function blockMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse { $this->context['uniqueMandateReference'] = $uniqueMandateReference; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/mandates/{uniqueMandateReference}/block'), $this->getClientMetaInfo(), null, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function unblockMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse { $this->context['uniqueMandateReference'] = $uniqueMandateReference; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/mandates/{uniqueMandateReference}/unblock'), $this->getClientMetaInfo(), null, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function revokeMandate(string $uniqueMandateReference, RevokeMandateRequest $body, ?CallContext $callContext = null): GetMandateResponse { $this->context['uniqueMandateReference'] = $uniqueMandateReference; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/mandates/{uniqueMandateReference}/revoke'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Mandates/MandatesClientInterface.php 0000644 00000007434 15224675306 0015310 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Mandates; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CreateMandateRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateMandateResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetMandateResponse; use App\Libs\OnlinePayments\Sdk\Domain\RevokeMandateRequest; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Mandates client interface. */ interface MandatesClientInterface { /** * Resource /v2/{merchantId}/mandates - Create mandate * * @param CreateMandateRequest $body * @param CallContext|null $callContext * @return CreateMandateResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createMandate(CreateMandateRequest $body, ?CallContext $callContext = null): CreateMandateResponse; /** * Resource /v2/{merchantId}/mandates/{uniqueMandateReference} - Get mandate * * @param string $uniqueMandateReference * @param CallContext|null $callContext * @return GetMandateResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse; /** * Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/block - Block mandate * * @param string $uniqueMandateReference * @param CallContext|null $callContext * @return GetMandateResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function blockMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse; /** * Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/unblock - Unblock mandate * * @param string $uniqueMandateReference * @param CallContext|null $callContext * @return GetMandateResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function unblockMandate(string $uniqueMandateReference, ?CallContext $callContext = null): GetMandateResponse; /** * Resource /v2/{merchantId}/mandates/{uniqueMandateReference}/revoke - Revoke mandate * * @param string $uniqueMandateReference * @param RevokeMandateRequest $body * @param CallContext|null $callContext * @return GetMandateResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function revokeMandate(string $uniqueMandateReference, RevokeMandateRequest $body, ?CallContext $callContext = null): GetMandateResponse; } Merchant/Products/GetProductDirectoryParams.php 0000644 00000002632 15224675306 0015747 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get payment product directory * * @package OnlinePayments\Sdk\Merchant\Products */ class GetProductDirectoryParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } return $array; } } Merchant/Products/GetPaymentProductParams.php 0000644 00000007002 15224675306 0015414 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get payment product * * @package OnlinePayments\Sdk\Merchant\Products */ class GetPaymentProductParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @var string|null */ public ?string $locale = null; /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var string[]|null */ public ?array $hide = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return string[]|null */ public function getHide(): ?array { return $this->hide; } /** * @param string[]|null $value */ public function setHide(?array $value): void { $this->hide = $value; } /** * @param string[]|null $value */ public function addHide(array $value): void { if (is_null($this->hide)) { $this->hide = []; } $this->hide[] = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } if ($this->locale != null) { $array['locale'] = $this->locale; } if ($this->amount != null) { $array['amount'] = $this->amount; } if ($this->isRecurring != null) { $array['isRecurring'] = $this->isRecurring ? 'true' : 'false'; } if ($this->hide != null) { $array['hide'] = []; foreach ($this->hide as $element) { if ($element != null) { $array['hide'][] = $element; } } } return $array; } } Merchant/Products/GetPaymentProductsParams.php 0000644 00000007004 15224675306 0015601 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get payment products * * @package OnlinePayments\Sdk\Merchant\Products */ class GetPaymentProductsParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @var string|null */ public ?string $locale = null; /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var string[]|null */ public ?array $hide = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return string|null */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return string[]|null */ public function getHide(): ?array { return $this->hide; } /** * @param string[]|null $value */ public function setHide(?array $value): void { $this->hide = $value; } /** * @param string[]|null $value */ public function addHide(array $value): void { if (is_null($this->hide)) { $this->hide = []; } $this->hide[] = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } if ($this->locale != null) { $array['locale'] = $this->locale; } if ($this->amount != null) { $array['amount'] = $this->amount; } if ($this->isRecurring != null) { $array['isRecurring'] = $this->isRecurring ? 'true' : 'false'; } if ($this->hide != null) { $array['hide'] = []; foreach ($this->hide as $element) { if ($element != null) { $array['hide'][] = $element; } } } return $array; } } Merchant/Products/GetPaymentProductNetworksParams.php 0000644 00000004460 15224675306 0017156 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get payment product networks * * @package OnlinePayments\Sdk\Merchant\Products */ class GetPaymentProductNetworksParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } if ($this->amount != null) { $array['amount'] = $this->amount; } if ($this->isRecurring != null) { $array['isRecurring'] = $this->isRecurring ? 'true' : 'false'; } return $array; } } Merchant/Products/ProductsClientInterface.php 0000644 00000006644 15224675306 0015430 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProduct; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProductNetworksResponse; use App\Libs\OnlinePayments\Sdk\Domain\ProductDirectory; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Products client interface. */ interface ProductsClientInterface { /** * Resource /v2/{merchantId}/products - Get payment products * * @param GetPaymentProductsParams $query * @param CallContext|null $callContext * @return GetPaymentProductsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentProducts(GetPaymentProductsParams $query, ?CallContext $callContext = null): GetPaymentProductsResponse; /** * Resource /v2/{merchantId}/products/{paymentProductId} - Get payment product * * @param int $paymentProductId * @param GetPaymentProductParams $query * @param CallContext|null $callContext * @return PaymentProduct * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentProduct(int $paymentProductId, GetPaymentProductParams $query, ?CallContext $callContext = null): PaymentProduct; /** * Resource /v2/{merchantId}/products/{paymentProductId}/networks - Get payment product networks * * @param int $paymentProductId * @param GetPaymentProductNetworksParams $query * @param CallContext|null $callContext * @return PaymentProductNetworksResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentProductNetworks(int $paymentProductId, GetPaymentProductNetworksParams $query, ?CallContext $callContext = null): PaymentProductNetworksResponse; /** * Resource /v2/{merchantId}/products/{paymentProductId}/directory - Get payment product directory * * @param int $paymentProductId * @param GetProductDirectoryParams $query * @param CallContext|null $callContext * @return ProductDirectory * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getProductDirectory(int $paymentProductId, GetProductDirectoryParams $query, ?CallContext $callContext = null): ProductDirectory; } Merchant/Products/ProductsClient.php 0000644 00000012465 15224675306 0013605 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Products; use App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProduct; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProductNetworksResponse; use App\Libs\OnlinePayments\Sdk\Domain\ProductDirectory; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Products client. */ class ProductsClient extends ApiResource implements ProductsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getPaymentProducts(GetPaymentProductsParams $query, ?CallContext $callContext = null): GetPaymentProductsResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/products'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getPaymentProduct(int $paymentProductId, GetPaymentProductParams $query, ?CallContext $callContext = null): PaymentProduct { $this->context['paymentProductId'] = $paymentProductId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentProduct'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/products/{paymentProductId}'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getPaymentProductNetworks(int $paymentProductId, GetPaymentProductNetworksParams $query, ?CallContext $callContext = null): PaymentProductNetworksResponse { $this->context['paymentProductId'] = $paymentProductId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentProductNetworksResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/products/{paymentProductId}/networks'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getProductDirectory(int $paymentProductId, GetProductDirectoryParams $query, ?CallContext $callContext = null): ProductDirectory { $this->context['paymentProductId'] = $paymentProductId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ProductDirectory'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/products/{paymentProductId}/directory'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Subsequent/SubsequentClientInterface.php 0000644 00000002722 15224675306 0016307 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Subsequent; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\DeclinedPaymentException; use App\Libs\OnlinePayments\Sdk\Domain\SubsequentPaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\SubsequentPaymentResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Subsequent client interface. */ interface SubsequentClientInterface { /** * Resource /v2/{merchantId}/payments/{paymentId}/subsequent - Subsequent payment * * @param string $paymentId * @param SubsequentPaymentRequest $body * @param CallContext|null $callContext * @return SubsequentPaymentResponse * * @throws DeclinedPaymentException * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function subsequentPayment(string $paymentId, SubsequentPaymentRequest $body, ?CallContext $callContext = null): SubsequentPaymentResponse; } Merchant/Subsequent/SubsequentClient.php 0000644 00000004066 15224675306 0014471 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Subsequent; use App\Libs\OnlinePayments\Sdk\Domain\SubsequentPaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\SubsequentPaymentResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Subsequent client. */ class SubsequentClient extends ApiResource implements SubsequentClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function subsequentPayment(string $paymentId, SubsequentPaymentRequest $body, ?CallContext $callContext = null): SubsequentPaymentResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\SubsequentPaymentResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/subsequent'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Captures/CapturesClientInterface.php 0000644 00000002276 15224675306 0015373 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Captures; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CapturesResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Captures client interface. */ interface CapturesClientInterface { /** * Resource /v2/{merchantId}/payments/{paymentId}/captures - Get captures of payment * * @param string $paymentId * @param CallContext|null $callContext * @return CapturesResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getCaptures(string $paymentId, ?CallContext $callContext = null): CapturesResponse; } Merchant/Captures/CapturesClient.php 0000644 00000003613 15224675306 0013546 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Captures; use App\Libs\OnlinePayments\Sdk\Domain\CapturesResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Captures client. */ class CapturesClient extends ApiResource implements CapturesClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getCaptures(string $paymentId, ?CallContext $callContext = null): CapturesResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CapturesResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/captures'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/HostedCheckout/HostedCheckoutClientInterface.php 0000644 00000003773 15224675306 0017652 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\HostedCheckout; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedCheckoutRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedCheckoutResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetHostedCheckoutResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * HostedCheckout client interface. */ interface HostedCheckoutClientInterface { /** * Resource /v2/{merchantId}/hostedcheckouts - Create hosted checkout * * @param CreateHostedCheckoutRequest $body * @param CallContext|null $callContext * @return CreateHostedCheckoutResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createHostedCheckout(CreateHostedCheckoutRequest $body, ?CallContext $callContext = null): CreateHostedCheckoutResponse; /** * Resource /v2/{merchantId}/hostedcheckouts/{hostedCheckoutId} - Get hosted checkout status * * @param string $hostedCheckoutId * @param CallContext|null $callContext * @return GetHostedCheckoutResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getHostedCheckout(string $hostedCheckoutId, ?CallContext $callContext = null): GetHostedCheckoutResponse; } Merchant/HostedCheckout/HostedCheckoutClient.php 0000644 00000006172 15224675306 0016025 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\HostedCheckout; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedCheckoutRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedCheckoutResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetHostedCheckoutResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * HostedCheckout client. */ class HostedCheckoutClient extends ApiResource implements HostedCheckoutClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function createHostedCheckout(CreateHostedCheckoutRequest $body, ?CallContext $callContext = null): CreateHostedCheckoutResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CreateHostedCheckoutResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/hostedcheckouts'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getHostedCheckout(string $hostedCheckoutId, ?CallContext $callContext = null): GetHostedCheckoutResponse { $this->context['hostedCheckoutId'] = $hostedCheckoutId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetHostedCheckoutResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/hostedcheckouts/{hostedCheckoutId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/MerchantClientInterface.php 0000644 00000010471 15224675306 0013554 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant; use App\Libs\OnlinePayments\Sdk\Merchant\Captures\CapturesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Complete\CompleteClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\HostedCheckout\HostedCheckoutClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\HostedTokenization\HostedTokenizationClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Mandates\MandatesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks\PaymentLinksClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Payments\PaymentsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Payouts\PayoutsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy\PrivacyPolicyClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups\ProductGroupsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Products\ProductsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Refunds\RefundsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Services\ServicesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Sessions\SessionsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Subsequent\SubsequentClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Tokens\TokensClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Webhooks\WebhooksClientInterface; /** * Merchant client interface. */ interface MerchantClientInterface { /** * Resource /v2/{merchantId}/hostedcheckouts * * @return HostedCheckoutClientInterface */ function hostedCheckout(): HostedCheckoutClientInterface; /** * Resource /v2/{merchantId}/hostedtokenizations * * @return HostedTokenizationClientInterface */ function hostedTokenization(): HostedTokenizationClientInterface; /** * Resource /v2/{merchantId}/payments * * @return PaymentsClientInterface */ function payments(): PaymentsClientInterface; /** * Resource /v2/{merchantId}/payments/{paymentId}/captures * * @return CapturesClientInterface */ function captures(): CapturesClientInterface; /** * Resource /v2/{merchantId}/payments/{paymentId}/refunds * * @return RefundsClientInterface */ function refunds(): RefundsClientInterface; /** * Resource /v2/{merchantId}/payments/{paymentId}/complete * * @return CompleteClientInterface */ function complete(): CompleteClientInterface; /** * Resource /v2/{merchantId}/payments/{paymentId}/subsequent * * @return SubsequentClientInterface */ function subsequent(): SubsequentClientInterface; /** * Resource /v2/{merchantId}/productgroups * * @return ProductGroupsClientInterface */ function productGroups(): ProductGroupsClientInterface; /** * Resource /v2/{merchantId}/products * * @return ProductsClientInterface */ function products(): ProductsClientInterface; /** * Resource /v2/{merchantId}/services/testconnection * * @return ServicesClientInterface */ function services(): ServicesClientInterface; /** * Resource /v2/{merchantId}/webhooks/validateCredentials * * @return WebhooksClientInterface */ function webhooks(): WebhooksClientInterface; /** * Resource /v2/{merchantId}/sessions * * @return SessionsClientInterface */ function sessions(): SessionsClientInterface; /** * Resource /v2/{merchantId}/tokens/{tokenId} * * @return TokensClientInterface */ function tokens(): TokensClientInterface; /** * Resource /v2/{merchantId}/payouts/{payoutId} * * @return PayoutsClientInterface */ function payouts(): PayoutsClientInterface; /** * Resource /v2/{merchantId}/mandates * * @return MandatesClientInterface */ function mandates(): MandatesClientInterface; /** * Resource /v2/{merchantId}/services/privacypolicy * * @return PrivacyPolicyClientInterface */ function privacyPolicy(): PrivacyPolicyClientInterface; /** * Resource /v2/{merchantId}/paymentlinks * * @return PaymentLinksClientInterface */ function paymentLinks(): PaymentLinksClientInterface; } Merchant/Complete/CompleteClient.php 0000644 00000004040 15224675306 0013505 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Complete; use App\Libs\OnlinePayments\Sdk\Domain\CompletePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CompletePaymentResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Complete client. */ class CompleteClient extends ApiResource implements CompleteClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function completePayment(string $paymentId, CompletePaymentRequest $body, ?CallContext $callContext = null): CompletePaymentResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CompletePaymentResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/complete'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Complete/CompleteClientInterface.php 0000644 00000002672 15224675306 0015337 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Complete; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\DeclinedPaymentException; use App\Libs\OnlinePayments\Sdk\Domain\CompletePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CompletePaymentResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Complete client interface. */ interface CompleteClientInterface { /** * Resource /v2/{merchantId}/payments/{paymentId}/complete - Complete payment * * @param string $paymentId * @param CompletePaymentRequest $body * @param CallContext|null $callContext * @return CompletePaymentResponse * * @throws DeclinedPaymentException * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function completePayment(string $paymentId, CompletePaymentRequest $body, ?CallContext $callContext = null): CompletePaymentResponse; } Merchant/HostedTokenization/HostedTokenizationClientInterface.php 0000644 00000004130 15224675306 0021460 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\HostedTokenization; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedTokenizationRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedTokenizationResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetHostedTokenizationResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * HostedTokenization client interface. */ interface HostedTokenizationClientInterface { /** * Resource /v2/{merchantId}/hostedtokenizations - Create hosted tokenization session * * @param CreateHostedTokenizationRequest $body * @param CallContext|null $callContext * @return CreateHostedTokenizationResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createHostedTokenization(CreateHostedTokenizationRequest $body, ?CallContext $callContext = null): CreateHostedTokenizationResponse; /** * Resource /v2/{merchantId}/hostedtokenizations/{hostedTokenizationId} - Get hosted tokenization session * * @param string $hostedTokenizationId * @param CallContext|null $callContext * @return GetHostedTokenizationResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getHostedTokenization(string $hostedTokenizationId, ?CallContext $callContext = null): GetHostedTokenizationResponse; } Merchant/HostedTokenization/HostedTokenizationClient.php 0000644 00000006312 15224675306 0017643 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\HostedTokenization; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedTokenizationRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreateHostedTokenizationResponse; use App\Libs\OnlinePayments\Sdk\Domain\GetHostedTokenizationResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * HostedTokenization client. */ class HostedTokenizationClient extends ApiResource implements HostedTokenizationClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function createHostedTokenization(CreateHostedTokenizationRequest $body, ?CallContext $callContext = null): CreateHostedTokenizationResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CreateHostedTokenizationResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/hostedtokenizations'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getHostedTokenization(string $hostedTokenizationId, ?CallContext $callContext = null): GetHostedTokenizationResponse { $this->context['hostedTokenizationId'] = $hostedTokenizationId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetHostedTokenizationResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/hostedtokenizations/{hostedTokenizationId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Payments/PaymentsClientInterface.php 0000644 00000011530 15224675306 0015410 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Payments; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\DeclinedPaymentException; use App\Libs\OnlinePayments\Sdk\DeclinedRefundException; use App\Libs\OnlinePayments\Sdk\Domain\CancelPaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CancelPaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\CapturePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CaptureResponse; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentDetailsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\RefundRequest; use App\Libs\OnlinePayments\Sdk\Domain\RefundResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Payments client interface. */ interface PaymentsClientInterface { /** * Resource /v2/{merchantId}/payments - Create payment * * @param CreatePaymentRequest $body * @param CallContext|null $callContext * @return CreatePaymentResponse * * @throws DeclinedPaymentException * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createPayment(CreatePaymentRequest $body, ?CallContext $callContext = null): CreatePaymentResponse; /** * Resource /v2/{merchantId}/payments/{paymentId} - Get payment * * @param string $paymentId * @param CallContext|null $callContext * @return PaymentResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPayment(string $paymentId, ?CallContext $callContext = null): PaymentResponse; /** * Resource /v2/{merchantId}/payments/{paymentId}/details - Get payment details * * @param string $paymentId * @param CallContext|null $callContext * @return PaymentDetailsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentDetails(string $paymentId, ?CallContext $callContext = null): PaymentDetailsResponse; /** * Resource /v2/{merchantId}/payments/{paymentId}/cancel - Cancel payment * * @param string $paymentId * @param CancelPaymentRequest $body * @param CallContext|null $callContext * @return CancelPaymentResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function cancelPayment(string $paymentId, CancelPaymentRequest $body, ?CallContext $callContext = null): CancelPaymentResponse; /** * Resource /v2/{merchantId}/payments/{paymentId}/capture - Capture payment * * @param string $paymentId * @param CapturePaymentRequest $body * @param CallContext|null $callContext * @return CaptureResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function capturePayment(string $paymentId, CapturePaymentRequest $body, ?CallContext $callContext = null): CaptureResponse; /** * Resource /v2/{merchantId}/payments/{paymentId}/refund - Refund payment * * @param string $paymentId * @param RefundRequest $body * @param CallContext|null $callContext * @return RefundResponse * * @throws DeclinedRefundException * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function refundPayment(string $paymentId, RefundRequest $body, ?CallContext $callContext = null): RefundResponse; } Merchant/Payments/PaymentsClient.php 0000644 00000017150 15224675306 0013573 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Payments; use App\Libs\OnlinePayments\Sdk\Domain\CancelPaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CancelPaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\CapturePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CaptureResponse; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentRequest; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentDetailsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentResponse; use App\Libs\OnlinePayments\Sdk\Domain\RefundRequest; use App\Libs\OnlinePayments\Sdk\Domain\RefundResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Payments client. */ class PaymentsClient extends ApiResource implements PaymentsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function createPayment(CreatePaymentRequest $body, ?CallContext $callContext = null): CreatePaymentResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getPayment(string $paymentId, ?CallContext $callContext = null): PaymentResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getPaymentDetails(string $paymentId, ?CallContext $callContext = null): PaymentDetailsResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentDetailsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/details'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function cancelPayment(string $paymentId, CancelPaymentRequest $body, ?CallContext $callContext = null): CancelPaymentResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CancelPaymentResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/cancel'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function capturePayment(string $paymentId, CapturePaymentRequest $body, ?CallContext $callContext = null): CaptureResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CaptureResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/capture'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function refundPayment(string $paymentId, RefundRequest $body, ?CallContext $callContext = null): RefundResponse { $this->context['paymentId'] = $paymentId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\RefundResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\RefundErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payments/{paymentId}/refund'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/MerchantClient.php 0000644 00000012725 15224675306 0011737 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant; use App\Libs\OnlinePayments\Sdk\Merchant\Captures\CapturesClient; use App\Libs\OnlinePayments\Sdk\Merchant\Captures\CapturesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Complete\CompleteClient; use App\Libs\OnlinePayments\Sdk\Merchant\Complete\CompleteClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\HostedCheckout\HostedCheckoutClient; use App\Libs\OnlinePayments\Sdk\Merchant\HostedCheckout\HostedCheckoutClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\HostedTokenization\HostedTokenizationClient; use App\Libs\OnlinePayments\Sdk\Merchant\HostedTokenization\HostedTokenizationClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Mandates\MandatesClient; use App\Libs\OnlinePayments\Sdk\Merchant\Mandates\MandatesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks\PaymentLinksClient; use App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks\PaymentLinksClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Payments\PaymentsClient; use App\Libs\OnlinePayments\Sdk\Merchant\Payments\PaymentsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Payouts\PayoutsClient; use App\Libs\OnlinePayments\Sdk\Merchant\Payouts\PayoutsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy\PrivacyPolicyClient; use App\Libs\OnlinePayments\Sdk\Merchant\PrivacyPolicy\PrivacyPolicyClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups\ProductGroupsClient; use App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups\ProductGroupsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Products\ProductsClient; use App\Libs\OnlinePayments\Sdk\Merchant\Products\ProductsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Refunds\RefundsClient; use App\Libs\OnlinePayments\Sdk\Merchant\Refunds\RefundsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Services\ServicesClient; use App\Libs\OnlinePayments\Sdk\Merchant\Services\ServicesClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Sessions\SessionsClient; use App\Libs\OnlinePayments\Sdk\Merchant\Sessions\SessionsClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Subsequent\SubsequentClient; use App\Libs\OnlinePayments\Sdk\Merchant\Subsequent\SubsequentClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Tokens\TokensClient; use App\Libs\OnlinePayments\Sdk\Merchant\Tokens\TokensClientInterface; use App\Libs\OnlinePayments\Sdk\Merchant\Webhooks\WebhooksClient; use App\Libs\OnlinePayments\Sdk\Merchant\Webhooks\WebhooksClientInterface; use App\Libs\Sdk\ApiResource; /** * Merchant client. */ class MerchantClient extends ApiResource implements MerchantClientInterface { /** * @inheritdoc */ public function hostedCheckout(): HostedCheckoutClientInterface { return new HostedCheckoutClient($this, $this->context); } /** * @inheritdoc */ public function hostedTokenization(): HostedTokenizationClientInterface { return new HostedTokenizationClient($this, $this->context); } /** * @inheritdoc */ public function payments(): PaymentsClientInterface { return new PaymentsClient($this, $this->context); } /** * @inheritdoc */ public function captures(): CapturesClientInterface { return new CapturesClient($this, $this->context); } /** * @inheritdoc */ public function refunds(): RefundsClientInterface { return new RefundsClient($this, $this->context); } /** * @inheritdoc */ public function complete(): CompleteClientInterface { return new CompleteClient($this, $this->context); } /** * @inheritdoc */ public function subsequent(): SubsequentClientInterface { return new SubsequentClient($this, $this->context); } /** * @inheritdoc */ public function productGroups(): ProductGroupsClientInterface { return new ProductGroupsClient($this, $this->context); } /** * @inheritdoc */ public function products(): ProductsClientInterface { return new ProductsClient($this, $this->context); } /** * @inheritdoc */ public function services(): ServicesClientInterface { return new ServicesClient($this, $this->context); } /** * @inheritdoc */ public function webhooks(): WebhooksClientInterface { return new WebhooksClient($this, $this->context); } /** * @inheritdoc */ public function sessions(): SessionsClientInterface { return new SessionsClient($this, $this->context); } /** * @inheritdoc */ public function tokens(): TokensClientInterface { return new TokensClient($this, $this->context); } /** * @inheritdoc */ public function payouts(): PayoutsClientInterface { return new PayoutsClient($this, $this->context); } /** * @inheritdoc */ public function mandates(): MandatesClientInterface { return new MandatesClient($this, $this->context); } /** * @inheritdoc */ public function privacyPolicy(): PrivacyPolicyClientInterface { return new PrivacyPolicyClient($this, $this->context); } /** * @inheritdoc */ public function paymentLinks(): PaymentLinksClientInterface { return new PaymentLinksClient($this, $this->context); } } Merchant/Sessions/SessionsClientInterface.php 0000644 00000002334 15224675306 0015426 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Sessions; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\SessionRequest; use App\Libs\OnlinePayments\Sdk\Domain\SessionResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Sessions client interface. */ interface SessionsClientInterface { /** * Resource /v2/{merchantId}/sessions - Create session * * @param SessionRequest $body * @param CallContext|null $callContext * @return SessionResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createSession(SessionRequest $body, ?CallContext $callContext = null): SessionResponse; } Merchant/Sessions/SessionsClient.php 0000644 00000003625 15224675306 0013611 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Sessions; use App\Libs\OnlinePayments\Sdk\Domain\SessionRequest; use App\Libs\OnlinePayments\Sdk\Domain\SessionResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Sessions client. */ class SessionsClient extends ApiResource implements SessionsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function createSession(SessionRequest $body, ?CallContext $callContext = null): SessionResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\SessionResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/sessions'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/Tokens/TokensClientInterface.php 0000644 00000004501 15224675306 0014516 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Tokens; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CreatedTokenResponse; use App\Libs\OnlinePayments\Sdk\Domain\CreateTokenRequest; use App\Libs\OnlinePayments\Sdk\Domain\TokenResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Tokens client interface. */ interface TokensClientInterface { /** * Resource /v2/{merchantId}/tokens/{tokenId} - Get token * * @param string $tokenId * @param CallContext|null $callContext * @return TokenResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getToken(string $tokenId, ?CallContext $callContext = null): TokenResponse; /** * Resource /v2/{merchantId}/tokens/{tokenId} - Delete token * * @param string $tokenId * @param CallContext|null $callContext * @return null * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function deleteToken(string $tokenId, ?CallContext $callContext = null): void; /** * Resource /v2/{merchantId}/tokens - Please create a token. * * @param CreateTokenRequest $body * @param CallContext|null $callContext * @return CreatedTokenResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createToken(CreateTokenRequest $body, ?CallContext $callContext = null): CreatedTokenResponse; } Merchant/Tokens/TokensClient.php 0000644 00000007466 15224675306 0012712 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Tokens; use App\Libs\OnlinePayments\Sdk\Domain\CreatedTokenResponse; use App\Libs\OnlinePayments\Sdk\Domain\CreateTokenRequest; use App\Libs\OnlinePayments\Sdk\Domain\TokenResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Tokens client. */ class TokensClient extends ApiResource implements TokensClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getToken(string $tokenId, ?CallContext $callContext = null): TokenResponse { $this->context['tokenId'] = $tokenId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\TokenResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/tokens/{tokenId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function deleteToken(string $tokenId, ?CallContext $callContext = null): void { $this->context['tokenId'] = $tokenId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { $this->getCommunicator()->delete( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/tokens/{tokenId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function createToken(CreateTokenRequest $body, ?CallContext $callContext = null): CreatedTokenResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\CreatedTokenResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/tokens'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/PaymentLinks/PaymentLinksClientInterface.php 0000644 00000006070 15224675306 0017047 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentLinkRequest; use App\Libs\OnlinePayments\Sdk\Domain\PaymentLinkResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentLinksResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * PaymentLinks client interface. */ interface PaymentLinksClientInterface { /** * Resource /v2/{merchantId}/paymentlinks - Get payment links * * @param GetPaymentLinksInBulkParams $query * @param CallContext|null $callContext * @return PaymentLinksResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentLinksInBulk(GetPaymentLinksInBulkParams $query, ?CallContext $callContext = null): PaymentLinksResponse; /** * Resource /v2/{merchantId}/paymentlinks - Create payment link * * @param CreatePaymentLinkRequest $body * @param CallContext|null $callContext * @return PaymentLinkResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createPaymentLink(CreatePaymentLinkRequest $body, ?CallContext $callContext = null): PaymentLinkResponse; /** * Resource /v2/{merchantId}/paymentlinks/{paymentLinkId} - Get payment link by ID * * @param string $paymentLinkId * @param CallContext|null $callContext * @return PaymentLinkResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPaymentLinkById(string $paymentLinkId, ?CallContext $callContext = null): PaymentLinkResponse; /** * Resource /v2/{merchantId}/paymentlinks/{paymentLinkId}/cancel - Cancel PaymentLink by ID * * @param string $paymentLinkId * @param CallContext|null $callContext * @return null * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function cancelPaymentLinkById(string $paymentLinkId, ?CallContext $callContext = null): void; } Merchant/PaymentLinks/PaymentLinksClient.php 0000644 00000011715 15224675306 0015230 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks; use App\Libs\OnlinePayments\Sdk\Domain\CreatePaymentLinkRequest; use App\Libs\OnlinePayments\Sdk\Domain\PaymentLinkResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentLinksResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * PaymentLinks client. */ class PaymentLinksClient extends ApiResource implements PaymentLinksClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getPaymentLinksInBulk(GetPaymentLinksInBulkParams $query, ?CallContext $callContext = null): PaymentLinksResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentLinksResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/paymentlinks'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function createPaymentLink(CreatePaymentLinkRequest $body, ?CallContext $callContext = null): PaymentLinkResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentLinkResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/paymentlinks'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getPaymentLinkById(string $paymentLinkId, ?CallContext $callContext = null): PaymentLinkResponse { $this->context['paymentLinkId'] = $paymentLinkId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentLinkResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/paymentlinks/{paymentLinkId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function cancelPaymentLinkById(string $paymentLinkId, ?CallContext $callContext = null): void { $this->context['paymentLinkId'] = $paymentLinkId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/paymentlinks/{paymentLinkId}/cancel'), $this->getClientMetaInfo(), null, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/PaymentLinks/GetPaymentLinksInBulkParams.php 0000644 00000002016 15224675306 0016774 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\PaymentLinks; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get payment links * * @package OnlinePayments\Sdk\Merchant\PaymentLinks */ class GetPaymentLinksInBulkParams extends RequestObject { /** * @var string|null */ public ?string $operationGroupReference = null; /** * @return string|null */ public function getOperationGroupReference(): ?string { return $this->operationGroupReference; } /** * @param string|null $value */ public function setOperationGroupReference(?string $value): void { $this->operationGroupReference = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->operationGroupReference != null) { $array['operationGroupReference'] = $this->operationGroupReference; } return $array; } } Merchant/ProductGroups/GetProductGroupParams.php 0000644 00000007217 15224675306 0016120 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get product group * * @package OnlinePayments\Sdk\Merchant\ProductGroups */ class GetProductGroupParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @var string|null * @deprecated This field has no effect. */ public ?string $locale = null; /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var string[]|null */ public ?array $hide = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return string|null * @deprecated This field has no effect. */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value * @deprecated This field has no effect. */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return string[]|null */ public function getHide(): ?array { return $this->hide; } /** * @param string[]|null $value */ public function setHide(?array $value): void { $this->hide = $value; } /** * @param string[]|null $value */ public function addHide(array $value): void { if (is_null($this->hide)) { $this->hide = []; } $this->hide[] = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } if ($this->locale != null) { $array['locale'] = $this->locale; } if ($this->amount != null) { $array['amount'] = $this->amount; } if ($this->isRecurring != null) { $array['isRecurring'] = $this->isRecurring ? 'true' : 'false'; } if ($this->hide != null) { $array['hide'] = []; foreach ($this->hide as $element) { if ($element != null) { $array['hide'][] = $element; } } } return $array; } } Merchant/ProductGroups/ProductGroupsClient.php 0000644 00000006071 15224675306 0015633 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups; use App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductGroupsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProductGroup; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * ProductGroups client. */ class ProductGroupsClient extends ApiResource implements ProductGroupsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getProductGroups(GetProductGroupsParams $query, ?CallContext $callContext = null): GetPaymentProductGroupsResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductGroupsResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/productgroups'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function getProductGroup(string $paymentProductGroupId, GetProductGroupParams $query, ?CallContext $callContext = null): PaymentProductGroup { $this->context['paymentProductGroupId'] = $paymentProductGroupId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PaymentProductGroup'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/productgroups/{paymentProductGroupId}'), $this->getClientMetaInfo(), $query, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Merchant/ProductGroups/GetProductGroupsParams.php 0000644 00000007221 15224675306 0016276 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups; use App\Libs\Sdk\Communication\RequestObject; /** * Query parameters for Get product groups * * @package OnlinePayments\Sdk\Merchant\ProductGroups */ class GetProductGroupsParams extends RequestObject { /** * @var string|null */ public ?string $countryCode = null; /** * @var string|null */ public ?string $currencyCode = null; /** * @var string|null * @deprecated This field has no effect. */ public ?string $locale = null; /** * @var int|null */ public ?int $amount = null; /** * @var bool|null */ public ?bool $isRecurring = null; /** * @var string[]|null */ public ?array $hide = null; /** * @return string|null */ public function getCountryCode(): ?string { return $this->countryCode; } /** * @param string|null $value */ public function setCountryCode(?string $value): void { $this->countryCode = $value; } /** * @return string|null */ public function getCurrencyCode(): ?string { return $this->currencyCode; } /** * @param string|null $value */ public function setCurrencyCode(?string $value): void { $this->currencyCode = $value; } /** * @return string|null * @deprecated This field has no effect. */ public function getLocale(): ?string { return $this->locale; } /** * @param string|null $value * @deprecated This field has no effect. */ public function setLocale(?string $value): void { $this->locale = $value; } /** * @return int|null */ public function getAmount(): ?int { return $this->amount; } /** * @param int|null $value */ public function setAmount(?int $value): void { $this->amount = $value; } /** * @return bool|null */ public function getIsRecurring(): ?bool { return $this->isRecurring; } /** * @param bool|null $value */ public function setIsRecurring(?bool $value): void { $this->isRecurring = $value; } /** * @return string[]|null */ public function getHide(): ?array { return $this->hide; } /** * @param string[]|null $value */ public function setHide(?array $value): void { $this->hide = $value; } /** * @param string[]|null $value */ public function addHide(array $value): void { if (is_null($this->hide)) { $this->hide = []; } $this->hide[] = $value; } /** * @return array */ public function toArray(): array { $array = []; if ($this->countryCode != null) { $array['countryCode'] = $this->countryCode; } if ($this->currencyCode != null) { $array['currencyCode'] = $this->currencyCode; } if ($this->locale != null) { $array['locale'] = $this->locale; } if ($this->amount != null) { $array['amount'] = $this->amount; } if ($this->isRecurring != null) { $array['isRecurring'] = $this->isRecurring ? 'true' : 'false'; } if ($this->hide != null) { $array['hide'] = []; foreach ($this->hide as $element) { if ($element != null) { $array['hide'][] = $element; } } } return $array; } } Merchant/ProductGroups/ProductGroupsClientInterface.php 0000644 00000003744 15224675306 0017460 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\ProductGroups; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\Domain\GetPaymentProductGroupsResponse; use App\Libs\OnlinePayments\Sdk\Domain\PaymentProductGroup; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * ProductGroups client interface. */ interface ProductGroupsClientInterface { /** * Resource /v2/{merchantId}/productgroups - Get product groups * * @param GetProductGroupsParams $query * @param CallContext|null $callContext * @return GetPaymentProductGroupsResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getProductGroups(GetProductGroupsParams $query, ?CallContext $callContext = null): GetPaymentProductGroupsResponse; /** * Resource /v2/{merchantId}/productgroups/{paymentProductGroupId} - Get product group * * @param string $paymentProductGroupId * @param GetProductGroupParams $query * @param CallContext|null $callContext * @return PaymentProductGroup * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getProductGroup(string $paymentProductGroupId, GetProductGroupParams $query, ?CallContext $callContext = null): PaymentProductGroup; } Merchant/Payouts/PayoutsClientInterface.php 0000644 00000003533 15224675306 0015124 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Payouts; use App\Libs\OnlinePayments\Sdk\ApiException; use App\Libs\OnlinePayments\Sdk\AuthorizationException; use App\Libs\OnlinePayments\Sdk\DeclinedPayoutException; use App\Libs\OnlinePayments\Sdk\Domain\CreatePayoutRequest; use App\Libs\OnlinePayments\Sdk\Domain\PayoutResponse; use App\Libs\OnlinePayments\Sdk\IdempotenceException; use App\Libs\OnlinePayments\Sdk\PlatformException; use App\Libs\OnlinePayments\Sdk\ReferenceException; use App\Libs\OnlinePayments\Sdk\ValidationException; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\InvalidResponseException; /** * Payouts client interface. */ interface PayoutsClientInterface { /** * Resource /v2/{merchantId}/payouts/{payoutId} - Get payout * * @param string $payoutId * @param CallContext|null $callContext * @return PayoutResponse * * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function getPayout(string $payoutId, ?CallContext $callContext = null): PayoutResponse; /** * Resource /v2/{merchantId}/payouts - Create payout * * @param CreatePayoutRequest $body * @param CallContext|null $callContext * @return PayoutResponse * * @throws DeclinedPayoutException * @throws IdempotenceException * @throws ValidationException * @throws AuthorizationException * @throws ReferenceException * @throws PlatformException * @throws ApiException * @throws InvalidResponseException */ function createPayout(CreatePayoutRequest $body, ?CallContext $callContext = null): PayoutResponse; } Merchant/Payouts/PayoutsClient.php 0000644 00000005622 15224675306 0013304 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk\Merchant\Payouts; use App\Libs\OnlinePayments\Sdk\Domain\CreatePayoutRequest; use App\Libs\OnlinePayments\Sdk\Domain\PayoutResponse; use App\Libs\OnlinePayments\Sdk\ExceptionFactory; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CallContext; use App\Libs\Sdk\Communication\ErrorResponseException; use App\Libs\Sdk\Communication\ResponseClassMap; /** * Payouts client. */ class PayoutsClient extends ApiResource implements PayoutsClientInterface { /** @var ExceptionFactory|null */ private ?ExceptionFactory $responseExceptionFactory = null; /** * @inheritdoc */ public function getPayout(string $payoutId, ?CallContext $callContext = null): PayoutResponse { $this->context['payoutId'] = $payoutId; $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PayoutResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\ErrorResponse'; try { return $this->getCommunicator()->get( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payouts/{payoutId}'), $this->getClientMetaInfo(), null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** * @inheritdoc */ public function createPayout(CreatePayoutRequest $body, ?CallContext $callContext = null): PayoutResponse { $responseClassMap = new ResponseClassMap(); $responseClassMap->defaultSuccessResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PayoutResponse'; $responseClassMap->defaultErrorResponseClassName = '\App\Libs\OnlinePayments\Sdk\Domain\PayoutErrorResponse'; try { return $this->getCommunicator()->post( $responseClassMap, $this->instantiateUri('/v2/{merchantId}/payouts'), $this->getClientMetaInfo(), $body, null, $callContext ); } catch (ErrorResponseException $e) { throw $this->getResponseExceptionFactory()->createException( $e->getHttpStatusCode(), $e->getErrorResponse(), $callContext ); } } /** @return ExceptionFactory */ private function getResponseExceptionFactory(): ExceptionFactory { if (is_null($this->responseExceptionFactory)) { $this->responseExceptionFactory = new ExceptionFactory(); } return $this->responseExceptionFactory; } } Client.php 0000644 00000004047 15224675306 0006512 0 ustar 00 <?php /* * This file was automatically generated. */ namespace App\Libs\OnlinePayments\Sdk; use App\Libs\OnlinePayments\Sdk\Merchant\MerchantClient; use App\Libs\Sdk\ApiResource; use App\Libs\Sdk\CommunicatorInterface; use App\Libs\Sdk\Logging\CommunicatorLogger; /** * Payment platform client. */ class Client extends ApiResource implements ClientInterface { /** @var CommunicatorInterface */ private CommunicatorInterface $communicator; /** @var string */ private string $clientMetaInfo; /** * Construct a new Payment platform API client. * * @param CommunicatorInterface $communicator * @param string $clientMetaInfo */ public function __construct(CommunicatorInterface $communicator, string $clientMetaInfo = '') { parent::__construct(); $this->communicator = $communicator; $this->setClientMetaInfo($clientMetaInfo); $this->context = array(); } /** * @return CommunicatorInterface */ protected function getCommunicator(): CommunicatorInterface { return $this->communicator; } /** * @inheritdoc */ public function enableLogging(CommunicatorLogger $communicatorLogger): void { $this->getCommunicator()->enableLogging($communicatorLogger); } /** * @inheritdoc */ public function disableLogging(): void { $this->getCommunicator()->disableLogging(); } /** * @inheritdoc */ public function setClientMetaInfo(string $clientMetaInfo): ClientInterface { $this->clientMetaInfo = $clientMetaInfo ? base64_encode($clientMetaInfo) : ''; return $this; } /** * @return string */ protected function getClientMetaInfo(): string { return $this->clientMetaInfo; } /** * @inheritdoc */ public function merchant(string $merchantId): MerchantClient { $newContext = $this->context; $newContext['merchantId'] = $merchantId; return new MerchantClient($this, $newContext); } }