1 | <?php |
||
25 | class Moip |
||
26 | { |
||
27 | /** |
||
28 | * endpoint of production. |
||
29 | * |
||
30 | * @const string |
||
31 | */ |
||
32 | const ENDPOINT_PRODUCTION = 'https://api.moip.com.br'; |
||
33 | |||
34 | /** |
||
35 | * endpoint of sandbox. |
||
36 | * |
||
37 | * @const string |
||
38 | */ |
||
39 | const ENDPOINT_SANDBOX = 'https://sandbox.moip.com.br'; |
||
40 | |||
41 | /** |
||
42 | * Client name. |
||
43 | * |
||
44 | * @const string |
||
45 | * */ |
||
46 | const CLIENT = 'MoipPhpSDK'; |
||
47 | |||
48 | /** |
||
49 | * Client Version. |
||
50 | * |
||
51 | * @const string |
||
52 | */ |
||
53 | const CLIENT_VERSION = '3.1.0'; |
||
54 | |||
55 | /** |
||
56 | * Authentication that will be added to the header of request. |
||
57 | * |
||
58 | * @var \Moip\MoipAuthentication |
||
59 | */ |
||
60 | private $moipAuthentication; |
||
61 | |||
62 | /** |
||
63 | * Endpoint of request. |
||
64 | * |
||
65 | * @var \Moip\Moip::ENDPOINT_PRODUCTION|\Moip\Moip::ENDPOINT_SANDBOX |
||
66 | */ |
||
67 | private $endpoint; |
||
68 | |||
69 | /** |
||
70 | * @var Requests_Session HTTP session configured to use the moip API. |
||
71 | */ |
||
72 | private $session; |
||
73 | |||
74 | /** |
||
75 | * Create a new aurhentication with the endpoint. |
||
76 | * |
||
77 | * @param \Moip\Auth\MoipAuthentication $moipAuthentication |
||
78 | * @param string $endpoint |
||
79 | */ |
||
80 | public function __construct(Authentication $moipAuthentication, $endpoint = self::ENDPOINT_PRODUCTION) |
||
86 | |||
87 | /** |
||
88 | * Creates a new Request_Session with all the default values. |
||
89 | * A Session is created at construction. |
||
90 | * |
||
91 | * @param float $timeout How long should we wait for a response?(seconds with a millisecond precision, default: 30, example: 0.01). |
||
92 | * @param float $connect_timeout How long should we wait while trying to connect? (seconds with a millisecond precision, default: 10, example: 0.01) |
||
93 | */ |
||
94 | public function createNewSession($timeout = 30.0, $connect_timeout = 30.0) |
||
104 | |||
105 | /** |
||
106 | * Returns the http session created. |
||
107 | * |
||
108 | * @return Requests_Session |
||
109 | */ |
||
110 | public function getSession() |
||
114 | |||
115 | /** |
||
116 | * Replace the http session by a custom one. |
||
117 | * |
||
118 | * @param Requests_Session $session |
||
119 | */ |
||
120 | public function setSession($session) |
||
124 | |||
125 | /** |
||
126 | * Create a new Customer instance. |
||
127 | * |
||
128 | * @return \Moip\Resource\Customer |
||
129 | */ |
||
130 | public function customers() |
||
134 | |||
135 | /** |
||
136 | * Create a new Holder instance. |
||
137 | * |
||
138 | * @return \Moip\Resource\Holder |
||
139 | */ |
||
140 | public function holders() |
||
144 | |||
145 | /** |
||
146 | * Create a new Account instance. |
||
147 | * |
||
148 | * @return \Moip\Resource\Account |
||
149 | */ |
||
150 | public function accounts() |
||
154 | |||
155 | /** |
||
156 | * Create a new Entry instance. |
||
157 | * |
||
158 | * @return \Moip\Resource\Entry |
||
159 | */ |
||
160 | public function entries() |
||
164 | |||
165 | /** |
||
166 | * Create a new Orders instance. |
||
167 | * |
||
168 | * @return \Moip\Resource\Orders |
||
169 | */ |
||
170 | public function orders() |
||
174 | |||
175 | /** |
||
176 | * Create a new Payment instance. |
||
177 | * |
||
178 | * @return \Moip\Resource\Payment |
||
179 | */ |
||
180 | public function payments() |
||
184 | |||
185 | /** |
||
186 | * Create a new Multiorders instance. |
||
187 | * |
||
188 | * @return \Moip\Resource\Multiorders |
||
189 | */ |
||
190 | public function multiorders() |
||
194 | |||
195 | /** |
||
196 | * Create a new Transfers. |
||
197 | * |
||
198 | * @return \Moip\Resource\Transfers |
||
199 | */ |
||
200 | |||
201 | /** |
||
202 | * Create a new Transfers instance. |
||
203 | * |
||
204 | * @return Transfers |
||
205 | */ |
||
206 | public function transfers() |
||
210 | |||
211 | /** |
||
212 | * Create a new Notification Prefences instance. |
||
213 | * |
||
214 | * @return NotificationPreferences |
||
215 | */ |
||
216 | public function notifications() |
||
220 | |||
221 | /** |
||
222 | * Create a new WebhookList instance. |
||
223 | * |
||
224 | * @return WebhookList |
||
225 | */ |
||
226 | public function webhooks() |
||
230 | |||
231 | /** |
||
232 | * Create a new Keys instance. |
||
233 | * |
||
234 | * @return Keys |
||
235 | */ |
||
236 | public function keys() |
||
240 | |||
241 | /** |
||
242 | * Create a new Refund instance. |
||
243 | * |
||
244 | * @return Refund |
||
245 | */ |
||
246 | public function refunds() |
||
250 | |||
251 | /** |
||
252 | * Create a new BankAccount instance. |
||
253 | * |
||
254 | * @return BankAccount |
||
255 | */ |
||
256 | public function bankaccount() |
||
260 | |||
261 | /** |
||
262 | * Create a new Balances instance. |
||
263 | * |
||
264 | * @return Balances |
||
265 | */ |
||
266 | public function balances() |
||
270 | |||
271 | /** |
||
272 | * Get the endpoint. |
||
273 | * |
||
274 | * @return \Moip\Moip::ENDPOINT_PRODUCTION|\Moip\Moip::ENDPOINT_SANDBOX |
||
275 | */ |
||
276 | public function getEndpoint() |
||
280 | } |
||
281 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..