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 / SearchTeamMembersRequest.php

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

119 lines 2.7 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 * Represents a search request for a filtered list of `TeamMember` objects.
11 */
12 class SearchTeamMembersRequest implements \JsonSerializable
13 {
14 /**
15 * @var SearchTeamMembersQuery|null
16 */
17 private $query;
18
19 /**
20 * @var int|null
21 */
22 private $limit;
23
24 /**
25 * @var string|null
26 */
27 private $cursor;
28
29 /**
30 * Returns Query.
31 * Represents the parameters in a search for `TeamMember` objects.
32 */
33 public function getQuery(): ?SearchTeamMembersQuery
34 {
35 return $this->query;
36 }
37
38 /**
39 * Sets Query.
40 * Represents the parameters in a search for `TeamMember` objects.
41 *
42 * @maps query
43 */
44 public function setQuery(?SearchTeamMembersQuery $query): void
45 {
46 $this->query = $query;
47 }
48
49 /**
50 * Returns Limit.
51 * The maximum number of `TeamMember` objects in a page (100 by default).
52 */
53 public function getLimit(): ?int
54 {
55 return $this->limit;
56 }
57
58 /**
59 * Sets Limit.
60 * The maximum number of `TeamMember` objects in a page (100 by default).
61 *
62 * @maps limit
63 */
64 public function setLimit(?int $limit): void
65 {
66 $this->limit = $limit;
67 }
68
69 /**
70 * Returns Cursor.
71 * The opaque cursor for fetching the next page. For more information, see
72 * [pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
73 */
74 public function getCursor(): ?string
75 {
76 return $this->cursor;
77 }
78
79 /**
80 * Sets Cursor.
81 * The opaque cursor for fetching the next page. For more information, see
82 * [pagination](https://developer.squareup.com/docs/working-with-apis/pagination).
83 *
84 * @maps cursor
85 */
86 public function setCursor(?string $cursor): void
87 {
88 $this->cursor = $cursor;
89 }
90
91 /**
92 * Encode this object to JSON
93 *
94 * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
95 * are set. (default: false)
96 *
97 * @return array|stdClass
98 */
99 #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
100 public function jsonSerialize(bool $asArrayWhenEmpty = false)
101 {
102 $json = [];
103 if (isset($this->query)) {
104 $json['query'] = $this->query;
105 }
106 if (isset($this->limit)) {
107 $json['limit'] = $this->limit;
108 }
109 if (isset($this->cursor)) {
110 $json['cursor'] = $this->cursor;
111 }
112 $json = array_filter($json, function ($val) {
113 return $val !== null;
114 });
115
116 return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
117 }
118 }
119