Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/Adyen/Model/LegalEntityManagement/FinancialReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if ($this->container['dateOfFinancialData'] === null) {
$invalidProperties[] = "'dateOfFinancialData' can't be null";
}
return $invalidProperties;
}

Expand Down Expand Up @@ -386,7 +383,7 @@ public function setCurrencyOfFinancialData($currencyOfFinancialData)
/**
* Gets dateOfFinancialData
*
* @return string
* @return string|null
*/
public function getDateOfFinancialData()
{
Expand All @@ -396,7 +393,7 @@ public function getDateOfFinancialData()
/**
* Sets dateOfFinancialData
*
* @param string $dateOfFinancialData The date the financial data were provided, in YYYY-MM-DD format.
* @param string|null $dateOfFinancialData The date the financial data were provided, in YYYY-MM-DD format.
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function getLanguage()
/**
* Sets language
*
* @param string $language The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.
* @param string $language The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible values: **en** for English or **fr** for French.
*
* @return self
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/LegalEntityManagement/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public function getEmail()
/**
* Sets email
*
* @param string|null $email The support email address of the legal entity.
* @param string|null $email The support email address of the legal entity. Required if you have a platform setup.
*
* @return self
*/
Expand Down
14 changes: 14 additions & 0 deletions src/Adyen/Service/LegalEntityManagement/LegalEntitiesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@ public function getLegalEntity(string $id, ?array $requestOptions = null): \Adye
return ObjectSerializer::deserialize($response, \Adyen\Model\LegalEntityManagement\LegalEntity::class);
}

/**
* Request periodic data review.
*
* @param string $id
* @param array|null $requestOptions

* @throws AdyenException
*/
public function requestPeriodicReview(string $id, ?array $requestOptions = null)
{
$endpoint = $this->baseURL . str_replace(['{id}'], [$id], "/legalEntities/{id}/requestPeriodicReview");
$this->requestHttp($endpoint, strtolower('POST'), null, $requestOptions);
}

/**
* Update a legal entity
*
Expand Down
12 changes: 12 additions & 0 deletions tests/Unit/LegalEntityManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Adyen\Service\LegalEntityManagement\TermsOfServiceApi;
use Adyen\Service\LegalEntityManagement\TransferInstrumentsApi;
use function PHPUnit\Framework\assertEquals;
use Adyen\Environment;

class LegalEntityManagementTest extends TestCaseMock
{
Expand Down Expand Up @@ -74,4 +75,15 @@ public function testUpdateTransferInstrument()
);
assertEquals('auLocal', $response->getBankAccount()->getAccountIdentification()->getType());
}

public function testRequestPeriodicReview()
{
$client = $this->createMockClientUrl(null, Environment::TEST);
$service = new LegalEntitiesApi($client);
$service->requestPeriodicReview('LE322JV223222F5GVGMLNB83F');
self::assertEquals(
'https://kyc-test.adyen.com/lem/v4/legalEntities/LE322JV223222F5GVGMLNB83F/requestPeriodicReview',
$this->requestUrl
);
}
}