Skip to content

Commit

Permalink
Use new created property on invoice
Browse files Browse the repository at this point in the history
The date property was removed from the invoice object in https://stripe.com/docs/upgrades#2019-03-14
  • Loading branch information
driesvints committed Mar 18, 2019
1 parent 886ab1a commit 4714ba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct($owner, StripeInvoice $invoice)
*/
public function date($timezone = null)
{
$carbon = Carbon::createFromTimestampUTC($this->invoice->date);
$carbon = Carbon::createFromTimestampUTC($this->invoice->created ?? $this->invoice->date);

return $timezone ? $carbon->setTimezone($timezone) : $carbon;
}
Expand Down

0 comments on commit 4714ba4

Please sign in to comment.