Skip to content

Commit

Permalink
Support for invalid api response
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jun 7, 2017
1 parent 77440c8 commit e30a8d2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Response/InvalidApiResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
namespace Packaged\Api\Response;

use Packaged\Api\Abstracts\AbstractApiResponse;

class InvalidApiResponse extends AbstractApiResponse
{
public $message;
public $originalResponse;

public static function withMessage($message, $original = null)
{
$resp = new static();
$resp->message = $message;
$resp->originalResponse = $original;
return $resp;
}
}

0 comments on commit e30a8d2

Please sign in to comment.