mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-02 05:39:35 +00:00
Read the orders that bill the app's subscriptions
$user->appOrders() and app(AnikeenId::class)->appOrders() read v1/client/orders with the app's own token (scope orders:client): all(), pending() and find(), paginated transparently, user scoped when called on a billable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9613d31a8d
commit
820f1b37cc
6 files changed
+208
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Anikeen\Id\Concerns;
|
||||
|
||||
use Anikeen\Id\Resources\AppOrders;
|
||||
use Anikeen\Id\Result;
|
||||
use Throwable;
|
||||
|
||||
@@ -10,6 +11,14 @@ use Throwable;
|
||||
*/
|
||||
trait ManagesUserBilling
|
||||
{
|
||||
/**
|
||||
* Orders of all users that bill the app's subscriptions (e.g. ->pending() for unpaid ones).
|
||||
*/
|
||||
public function appOrders(): AppOrders
|
||||
{
|
||||
return new AppOrders();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an order for a user (VAT from the billing address). With `checkout`, it is paid right
|
||||
* away: with the given `transaction` (a payment captured elsewhere) or by charging the user's
|
||||
|
||||
Reference in new issue
Block a user