PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13.1
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13.1
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / vendor / square / square / src / Legacy / Models / CreateMobileAuthorizationCodeRequest.php

CreateMobileAuthorizationCodeRequest.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13.1, at vendor/square/square/src/Legacy/Models/CreateMobileAuthorizationCodeRequest.php

62 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Square\Legacy\Models;
6
7 use stdClass;
8
9 /**
10 * Defines the body parameters that can be provided in a request to the
11 * `CreateMobileAuthorizationCode` endpoint.
12 */
13 class CreateMobileAuthorizationCodeRequest implements \JsonSerializable
14 {
15 /**
16 * @var string|null
17 */
18 private $locationId;
19
20 /**
21 * Returns Location Id.
22 * The Square location ID that the authorization code should be tied to.
23 */
24 public function getLocationId(): ?string
25 {
26 return $this->locationId;
27 }
28
29 /**
30 * Sets Location Id.
31 * The Square location ID that the authorization code should be tied to.
32 *
33 * @maps location_id
34 */
35 public function setLocationId(?string $locationId): void
36 {
37 $this->locationId = $locationId;
38 }
39
40 /**
41 * Encode this object to JSON
42 *
43 * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
44 * are set. (default: false)
45 *
46 * @return array|stdClass
47 */
48 #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
49 public function jsonSerialize(bool $asArrayWhenEmpty = false)
50 {
51 $json = [];
52 if (isset($this->locationId)) {
53 $json['location_id'] = $this->locationId;
54 }
55 $json = array_filter($json, function ($val) {
56 return $val !== null;
57 });
58
59 return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
60 }
61 }
62