1 | <?php namespace Arcanedev\Stripe\Resources; |
||
29 | class Recipient extends StripeResource implements RecipientContract |
||
30 | { |
||
31 | /* ------------------------------------------------------------------------------------------------ |
||
32 | | Properties |
||
33 | | ------------------------------------------------------------------------------------------------ |
||
34 | */ |
||
35 | /** |
||
36 | * Allow to check attributes while setting |
||
37 | * |
||
38 | * @var bool |
||
39 | */ |
||
40 | protected $checkUnsavedAttributes = true; |
||
41 | |||
42 | /* ------------------------------------------------------------------------------------------------ |
||
43 | | Main Functions |
||
44 | | ------------------------------------------------------------------------------------------------ |
||
45 | */ |
||
46 | /** |
||
47 | * List all Recipients. |
||
48 | * @link https://stripe.com/docs/api/php#list_recipients |
||
49 | * |
||
50 | * @param array|null $params |
||
51 | * @param array|string|null $options |
||
52 | * |
||
53 | * @return \Arcanedev\Stripe\Collection|array |
||
54 | */ |
||
55 | 2 | public static function all($params = [], $options = null) |
|
59 | |||
60 | /** |
||
61 | * Retrieve a Recipient. |
||
62 | * @link https://stripe.com/docs/api/php#retrieve_recipient |
||
63 | * |
||
64 | * @param string $id |
||
65 | * @param array|string|null $options |
||
66 | * |
||
67 | * @return self |
||
68 | */ |
||
69 | 16 | public static function retrieve($id, $options = null) |
|
73 | |||
74 | /** |
||
75 | * Create a new Recipient. |
||
76 | * @link https://stripe.com/docs/api/php#create_recipient |
||
77 | * |
||
78 | * @param array|null $params |
||
79 | * @param array|string|null $options |
||
80 | * |
||
81 | * @return self|array |
||
82 | */ |
||
83 | 30 | public static function create($params = [], $options = null) |
|
87 | |||
88 | /** |
||
89 | * Update a Recipient. |
||
90 | * @link https://stripe.com/docs/api/php#update_recipient |
||
91 | * |
||
92 | * @param string $id |
||
93 | * @param array|null $params |
||
94 | * @param array|string|null $options |
||
95 | * |
||
96 | * @return self |
||
97 | */ |
||
98 | 2 | public static function update($id, $params = [], $options = null) |
|
102 | |||
103 | /** |
||
104 | * Update/Save a Recipient. |
||
105 | * @link https://stripe.com/docs/api/php#update_recipient |
||
106 | * |
||
107 | * @param array|string|null $options |
||
108 | * |
||
109 | * @return self |
||
110 | */ |
||
111 | 12 | public function save($options = null) |
|
115 | |||
116 | /** |
||
117 | * Delete a Recipient. |
||
118 | * @link https://stripe.com/docs/api/php#delete_recipient |
||
119 | * |
||
120 | * @param array|null $params |
||
121 | * @param array|string|null $options |
||
122 | * |
||
123 | * @return self |
||
124 | */ |
||
125 | 2 | public function delete($params = [], $options = null) |
|
129 | |||
130 | /* ------------------------------------------------------------------------------------------------ |
||
131 | | Relationships Functions |
||
132 | | ------------------------------------------------------------------------------------------------ |
||
133 | */ |
||
134 | /** |
||
135 | * List all Recipient's Transfers. |
||
136 | * |
||
137 | * @param array $params |
||
138 | * |
||
139 | * @return \Arcanedev\Stripe\Collection|array |
||
140 | */ |
||
141 | public function transfers($params = []) |
||
147 | |||
148 | /* ------------------------------------------------------------------------------------------------ |
||
149 | | Other Functions |
||
150 | | ------------------------------------------------------------------------------------------------ |
||
151 | */ |
||
152 | /** |
||
153 | * Add Recipient ID to Parameters. |
||
154 | * |
||
155 | * @param array $params |
||
156 | */ |
||
157 | private function addRecipientParam(&$params) |
||
161 | } |
||
162 |