Skip to content

Commit 0983e1e

Browse files
committed
WebHook vs WebHooks contract
1 parent 9490b16 commit 0983e1e

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

src/OpenAPI/WebHookInterface.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44

55
interface WebHookInterface
66
{
7-
/**
8-
* @template H
9-
* @param class-string<H> $className
10-
* @return H
11-
*/
12-
public function hydrateWebHook(string $className, array $data) : object;
13-
14-
/**
15-
* @return array{className: class-string, data: mixed}
16-
*/
17-
public function serializeWebHook(object $object) : array;
187

198
/**
209
* @param array<string, string> $headers

src/OpenAPI/WebHooksInterface.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace ApiClients\Contracts\OpenAPI;
4+
5+
interface WebHookInterface
6+
{
7+
/**
8+
* @template H
9+
* @param class-string<H> $className
10+
* @return H
11+
*/
12+
public function hydrateWebHook(string $className, array $data) : object;
13+
14+
/**
15+
* @return array{className: class-string, data: mixed}
16+
*/
17+
public function serializeWebHook(object $object) : array;
18+
19+
/**
20+
* @param array<string, string> $headers
21+
* @param array<mixed> $data
22+
*/
23+
public function resolve(array $headers, array $data) : object;
24+
}

0 commit comments

Comments
 (0)