✏️ 编辑:GetEmployeeWageResponse.php
路径:
/home/forge/woocommerce-square/vendor/square/square/src/Models/GetEmployeeWageResponse.php
大小:2.51 KB · 修改:2025-12-23 20:26:26 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php declare(strict_types=1); namespace Square\Models; use stdClass; /** * A response to a request to get an `EmployeeWage`. The response contains * the requested `EmployeeWage` objects and might contain a set of `Error` objects if * the request resulted in errors. */ class GetEmployeeWageResponse implements \JsonSerializable { /** * @var EmployeeWage|null */ private $employeeWage; /** * @var Error[]|null */ private $errors; /** * Returns Employee Wage. * The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title` * property of this object. Deprecated at version 2020-08-26. Use [TeamMemberWage](entity: * TeamMemberWage). */ public function getEmployeeWage(): ?EmployeeWage { return $this->employeeWage; } /** * Sets Employee Wage. * The hourly wage rate that an employee earns on a `Shift` for doing the job specified by the `title` * property of this object. Deprecated at version 2020-08-26. Use [TeamMemberWage](entity: * TeamMemberWage). * * @maps employee_wage */ public function setEmployeeWage(?EmployeeWage $employeeWage): void { $this->employeeWage = $employeeWage; } /** * Returns Errors. * Any errors that occurred during the request. * * @return Error[]|null */ public function getErrors(): ?array { return $this->errors; } /** * Sets Errors. * Any errors that occurred during the request. * * @maps errors * * @param Error[]|null $errors */ public function setErrors(?array $errors): void { $this->errors = $errors; } /** * Encode this object to JSON * * @param bool $asArrayWhenEmpty Whether to serialize this model as an array whenever no fields * are set. (default: false) * * @return array|stdClass */ #[\ReturnTypeWillChange] // @phan-suppress-current-line PhanUndeclaredClassAttribute for (php < 8.1) public function jsonSerialize(bool $asArrayWhenEmpty = false) { $json = []; if (isset($this->employeeWage)) { $json['employee_wage'] = $this->employeeWage; } if (isset($this->errors)) { $json['errors'] = $this->errors; } $json = array_filter($json, function ($val) { return $val !== null; }); return (!$asArrayWhenEmpty && empty($json)) ? new stdClass() : $json; } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF