| 1 | <?php |
||
| 8 | class CouldNotSendMobilyWsNotification extends \Exception |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Thrown when mobily.ws return a response body other than '1'. |
||
| 12 | * |
||
| 13 | * @param $code |
||
| 14 | * @param $message |
||
| 15 | * |
||
| 16 | * @return static |
||
| 17 | */ |
||
| 18 | 2 | public static function mobilyWsRespondedWithAnError($code, $message) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Thrown when GuzzleHttp throw a request exception. |
||
| 29 | * |
||
| 30 | * @param RequestException $exception |
||
| 31 | * |
||
| 32 | * @return static |
||
| 33 | */ |
||
| 34 | 1 | public static function couldNotSendRequestToMobilyWs(RequestException $exception) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Thrown when any other errors received. |
||
| 45 | * |
||
| 46 | * @param Response $response |
||
| 47 | * |
||
| 48 | * @return static |
||
| 49 | */ |
||
| 50 | public static function someErrorWhenSendingSms(Response $response) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Thrown when any other errors occur. |
||
| 62 | * |
||
| 63 | * @param $message |
||
| 64 | * |
||
| 65 | * @return static |
||
| 66 | */ |
||
| 67 | 8 | public static function withErrorMessage($message) |
|
| 71 | } |
||
| 72 |