class PetApi

PetApi Class Doc Comment

Properties

protected ClientInterface $client
protected Configuration $config
protected HeaderSelector $headerSelector
protected int $hostIndex

Methods

__construct(ClientInterface $client = null, Configuration $config = null, HeaderSelector $selector = null, int $hostIndex = 0)

No description

void
setHostIndex(int $hostIndex)

Set the host index

int
getHostIndex()

Get the host index

getConfig()

No description

Pet
addPet(Pet $pet)

Operation addPet

array
addPetWithHttpInfo(Pet $pet)

Operation addPetWithHttpInfo

PromiseInterface
addPetAsync(Pet $pet)

Operation addPetAsync

PromiseInterface
addPetAsyncWithHttpInfo(Pet $pet)

Operation addPetAsyncWithHttpInfo

Request
addPetRequest(Pet $pet)

Create request for operation 'addPet'

void
deletePet(int $pet_id, string $api_key = null)

Operation deletePet

array
deletePetWithHttpInfo(int $pet_id, string $api_key = null)

Operation deletePetWithHttpInfo

PromiseInterface
deletePetAsync(int $pet_id, string $api_key = null)

Operation deletePetAsync

PromiseInterface
deletePetAsyncWithHttpInfo(int $pet_id, string $api_key = null)

Operation deletePetAsyncWithHttpInfo

Request
deletePetRequest(int $pet_id, string $api_key = null)

Create request for operation 'deletePet'

Pet[]
findPetsByStatus(string[] $status)

Operation findPetsByStatus

array
findPetsByStatusWithHttpInfo(string[] $status)

Operation findPetsByStatusWithHttpInfo

PromiseInterface
findPetsByStatusAsync(string[] $status)

Operation findPetsByStatusAsync

PromiseInterface
findPetsByStatusAsyncWithHttpInfo(string[] $status)

Operation findPetsByStatusAsyncWithHttpInfo

Request
findPetsByStatusRequest(string[] $status)

Create request for operation 'findPetsByStatus'

Pet[]
findPetsByTags(string[] $tags) deprecated

Operation findPetsByTags

array
findPetsByTagsWithHttpInfo(string[] $tags) deprecated

Operation findPetsByTagsWithHttpInfo

PromiseInterface
findPetsByTagsAsync(string[] $tags) deprecated

Operation findPetsByTagsAsync

PromiseInterface
findPetsByTagsAsyncWithHttpInfo(string[] $tags) deprecated

Operation findPetsByTagsAsyncWithHttpInfo

Request
findPetsByTagsRequest(string[] $tags) deprecated

Create request for operation 'findPetsByTags'

Pet
getPetById(int $pet_id)

Operation getPetById

array
getPetByIdWithHttpInfo(int $pet_id)

Operation getPetByIdWithHttpInfo

PromiseInterface
getPetByIdAsync(int $pet_id)

Operation getPetByIdAsync

PromiseInterface
getPetByIdAsyncWithHttpInfo(int $pet_id)

Operation getPetByIdAsyncWithHttpInfo

Request
getPetByIdRequest(int $pet_id)

Create request for operation 'getPetById'

Pet
updatePet(Pet $pet)

Operation updatePet

array
updatePetWithHttpInfo(Pet $pet)

Operation updatePetWithHttpInfo

PromiseInterface
updatePetAsync(Pet $pet)

Operation updatePetAsync

PromiseInterface
updatePetAsyncWithHttpInfo(Pet $pet)

Operation updatePetAsyncWithHttpInfo

Request
updatePetRequest(Pet $pet)

Create request for operation 'updatePet'

void
updatePetWithForm(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithForm

array
updatePetWithFormWithHttpInfo(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormWithHttpInfo

PromiseInterface
updatePetWithFormAsync(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormAsync

PromiseInterface
updatePetWithFormAsyncWithHttpInfo(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormAsyncWithHttpInfo

Request
updatePetWithFormRequest(int $pet_id, string $name = null, string $status = null)

Create request for operation 'updatePetWithForm'

uploadFile(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFile

array
uploadFileWithHttpInfo(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileWithHttpInfo

PromiseInterface
uploadFileAsync(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileAsync

PromiseInterface
uploadFileAsyncWithHttpInfo(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileAsyncWithHttpInfo

Request
uploadFileRequest(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Create request for operation 'uploadFile'

array
createHttpClientOption()

Create http client option

Details

at line 78
__construct(ClientInterface $client = null, Configuration $config = null, HeaderSelector $selector = null, int $hostIndex = 0)

No description

Parameters

ClientInterface $client
Configuration $config
HeaderSelector $selector
int $hostIndex

(Optional) host index to select the list of hosts if defined in the OpenAPI spec

at line 95
void setHostIndex(int $hostIndex)

Set the host index

Parameters

int $hostIndex

Host index (required)

Return Value

void

at line 105
int getHostIndex()

Get the host index

Return Value

int

Host index

at line 113
Configuration getConfig()

No description

Return Value

Configuration

at line 129
Pet addPet(Pet $pet)

Operation addPet

Add a new pet to the store

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

Pet

Exceptions

ApiException
InvalidArgumentException

at line 146
array addPetWithHttpInfo(Pet $pet)

Operation addPetWithHttpInfo

Add a new pet to the store

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

array

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 244
PromiseInterface addPetAsync(Pet $pet)

Operation addPetAsync

Add a new pet to the store

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 264
PromiseInterface addPetAsyncWithHttpInfo(Pet $pet)

Operation addPetAsyncWithHttpInfo

Add a new pet to the store

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 313
Request addPetRequest(Pet $pet)

Create request for operation 'addPet'

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

Request

Exceptions

InvalidArgumentException

at line 414
void deletePet(int $pet_id, string $api_key = null)

Operation deletePet

Deletes a pet

Parameters

int $pet_id

Pet id to delete (required)

string $api_key

api_key (optional)

Return Value

void

Exceptions

ApiException
InvalidArgumentException

at line 431
array deletePetWithHttpInfo(int $pet_id, string $api_key = null)

Operation deletePetWithHttpInfo

Deletes a pet

Parameters

int $pet_id

Pet id to delete (required)

string $api_key (optional)

Return Value

array

of null, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 490
PromiseInterface deletePetAsync(int $pet_id, string $api_key = null)

Operation deletePetAsync

Deletes a pet

Parameters

int $pet_id

Pet id to delete (required)

string $api_key (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 511
PromiseInterface deletePetAsyncWithHttpInfo(int $pet_id, string $api_key = null)

Operation deletePetAsyncWithHttpInfo

Deletes a pet

Parameters

int $pet_id

Pet id to delete (required)

string $api_key (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 548
Request deletePetRequest(int $pet_id, string $api_key = null)

Create request for operation 'deletePet'

Parameters

int $pet_id

Pet id to delete (required)

string $api_key (optional)

Return Value

Request

Exceptions

InvalidArgumentException

at line 655
Pet[] findPetsByStatus(string[] $status)

Operation findPetsByStatus

Finds Pets by status

Parameters

string[] $status

Status values that need to be considered for filter (required) (deprecated)

Return Value

Pet[]

Exceptions

ApiException
InvalidArgumentException

at line 672
array findPetsByStatusWithHttpInfo(string[] $status)

Operation findPetsByStatusWithHttpInfo

Finds Pets by status

Parameters

string[] $status

Status values that need to be considered for filter (required) (deprecated)

Return Value

array

of \Ally\PetStore\Schema\Pet[], HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 770
PromiseInterface findPetsByStatusAsync(string[] $status)

Operation findPetsByStatusAsync

Finds Pets by status

Parameters

string[] $status

Status values that need to be considered for filter (required) (deprecated)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 790
PromiseInterface findPetsByStatusAsyncWithHttpInfo(string[] $status)

Operation findPetsByStatusAsyncWithHttpInfo

Finds Pets by status

Parameters

string[] $status

Status values that need to be considered for filter (required) (deprecated)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 839
Request findPetsByStatusRequest(string[] $status)

Create request for operation 'findPetsByStatus'

Parameters

string[] $status

Status values that need to be considered for filter (required) (deprecated)

Return Value

Request

Exceptions

InvalidArgumentException

at line 943
Pet[] findPetsByTags(string[] $tags) deprecated

deprecated

Operation findPetsByTags

Finds Pets by tags

Parameters

string[] $tags

Tags to filter by (required)

Return Value

Pet[]

Exceptions

ApiException
InvalidArgumentException

at line 961
array findPetsByTagsWithHttpInfo(string[] $tags) deprecated

deprecated

Operation findPetsByTagsWithHttpInfo

Finds Pets by tags

Parameters

string[] $tags

Tags to filter by (required)

Return Value

array

of \Ally\PetStore\Schema\Pet[], HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 1060
PromiseInterface findPetsByTagsAsync(string[] $tags) deprecated

deprecated

Operation findPetsByTagsAsync

Finds Pets by tags

Parameters

string[] $tags

Tags to filter by (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1081
PromiseInterface findPetsByTagsAsyncWithHttpInfo(string[] $tags) deprecated

deprecated

Operation findPetsByTagsAsyncWithHttpInfo

Finds Pets by tags

Parameters

string[] $tags

Tags to filter by (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1131
Request findPetsByTagsRequest(string[] $tags) deprecated

deprecated

Create request for operation 'findPetsByTags'

Parameters

string[] $tags

Tags to filter by (required)

Return Value

Request

Exceptions

InvalidArgumentException

at line 1234
Pet getPetById(int $pet_id)

Operation getPetById

Find pet by ID

Parameters

int $pet_id

ID of pet to return (required)

Return Value

Pet

Exceptions

ApiException
InvalidArgumentException

at line 1251
array getPetByIdWithHttpInfo(int $pet_id)

Operation getPetByIdWithHttpInfo

Find pet by ID

Parameters

int $pet_id

ID of pet to return (required)

Return Value

array

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 1349
PromiseInterface getPetByIdAsync(int $pet_id)

Operation getPetByIdAsync

Find pet by ID

Parameters

int $pet_id

ID of pet to return (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1369
PromiseInterface getPetByIdAsyncWithHttpInfo(int $pet_id)

Operation getPetByIdAsyncWithHttpInfo

Find pet by ID

Parameters

int $pet_id

ID of pet to return (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1418
Request getPetByIdRequest(int $pet_id)

Create request for operation 'getPetById'

Parameters

int $pet_id

ID of pet to return (required)

Return Value

Request

Exceptions

InvalidArgumentException

at line 1521
Pet updatePet(Pet $pet)

Operation updatePet

Update an existing pet

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

Pet

Exceptions

ApiException
InvalidArgumentException

at line 1538
array updatePetWithHttpInfo(Pet $pet)

Operation updatePetWithHttpInfo

Update an existing pet

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

array

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 1636
PromiseInterface updatePetAsync(Pet $pet)

Operation updatePetAsync

Update an existing pet

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1656
PromiseInterface updatePetAsyncWithHttpInfo(Pet $pet)

Operation updatePetAsyncWithHttpInfo

Update an existing pet

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1705
Request updatePetRequest(Pet $pet)

Create request for operation 'updatePet'

Parameters

Pet $pet

Pet object that needs to be added to the store (required)

Return Value

Request

Exceptions

InvalidArgumentException

at line 1807
void updatePetWithForm(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithForm

Updates a pet in the store with form data

Parameters

int $pet_id

ID of pet that needs to be updated (required)

string $name

Updated name of the pet (optional)

string $status

Updated status of the pet (optional)

Return Value

void

Exceptions

ApiException
InvalidArgumentException

at line 1825
array updatePetWithFormWithHttpInfo(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormWithHttpInfo

Updates a pet in the store with form data

Parameters

int $pet_id

ID of pet that needs to be updated (required)

string $name

Updated name of the pet (optional)

string $status

Updated status of the pet (optional)

Return Value

array

of null, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 1885
PromiseInterface updatePetWithFormAsync(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormAsync

Updates a pet in the store with form data

Parameters

int $pet_id

ID of pet that needs to be updated (required)

string $name

Updated name of the pet (optional)

string $status

Updated status of the pet (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1907
PromiseInterface updatePetWithFormAsyncWithHttpInfo(int $pet_id, string $name = null, string $status = null)

Operation updatePetWithFormAsyncWithHttpInfo

Updates a pet in the store with form data

Parameters

int $pet_id

ID of pet that needs to be updated (required)

string $name

Updated name of the pet (optional)

string $status

Updated status of the pet (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 1945
Request updatePetWithFormRequest(int $pet_id, string $name = null, string $status = null)

Create request for operation 'updatePetWithForm'

Parameters

int $pet_id

ID of pet that needs to be updated (required)

string $name

Updated name of the pet (optional)

string $status

Updated status of the pet (optional)

Return Value

Request

Exceptions

InvalidArgumentException

at line 2059
ApiResponse uploadFile(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFile

uploads an image

Parameters

int $pet_id

ID of pet to update (required)

string $additional_metadata

Additional data to pass to server (optional)

SplFileObject $file

file to upload (optional)

Return Value

ApiResponse

Exceptions

ApiException
InvalidArgumentException

at line 2078
array uploadFileWithHttpInfo(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileWithHttpInfo

uploads an image

Parameters

int $pet_id

ID of pet to update (required)

string $additional_metadata

Additional data to pass to server (optional)

SplFileObject $file

file to upload (optional)

Return Value

array

of \Ally\PetStore\Schema\ApiResponse, HTTP status code, HTTP response headers (array of strings)

Exceptions

ApiException
InvalidArgumentException

at line 2178
PromiseInterface uploadFileAsync(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileAsync

uploads an image

Parameters

int $pet_id

ID of pet to update (required)

string $additional_metadata

Additional data to pass to server (optional)

SplFileObject $file

file to upload (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 2200
PromiseInterface uploadFileAsyncWithHttpInfo(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Operation uploadFileAsyncWithHttpInfo

uploads an image

Parameters

int $pet_id

ID of pet to update (required)

string $additional_metadata

Additional data to pass to server (optional)

SplFileObject $file

file to upload (optional)

Return Value

PromiseInterface

Exceptions

InvalidArgumentException

at line 2251
Request uploadFileRequest(int $pet_id, string $additional_metadata = null, SplFileObject $file = null)

Create request for operation 'uploadFile'

Parameters

int $pet_id

ID of pet to update (required)

string $additional_metadata

Additional data to pass to server (optional)

SplFileObject $file

file to upload (optional)

Return Value

Request

Exceptions

InvalidArgumentException

at line 2366
protected array createHttpClientOption()

Create http client option

Return Value

array

of http client options

Exceptions

RuntimeException