| 1 |
<?php |
| 2 |
|
| 3 |
namespace Stripe; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class OAuthErrorObject. |
| 7 |
* |
| 8 |
* @property string $error |
| 9 |
* @property string $error_description |
| 10 |
*/ |
| 11 |
class OAuthErrorObject extends StripeObject |
| 12 |
{ |
| 13 |
/** |
| 14 |
* Refreshes this object using the provided values. |
| 15 |
* |
| 16 |
* @param array $values |
| 17 |
* @param null|array|string|Util\RequestOptions $opts |
| 18 |
* @param bool $partial defaults to false |
| 19 |
*/ |
| 20 |
public function refreshFrom($values, $opts, $partial = false) |
| 21 |
{ |
| 22 |
// Unlike most other API resources, the API will omit attributes in |
| 23 |
// error objects when they have a null value. We manually set default |
| 24 |
// values here to facilitate generic error handling. |
| 25 |
$values = \array_merge([ |
| 26 |
'error' => null, |
| 27 |
'error_description' => null, |
| 28 |
], $values); |
| 29 |
parent::refreshFrom($values, $opts, $partial); |
| 30 |
} |
| 31 |
} |
| 32 |
|