1 | <?php namespace Stevenmaguire\Uber\Resources; |
||
3 | trait Requests |
||
4 | { |
||
5 | /** |
||
6 | * Cancels the current ride request. |
||
7 | * |
||
8 | * @return stdClass The JSON response from the request |
||
9 | * |
||
10 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-current-delete |
||
11 | */ |
||
12 | 2 | public function cancelCurrentRequest() |
|
16 | |||
17 | /** |
||
18 | * Cancels a specific ride request. |
||
19 | * |
||
20 | * @param string $requestId Request id |
||
21 | * |
||
22 | * @return stdClass The JSON response from the request |
||
23 | * |
||
24 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-delete |
||
25 | */ |
||
26 | 4 | public function cancelRequest($requestId) |
|
30 | |||
31 | /** |
||
32 | * Fetches the current ride request. |
||
33 | * |
||
34 | * The Ride Request endpoint allows retrieving real-time details for an |
||
35 | * ongoing trip. |
||
36 | * |
||
37 | * This endpoint behaves similarly to the GET /requests/{request_id} |
||
38 | * endpoint, except you do not need to provide a request_id. If there is |
||
39 | * no trip in progress the endpoint will result in a 404 not found error. |
||
40 | * This endpoint will only work for trips requested through your app unless |
||
41 | * you have the all_trips scope. |
||
42 | * |
||
43 | * By default, only details about trips your app requested will be returned. |
||
44 | * If your app has all_trips scope, however, trip details will be returned |
||
45 | * for all trips irrespective of which application initiated them. |
||
46 | * |
||
47 | * See the Ride Request tutorial for a step-by-step guide to requesting |
||
48 | * rides on behalf of an Uber user. Please review the Sandbox documentation |
||
49 | * on how to develop and test against these endpoints without making |
||
50 | * real-world Ride Requests and being charged. |
||
51 | * |
||
52 | * @return stdClass The JSON response from the request |
||
53 | * |
||
54 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-current-get |
||
55 | */ |
||
56 | 2 | public function getCurrentRequest() |
|
60 | |||
61 | /** |
||
62 | * Fetches a specific ride request. |
||
63 | * |
||
64 | * @param string $requestId Request id |
||
65 | * |
||
66 | * @return stdClass The JSON response from the request |
||
67 | * |
||
68 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-get |
||
69 | */ |
||
70 | 4 | public function getRequest($requestId) |
|
74 | |||
75 | /** |
||
76 | * Creates a ride request estimate. |
||
77 | * |
||
78 | * The Request Estimate endpoint allows a ride to be estimated given the |
||
79 | * desired product, start, and end locations. If the end location is |
||
80 | * not provided, only the pickup ETA and details of surge pricing |
||
81 | * information are provided. If the pickup ETA is null, there are no cars |
||
82 | * available, but an estimate may still be given to the user. |
||
83 | * |
||
84 | * @param array $attributes Query attributes |
||
85 | * |
||
86 | * @return stdClass The JSON response from the request |
||
87 | * |
||
88 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-estimate-post |
||
89 | */ |
||
90 | 2 | public function getRequestEstimate($attributes = []) |
|
94 | |||
95 | /** |
||
96 | * Fetches the map for a specific ride request. |
||
97 | * |
||
98 | * @param string $requestId Request id |
||
99 | * |
||
100 | * @return stdClass The JSON response from the request |
||
101 | * |
||
102 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-map-get |
||
103 | */ |
||
104 | 2 | public function getRequestMap($requestId) |
|
108 | |||
109 | /** |
||
110 | * Fetches the receipt for a specific ride request. |
||
111 | * |
||
112 | * @param string $requestId Request id |
||
113 | * |
||
114 | * @return stdClass The JSON response from the request |
||
115 | * |
||
116 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-receipt-get |
||
117 | */ |
||
118 | 2 | public function getRequestReceipt($requestId) |
|
122 | |||
123 | /** |
||
124 | * Creates a new ride request. |
||
125 | * |
||
126 | * The Request endpoint allows a ride to be requested on behalf of an Uber |
||
127 | * user given their desired product, start, and end locations. |
||
128 | * |
||
129 | * @param array $attributes Query attributes |
||
130 | * |
||
131 | * @return stdClass The JSON response from the request |
||
132 | * |
||
133 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-post |
||
134 | */ |
||
135 | 2 | public function requestRide($attributes = []) |
|
139 | |||
140 | /** |
||
141 | * Updates the current ride request. |
||
142 | * |
||
143 | * The Ride Request endpoint allows updating an ongoing request’s |
||
144 | * destination. |
||
145 | * |
||
146 | * This endpoint behaves similarly to the PATCH /v1.2/requests/{request_id} |
||
147 | * endpoint, except you do not need to provide a request_id. If there is no |
||
148 | * trip in progress the endpoint will result in a 404 not found error. This |
||
149 | * endpoint will only work for trips requested through your app unless you |
||
150 | * have the all_trips scope. |
||
151 | * |
||
152 | * @param array $attributes Query attributes |
||
153 | * |
||
154 | * @return stdClass The JSON response from the request |
||
155 | * |
||
156 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-current-patch |
||
157 | */ |
||
158 | 2 | public function setCurrentRequest($attributes = []) |
|
162 | |||
163 | /** |
||
164 | * Updates a specific ride request. |
||
165 | * |
||
166 | * The Ride Request endpoint allows updating an ongoing request’s |
||
167 | * destination using the Ride Request endpoint. |
||
168 | * |
||
169 | * @param string $requestId Request id |
||
170 | * @param array $attributes Query attributes |
||
171 | * |
||
172 | * @return stdClass The JSON response from the request |
||
173 | * |
||
174 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-request_id-patch |
||
175 | */ |
||
176 | 4 | public function setRequest($requestId, $attributes = []) |
|
180 | |||
181 | /** |
||
182 | * Updates a specific ride request properties for sandbox responses. |
||
183 | * |
||
184 | * @param string $requestId Request id |
||
185 | * @param array $attributes Query attributes |
||
186 | * |
||
187 | * @return stdClass The JSON response from the request |
||
188 | * @throws Exception |
||
189 | * |
||
190 | * @see https://developer.uber.com/docs/riders/references/api/v1.2/requests-estimate-post |
||
191 | */ |
||
192 | 4 | public function setSandboxRequest($requestId, $attributes = []) |
|
198 | } |
||
199 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.