mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-07 16:18:33 +00:00
Add charges and the billing limit for trusted apps
This commit is contained in:
7 files changed
+799
-60
No files matched your search
@@ -79,6 +79,16 @@ class ApiException extends ResourceException
|
||||
return $this->status === 409;
|
||||
}
|
||||
|
||||
/**
|
||||
* A charge was refused because it would take the user's open monthly bill above their billing
|
||||
* limit (409 "billing_limit_reached"). body() has limit, used, remaining, remaining_net,
|
||||
* required, currency and resets_at.
|
||||
*/
|
||||
public function isBillingLimitReached(): bool
|
||||
{
|
||||
return $this->status === 409 && $this->error === 'billing_limit_reached';
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID service could not be reached (network error, timeout) or failed (5xx): retry later.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user