PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.4
Booking for Appointments and Events Calendar – Amelia v2.4.4
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / vendor / stripe / stripe-php / lib / Terminal / Location.php
ameliabooking / vendor / stripe / stripe-php / lib / Terminal Last commit date
Configuration.php 6 months ago ConnectionToken.php 6 months ago Location.php 6 months ago Reader.php 6 months ago
Location.php
115 lines
1 <?php
2
3 // File generated from our OpenAPI spec
4 namespace AmeliaVendor\Stripe\Terminal;
5
6 /**
7 * A Location represents a grouping of readers.
8 *
9 * Related guide: <a href="https://stripe.com/docs/terminal/fleet/locations">Fleet management</a>
10 *
11 * @property string $id Unique identifier for the object.
12 * @property string $object String representing the object's type. Objects of the same type share the same value.
13 * @property (object{city: null|string, country: null|string, line1: null|string, line2: null|string, postal_code: null|string, state: null|string}&\AmeliaVendor\Stripe\StripeObject) $address
14 * @property null|string $configuration_overrides The ID of a configuration that will be used to customize all readers in this location.
15 * @property string $display_name The display name of the location.
16 * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
17 * @property \AmeliaVendor\Stripe\StripeObject $metadata Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
18 */
19 class Location extends \AmeliaVendor\Stripe\ApiResource
20 {
21 const OBJECT_NAME = 'terminal.location';
22 use \AmeliaVendor\Stripe\ApiOperations\Update;
23 /**
24 * Creates a new <code>Location</code> object. For further details, including which
25 * address fields are required in each country, see the <a
26 * href="/docs/terminal/fleet/locations">Manage locations</a> guide.
27 *
28 * @param null|array{address: array{city?: string, country: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: string, display_name: string, expand?: string[], metadata?: null|array<string, string>} $params
29 * @param null|array|string $options
30 *
31 * @return Location the created resource
32 *
33 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
34 */
35 public static function create($params = null, $options = null)
36 {
37 self::_validateParams($params);
38 $url = static::classUrl();
39 list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
40 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
41 $obj->setLastResponse($response);
42 return $obj;
43 }
44 /**
45 * Deletes a <code>Location</code> object.
46 *
47 * @param null|array $params
48 * @param null|array|string $opts
49 *
50 * @return Location the deleted resource
51 *
52 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
53 */
54 public function delete($params = null, $opts = null)
55 {
56 self::_validateParams($params);
57 $url = $this->instanceUrl();
58 list($response, $opts) = $this->_request('delete', $url, $params, $opts);
59 $this->refreshFrom($response, $opts);
60 return $this;
61 }
62 /**
63 * Returns a list of <code>Location</code> objects.
64 *
65 * @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
66 * @param null|array|string $opts
67 *
68 * @return \AmeliaVendor\Stripe\Collection<Location> of ApiResources
69 *
70 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
71 */
72 public static function all($params = null, $opts = null)
73 {
74 $url = static::classUrl();
75 return static::_requestPage($url, \AmeliaVendor\Stripe\Collection::class, $params, $opts);
76 }
77 /**
78 * Retrieves a <code>Location</code> object.
79 *
80 * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
81 * @param null|array|string $opts
82 *
83 * @return Location
84 *
85 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
86 */
87 public static function retrieve($id, $opts = null)
88 {
89 $opts = \AmeliaVendor\Stripe\Util\RequestOptions::parse($opts);
90 $instance = new static($id, $opts);
91 $instance->refresh();
92 return $instance;
93 }
94 /**
95 * Updates a <code>Location</code> object by setting the values of the parameters
96 * passed. Any parameters not provided will be left unchanged.
97 *
98 * @param string $id the ID of the resource to update
99 * @param null|array{address?: array{city?: string, country?: string, line1?: string, line2?: string, postal_code?: string, state?: string}, configuration_overrides?: null|string, display_name?: string, expand?: string[], metadata?: null|array<string, string>} $params
100 * @param null|array|string $opts
101 *
102 * @return Location the updated resource
103 *
104 * @throws \AmeliaVendor\Stripe\Exception\ApiErrorException if the request fails
105 */
106 public static function update($id, $params = null, $opts = null)
107 {
108 self::_validateParams($params);
109 $url = static::resourceUrl($id);
110 list($response, $opts) = static::_staticRequest('post', $url, $params, $opts);
111 $obj = \AmeliaVendor\Stripe\Util\Util::convertToStripeObject($response->json, $opts);
112 $obj->setLastResponse($response);
113 return $obj;
114 }
115 }