1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace LauLamanApps\eCurring\Resource\Proxy; |
6
|
|
|
|
7
|
|
|
use DateTimeImmutable; |
8
|
|
|
use LauLamanApps\eCurring\eCurringClientInterface; |
9
|
|
|
use LauLamanApps\eCurring\Resource\CustomerInterface; |
10
|
|
|
use LauLamanApps\eCurring\Resource\ProductInterface; |
11
|
|
|
use LauLamanApps\eCurring\Resource\Subscription; |
12
|
|
|
use LauLamanApps\eCurring\Resource\Subscription\Mandate; |
13
|
|
|
use LauLamanApps\eCurring\Resource\Subscription\Status; |
14
|
|
|
use LauLamanApps\eCurring\Resource\SubscriptionInterface; |
15
|
|
|
use LauLamanApps\eCurring\Resource\TransactionInterface; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* @method int getId() |
19
|
|
|
* @method Mandate getMandate() |
20
|
|
|
* @method DateTimeImmutable getStartDate() |
21
|
|
|
* @method Status getStatus() |
22
|
|
|
* @method DateTimeImmutable|null getCancelDate() |
23
|
|
|
* @method DateTimeImmutable|null getResumeDate() |
24
|
|
|
* @method string getConfirmationPage() |
25
|
|
|
* @method bool isConfirmationSent() |
26
|
|
|
* @method string|null getSubscriptionWebhookUrl() |
27
|
|
|
* @method string|null getTransactionWebhookUrl() |
28
|
|
|
* @method string|null getSuccessRedirectUrl() |
29
|
|
|
* @method ProductInterface getSubscriptionPlan() |
30
|
|
|
* @method CustomerInterface getCustomer() |
31
|
|
|
* @method TransactionInterface[]|null getTransactions() |
32
|
|
|
* @method DateTimeImmutable getCreatedAt() |
33
|
|
|
* @method DateTimeImmutable getUpdatedAt() |
34
|
|
|
*/ |
35
|
|
|
final class SubscriptionProxy extends AbstractProxy implements SubscriptionInterface |
36
|
|
|
{ |
37
|
|
|
/** |
38
|
|
|
* @return Subscription |
39
|
|
|
*/ |
40
|
|
|
protected function __load(eCurringClientInterface $client, string $id) |
41
|
|
|
{ |
42
|
|
|
return $client->getSubscription($id); |
43
|
|
|
} |
44
|
|
|
} |
45
|
|
|
|