Skip to content

Commit

Permalink
Update contract signatures in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jlevers committed Jun 8, 2023
1 parent ed1f9da commit a7f90fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ You may need to do custom operations while signing the API request. You can crea

```php
// CustomAuthorizationSigner.php
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestInterface;
use SellingPartnerApi\Contract\AuthorizationSignerContract;

class CustomAuthorizationSigner implements AuthorizationSignerContract
{
public function sign(Request $request, Credentials $credentials): Request
public function sign(RequestInterface $request, Credentials $credentials): RequestInterface
{
// Calculate request signature and request date.

Expand Down Expand Up @@ -478,17 +478,17 @@ You may also need to customize the entire request signing process – for instan

```php
// RemoteRequestSigner.php
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestInterface;
use SellingPartnerApi\Contract\RequestSignerContract;

class RemoteRequestSigner implements RequestSignerContract
{
public function signRequest(
Request $request,
RequestInterface $request,
?string $scope = null,
?string $restrictedPath = null,
?string $operation = null
): Request {
): RequestInterface {
// Sign request by sending HTTP call
// to external/separate service instance.

Expand Down

0 comments on commit a7f90fc

Please sign in to comment.