1 | <?php namespace Stevenmaguire\Uber\Resources; |
||
3 | trait Promotions |
||
4 | { |
||
5 | /** |
||
6 | * Lists available promotions. |
||
7 | * |
||
8 | * The Promotions endpoint returns information about the promotion that |
||
9 | * will be available to a new user based on their activity's location. |
||
10 | * These promotions do not apply for existing users. |
||
11 | * |
||
12 | * @param array $attributes Query attributes |
||
13 | * |
||
14 | * @return stdClass The JSON response from the request |
||
15 | * |
||
16 | * @see https://developer.uber.com/docs/riders/ride-promotions/introduction |
||
17 | */ |
||
18 | 2 | public function getPromotions($attributes = []) |
|
22 | |||
23 | /** |
||
24 | * Makes a request to the Uber API and returns the response. |
||
25 | * |
||
26 | * @param string $verb The Http verb to use |
||
27 | * @param string $path The path of the APi after the domain |
||
28 | * @param array $parameters Parameters |
||
29 | * |
||
30 | * @return stdClass The JSON response from the request |
||
31 | * @throws Exception |
||
32 | */ |
||
33 | abstract protected function request($verb, $path, $parameters = []); |
||
34 | } |
||
35 |