Skip to content

Commit

Permalink
chore: update test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Orkuncakilkaya committed Aug 27, 2024
1 parent a00f325 commit 467f185
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 148 deletions.
20 changes: 20 additions & 0 deletions src/Api/FingerprintApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function getConfig(): Configuration
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function deleteVisitorData(string $visitor_id): array
{
Expand Down Expand Up @@ -168,6 +169,8 @@ public function deleteVisitorData(string $visitor_id): array
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function deleteVisitorDataAsync(string $visitor_id): PromiseInterface
{
Expand Down Expand Up @@ -247,6 +250,7 @@ function ($e) {
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function getEvent(string $request_id): array
{
Expand Down Expand Up @@ -327,6 +331,8 @@ public function getEvent(string $request_id): array
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function getEventAsync(string $request_id): PromiseInterface
{
Expand Down Expand Up @@ -406,6 +412,7 @@ function ($e) {
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function getVisits(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): array
{
Expand Down Expand Up @@ -491,6 +498,8 @@ public function getVisits(string $visitor_id, ?string $request_id = null, ?strin
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function getVisitsAsync(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): PromiseInterface
{
Expand Down Expand Up @@ -566,6 +575,7 @@ function ($e) {
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function updateEvent(EventUpdateRequest $body, string $request_id): array
{
Expand Down Expand Up @@ -652,6 +662,8 @@ public function updateEvent(EventUpdateRequest $body, string $request_id): array
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function updateEventAsync(EventUpdateRequest $body, string $request_id): PromiseInterface
{
Expand Down Expand Up @@ -724,6 +736,8 @@ function ($e) {
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
protected function deleteVisitorDataRequest(string $visitor_id): Request
{
Expand Down Expand Up @@ -789,6 +803,8 @@ protected function deleteVisitorDataRequest(string $visitor_id): Request
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
protected function getEventRequest(string $request_id): Request
{
Expand Down Expand Up @@ -854,6 +870,8 @@ protected function getEventRequest(string $request_id): Request
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
protected function getVisitsRequest(string $visitor_id, ?string $request_id = null, ?string $linked_id = null, ?int $limit = null, ?string $pagination_key = null, ?int $before = null): Request
{
Expand Down Expand Up @@ -940,6 +958,8 @@ protected function getVisitsRequest(string $visitor_id, ?string $request_id = nu
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
protected function updateEventRequest(EventUpdateRequest $body, string $request_id): Request
{
Expand Down
5 changes: 5 additions & 0 deletions template/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ use \GuzzleHttp\Exception\GuzzleException;
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
* @return array{ {{#returnType}}{{{returnType}}}|null{{/returnType}}{{^returnType}}null{{/returnType}}, \Psr\Http\Message\ResponseInterface }
*/
public function {{operationId}}({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): array
Expand Down Expand Up @@ -155,6 +156,8 @@ use \GuzzleHttp\Exception\GuzzleException;
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
public function {{operationId}}Async({{#parameters}}{{dataType}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Promise\PromiseInterface
{
Expand Down Expand Up @@ -214,6 +217,8 @@ use \GuzzleHttp\Exception\GuzzleException;
*
* @throws \InvalidArgumentException
* @throws SerializationException
* @throws GuzzleException
* @throws ApiException
*/
protected function {{operationId}}Request({{#parameters}}{{dataType}}{{^required}}|null{{/required}} ${{paramName}}{{^required}} = {{#defaultValue}}'{{{.}}}'{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/parameters}}): \GuzzleHttp\Psr7\Request
{
Expand Down
Loading

0 comments on commit 467f185

Please sign in to comment.