ConfigurationService.php
2 years ago
ConnectionTokenService.php
4 years ago
LocationService.php
2 years ago
ReaderService.php
2 years ago
TerminalServiceFactory.php
2 years ago
LocationService.php
90 lines
| 1 | <?php |
| 2 | |
| 3 | // File generated from our OpenAPI spec |
| 4 | |
| 5 | namespace Stripe\Service\Terminal; |
| 6 | |
| 7 | class LocationService extends \Stripe\Service\AbstractService |
| 8 | { |
| 9 | /** |
| 10 | * Returns a list of <code>Location</code> objects. |
| 11 | * |
| 12 | * @param null|array $params |
| 13 | * @param null|array|\Stripe\Util\RequestOptions $opts |
| 14 | * |
| 15 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 16 | * |
| 17 | * @return \Stripe\Collection<\Stripe\Terminal\Location> |
| 18 | */ |
| 19 | public function all($params = null, $opts = null) |
| 20 | { |
| 21 | return $this->requestCollection('get', '/v1/terminal/locations', $params, $opts); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Creates a new <code>Location</code> object. For further details, including which |
| 26 | * address fields are required in each country, see the <a |
| 27 | * href="/docs/terminal/fleet/locations">Manage locations</a> guide. |
| 28 | * |
| 29 | * @param null|array $params |
| 30 | * @param null|array|\Stripe\Util\RequestOptions $opts |
| 31 | * |
| 32 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 33 | * |
| 34 | * @return \Stripe\Terminal\Location |
| 35 | */ |
| 36 | public function create($params = null, $opts = null) |
| 37 | { |
| 38 | return $this->request('post', '/v1/terminal/locations', $params, $opts); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Deletes a <code>Location</code> object. |
| 43 | * |
| 44 | * @param string $id |
| 45 | * @param null|array $params |
| 46 | * @param null|array|\Stripe\Util\RequestOptions $opts |
| 47 | * |
| 48 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 49 | * |
| 50 | * @return \Stripe\Terminal\Location |
| 51 | */ |
| 52 | public function delete($id, $params = null, $opts = null) |
| 53 | { |
| 54 | return $this->request('delete', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Retrieves a <code>Location</code> object. |
| 59 | * |
| 60 | * @param string $id |
| 61 | * @param null|array $params |
| 62 | * @param null|array|\Stripe\Util\RequestOptions $opts |
| 63 | * |
| 64 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 65 | * |
| 66 | * @return \Stripe\Terminal\Location |
| 67 | */ |
| 68 | public function retrieve($id, $params = null, $opts = null) |
| 69 | { |
| 70 | return $this->request('get', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Updates a <code>Location</code> object by setting the values of the parameters |
| 75 | * passed. Any parameters not provided will be left unchanged. |
| 76 | * |
| 77 | * @param string $id |
| 78 | * @param null|array $params |
| 79 | * @param null|array|\Stripe\Util\RequestOptions $opts |
| 80 | * |
| 81 | * @throws \Stripe\Exception\ApiErrorException if the request fails |
| 82 | * |
| 83 | * @return \Stripe\Terminal\Location |
| 84 | */ |
| 85 | public function update($id, $params = null, $opts = null) |
| 86 | { |
| 87 | return $this->request('post', $this->buildPath('/v1/terminal/locations/%s', $id), $params, $opts); |
| 88 | } |
| 89 | } |
| 90 |