Skip to content

Commit d655dbb

Browse files
committed
Fixed BillingReports request method
when there is no report available for specified period (204 No content)
1 parent 8b30b18 commit d655dbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/BillingReports.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public function get_id()
111111
public function save()
112112
{
113113
$header = parent::post(null, "BillingReport", $this->to_array());
114+
115+
if (!isset($header['Location']))
116+
{
117+
return $this;
118+
}
119+
114120
$splitted = explode("/", $header['Location']);
115121
$this->Id = end($splitted);
116122

0 commit comments

Comments
 (0)