|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Sprain\NftPort\Request\Ownership; |
| 6 | + |
| 7 | +use JMS\Serializer\Annotation\Exclude; |
| 8 | +use JMS\Serializer\Annotation\SerializedName; |
| 9 | +use Sprain\NftPort\Request\IdRequestInterface; |
| 10 | +use Sprain\NftPort\Request\Request; |
| 11 | +use Sprain\NftPort\Request\RequestCommonsTrait; |
| 12 | +use Sprain\NftPort\Response\Ownership\RetrieveOwnedByAccountResponse; |
| 13 | + |
| 14 | +class RetrieveOwnedByAccountRequest extends Request implements IdRequestInterface |
| 15 | +{ |
| 16 | + use RequestCommonsTrait; |
| 17 | + |
| 18 | + public const API_PATH = '/accounts/{id}'; |
| 19 | + public const RESPONSE_CLASS = RetrieveOwnedByAccountResponse::class; |
| 20 | + public const HTTP_METHOD = self::HTTP_METHOD_GET; |
| 21 | + |
| 22 | + public function __construct( |
| 23 | + #[Exclude] |
| 24 | + protected string $apiKey, |
| 25 | + private string $id, |
| 26 | + #[SerializedName('chain')] |
| 27 | + private string $chain, |
| 28 | + #[SerializedName('continuation')] |
| 29 | + private ?string $continuation = null, |
| 30 | + #[SerializedName('include')] |
| 31 | + private ?string $include = null, |
| 32 | + #[SerializedName('page_number')] |
| 33 | + private ?string $pageNumber = null, |
| 34 | + #[SerializedName('page_size')] |
| 35 | + private ?string $pageSize = null, |
| 36 | + ) { |
| 37 | + parent::__construct($apiKey); |
| 38 | + } |
| 39 | + |
| 40 | + public function getId(): string |
| 41 | + { |
| 42 | + return $this->id; |
| 43 | + } |
| 44 | +} |
0 commit comments