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