Skip to content

Commit 7c03137

Browse files
IONOS(ionos-mail): update IONOS Mail API client reference to 2.0.0-20251110130214
https://github.com/IONOS-Productivity/ionos-mail-configuration-api-client/releases/tag/2.0.0-20251110130214 Signed-off-by: Misha M.-Kupriyanov <[email protected]>
1 parent 4534c95 commit 7c03137

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"source": {
5555
"type": "git",
5656
"url": "https://github.com/ionos-productivity/ionos-mail-configuration-api-client.git",
57-
"reference": "2.0.0-20251031093901"
57+
"reference": "2.0.0-20251110130214"
5858
},
5959
"autoload": {
6060
"psr-4": {

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Service/IONOS/IonosMailService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
namespace OCA\Mail\Service\IONOS;
1111

1212
use IONOS\MailConfigurationAPI\Client\ApiException;
13-
use IONOS\MailConfigurationAPI\Client\Model\ErrorMessage;
1413
use IONOS\MailConfigurationAPI\Client\Model\MailAccountResponse;
14+
use IONOS\MailConfigurationAPI\Client\Model\MailAddonErrorMessage;
1515
use IONOS\MailConfigurationAPI\Client\Model\MailCreateData;
1616
use OCA\Mail\Exception\ServiceException;
1717
use OCA\Mail\Service\IONOS\Dto\MailAccountConfig;
@@ -76,7 +76,7 @@ public function createEmailAccount(string $userName): MailAccountConfig {
7676
$this->logger->debug('Send message to mailconfig service', ['data' => $mailCreateData]);
7777
$result = $apiInstance->createMailbox(self::BRAND, $this->configService->getExternalReference(), $mailCreateData);
7878

79-
if ($result instanceof ErrorMessage) {
79+
if ($result instanceof MailAddonErrorMessage) {
8080
$this->logger->error('Failed to create ionos mail', [
8181
'status code' => $result->getStatus(),
8282
'message' => $result->getMessage(),

tests/Unit/Service/IONOS/IonosMailServiceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
use ChristophWurst\Nextcloud\Testing\TestCase;
1313
use GuzzleHttp\ClientInterface;
1414
use IONOS\MailConfigurationAPI\Client\Api\MailConfigurationAPIApi;
15-
use IONOS\MailConfigurationAPI\Client\Model\ErrorMessage;
1615
use IONOS\MailConfigurationAPI\Client\Model\Imap;
1716
use IONOS\MailConfigurationAPI\Client\Model\MailAccountResponse;
17+
use IONOS\MailConfigurationAPI\Client\Model\MailAddonErrorMessage;
1818
use IONOS\MailConfigurationAPI\Client\Model\MailServer;
1919
use IONOS\MailConfigurationAPI\Client\Model\Smtp;
2020
use OCA\Mail\Exception\ServiceException;
@@ -191,7 +191,7 @@ public function testCreateEmailAccountWithApiException(): void {
191191
$this->service->createEmailAccount($userName);
192192
}
193193

194-
public function testCreateEmailAccountWithErrorMessageResponse(): void {
194+
public function testCreateEmailAccountWithMailAddonErrorMessageResponse(): void {
195195
$userName = 'test';
196196
$domain = 'example.com';
197197

@@ -215,12 +215,12 @@ public function testCreateEmailAccountWithErrorMessageResponse(): void {
215215
$apiInstance = $this->createMock(MailConfigurationAPIApi::class);
216216
$this->apiClientService->method('newEventAPIApi')->willReturn($apiInstance);
217217

218-
// Mock ErrorMessage response
219-
$errorMessage = $this->getMockBuilder(ErrorMessage::class)
218+
// Mock MailAddonErrorMessage response
219+
$errorMessage = $this->getMockBuilder(MailAddonErrorMessage::class)
220220
->disableOriginalConstructor()
221221
->onlyMethods(['getStatus', 'getMessage'])
222222
->getMock();
223-
$errorMessage->method('getStatus')->willReturn(400);
223+
$errorMessage->method('getStatus')->willReturn(MailAddonErrorMessage::STATUS__400_BAD_REQUEST);
224224
$errorMessage->method('getMessage')->willReturn('Bad Request');
225225

226226
$apiInstance->method('createMailbox')->willReturn($errorMessage);

0 commit comments

Comments
 (0)