Skip to content

Commit

Permalink
Add DELETE BatchSending endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelvais committed Oct 1, 2024
1 parent cbe69da commit e929943
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Endpoint/BatchSendingsEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use DigitalCz\DigiSign\DigiSign;
use DigitalCz\DigiSign\Endpoint\Traits\CreateEndpointTrait;
use DigitalCz\DigiSign\Endpoint\Traits\DeleteEndpointTrait;
use DigitalCz\DigiSign\Endpoint\Traits\GetEndpointTrait;
use DigitalCz\DigiSign\Endpoint\Traits\UpdateEndpointTrait;
use DigitalCz\DigiSign\Resource\BatchSending;
Expand All @@ -15,20 +16,22 @@
* @method BatchSending get(string $id)
* @method BatchSending update(string $id, array $body)
* @method BatchSending create(array $body)
* @method BatchSending delete(string $id)
*/
final class BatchSendingsEndpoint extends ResourceEndpoint
{
use GetEndpointTrait;
use UpdateEndpointTrait;
use CreateEndpointTrait;
use DeleteEndpointTrait;

public function __construct(DigiSign $parent)
{
parent::__construct($parent, '/api/batch-sendings');
}

public function items(BatchSending|string $id): BatchSendingItemsEndpoint
public function items(string $id): BatchSendingsItemsEndpoint

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-lowest)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.

Check failure on line 33 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-stable)

Method DigitalCz\DigiSign\Endpoint\BatchSendingsEndpoint::items() has invalid return type DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint.
{
return new BatchSendingItemsEndpoint($this, $id);
return new BatchSendingsItemsEndpoint($this, $id);

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 (prefer-lowest)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.

Check failure on line 35 in src/Endpoint/BatchSendingsEndpoint.php

View workflow job for this annotation

GitHub Actions / PHP 8 (prefer-stable)

Instantiated class DigitalCz\DigiSign\Endpoint\BatchSendingsItemsEndpoint not found.
}
}
3 changes: 3 additions & 0 deletions tests/Endpoint/BatchSendingEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function testCRUD(): void

self::endpoint()->update('foo', []);
self::assertLastRequest('PUT', "/api/batch-sendings/foo");

self::endpoint()->delete('foo');
self::assertLastRequest('DELETE', "/api/batch-sendings/foo");
}

protected static function endpoint(): BatchSendingsEndpoint
Expand Down

0 comments on commit e929943

Please sign in to comment.