composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / Order.php
blob06c4ad3466f12a419d84c320c16f587c7d0d118a
1 <?php
3 namespace Stripe;
5 /**
6 * Class Order
8 * @property string $id
9 * @property string $object
10 * @property int $amount
11 * @property int $amount_returned
12 * @property string $application
13 * @property int $application_fee
14 * @property string $charge
15 * @property int $created
16 * @property string $currency
17 * @property string $customer
18 * @property string $email
19 * @property string $external_coupon_code
20 * @property OrderItem[] $items
21 * @property bool $livemode
22 * @property StripeObject $metadata
23 * @property Collection $returns
24 * @property string $selected_shipping_method
25 * @property mixed $shipping
26 * @property mixed $shipping_methods
27 * @property string $status
28 * @property mixed $status_transitions
29 * @property int $updated
30 * @property string $upstream_id
32 * @package Stripe
34 class Order extends ApiResource
37 const OBJECT_NAME = "order";
39 use ApiOperations\All;
40 use ApiOperations\Create;
41 use ApiOperations\Retrieve;
42 use ApiOperations\Update;
44 /**
45 * @return Order The paid order.
47 public function pay($params = null, $opts = null)
49 $url = $this->instanceUrl() . '/pay';
50 list($response, $opts) = $this->_request('post', $url, $params, $opts);
51 $this->refreshFrom($response, $opts);
52 return $this;
55 /**
56 * @return OrderReturn The newly created return.
58 public function returnOrder($params = null, $opts = null)
60 $url = $this->instanceUrl() . '/returns';
61 list($response, $opts) = $this->_request('post', $url, $params, $opts);
62 return Util\Util::convertToStripeObject($response, $opts);