-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWave.php
More file actions
55 lines (49 loc) · 1.74 KB
/
Wave.php
File metadata and controls
55 lines (49 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
declare(strict_types=1);
/**
* Anchor Framework
*
* Wave Facade for subscription billing.
*
* @author BenIyke <beniyke34@gmail.com> | Twitter: @BigBeniyke
*/
namespace Wave;
use Wallet\Services\WalletManagerService;
use Wave\Models\Plan;
use Wave\Models\Product;
use Wave\Models\Subscription;
use Wave\Services\AnalyticsManagerService;
use Wave\Services\Builders\SubscriptionBuilder;
use Wave\Services\CouponManagerService;
use Wave\Services\InvoiceManagerService;
use Wave\Services\PlanManagerService;
use Wave\Services\SubscriptionManagerService;
use Wave\Services\WaveManagerService;
/**
* @method static Subscription subscribe(string|int $ownerId, string $ownerType, string|int $planId, array $options = [])
* @method static Subscription|null findSubscription(string|int $id)
* @method static Plan|null findPlan(string|int $id)
* @method static Product|null findProduct(string|int $id)
* @method static Product createProduct(array $data)
* @method static SubscriptionManagerService subscriptions()
* @method static InvoiceManagerService invoices()
* @method static PlanManagerService plan()
* @method static CouponManagerService coupons()
* @method static WalletManagerService wallet()
* @method static SubscriptionBuilder newSubscription()
* @method static AnalyticsManagerService analytics()
*/
class Wave
{
protected static function getInstance(): WaveManagerService
{
return resolve(WaveManagerService::class);
}
/**
* Proxy static calls to the manager
*/
public static function __callStatic(string $method, array $args): mixed
{
return static::getInstance()->$method(...$args);
}
}