1
|
|
|
<?php namespace Arcanedev\Stripe\Resources; |
2
|
|
|
|
3
|
|
|
use Arcanedev\Stripe\Contracts\Resources\BalanceTransaction as BalanceTransactionContract; |
4
|
|
|
use Arcanedev\Stripe\StripeResource; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Class BalanceTransaction |
8
|
|
|
* |
9
|
|
|
* @package Arcanedev\Stripe\Resources |
10
|
|
|
* @author ARCANEDEV <[email protected]> |
11
|
|
|
* @link https://stripe.com/docs/api/php#balance_transaction_object |
12
|
|
|
* |
13
|
|
|
* @property string id |
14
|
|
|
* @property string object // "balance_transaction" |
15
|
|
|
* @property int amount |
16
|
|
|
* @property int available_on // timestamp |
17
|
|
|
* @property int created // timestamp |
18
|
|
|
* @property string currency |
19
|
|
|
* @property string description |
20
|
|
|
* @property int fee |
21
|
|
|
* @property \Arcanedev\Stripe\Collection fee_details |
22
|
|
|
* @property int net |
23
|
|
|
* @property string source |
24
|
|
|
* @property \Arcanedev\Stripe\Collection sourced_transfers |
25
|
|
|
* @property string status |
26
|
|
|
* @property string type |
27
|
|
|
*/ |
28
|
|
|
class BalanceTransaction extends StripeResource implements BalanceTransactionContract |
29
|
|
|
{ |
30
|
|
|
/* ------------------------------------------------------------------------------------------------ |
31
|
|
|
| Getters & Setters |
32
|
|
|
| ------------------------------------------------------------------------------------------------ |
33
|
|
|
*/ |
34
|
|
|
/** |
35
|
|
|
* The class URL for this resource. It needs to be special cased because |
36
|
|
|
* it doesn't fit into the standard resource pattern. |
37
|
|
|
* |
38
|
|
|
* @param string $class |
39
|
|
|
* |
40
|
|
|
* @return string |
41
|
|
|
*/ |
42
|
4 |
|
public static function classUrl($class = '') |
43
|
|
|
{ |
44
|
4 |
|
return '/v1/balance/history'; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/* ------------------------------------------------------------------------------------------------ |
48
|
|
|
| Main Functions |
49
|
|
|
| ------------------------------------------------------------------------------------------------ |
50
|
|
|
*/ |
51
|
|
|
/** |
52
|
|
|
* Retrieving a Balance Transaction. |
53
|
|
|
* |
54
|
|
|
* @link https://stripe.com/docs/api/php#retrieve_balance_transaction |
55
|
|
|
* |
56
|
|
|
* @param string $id |
57
|
|
|
* @param array|string|null $options |
58
|
|
|
* |
59
|
|
|
* @return self |
60
|
|
|
*/ |
61
|
2 |
|
public static function retrieve($id, $options = null) |
62
|
|
|
{ |
63
|
2 |
|
return self::scopedRetrieve($id, $options); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* List balance history. |
68
|
|
|
* |
69
|
|
|
* @link https://stripe.com/docs/api/php#balance_history |
70
|
|
|
* |
71
|
|
|
* @param array|null $params |
72
|
|
|
* @param array|string|null $options |
73
|
|
|
* |
74
|
|
|
* @return \Arcanedev\Stripe\Collection|array |
75
|
|
|
*/ |
76
|
4 |
|
public static function all($params = [], $options = null) |
77
|
|
|
{ |
78
|
4 |
|
return self::scopedAll($params, $options); |
79
|
|
|
} |
80
|
|
|
} |
81
|
|
|
|