1
|
|
|
<?php namespace Arcanedev\Stripe\Resources; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Stripe\Contracts\Resources\Event as EventContract; |
4
|
|
|
use Arcanedev\Stripe\StripeResource; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class Event |
8
|
|
|
* |
9
|
|
|
* @package Arcanedev\Stripe\Resources |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
* @link https://stripe.com/docs/api/php#event_object |
12
|
|
|
* @link https://stripe.com/docs/api/php#event_types |
13
|
|
|
* |
14
|
|
|
* @property string id |
15
|
|
|
* @property string object // 'event' |
16
|
|
|
* @property string api_version |
17
|
|
|
* @property int created // timestamp |
18
|
|
|
* @property \Arcanedev\Stripe\StripeObject data |
19
|
|
|
* @property bool livemode |
20
|
|
|
* @property int pending_webhooks |
21
|
|
|
* @property string request |
22
|
|
|
* @property string type |
23
|
|
|
*/ |
24
|
|
|
class Event extends StripeResource implements EventContract |
25
|
|
|
{ |
26
|
|
|
/* ------------------------------------------------------------------------------------------------ |
27
|
|
|
| Main Functions |
28
|
|
|
| ------------------------------------------------------------------------------------------------ |
29
|
|
|
*/ |
30
|
|
|
/** |
31
|
|
|
* Retrieve an event. |
32
|
|
|
* @link https://stripe.com/docs/api/php#retrieve_event |
33
|
|
|
* |
34
|
|
|
* @param string $id |
35
|
|
|
* @param array|string|null $options |
36
|
|
|
* |
37
|
|
|
* @return self |
38
|
|
|
*/ |
39
|
2 |
|
public static function retrieve($id, $options = null) |
40
|
|
|
{ |
41
|
2 |
|
return self::scopedRetrieve($id, $options); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* List all events. |
46
|
|
|
* @link https://stripe.com/docs/api/php#list_events |
47
|
|
|
* |
48
|
|
|
* @param array|null $params |
49
|
|
|
* @param array|string|null $options |
50
|
|
|
* |
51
|
|
|
* @return \Arcanedev\Stripe\Collection|array |
52
|
|
|
*/ |
53
|
4 |
|
public static function all($params = [], $options = null) |
54
|
|
|
{ |
55
|
4 |
|
return self::scopedAll($params, $options); |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|