Authorization.php
6 years ago
Card.php
6 years ago
CardDetails.php
6 years ago
Cardholder.php
6 years ago
Dispute.php
6 years ago
Transaction.php
6 years ago
Authorization.php
69 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Stripe\Issuing; |
| 4 | |
| 5 | /** |
| 6 | * Class Authorization |
| 7 | * |
| 8 | * @property string $id |
| 9 | * @property string $object |
| 10 | * @property bool $approved |
| 11 | * @property string $authorization_method |
| 12 | * @property int $authorized_amount |
| 13 | * @property string $authorized_currency |
| 14 | * @property \Stripe\Collection $balance_transactions |
| 15 | * @property Card $card |
| 16 | * @property Cardholder $cardholder |
| 17 | * @property int $created |
| 18 | * @property int $held_amount |
| 19 | * @property string $held_currency |
| 20 | * @property bool $is_held_amount_controllable |
| 21 | * @property bool $livemode |
| 22 | * @property mixed $merchant_data |
| 23 | * @property \Stripe\StripeObject $metadata |
| 24 | * @property int $pending_authorized_amount |
| 25 | * @property int $pending_held_amount |
| 26 | * @property mixed $request_history |
| 27 | * @property string $status |
| 28 | * @property \Stripe\Collection $transactions |
| 29 | * @property mixed $verification_data |
| 30 | * |
| 31 | * @package Stripe\Issuing |
| 32 | */ |
| 33 | class Authorization extends \Stripe\ApiResource |
| 34 | { |
| 35 | const OBJECT_NAME = "issuing.authorization"; |
| 36 | |
| 37 | use \Stripe\ApiOperations\All; |
| 38 | use \Stripe\ApiOperations\Retrieve; |
| 39 | use \Stripe\ApiOperations\Update; |
| 40 | |
| 41 | /** |
| 42 | * @param array|null $params |
| 43 | * @param array|string|null $options |
| 44 | * |
| 45 | * @return Authorization The approved authorization. |
| 46 | */ |
| 47 | public function approve($params = null, $options = null) |
| 48 | { |
| 49 | $url = $this->instanceUrl() . '/approve'; |
| 50 | list($response, $opts) = $this->_request('post', $url, $params, $options); |
| 51 | $this->refreshFrom($response, $opts); |
| 52 | return $this; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * @param array|null $params |
| 57 | * @param array|string|null $options |
| 58 | * |
| 59 | * @return Authorization The declined authorization. |
| 60 | */ |
| 61 | public function decline($params = null, $options = null) |
| 62 | { |
| 63 | $url = $this->instanceUrl() . '/decline'; |
| 64 | list($response, $opts) = $this->_request('post', $url, $params, $options); |
| 65 | $this->refreshFrom($response, $opts); |
| 66 | return $this; |
| 67 | } |
| 68 | } |
| 69 |