Skip to content

Commit 373df0e

Browse files
committed
Merge remote-tracking branch 'origin/development' into pursue-vouchers
2 parents 84538d2 + 4d21659 commit 373df0e

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ $response = $api->downPaymentInvoice()->document($entityId, true, 'image/*'); //
116116

117117
### Event Subscriptions Endpooint
118118
```php
119-
// TODO: get
120-
$response = $api->voucher()->create($data);
121-
$response = $api->voucher()->delete($entityId);
122-
$response = $api->voucher()->getAll();
119+
$response = $api->event()->get($entityId);
120+
$response = $api->event()->create($data);
121+
$response = $api->event()->delete($entityId);
122+
$response = $api->event()->getAll();
123123
```
124124

125125
### File Endpoint

src/Clients/Event.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
use Sysix\LexOffice\BaseClient;
99
use Sysix\LexOffice\Clients\Traits\CreateTrait;
1010
use Sysix\LexOffice\Clients\Traits\DeleteTrait;
11+
use Sysix\LexOffice\Clients\Traits\GetTrait;
1112

1213
class Event extends BaseClient
1314
{
1415
use CreateTrait;
16+
use GetTrait;
1517
use DeleteTrait;
1618

1719
protected string $resource = 'event-subscriptions';

tests/Clients/EventTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ public function testCreate(): void
2727
);
2828
}
2929

30+
public function testGet(): void
31+
{
32+
[$api, $stub] = $this->createClientMockObject(Event::class);
33+
34+
$response = $stub->get('resource-id');
35+
36+
$this->assertInstanceOf(ResponseInterface::class, $response);
37+
38+
$this->assertEquals('GET', $api->getRequest()->getMethod());
39+
$this->assertEquals(
40+
$api->apiUrl . '/v1/event-subscriptions/resource-id',
41+
$api->getRequest()->getUri()->__toString()
42+
);
43+
}
44+
3045
public function testDelete(): void
3146
{
3247
[$api, $stub] = $this->createClientMockObject(Event::class);

0 commit comments

Comments
 (0)