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

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

99 lines 2.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 * A response to a request to get an `EmployeeWage`. The response contains
11 * the requested `EmployeeWage` objects and might contain a set of `Error` objects if
12 * the request resulted in errors.
13 */
14 class GetEmployeeWageResponse implements \JsonSerializable
15 {
16 /**
17 * @var EmployeeWage|null
18 */
19 private $employeeWage;
20
21 /**
22 * @var Error[]|null
23 */
24 private $errors;
25
26 /**
27 * Returns Employee Wage.
28 * The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title`
29 * property of this object. Deprecated at version 2020-08-26. Use [TeamMemberWage](entity:
30 * TeamMemberWage).
31 */
32 public function getEmployeeWage(): ?EmployeeWage
33 {
34 return $this->employeeWage;
35 }
36
37 /**
38 * Sets Employee Wage.
39 * The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title`
40 * property of this object. Deprecated at version 2020-08-26. Use [TeamMemberWage](entity:
41 * TeamMemberWage).
42 *
43 * @maps employee_wage
44 */
45 public function setEmployeeWage(?EmployeeWage $employeeWage): void
46 {
47 $this->employeeWage = $employeeWage;
48 }
49
50 /**
51 * Returns Errors.
52 * Any errors that occurred during the request.
53 *
54 * @return Error[]|null
55 */
56 public function getErrors(): ?array
57 {
58 return $this->errors;
59 }
60
61 /**
62 * Sets Errors.
63 * Any errors that occurred during the request.
64 *
65 * @maps errors
66 *
67 * @param Error[]|null $errors
68 */
69 public function setErrors(?array $errors): void
70 {
71 $this->errors = $errors;
72 }
73
74 /**
75 * Encode this object to JSON
76 *
77 * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields
78 * are set. (default: false)
79 *
80 * @return array|stdClass
81 */
82 #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1)
83 public function jsonSerialize(bool $asArrayWhenEmpty = false)
84 {
85 $json = [];
86 if (isset($this->employeeWage)) {
87 $json['employee_wage'] = $this->employeeWage;
88 }
89 if (isset($this->errors)) {
90 $json['errors'] = $this->errors;
91 }
92 $json = array_filter($json, function ($val) {
93 return $val !== null;
94 });
95
96 return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json;
97 }
98 }
99