apiClient = $apiClient; } /** * getOrderById * Find purchase order by ID * orderId, string: ID of pet that needs to be fetched (required) * @return Order */ public function getOrderById($orderId) { //parse inputs $resourcePath = "/store/order/{orderId}"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "GET"; $queryParams = array(); $headerParams = array(); $headerParams['Accept'] = 'application/json'; $headerParams['Content-Type'] = 'application/json'; if($orderId != null) { $resourcePath = str_replace("{" . "orderId" . "}", $this->apiClient->toPathValue($orderId), $resourcePath); } //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); if(! $response){ return null; } $responseObject = $this->apiClient->deserialize($response, 'Order'); return $responseObject; } /** * deleteOrder * Delete purchase order by ID * orderId, string: ID of the order that needs to be deleted (required) * @return */ public function deleteOrder($orderId) { //parse inputs $resourcePath = "/store/order/{orderId}"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "DELETE"; $queryParams = array(); $headerParams = array(); $headerParams['Accept'] = 'application/json'; $headerParams['Content-Type'] = 'application/json'; if($orderId != null) { $resourcePath = str_replace("{" . "orderId" . "}", $this->apiClient->toPathValue($orderId), $resourcePath); } //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); } /** * placeOrder * Place an order for a pet * body, Order: order placed for purchasing the pet (required) * @return */ public function placeOrder($body) { //parse inputs $resourcePath = "/store/order"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "POST"; $queryParams = array(); $headerParams = array(); $headerParams['Accept'] = 'application/json'; $headerParams['Content-Type'] = 'application/json'; //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); } }