| 1 |
<?php |
| 2 |
/** |
| 3 |
* ApiException |
| 4 |
* PHP version 5 |
| 5 |
* |
| 6 |
* @category Class |
| 7 |
* @package OpenAPI\Client |
| 8 |
* @author OpenAPI Generator team |
| 9 |
* @link https://openapi-generator.tech |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* MONEI API v1 |
| 14 |
* |
| 15 |
* The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. |
| 16 |
* |
| 17 |
* The version of the OpenAPI document: 1.0.0 |
| 18 |
* |
| 19 |
* Generated by: https://openapi-generator.tech |
| 20 |
* OpenAPI Generator version: 4.3.1 |
| 21 |
*/ |
| 22 |
|
| 23 |
/** |
| 24 |
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 25 |
* https://openapi-generator.tech |
| 26 |
* Do not edit the class manually. |
| 27 |
*/ |
| 28 |
|
| 29 |
namespace OpenAPI\Client; |
| 30 |
|
| 31 |
use \Exception; |
| 32 |
|
| 33 |
/** |
| 34 |
* ApiException Class Doc Comment |
| 35 |
* |
| 36 |
* @category Class |
| 37 |
* @package OpenAPI\Client |
| 38 |
* @author OpenAPI Generator team |
| 39 |
* @link https://openapi-generator.tech |
| 40 |
*/ |
| 41 |
class ApiException extends Exception |
| 42 |
{ |
| 43 |
|
| 44 |
/** |
| 45 |
* The HTTP body of the server response either as Json or string. |
| 46 |
* |
| 47 |
* @var mixed |
| 48 |
*/ |
| 49 |
protected $responseBody; |
| 50 |
|
| 51 |
/** |
| 52 |
* The HTTP header of the server response. |
| 53 |
* |
| 54 |
* @var string[]|null |
| 55 |
*/ |
| 56 |
protected $responseHeaders; |
| 57 |
|
| 58 |
/** |
| 59 |
* The deserialized response object |
| 60 |
* |
| 61 |
* @var $responseObject; |
| 62 |
*/ |
| 63 |
protected $responseObject; |
| 64 |
|
| 65 |
/** |
| 66 |
* Constructor |
| 67 |
* |
| 68 |
* @param string $message Error message |
| 69 |
* @param int $code HTTP status code |
| 70 |
* @param string[]|null $responseHeaders HTTP response header |
| 71 |
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string |
| 72 |
*/ |
| 73 |
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) |
| 74 |
{ |
| 75 |
parent::__construct($message, $code); |
| 76 |
$this->responseHeaders = $responseHeaders; |
| 77 |
$this->responseBody = $responseBody; |
| 78 |
} |
| 79 |
|
| 80 |
/** |
| 81 |
* Gets the HTTP response header |
| 82 |
* |
| 83 |
* @return string[]|null HTTP response header |
| 84 |
*/ |
| 85 |
public function getResponseHeaders() |
| 86 |
{ |
| 87 |
return $this->responseHeaders; |
| 88 |
} |
| 89 |
|
| 90 |
/** |
| 91 |
* Gets the HTTP body of the server response either as Json or string |
| 92 |
* |
| 93 |
* @return mixed HTTP body of the server response either as \stdClass or string |
| 94 |
*/ |
| 95 |
public function getResponseBody() |
| 96 |
{ |
| 97 |
return $this->responseBody; |
| 98 |
} |
| 99 |
|
| 100 |
/** |
| 101 |
* Sets the deseralized response object (during deserialization) |
| 102 |
* |
| 103 |
* @param mixed $obj Deserialized response object |
| 104 |
* |
| 105 |
* @return void |
| 106 |
*/ |
| 107 |
public function setResponseObject($obj) |
| 108 |
{ |
| 109 |
$this->responseObject = $obj; |
| 110 |
} |
| 111 |
|
| 112 |
/** |
| 113 |
* Gets the deseralized response object (during deserialization) |
| 114 |
* |
| 115 |
* @return mixed the deserialized response object |
| 116 |
*/ |
| 117 |
public function getResponseObject() |
| 118 |
{ |
| 119 |
return $this->responseObject; |
| 120 |
} |
| 121 |
} |
| 122 |
|