PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
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 1.7.0.9 All 211 releases
charitable / vendor / square / square / src / Legacy / Models / UpdateTeamMemberResponse.php

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

94 lines 2.1 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 response from an update request containing the updated `TeamMember` object or error
11 * messages.
12 */
13 class UpdateTeamMemberResponse implements \JsonSerializable
14 {
15 /**
16 * @var TeamMember|null
17 */
18 private $teamMember;
19
20 /**
21 * @var Error[]|null
22 */
23 private $errors;
24
25 /**
26 * Returns Team Member.
27 * A record representing an individual team member for a business.
28 */
29 public function getTeamMember(): ?TeamMember
30 {
31 return $this->teamMember;
32 }
33
34 /**
35 * Sets Team Member.
36 * A record representing an individual team member for a business.
37 *
38 * @maps team_member
39 */
40 public function setTeamMember(?TeamMember $teamMember): void
41 {
42 $this->teamMember = $teamMember;
43 }
44
45 /**
46 * Returns Errors.
47 * The errors that occurred during the request.
48 *
49 * @return Error[]|null
50 */
51 public function getErrors(): ?array
52 {
53 return $this->errors;
54 }
55
56 /**
57 * Sets Errors.
58 * The errors that occurred during the request.
59 *
60 * @maps errors
61 *
62 * @param Error[]|null $errors
63 */
64 public function setErrors(?array $errors): void
65 {
66 $this->errors = $errors;
67 }
68
69 /**
70 * Encode this object to JSON
71 *
72 * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
73 * are set. (default: false)
74 *
75 * @return array|stdClass
76 */
77 #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
78 public function jsonSerialize(bool $asArrayWhenEmpty = false)
79 {
80 $json = [];
81 if (isset($this->teamMember)) {
82 $json['team_member'] = $this->teamMember;
83 }
84 if (isset($this->errors)) {
85 $json['errors'] = $this->errors;
86 }
87 $json = array_filter($json, function ($val) {
88 return $val !== null;
89 });
90
91 return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
92 }
93 }
94