-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save the last API response to StripeObjects.
Calling `getLastResponse` will return the last API response made by that object. The API response contains the headers, status code, response body and JSON.
- Loading branch information
1 parent
3cb2ac9
commit 1439e5b
Showing
7 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Stripe; | ||
|
||
class ApiResponse | ||
{ | ||
public $headers; | ||
public $body; | ||
public $json; | ||
public $code; | ||
|
||
/** | ||
* @param string $body | ||
* @param integer $body | ||
* @param array|null $headers | ||
* @param array|null $json | ||
* | ||
* @return obj An APIResponse | ||
*/ | ||
public function __construct($body, $code, $headers, $json) | ||
{ | ||
$this->body = $body; | ||
$this->code = $code; | ||
$this->headers = $headers; | ||
$this->json = $json; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters