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