composer package updates
[openemr.git] / vendor / stripe / stripe-php / lib / Invoice.php
blob2ccf9930313fdf15022aac2513da9c399b4aad47
1 <?php
3 namespace Stripe;
5 /**
6 * Class Invoice
8 * @property string $id
9 * @property string $object
10 * @property int $amount_due
11 * @property int $amount_paid
12 * @property int $amount_remaining
13 * @property int $application_fee
14 * @property int $attempt_count
15 * @property bool $attempted
16 * @property string $billing
17 * @property string $billing_reason
18 * @property string $charge
19 * @property bool $closed
20 * @property string $currency
21 * @property string $customer
22 * @property int $date
23 * @property string $description
24 * @property Discount $discount
25 * @property int $due_date
26 * @property int $ending_balance
27 * @property bool $forgiven
28 * @property string $hosted_invoice_url
29 * @property string $invoice_pdf
30 * @property Collection $lines
31 * @property bool $livemode
32 * @property StripeObject $metadata
33 * @property int $next_payment_attempt
34 * @property string $number
35 * @property bool $paid
36 * @property int $period_end
37 * @property int $period_start
38 * @property string $receipt_number
39 * @property int $starting_balance
40 * @property string $statement_descriptor
41 * @property string $subscription
42 * @property int $subscription_proration_date
43 * @property int $subtotal
44 * @property int $tax
45 * @property float $tax_percent
46 * @property int $total
47 * @property int $webhooks_delivered_at
49 * @package Stripe
51 class Invoice extends ApiResource
54 const OBJECT_NAME = "invoice";
56 use ApiOperations\All;
57 use ApiOperations\Create;
58 use ApiOperations\Retrieve;
59 use ApiOperations\Update;
61 /**
62 * @param array|null $params
63 * @param array|string|null $opts
65 * @return Invoice The upcoming invoice.
67 public static function upcoming($params = null, $opts = null)
69 $url = static::classUrl() . '/upcoming';
70 list($response, $opts) = static::_staticRequest('get', $url, $params, $opts);
71 $obj = Util\Util::convertToStripeObject($response->json, $opts);
72 $obj->setLastResponse($response);
73 return $obj;
76 /**
77 * @return Invoice The paid invoice.
79 public function pay($params = null, $opts = null)
81 $url = $this->instanceUrl() . '/pay';
82 list($response, $opts) = $this->_request('post', $url, $params, $opts);
83 $this->refreshFrom($response, $opts);
84 return $this;