diff --git a/src/lib/Api/BrandApi.php b/src/lib/Api/BrandApi.php index 9e37489..a98d4ad 100644 --- a/src/lib/Api/BrandApi.php +++ b/src/lib/Api/BrandApi.php @@ -1263,6 +1263,280 @@ protected function brandReportGetRequest($brand_id, $request_email_addresses = n ); } + /** + * Operation businessTemplatesGetBusinessTemplates + * + * List Business Templates + * + * @param string $brand_id brand_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\BusinessTemplateModel[] + */ + public function businessTemplatesGetBusinessTemplates($brand_id) + { + list($response) = $this->businessTemplatesGetBusinessTemplatesWithHttpInfo($brand_id); + return $response; + } + + /** + * Operation businessTemplatesGetBusinessTemplatesWithHttpInfo + * + * List Business Templates + * + * @param string $brand_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\BusinessTemplateModel[], HTTP status code, HTTP response headers (array of strings) + */ + public function businessTemplatesGetBusinessTemplatesWithHttpInfo($brand_id) + { + $returnType = '\Swagger\Client\Model\BusinessTemplateModel[]'; + $request = $this->businessTemplatesGetBusinessTemplatesRequest($brand_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\BusinessTemplateModel[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation businessTemplatesGetBusinessTemplatesAsync + * + * List Business Templates + * + * @param string $brand_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function businessTemplatesGetBusinessTemplatesAsync($brand_id) + { + return $this->businessTemplatesGetBusinessTemplatesAsyncWithHttpInfo($brand_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation businessTemplatesGetBusinessTemplatesAsyncWithHttpInfo + * + * List Business Templates + * + * @param string $brand_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function businessTemplatesGetBusinessTemplatesAsyncWithHttpInfo($brand_id) + { + $returnType = '\Swagger\Client\Model\BusinessTemplateModel[]'; + $request = $this->businessTemplatesGetBusinessTemplatesRequest($brand_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'businessTemplatesGetBusinessTemplates' + * + * @param string $brand_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function businessTemplatesGetBusinessTemplatesRequest($brand_id) + { + // verify the required parameter 'brand_id' is set + if ($brand_id === null || (is_array($brand_id) && count($brand_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $brand_id when calling businessTemplatesGetBusinessTemplates' + ); + } + + $resourcePath = '/api/v2/brand/{brandId}/business-templates'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($brand_id !== null) { + $resourcePath = str_replace( + '{' . 'brandId' . '}', + ObjectSerializer::toPathValue($brand_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation cancelBusinessCancel * diff --git a/src/lib/Api/BusinessApi.php b/src/lib/Api/BusinessApi.php index 4a854d7..2e2f6d8 100644 --- a/src/lib/Api/BusinessApi.php +++ b/src/lib/Api/BusinessApi.php @@ -1179,6 +1179,262 @@ protected function actionItemsGetRequest($business_id) ); } + /** + * Operation auBusinessCopyBusinessSettingsFromTemplate + * + * Copy Business Settings From Template + * + * @param int $business_id business_id (required) + * @param int $business_template_id business_template_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function auBusinessCopyBusinessSettingsFromTemplate($business_id, $business_template_id) + { + $this->auBusinessCopyBusinessSettingsFromTemplateWithHttpInfo($business_id, $business_template_id); + } + + /** + * Operation auBusinessCopyBusinessSettingsFromTemplateWithHttpInfo + * + * Copy Business Settings From Template + * + * @param int $business_id (required) + * @param int $business_template_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function auBusinessCopyBusinessSettingsFromTemplateWithHttpInfo($business_id, $business_template_id) + { + $returnType = ''; + $request = $this->auBusinessCopyBusinessSettingsFromTemplateRequest($business_id, $business_template_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation auBusinessCopyBusinessSettingsFromTemplateAsync + * + * Copy Business Settings From Template + * + * @param int $business_id (required) + * @param int $business_template_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auBusinessCopyBusinessSettingsFromTemplateAsync($business_id, $business_template_id) + { + return $this->auBusinessCopyBusinessSettingsFromTemplateAsyncWithHttpInfo($business_id, $business_template_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auBusinessCopyBusinessSettingsFromTemplateAsyncWithHttpInfo + * + * Copy Business Settings From Template + * + * @param int $business_id (required) + * @param int $business_template_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auBusinessCopyBusinessSettingsFromTemplateAsyncWithHttpInfo($business_id, $business_template_id) + { + $returnType = ''; + $request = $this->auBusinessCopyBusinessSettingsFromTemplateRequest($business_id, $business_template_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auBusinessCopyBusinessSettingsFromTemplate' + * + * @param int $business_id (required) + * @param int $business_template_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auBusinessCopyBusinessSettingsFromTemplateRequest($business_id, $business_template_id) + { + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling auBusinessCopyBusinessSettingsFromTemplate' + ); + } + // verify the required parameter 'business_template_id' is set + if ($business_template_id === null || (is_array($business_template_id) && count($business_template_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_template_id when calling auBusinessCopyBusinessSettingsFromTemplate' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/{businessTemplateId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($business_template_id !== null) { + $resourcePath = str_replace( + '{' . 'businessTemplateId' . '}', + ObjectSerializer::toPathValue($business_template_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation auBusinessGetBusiness * @@ -6776,6 +7032,280 @@ protected function businessChangeTaxYearChangeFinancialYearRequest($year, $busin ); } + /** + * Operation businessTagsGet + * + * List the Business tags + * + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\TagViewModel[] + */ + public function businessTagsGet($business_id) + { + list($response) = $this->businessTagsGetWithHttpInfo($business_id); + return $response; + } + + /** + * Operation businessTagsGetWithHttpInfo + * + * List the Business tags + * + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\TagViewModel[], HTTP status code, HTTP response headers (array of strings) + */ + public function businessTagsGetWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\TagViewModel[]'; + $request = $this->businessTagsGetRequest($business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\TagViewModel[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation businessTagsGetAsync + * + * List the Business tags + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function businessTagsGetAsync($business_id) + { + return $this->businessTagsGetAsyncWithHttpInfo($business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation businessTagsGetAsyncWithHttpInfo + * + * List the Business tags + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function businessTagsGetAsyncWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\TagViewModel[]'; + $request = $this->businessTagsGetRequest($business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'businessTagsGet' + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function businessTagsGetRequest($business_id) + { + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling businessTagsGet' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/tags'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation documentContent * diff --git a/src/lib/Api/EmployeeEarningsLineSplitApi.php b/src/lib/Api/EmployeeEarningsLineSplitApi.php index 9a6a86d..614e794 100644 --- a/src/lib/Api/EmployeeEarningsLineSplitApi.php +++ b/src/lib/Api/EmployeeEarningsLineSplitApi.php @@ -365,7 +365,7 @@ protected function genericEarningsLineSplitDeleteRequest($location_id, $business /** * Operation genericEarningsLineSplitGet * - * Get Employee earnings line splits + * Get Employee location earnings line splits * * @param string $business_id business_id (required) * @param string $employee_id employee_id (required) @@ -383,7 +383,7 @@ public function genericEarningsLineSplitGet($business_id, $employee_id) /** * Operation genericEarningsLineSplitGetWithHttpInfo * - * Get Employee earnings line splits + * Get Employee location earnings line splits * * @param string $business_id (required) * @param string $employee_id (required) @@ -459,7 +459,7 @@ public function genericEarningsLineSplitGetWithHttpInfo($business_id, $employee_ /** * Operation genericEarningsLineSplitGetAsync * - * Get Employee earnings line splits + * Get Employee location earnings line splits * * @param string $business_id (required) * @param string $employee_id (required) @@ -480,7 +480,7 @@ function ($response) { /** * Operation genericEarningsLineSplitGetAsyncWithHttpInfo * - * Get Employee earnings line splits + * Get Employee location earnings line splits * * @param string $business_id (required) * @param string $employee_id (required) diff --git a/src/lib/Api/EmployeeReportingDimensionEarningsLineSplitApi.php b/src/lib/Api/EmployeeReportingDimensionEarningsLineSplitApi.php new file mode 100644 index 0000000..2bcf332 --- /dev/null +++ b/src/lib/Api/EmployeeReportingDimensionEarningsLineSplitApi.php @@ -0,0 +1,1529 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation genericDimensionEarningsLineSplitDelete + * + * Delete Dimension Earnings Line Split + * + * @param int $dimension_id dimension_id (required) + * @param int $dimension_value_id dimension_value_id (required) + * @param string $business_id business_id (required) + * @param string $employee_id employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function genericDimensionEarningsLineSplitDelete($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $this->genericDimensionEarningsLineSplitDeleteWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id); + } + + /** + * Operation genericDimensionEarningsLineSplitDeleteWithHttpInfo + * + * Delete Dimension Earnings Line Split + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function genericDimensionEarningsLineSplitDeleteWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitDeleteRequest($dimension_id, $dimension_value_id, $business_id, $employee_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation genericDimensionEarningsLineSplitDeleteAsync + * + * Delete Dimension Earnings Line Split + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitDeleteAsync($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + return $this->genericDimensionEarningsLineSplitDeleteAsyncWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation genericDimensionEarningsLineSplitDeleteAsyncWithHttpInfo + * + * Delete Dimension Earnings Line Split + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitDeleteAsyncWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitDeleteRequest($dimension_id, $dimension_value_id, $business_id, $employee_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'genericDimensionEarningsLineSplitDelete' + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function genericDimensionEarningsLineSplitDeleteRequest($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling genericDimensionEarningsLineSplitDelete' + ); + } + // verify the required parameter 'dimension_value_id' is set + if ($dimension_value_id === null || (is_array($dimension_value_id) && count($dimension_value_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_value_id when calling genericDimensionEarningsLineSplitDelete' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling genericDimensionEarningsLineSplitDelete' + ); + } + // verify the required parameter 'employee_id' is set + if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $employee_id when calling genericDimensionEarningsLineSplitDelete' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/employee/{employeeId}/earningslinesplit/dimension/{dimensionId}/value/{dimensionValueId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($dimension_value_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionValueId' . '}', + ObjectSerializer::toPathValue($dimension_value_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employee_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation genericDimensionEarningsLineSplitGet + * + * Get Employee Dimension Earnings Line Splits + * + * @param string $business_id business_id (required) + * @param string $employee_id employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\DimensionEarningsLineSplitApiModel[] + */ + public function genericDimensionEarningsLineSplitGet($business_id, $employee_id) + { + list($response) = $this->genericDimensionEarningsLineSplitGetWithHttpInfo($business_id, $employee_id); + return $response; + } + + /** + * Operation genericDimensionEarningsLineSplitGetWithHttpInfo + * + * Get Employee Dimension Earnings Line Splits + * + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\DimensionEarningsLineSplitApiModel[], HTTP status code, HTTP response headers (array of strings) + */ + public function genericDimensionEarningsLineSplitGetWithHttpInfo($business_id, $employee_id) + { + $returnType = '\Swagger\Client\Model\DimensionEarningsLineSplitApiModel[]'; + $request = $this->genericDimensionEarningsLineSplitGetRequest($business_id, $employee_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\DimensionEarningsLineSplitApiModel[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation genericDimensionEarningsLineSplitGetAsync + * + * Get Employee Dimension Earnings Line Splits + * + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitGetAsync($business_id, $employee_id) + { + return $this->genericDimensionEarningsLineSplitGetAsyncWithHttpInfo($business_id, $employee_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation genericDimensionEarningsLineSplitGetAsyncWithHttpInfo + * + * Get Employee Dimension Earnings Line Splits + * + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitGetAsyncWithHttpInfo($business_id, $employee_id) + { + $returnType = '\Swagger\Client\Model\DimensionEarningsLineSplitApiModel[]'; + $request = $this->genericDimensionEarningsLineSplitGetRequest($business_id, $employee_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'genericDimensionEarningsLineSplitGet' + * + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function genericDimensionEarningsLineSplitGetRequest($business_id, $employee_id) + { + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling genericDimensionEarningsLineSplitGet' + ); + } + // verify the required parameter 'employee_id' is set + if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $employee_id when calling genericDimensionEarningsLineSplitGet' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/employee/{employeeId}/earningslinesplit/dimension'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employee_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation genericDimensionEarningsLineSplitGetById + * + * Get Employee Dimension Earnings Line Split By Id + * + * @param int $dimension_id dimension_id (required) + * @param int $dimension_value_id dimension_value_id (required) + * @param string $business_id business_id (required) + * @param string $employee_id employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function genericDimensionEarningsLineSplitGetById($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $this->genericDimensionEarningsLineSplitGetByIdWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id); + } + + /** + * Operation genericDimensionEarningsLineSplitGetByIdWithHttpInfo + * + * Get Employee Dimension Earnings Line Split By Id + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function genericDimensionEarningsLineSplitGetByIdWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitGetByIdRequest($dimension_id, $dimension_value_id, $business_id, $employee_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation genericDimensionEarningsLineSplitGetByIdAsync + * + * Get Employee Dimension Earnings Line Split By Id + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitGetByIdAsync($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + return $this->genericDimensionEarningsLineSplitGetByIdAsyncWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation genericDimensionEarningsLineSplitGetByIdAsyncWithHttpInfo + * + * Get Employee Dimension Earnings Line Split By Id + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitGetByIdAsyncWithHttpInfo($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitGetByIdRequest($dimension_id, $dimension_value_id, $business_id, $employee_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'genericDimensionEarningsLineSplitGetById' + * + * @param int $dimension_id (required) + * @param int $dimension_value_id (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function genericDimensionEarningsLineSplitGetByIdRequest($dimension_id, $dimension_value_id, $business_id, $employee_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling genericDimensionEarningsLineSplitGetById' + ); + } + // verify the required parameter 'dimension_value_id' is set + if ($dimension_value_id === null || (is_array($dimension_value_id) && count($dimension_value_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_value_id when calling genericDimensionEarningsLineSplitGetById' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling genericDimensionEarningsLineSplitGetById' + ); + } + // verify the required parameter 'employee_id' is set + if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $employee_id when calling genericDimensionEarningsLineSplitGetById' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/employee/{employeeId}/earningslinesplit/dimension/{dimensionId}/value/{dimensionValueId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($dimension_value_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionValueId' . '}', + ObjectSerializer::toPathValue($dimension_value_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employee_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation genericDimensionEarningsLineSplitPost + * + * Create Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model model (required) + * @param string $business_id business_id (required) + * @param string $employee_id employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function genericDimensionEarningsLineSplitPost($model, $business_id, $employee_id) + { + $this->genericDimensionEarningsLineSplitPostWithHttpInfo($model, $business_id, $employee_id); + } + + /** + * Operation genericDimensionEarningsLineSplitPostWithHttpInfo + * + * Create Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function genericDimensionEarningsLineSplitPostWithHttpInfo($model, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitPostRequest($model, $business_id, $employee_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation genericDimensionEarningsLineSplitPostAsync + * + * Create Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitPostAsync($model, $business_id, $employee_id) + { + return $this->genericDimensionEarningsLineSplitPostAsyncWithHttpInfo($model, $business_id, $employee_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation genericDimensionEarningsLineSplitPostAsyncWithHttpInfo + * + * Create Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitPostAsyncWithHttpInfo($model, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitPostRequest($model, $business_id, $employee_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'genericDimensionEarningsLineSplitPost' + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function genericDimensionEarningsLineSplitPostRequest($model, $business_id, $employee_id) + { + // verify the required parameter 'model' is set + if ($model === null || (is_array($model) && count($model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $model when calling genericDimensionEarningsLineSplitPost' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling genericDimensionEarningsLineSplitPost' + ); + } + // verify the required parameter 'employee_id' is set + if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $employee_id when calling genericDimensionEarningsLineSplitPost' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/employee/{employeeId}/earningslinesplit/dimension'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employee_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($model)) { + $_tempBody = $model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation genericDimensionEarningsLineSplitPut + * + * Update Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model model (required) + * @param string $business_id business_id (required) + * @param string $employee_id employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function genericDimensionEarningsLineSplitPut($model, $business_id, $employee_id) + { + $this->genericDimensionEarningsLineSplitPutWithHttpInfo($model, $business_id, $employee_id); + } + + /** + * Operation genericDimensionEarningsLineSplitPutWithHttpInfo + * + * Update Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function genericDimensionEarningsLineSplitPutWithHttpInfo($model, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitPutRequest($model, $business_id, $employee_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation genericDimensionEarningsLineSplitPutAsync + * + * Update Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitPutAsync($model, $business_id, $employee_id) + { + return $this->genericDimensionEarningsLineSplitPutAsyncWithHttpInfo($model, $business_id, $employee_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation genericDimensionEarningsLineSplitPutAsyncWithHttpInfo + * + * Update Dimension Earnings Line Split + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function genericDimensionEarningsLineSplitPutAsyncWithHttpInfo($model, $business_id, $employee_id) + { + $returnType = ''; + $request = $this->genericDimensionEarningsLineSplitPutRequest($model, $business_id, $employee_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'genericDimensionEarningsLineSplitPut' + * + * @param \Swagger\Client\Model\EarningsLineSplitEditModel $model (required) + * @param string $business_id (required) + * @param string $employee_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function genericDimensionEarningsLineSplitPutRequest($model, $business_id, $employee_id) + { + // verify the required parameter 'model' is set + if ($model === null || (is_array($model) && count($model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $model when calling genericDimensionEarningsLineSplitPut' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling genericDimensionEarningsLineSplitPut' + ); + } + // verify the required parameter 'employee_id' is set + if ($employee_id === null || (is_array($employee_id) && count($employee_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $employee_id when calling genericDimensionEarningsLineSplitPut' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/employee/{employeeId}/earningslinesplit/dimension'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + // path params + if ($employee_id !== null) { + $resourcePath = str_replace( + '{' . 'employeeId' . '}', + ObjectSerializer::toPathValue($employee_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($model)) { + $_tempBody = $model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/lib/Api/LookupDataApi.php b/src/lib/Api/LookupDataApi.php index 4e3698c..97889c5 100644 --- a/src/lib/Api/LookupDataApi.php +++ b/src/lib/Api/LookupDataApi.php @@ -1126,6 +1126,261 @@ protected function lookupDataGetApiV2BusinessByBusinessIdLookupdataTimezonesRequ ); } + /** + * Operation lookupDataIndustries + * + * List industry options + * + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return string[] + */ + public function lookupDataIndustries() + { + list($response) = $this->lookupDataIndustriesWithHttpInfo(); + return $response; + } + + /** + * Operation lookupDataIndustriesWithHttpInfo + * + * List industry options + * + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of string[], HTTP status code, HTTP response headers (array of strings) + */ + public function lookupDataIndustriesWithHttpInfo() + { + $returnType = 'string[]'; + $request = $this->lookupDataIndustriesRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation lookupDataIndustriesAsync + * + * List industry options + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function lookupDataIndustriesAsync() + { + return $this->lookupDataIndustriesAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation lookupDataIndustriesAsyncWithHttpInfo + * + * List industry options + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function lookupDataIndustriesAsyncWithHttpInfo() + { + $returnType = 'string[]'; + $request = $this->lookupDataIndustriesRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'lookupDataIndustries' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function lookupDataIndustriesRequest() + { + + $resourcePath = '/api/v2/lookupdata/industries'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation lookupDataReports * diff --git a/src/lib/Api/ManagerApi.php b/src/lib/Api/ManagerApi.php index d867f2f..284eedb 100644 --- a/src/lib/Api/ManagerApi.php +++ b/src/lib/Api/ManagerApi.php @@ -6180,6 +6180,557 @@ protected function auManagerRosterShiftNearbyRosterShiftsRequest($employee_id, $ ); } + /** + * Operation auManagerRosterShiftPost + * + * Create roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model shift_model (required) + * @param bool $publish publish (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function auManagerRosterShiftPost($shift_model, $publish, $business_id) + { + $this->auManagerRosterShiftPostWithHttpInfo($shift_model, $publish, $business_id); + } + + /** + * Operation auManagerRosterShiftPostWithHttpInfo + * + * Create roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function auManagerRosterShiftPostWithHttpInfo($shift_model, $publish, $business_id) + { + $returnType = ''; + $request = $this->auManagerRosterShiftPostRequest($shift_model, $publish, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation auManagerRosterShiftPostAsync + * + * Create roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auManagerRosterShiftPostAsync($shift_model, $publish, $business_id) + { + return $this->auManagerRosterShiftPostAsyncWithHttpInfo($shift_model, $publish, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auManagerRosterShiftPostAsyncWithHttpInfo + * + * Create roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auManagerRosterShiftPostAsyncWithHttpInfo($shift_model, $publish, $business_id) + { + $returnType = ''; + $request = $this->auManagerRosterShiftPostRequest($shift_model, $publish, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auManagerRosterShiftPost' + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auManagerRosterShiftPostRequest($shift_model, $publish, $business_id) + { + // verify the required parameter 'shift_model' is set + if ($shift_model === null || (is_array($shift_model) && count($shift_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $shift_model when calling auManagerRosterShiftPost' + ); + } + // verify the required parameter 'publish' is set + if ($publish === null || (is_array($publish) && count($publish) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $publish when calling auManagerRosterShiftPost' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling auManagerRosterShiftPost' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/manager/rostershift'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($publish !== null) { + $queryParams['publish'] = ObjectSerializer::toQueryValue($publish); + } + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($shift_model)) { + $_tempBody = $shift_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation auManagerRosterShiftPut + * + * Update roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model shift_model (required) + * @param int $roster_shift_id roster_shift_id (required) + * @param bool $publish publish (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function auManagerRosterShiftPut($shift_model, $roster_shift_id, $publish, $business_id) + { + $this->auManagerRosterShiftPutWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id); + } + + /** + * Operation auManagerRosterShiftPutWithHttpInfo + * + * Update roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function auManagerRosterShiftPutWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + { + $returnType = ''; + $request = $this->auManagerRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation auManagerRosterShiftPutAsync + * + * Update roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auManagerRosterShiftPutAsync($shift_model, $roster_shift_id, $publish, $business_id) + { + return $this->auManagerRosterShiftPutAsyncWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auManagerRosterShiftPutAsyncWithHttpInfo + * + * Update roster shift + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auManagerRosterShiftPutAsyncWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + { + $returnType = ''; + $request = $this->auManagerRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auManagerRosterShiftPut' + * + * @param \Swagger\Client\Model\RosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auManagerRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id) + { + // verify the required parameter 'shift_model' is set + if ($shift_model === null || (is_array($shift_model) && count($shift_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $shift_model when calling auManagerRosterShiftPut' + ); + } + // verify the required parameter 'roster_shift_id' is set + if ($roster_shift_id === null || (is_array($roster_shift_id) && count($roster_shift_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $roster_shift_id when calling auManagerRosterShiftPut' + ); + } + // verify the required parameter 'publish' is set + if ($publish === null || (is_array($publish) && count($publish) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $publish when calling auManagerRosterShiftPut' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling auManagerRosterShiftPut' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/manager/rostershift/{rosterShiftId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($publish !== null) { + $queryParams['publish'] = ObjectSerializer::toQueryValue($publish); + } + + // path params + if ($roster_shift_id !== null) { + $resourcePath = str_replace( + '{' . 'rosterShiftId' . '}', + ObjectSerializer::toPathValue($roster_shift_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($shift_model)) { + $_tempBody = $shift_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation auManagerRosterShiftStubShiftTimesheets * @@ -11292,16 +11843,17 @@ protected function genericManagerTimeAndAttendanceGetShiftNotesRequest($kiosk_id * * List Kiosk Staff * - * @param int $kiosk_id kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Swagger\Client\Model\BasicKioskEmployeeModel[] */ - public function genericManagerTimeAndAttendanceGetStaff($kiosk_id, $business_id) + public function genericManagerTimeAndAttendanceGetStaff($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { - list($response) = $this->genericManagerTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id); + list($response) = $this->genericManagerTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); return $response; } @@ -11310,17 +11862,18 @@ public function genericManagerTimeAndAttendanceGetStaff($kiosk_id, $business_id) * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\BasicKioskEmployeeModel[], HTTP status code, HTTP response headers (array of strings) */ - public function genericManagerTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id) + public function genericManagerTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { $returnType = '\Swagger\Client\Model\BasicKioskEmployeeModel[]'; - $request = $this->genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id); + $request = $this->genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); try { $options = $this->createHttpClientOption(); @@ -11386,15 +11939,16 @@ public function genericManagerTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $ * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function genericManagerTimeAndAttendanceGetStaffAsync($kiosk_id, $business_id) + public function genericManagerTimeAndAttendanceGetStaffAsync($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { - return $this->genericManagerTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id) + return $this->genericManagerTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location) ->then( function ($response) { return $response[0]; @@ -11407,16 +11961,17 @@ function ($response) { * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function genericManagerTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id) + public function genericManagerTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { $returnType = '\Swagger\Client\Model\BasicKioskEmployeeModel[]'; - $request = $this->genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id); + $request = $this->genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11458,13 +12013,14 @@ function ($exception) { /** * Create request for operation 'genericManagerTimeAndAttendanceGetStaff' * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id) + protected function genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { // verify the required parameter 'kiosk_id' is set if ($kiosk_id === null || (is_array($kiosk_id) && count($kiosk_id) === 0)) { @@ -11486,6 +12042,10 @@ protected function genericManagerTimeAndAttendanceGetStaffRequest($kiosk_id, $bu $httpBody = ''; $multipart = false; + // query params + if ($restrict_current_shifts_to_current_kiosk_location !== null) { + $queryParams['restrictCurrentShiftsToCurrentKioskLocation'] = ObjectSerializer::toQueryValue($restrict_current_shifts_to_current_kiosk_location); + } // path params if ($kiosk_id !== null) { @@ -23271,6 +23831,280 @@ protected function managerExpenseGetTaxCodesRequest($business_id) ); } + /** + * Operation managerGetDashboard + * + * Get Dashboard + * + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ManagerDashboardModel + */ + public function managerGetDashboard($business_id) + { + list($response) = $this->managerGetDashboardWithHttpInfo($business_id); + return $response; + } + + /** + * Operation managerGetDashboardWithHttpInfo + * + * Get Dashboard + * + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ManagerDashboardModel, HTTP status code, HTTP response headers (array of strings) + */ + public function managerGetDashboardWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\ManagerDashboardModel'; + $request = $this->managerGetDashboardRequest($business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ManagerDashboardModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation managerGetDashboardAsync + * + * Get Dashboard + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function managerGetDashboardAsync($business_id) + { + return $this->managerGetDashboardAsyncWithHttpInfo($business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation managerGetDashboardAsyncWithHttpInfo + * + * Get Dashboard + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function managerGetDashboardAsyncWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\ManagerDashboardModel'; + $request = $this->managerGetDashboardRequest($business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'managerGetDashboard' + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function managerGetDashboardRequest($business_id) + { + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling managerGetDashboard' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/manager/dashboard'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation managerGetEmployees * diff --git a/src/lib/Api/PayRunApi.php b/src/lib/Api/PayRunApi.php index d485bc6..2ce56d4 100644 --- a/src/lib/Api/PayRunApi.php +++ b/src/lib/Api/PayRunApi.php @@ -11369,6 +11369,262 @@ protected function employeePayRunTotalGetRequest($employee_id, $business_id) ); } + /** + * Operation payRunApprovalStartApprovalProcess + * + * Start Approval Process + * + * @param int $pay_run_id pay_run_id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function payRunApprovalStartApprovalProcess($pay_run_id, $business_id) + { + $this->payRunApprovalStartApprovalProcessWithHttpInfo($pay_run_id, $business_id); + } + + /** + * Operation payRunApprovalStartApprovalProcessWithHttpInfo + * + * Start Approval Process + * + * @param int $pay_run_id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function payRunApprovalStartApprovalProcessWithHttpInfo($pay_run_id, $business_id) + { + $returnType = ''; + $request = $this->payRunApprovalStartApprovalProcessRequest($pay_run_id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation payRunApprovalStartApprovalProcessAsync + * + * Start Approval Process + * + * @param int $pay_run_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function payRunApprovalStartApprovalProcessAsync($pay_run_id, $business_id) + { + return $this->payRunApprovalStartApprovalProcessAsyncWithHttpInfo($pay_run_id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation payRunApprovalStartApprovalProcessAsyncWithHttpInfo + * + * Start Approval Process + * + * @param int $pay_run_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function payRunApprovalStartApprovalProcessAsyncWithHttpInfo($pay_run_id, $business_id) + { + $returnType = ''; + $request = $this->payRunApprovalStartApprovalProcessRequest($pay_run_id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'payRunApprovalStartApprovalProcess' + * + * @param int $pay_run_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function payRunApprovalStartApprovalProcessRequest($pay_run_id, $business_id) + { + // verify the required parameter 'pay_run_id' is set + if ($pay_run_id === null || (is_array($pay_run_id) && count($pay_run_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $pay_run_id when calling payRunApprovalStartApprovalProcess' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling payRunApprovalStartApprovalProcess' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/payrun/{payRunId}/approval/start'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($pay_run_id !== null) { + $resourcePath = str_replace( + '{' . 'payRunId' . '}', + ObjectSerializer::toPathValue($pay_run_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation payRunEmployeeExpensesDelete * diff --git a/src/lib/Api/ReportingApi.php b/src/lib/Api/ReportingApi.php index 39eae56..482fac3 100644 --- a/src/lib/Api/ReportingApi.php +++ b/src/lib/Api/ReportingApi.php @@ -95,6 +95,7 @@ public function getConfig() * @param string $business_id business_id (required) * @param bool $request_show_zero_pay_categories (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -104,9 +105,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \Swagger\Client\Model\AuCostingReportApiModel[] */ - public function auReportsCostingGet($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsCostingGet($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsCostingGetWithHttpInfo($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsCostingGetWithHttpInfo($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -118,6 +119,7 @@ public function auReportsCostingGet($business_id, $request_show_zero_pay_categor * @param string $business_id (required) * @param bool $request_show_zero_pay_categories (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -127,10 +129,10 @@ public function auReportsCostingGet($business_id, $request_show_zero_pay_categor * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\AuCostingReportApiModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsCostingGetWithHttpInfo($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsCostingGetWithHttpInfo($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuCostingReportApiModel[]'; - $request = $this->auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -199,6 +201,7 @@ public function auReportsCostingGetWithHttpInfo($business_id, $request_show_zero * @param string $business_id (required) * @param bool $request_show_zero_pay_categories (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -207,9 +210,9 @@ public function auReportsCostingGetWithHttpInfo($business_id, $request_show_zero * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsCostingGetAsync($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsCostingGetAsync($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsCostingGetAsyncWithHttpInfo($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsCostingGetAsyncWithHttpInfo($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -225,6 +228,7 @@ function ($response) { * @param string $business_id (required) * @param bool $request_show_zero_pay_categories (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -233,10 +237,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsCostingGetAsyncWithHttpInfo($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsCostingGetAsyncWithHttpInfo($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuCostingReportApiModel[]'; - $request = $this->auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -281,6 +285,7 @@ function ($exception) { * @param string $business_id (required) * @param bool $request_show_zero_pay_categories (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -289,7 +294,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsCostingGetRequest($business_id, $request_show_zero_pay_categories = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -314,6 +319,10 @@ protected function auReportsCostingGetRequest($business_id, $request_show_zero_p $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -422,6 +431,7 @@ protected function auReportsCostingGetRequest($business_id, $request_show_zero_p * * @param string $business_id business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -431,9 +441,9 @@ protected function auReportsCostingGetRequest($business_id, $request_show_zero_p * @throws \InvalidArgumentException * @return \Swagger\Client\Model\AuDetailedActivityReportExportModel[] */ - public function auReportsDetailedActivityGet($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsDetailedActivityGet($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsDetailedActivityGetWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsDetailedActivityGetWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -444,6 +454,7 @@ public function auReportsDetailedActivityGet($business_id, $request_pay_schedule * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -453,10 +464,10 @@ public function auReportsDetailedActivityGet($business_id, $request_pay_schedule * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\AuDetailedActivityReportExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsDetailedActivityGetWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsDetailedActivityGetWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuDetailedActivityReportExportModel[]'; - $request = $this->auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -524,6 +535,7 @@ public function auReportsDetailedActivityGetWithHttpInfo($business_id, $request_ * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -532,9 +544,9 @@ public function auReportsDetailedActivityGetWithHttpInfo($business_id, $request_ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsDetailedActivityGetAsync($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsDetailedActivityGetAsync($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsDetailedActivityGetAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsDetailedActivityGetAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -549,6 +561,7 @@ function ($response) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -557,10 +570,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsDetailedActivityGetAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsDetailedActivityGetAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuDetailedActivityReportExportModel[]'; - $request = $this->auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -604,6 +617,7 @@ function ($exception) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -612,7 +626,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsDetailedActivityGetRequest($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -633,6 +647,10 @@ protected function auReportsDetailedActivityGetRequest($business_id, $request_pa $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -1336,6 +1354,7 @@ protected function auReportsEmployeePaymentHistoryGetRequest($business_id, $requ * @param int $request_employee_id (optional) * @param int[] $request_pay_category_ids (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -1345,9 +1364,9 @@ protected function auReportsEmployeePaymentHistoryGetRequest($business_id, $requ * @throws \InvalidArgumentException * @return \Swagger\Client\Model\AuGrossToNetResponseModel[] */ - public function auReportsGrossToNetGet($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsGrossToNetGet($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsGrossToNetGetWithHttpInfo($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsGrossToNetGetWithHttpInfo($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -1360,6 +1379,7 @@ public function auReportsGrossToNetGet($business_id, $request_employee_id = null * @param int $request_employee_id (optional) * @param int[] $request_pay_category_ids (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -1369,10 +1389,10 @@ public function auReportsGrossToNetGet($business_id, $request_employee_id = null * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\AuGrossToNetResponseModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsGrossToNetGetWithHttpInfo($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsGrossToNetGetWithHttpInfo($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuGrossToNetResponseModel[]'; - $request = $this->auReportsGrossToNetGetRequest($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsGrossToNetGetRequest($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -1442,6 +1462,7 @@ public function auReportsGrossToNetGetWithHttpInfo($business_id, $request_employ * @param int $request_employee_id (optional) * @param int[] $request_pay_category_ids (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -1450,9 +1471,9 @@ public function auReportsGrossToNetGetWithHttpInfo($business_id, $request_employ * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsGrossToNetGetAsync($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsGrossToNetGetAsync($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsGrossToNetGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsGrossToNetGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -1469,6 +1490,7 @@ function ($response) { * @param int $request_employee_id (optional) * @param int[] $request_pay_category_ids (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -1477,10 +1499,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsGrossToNetGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsGrossToNetGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuGrossToNetResponseModel[]'; - $request = $this->auReportsGrossToNetGetRequest($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsGrossToNetGetRequest($business_id, $request_employee_id, $request_pay_category_ids, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1526,6 +1548,7 @@ function ($exception) { * @param int $request_employee_id (optional) * @param int[] $request_pay_category_ids (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -1534,7 +1557,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsGrossToNetGetRequest($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsGrossToNetGetRequest($business_id, $request_employee_id = null, $request_pay_category_ids = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -1566,6 +1589,10 @@ protected function auReportsGrossToNetGetRequest($business_id, $request_employee $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -4586,6 +4613,7 @@ protected function auReportsPayrollTaxGetRequest($business_id, $request_group_by * @param int $request_timesheet_location_id (optional) * @param string[] $request_roster_statuses (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4595,9 +4623,9 @@ protected function auReportsPayrollTaxGetRequest($business_id, $request_group_by * @throws \InvalidArgumentException * @return \Swagger\Client\Model\AuRosterTimesheetComparisonReportExportModel[] */ - public function auReportsRosterTimesheetComparisonGet($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsRosterTimesheetComparisonGet($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -4616,6 +4644,7 @@ public function auReportsRosterTimesheetComparisonGet($business_id, $request_emp * @param int $request_timesheet_location_id (optional) * @param string[] $request_roster_statuses (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4625,10 +4654,10 @@ public function auReportsRosterTimesheetComparisonGet($business_id, $request_emp * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\AuRosterTimesheetComparisonReportExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuRosterTimesheetComparisonReportExportModel[]'; - $request = $this->auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -4704,6 +4733,7 @@ public function auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, * @param int $request_timesheet_location_id (optional) * @param string[] $request_roster_statuses (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4712,9 +4742,9 @@ public function auReportsRosterTimesheetComparisonGetWithHttpInfo($business_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsRosterTimesheetComparisonGetAsync($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsRosterTimesheetComparisonGetAsync($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsRosterTimesheetComparisonGetAsyncWithHttpInfo($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsRosterTimesheetComparisonGetAsyncWithHttpInfo($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -4737,6 +4767,7 @@ function ($response) { * @param int $request_timesheet_location_id (optional) * @param string[] $request_roster_statuses (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4745,10 +4776,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsRosterTimesheetComparisonGetAsyncWithHttpInfo($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsRosterTimesheetComparisonGetAsyncWithHttpInfo($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuRosterTimesheetComparisonReportExportModel[]'; - $request = $this->auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id, $request_employee_id, $request_include_costs, $request_timesheet_statuses, $request_work_type_id, $request_roster_location_id, $request_timesheet_location_id, $request_roster_statuses, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4800,6 +4831,7 @@ function ($exception) { * @param int $request_timesheet_location_id (optional) * @param string[] $request_roster_statuses (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4808,7 +4840,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsRosterTimesheetComparisonGetRequest($business_id, $request_employment_type_id = null, $request_employee_id = null, $request_include_costs = null, $request_timesheet_statuses = null, $request_work_type_id = null, $request_roster_location_id = null, $request_timesheet_location_id = null, $request_roster_statuses = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -4867,6 +4899,10 @@ protected function auReportsRosterTimesheetComparisonGetRequest($business_id, $r $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -4975,6 +5011,7 @@ protected function auReportsRosterTimesheetComparisonGetRequest($business_id, $r * * @param string $business_id business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -4984,9 +5021,9 @@ protected function auReportsRosterTimesheetComparisonGetRequest($business_id, $r * @throws \InvalidArgumentException * @return \Swagger\Client\Model\SuperAccrualExportModel[] */ - public function auReportsSuperContributionsByEmployee($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsByEmployee($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -4997,6 +5034,7 @@ public function auReportsSuperContributionsByEmployee($business_id, $request_pay * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5006,10 +5044,10 @@ public function auReportsSuperContributionsByEmployee($business_id, $request_pay * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\SuperAccrualExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\SuperAccrualExportModel[]'; - $request = $this->auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -5077,6 +5115,7 @@ public function auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5085,9 +5124,9 @@ public function auReportsSuperContributionsByEmployeeWithHttpInfo($business_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsSuperContributionsByEmployeeAsync($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsByEmployeeAsync($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsSuperContributionsByEmployeeAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsSuperContributionsByEmployeeAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -5102,6 +5141,7 @@ function ($response) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5110,10 +5150,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsSuperContributionsByEmployeeAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsByEmployeeAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\SuperAccrualExportModel[]'; - $request = $this->auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5157,6 +5197,7 @@ function ($exception) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5165,7 +5206,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsSuperContributionsByEmployeeRequest($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -5186,6 +5227,10 @@ protected function auReportsSuperContributionsByEmployeeRequest($business_id, $r $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -5294,6 +5339,7 @@ protected function auReportsSuperContributionsByEmployeeRequest($business_id, $r * * @param string $business_id business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5303,9 +5349,9 @@ protected function auReportsSuperContributionsByEmployeeRequest($business_id, $r * @throws \InvalidArgumentException * @return \Swagger\Client\Model\SuperContributionsReportExportModel[] */ - public function auReportsSuperContributionsBySuperFund($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsBySuperFund($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -5316,6 +5362,7 @@ public function auReportsSuperContributionsBySuperFund($business_id, $request_pa * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5325,10 +5372,10 @@ public function auReportsSuperContributionsBySuperFund($business_id, $request_pa * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\SuperContributionsReportExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\SuperContributionsReportExportModel[]'; - $request = $this->auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -5396,6 +5443,7 @@ public function auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5404,9 +5452,9 @@ public function auReportsSuperContributionsBySuperFundWithHttpInfo($business_id, * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsSuperContributionsBySuperFundAsync($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsBySuperFundAsync($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsSuperContributionsBySuperFundAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsSuperContributionsBySuperFundAsyncWithHttpInfo($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -5421,6 +5469,7 @@ function ($response) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5429,10 +5478,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsSuperContributionsBySuperFundAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsSuperContributionsBySuperFundAsyncWithHttpInfo($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\SuperContributionsReportExportModel[]'; - $request = $this->auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5476,6 +5525,7 @@ function ($exception) { * * @param string $business_id (required) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5484,7 +5534,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsSuperContributionsBySuperFundRequest($business_id, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -5505,6 +5555,10 @@ protected function auReportsSuperContributionsBySuperFundRequest($business_id, $ $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -5617,6 +5671,7 @@ protected function auReportsSuperContributionsBySuperFundRequest($business_id, $ * @param string[] $request_statuses (optional) * @param int $request_work_type_id (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5626,9 +5681,9 @@ protected function auReportsSuperContributionsBySuperFundRequest($business_id, $ * @throws \InvalidArgumentException * @return \Swagger\Client\Model\AuTimesheetExportModel[] */ - public function auReportsTimesheetGet($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsTimesheetGet($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->auReportsTimesheetGetWithHttpInfo($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->auReportsTimesheetGetWithHttpInfo($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -5643,6 +5698,7 @@ public function auReportsTimesheetGet($business_id, $request_employee_id = null, * @param string[] $request_statuses (optional) * @param int $request_work_type_id (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5652,10 +5708,10 @@ public function auReportsTimesheetGet($business_id, $request_employee_id = null, * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\AuTimesheetExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function auReportsTimesheetGetWithHttpInfo($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsTimesheetGetWithHttpInfo($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuTimesheetExportModel[]'; - $request = $this->auReportsTimesheetGetRequest($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsTimesheetGetRequest($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -5727,6 +5783,7 @@ public function auReportsTimesheetGetWithHttpInfo($business_id, $request_employe * @param string[] $request_statuses (optional) * @param int $request_work_type_id (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5735,9 +5792,9 @@ public function auReportsTimesheetGetWithHttpInfo($business_id, $request_employe * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsTimesheetGetAsync($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsTimesheetGetAsync($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->auReportsTimesheetGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->auReportsTimesheetGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -5756,6 +5813,7 @@ function ($response) { * @param string[] $request_statuses (optional) * @param int $request_work_type_id (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5764,10 +5822,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function auReportsTimesheetGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function auReportsTimesheetGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\AuTimesheetExportModel[]'; - $request = $this->auReportsTimesheetGetRequest($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->auReportsTimesheetGetRequest($business_id, $request_employee_id, $request_include_costs, $request_statuses, $request_work_type_id, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5815,6 +5873,7 @@ function ($exception) { * @param string[] $request_statuses (optional) * @param int $request_work_type_id (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -5823,7 +5882,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function auReportsTimesheetGetRequest($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function auReportsTimesheetGetRequest($business_id, $request_employee_id = null, $request_include_costs = null, $request_statuses = null, $request_work_type_id = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -5863,6 +5922,10 @@ protected function auReportsTimesheetGetRequest($business_id, $request_employee_ $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -6287,6 +6350,7 @@ protected function reportsBirthdayGetRequest($from_date, $to_date, $business_id, * @param int $request_deduction_category_id (optional) * @param bool $request_disable_rollup_reporting (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6296,9 +6360,9 @@ protected function reportsBirthdayGetRequest($from_date, $to_date, $business_id, * @throws \InvalidArgumentException * @return \Swagger\Client\Model\DeductionsReportExportModel[] */ - public function reportsDeductionsGet($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsDeductionsGet($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->reportsDeductionsGetWithHttpInfo($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->reportsDeductionsGetWithHttpInfo($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -6312,6 +6376,7 @@ public function reportsDeductionsGet($business_id, $request_employee_id = null, * @param int $request_deduction_category_id (optional) * @param bool $request_disable_rollup_reporting (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6321,10 +6386,10 @@ public function reportsDeductionsGet($business_id, $request_employee_id = null, * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\DeductionsReportExportModel[], HTTP status code, HTTP response headers (array of strings) */ - public function reportsDeductionsGetWithHttpInfo($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsDeductionsGetWithHttpInfo($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\DeductionsReportExportModel[]'; - $request = $this->reportsDeductionsGetRequest($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->reportsDeductionsGetRequest($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -6395,6 +6460,7 @@ public function reportsDeductionsGetWithHttpInfo($business_id, $request_employee * @param int $request_deduction_category_id (optional) * @param bool $request_disable_rollup_reporting (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6403,9 +6469,9 @@ public function reportsDeductionsGetWithHttpInfo($business_id, $request_employee * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reportsDeductionsGetAsync($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsDeductionsGetAsync($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->reportsDeductionsGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->reportsDeductionsGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -6423,6 +6489,7 @@ function ($response) { * @param int $request_deduction_category_id (optional) * @param bool $request_disable_rollup_reporting (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6431,10 +6498,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reportsDeductionsGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsDeductionsGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\DeductionsReportExportModel[]'; - $request = $this->reportsDeductionsGetRequest($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->reportsDeductionsGetRequest($business_id, $request_employee_id, $request_deduction_category_id, $request_disable_rollup_reporting, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6481,6 +6548,7 @@ function ($exception) { * @param int $request_deduction_category_id (optional) * @param bool $request_disable_rollup_reporting (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6489,7 +6557,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function reportsDeductionsGetRequest($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function reportsDeductionsGetRequest($business_id, $request_employee_id = null, $request_deduction_category_id = null, $request_disable_rollup_reporting = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -6522,6 +6590,10 @@ protected function reportsDeductionsGetRequest($business_id, $request_employee_i $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } @@ -6954,6 +7026,7 @@ protected function reportsDocumentAcknowledgementsGetRequest($business_id, $docu * @param int $request_employee_id (optional) * @param string $request_section (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6963,9 +7036,9 @@ protected function reportsDocumentAcknowledgementsGetRequest($business_id, $docu * @throws \InvalidArgumentException * @return \Swagger\Client\Model\EmployeeDetailsAuditReportApiModel[] */ - public function reportsEmployeeAuditGet($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsEmployeeAuditGet($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - list($response) = $this->reportsEmployeeAuditGetWithHttpInfo($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + list($response) = $this->reportsEmployeeAuditGetWithHttpInfo($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $response; } @@ -6978,6 +7051,7 @@ public function reportsEmployeeAuditGet($business_id, $request_employee_id = nul * @param int $request_employee_id (optional) * @param string $request_section (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -6987,10 +7061,10 @@ public function reportsEmployeeAuditGet($business_id, $request_employee_id = nul * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\EmployeeDetailsAuditReportApiModel[], HTTP status code, HTTP response headers (array of strings) */ - public function reportsEmployeeAuditGetWithHttpInfo($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsEmployeeAuditGetWithHttpInfo($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\EmployeeDetailsAuditReportApiModel[]'; - $request = $this->reportsEmployeeAuditGetRequest($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->reportsEmployeeAuditGetRequest($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); try { $options = $this->createHttpClientOption(); @@ -7060,6 +7134,7 @@ public function reportsEmployeeAuditGetWithHttpInfo($business_id, $request_emplo * @param int $request_employee_id (optional) * @param string $request_section (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -7068,9 +7143,9 @@ public function reportsEmployeeAuditGetWithHttpInfo($business_id, $request_emplo * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reportsEmployeeAuditGetAsync($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsEmployeeAuditGetAsync($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { - return $this->reportsEmployeeAuditGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) + return $this->reportsEmployeeAuditGetAsyncWithHttpInfo($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id) ->then( function ($response) { return $response[0]; @@ -7087,6 +7162,7 @@ function ($response) { * @param int $request_employee_id (optional) * @param string $request_section (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -7095,10 +7171,10 @@ function ($response) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function reportsEmployeeAuditGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + public function reportsEmployeeAuditGetAsyncWithHttpInfo($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { $returnType = '\Swagger\Client\Model\EmployeeDetailsAuditReportApiModel[]'; - $request = $this->reportsEmployeeAuditGetRequest($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); + $request = $this->reportsEmployeeAuditGetRequest($business_id, $request_employee_id, $request_section, $request_pay_schedule_id, $request_include_post_tax_deductions, $request_from_date, $request_to_date, $request_location_id, $request_employing_entity_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7144,6 +7220,7 @@ function ($exception) { * @param int $request_employee_id (optional) * @param string $request_section (optional) * @param int $request_pay_schedule_id (optional) + * @param bool $request_include_post_tax_deductions (optional) * @param \DateTime $request_from_date (optional) * @param \DateTime $request_to_date (optional) * @param int $request_location_id (optional) @@ -7152,7 +7229,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function reportsEmployeeAuditGetRequest($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) + protected function reportsEmployeeAuditGetRequest($business_id, $request_employee_id = null, $request_section = null, $request_pay_schedule_id = null, $request_include_post_tax_deductions = null, $request_from_date = null, $request_to_date = null, $request_location_id = null, $request_employing_entity_id = null) { // verify the required parameter 'business_id' is set if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { @@ -7181,6 +7258,10 @@ protected function reportsEmployeeAuditGetRequest($business_id, $request_employe $queryParams['request.payScheduleId'] = ObjectSerializer::toQueryValue($request_pay_schedule_id); } // query params + if ($request_include_post_tax_deductions !== null) { + $queryParams['request.includePostTaxDeductions'] = ObjectSerializer::toQueryValue($request_include_post_tax_deductions); + } + // query params if ($request_from_date !== null) { $queryParams['request.fromDate'] = ObjectSerializer::toQueryValue($request_from_date); } diff --git a/src/lib/Api/ReportingDimensionsApi.php b/src/lib/Api/ReportingDimensionsApi.php new file mode 100644 index 0000000..f01a258 --- /dev/null +++ b/src/lib/Api/ReportingDimensionsApi.php @@ -0,0 +1,3039 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation reportingDimensionDelete + * + * Delete Dimension + * + * @param int $id id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function reportingDimensionDelete($id, $business_id) + { + $this->reportingDimensionDeleteWithHttpInfo($id, $business_id); + } + + /** + * Operation reportingDimensionDeleteWithHttpInfo + * + * Delete Dimension + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionDeleteWithHttpInfo($id, $business_id) + { + $returnType = ''; + $request = $this->reportingDimensionDeleteRequest($id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation reportingDimensionDeleteAsync + * + * Delete Dimension + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionDeleteAsync($id, $business_id) + { + return $this->reportingDimensionDeleteAsyncWithHttpInfo($id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionDeleteAsyncWithHttpInfo + * + * Delete Dimension + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionDeleteAsyncWithHttpInfo($id, $business_id) + { + $returnType = ''; + $request = $this->reportingDimensionDeleteRequest($id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionDelete' + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionDeleteRequest($id, $business_id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionDelete' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionDelete' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionGet + * + * Get Dimension by ID + * + * @param int $id id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionApiModel + */ + public function reportingDimensionGet($id, $business_id) + { + list($response) = $this->reportingDimensionGetWithHttpInfo($id, $business_id); + return $response; + } + + /** + * Operation reportingDimensionGetWithHttpInfo + * + * Get Dimension by ID + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionGetWithHttpInfo($id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionGetRequest($id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionGetAsync + * + * Get Dimension by ID + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionGetAsync($id, $business_id) + { + return $this->reportingDimensionGetAsyncWithHttpInfo($id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionGetAsyncWithHttpInfo + * + * Get Dimension by ID + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionGetAsyncWithHttpInfo($id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionGetRequest($id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionGet' + * + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionGetRequest($id, $business_id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionGet' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionGet' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionGetDimensions + * + * List Dimensions + * + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionApiModel[] + */ + public function reportingDimensionGetDimensions($business_id) + { + list($response) = $this->reportingDimensionGetDimensionsWithHttpInfo($business_id); + return $response; + } + + /** + * Operation reportingDimensionGetDimensionsWithHttpInfo + * + * List Dimensions + * + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionApiModel[], HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionGetDimensionsWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel[]'; + $request = $this->reportingDimensionGetDimensionsRequest($business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionApiModel[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionGetDimensionsAsync + * + * List Dimensions + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionGetDimensionsAsync($business_id) + { + return $this->reportingDimensionGetDimensionsAsyncWithHttpInfo($business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionGetDimensionsAsyncWithHttpInfo + * + * List Dimensions + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionGetDimensionsAsyncWithHttpInfo($business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel[]'; + $request = $this->reportingDimensionGetDimensionsRequest($business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionGetDimensions' + * + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionGetDimensionsRequest($business_id) + { + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionGetDimensions' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionPost + * + * Create Dimension + * + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension dimension (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionApiModel + */ + public function reportingDimensionPost($dimension, $business_id) + { + list($response) = $this->reportingDimensionPostWithHttpInfo($dimension, $business_id); + return $response; + } + + /** + * Operation reportingDimensionPostWithHttpInfo + * + * Create Dimension + * + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionPostWithHttpInfo($dimension, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionPostRequest($dimension, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionPostAsync + * + * Create Dimension + * + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionPostAsync($dimension, $business_id) + { + return $this->reportingDimensionPostAsyncWithHttpInfo($dimension, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionPostAsyncWithHttpInfo + * + * Create Dimension + * + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionPostAsyncWithHttpInfo($dimension, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionPostRequest($dimension, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionPost' + * + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionPostRequest($dimension, $business_id) + { + // verify the required parameter 'dimension' is set + if ($dimension === null || (is_array($dimension) && count($dimension) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension when calling reportingDimensionPost' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionPost' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($dimension)) { + $_tempBody = $dimension; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionPut + * + * Update Dimension + * + * @param int $id id (required) + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension_model dimension_model (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionApiModel + */ + public function reportingDimensionPut($id, $dimension_model, $business_id) + { + list($response) = $this->reportingDimensionPutWithHttpInfo($id, $dimension_model, $business_id); + return $response; + } + + /** + * Operation reportingDimensionPutWithHttpInfo + * + * Update Dimension + * + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension_model (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionPutWithHttpInfo($id, $dimension_model, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionPutRequest($id, $dimension_model, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionPutAsync + * + * Update Dimension + * + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionPutAsync($id, $dimension_model, $business_id) + { + return $this->reportingDimensionPutAsyncWithHttpInfo($id, $dimension_model, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionPutAsyncWithHttpInfo + * + * Update Dimension + * + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionPutAsyncWithHttpInfo($id, $dimension_model, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionApiModel'; + $request = $this->reportingDimensionPutRequest($id, $dimension_model, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionPut' + * + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionApiModel $dimension_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionPutRequest($id, $dimension_model, $business_id) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionPut' + ); + } + // verify the required parameter 'dimension_model' is set + if ($dimension_model === null || (is_array($dimension_model) && count($dimension_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_model when calling reportingDimensionPut' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionPut' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($dimension_model)) { + $_tempBody = $dimension_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionValueDelete + * + * Delete Dimension Value + * + * @param int $dimension_id dimension_id (required) + * @param int $id id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function reportingDimensionValueDelete($dimension_id, $id, $business_id) + { + $this->reportingDimensionValueDeleteWithHttpInfo($dimension_id, $id, $business_id); + } + + /** + * Operation reportingDimensionValueDeleteWithHttpInfo + * + * Delete Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionValueDeleteWithHttpInfo($dimension_id, $id, $business_id) + { + $returnType = ''; + $request = $this->reportingDimensionValueDeleteRequest($dimension_id, $id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation reportingDimensionValueDeleteAsync + * + * Delete Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueDeleteAsync($dimension_id, $id, $business_id) + { + return $this->reportingDimensionValueDeleteAsyncWithHttpInfo($dimension_id, $id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionValueDeleteAsyncWithHttpInfo + * + * Delete Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueDeleteAsyncWithHttpInfo($dimension_id, $id, $business_id) + { + $returnType = ''; + $request = $this->reportingDimensionValueDeleteRequest($dimension_id, $id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionValueDelete' + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionValueDeleteRequest($dimension_id, $id, $business_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling reportingDimensionValueDelete' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionValueDelete' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionValueDelete' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{dimensionId}/value/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionValueGet + * + * Get Dimension Value by ID + * + * @param int $dimension_id dimension_id (required) + * @param int $id id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionValueApiModel + */ + public function reportingDimensionValueGet($dimension_id, $id, $business_id) + { + list($response) = $this->reportingDimensionValueGetWithHttpInfo($dimension_id, $id, $business_id); + return $response; + } + + /** + * Operation reportingDimensionValueGetWithHttpInfo + * + * Get Dimension Value by ID + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionValueApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionValueGetWithHttpInfo($dimension_id, $id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValueGetRequest($dimension_id, $id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionValueApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionValueGetAsync + * + * Get Dimension Value by ID + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueGetAsync($dimension_id, $id, $business_id) + { + return $this->reportingDimensionValueGetAsyncWithHttpInfo($dimension_id, $id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionValueGetAsyncWithHttpInfo + * + * Get Dimension Value by ID + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueGetAsyncWithHttpInfo($dimension_id, $id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValueGetRequest($dimension_id, $id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionValueGet' + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionValueGetRequest($dimension_id, $id, $business_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling reportingDimensionValueGet' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionValueGet' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionValueGet' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{dimensionId}/value/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionValueGetDimensionValues + * + * List Dimension Values + * + * @param int $dimension_id dimension_id (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionValueApiModel[] + */ + public function reportingDimensionValueGetDimensionValues($dimension_id, $business_id) + { + list($response) = $this->reportingDimensionValueGetDimensionValuesWithHttpInfo($dimension_id, $business_id); + return $response; + } + + /** + * Operation reportingDimensionValueGetDimensionValuesWithHttpInfo + * + * List Dimension Values + * + * @param int $dimension_id (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionValueApiModel[], HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionValueGetDimensionValuesWithHttpInfo($dimension_id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel[]'; + $request = $this->reportingDimensionValueGetDimensionValuesRequest($dimension_id, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionValueApiModel[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionValueGetDimensionValuesAsync + * + * List Dimension Values + * + * @param int $dimension_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueGetDimensionValuesAsync($dimension_id, $business_id) + { + return $this->reportingDimensionValueGetDimensionValuesAsyncWithHttpInfo($dimension_id, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionValueGetDimensionValuesAsyncWithHttpInfo + * + * List Dimension Values + * + * @param int $dimension_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValueGetDimensionValuesAsyncWithHttpInfo($dimension_id, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel[]'; + $request = $this->reportingDimensionValueGetDimensionValuesRequest($dimension_id, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionValueGetDimensionValues' + * + * @param int $dimension_id (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionValueGetDimensionValuesRequest($dimension_id, $business_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling reportingDimensionValueGetDimensionValues' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionValueGetDimensionValues' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{dimensionId}/value'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionValuePost + * + * Create Dimension Value + * + * @param int $dimension_id dimension_id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value dimension_value (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionValueApiModel + */ + public function reportingDimensionValuePost($dimension_id, $dimension_value, $business_id) + { + list($response) = $this->reportingDimensionValuePostWithHttpInfo($dimension_id, $dimension_value, $business_id); + return $response; + } + + /** + * Operation reportingDimensionValuePostWithHttpInfo + * + * Create Dimension Value + * + * @param int $dimension_id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionValueApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionValuePostWithHttpInfo($dimension_id, $dimension_value, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValuePostRequest($dimension_id, $dimension_value, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionValueApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionValuePostAsync + * + * Create Dimension Value + * + * @param int $dimension_id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValuePostAsync($dimension_id, $dimension_value, $business_id) + { + return $this->reportingDimensionValuePostAsyncWithHttpInfo($dimension_id, $dimension_value, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionValuePostAsyncWithHttpInfo + * + * Create Dimension Value + * + * @param int $dimension_id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValuePostAsyncWithHttpInfo($dimension_id, $dimension_value, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValuePostRequest($dimension_id, $dimension_value, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionValuePost' + * + * @param int $dimension_id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionValuePostRequest($dimension_id, $dimension_value, $business_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling reportingDimensionValuePost' + ); + } + // verify the required parameter 'dimension_value' is set + if ($dimension_value === null || (is_array($dimension_value) && count($dimension_value) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_value when calling reportingDimensionValuePost' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionValuePost' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{dimensionId}/value'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($dimension_value)) { + $_tempBody = $dimension_value; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation reportingDimensionValuePut + * + * Update Dimension Value + * + * @param int $dimension_id dimension_id (required) + * @param int $id id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value_model dimension_value_model (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\ReportingDimensionValueApiModel + */ + public function reportingDimensionValuePut($dimension_id, $id, $dimension_value_model, $business_id) + { + list($response) = $this->reportingDimensionValuePutWithHttpInfo($dimension_id, $id, $dimension_value_model, $business_id); + return $response; + } + + /** + * Operation reportingDimensionValuePutWithHttpInfo + * + * Update Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value_model (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\ReportingDimensionValueApiModel, HTTP status code, HTTP response headers (array of strings) + */ + public function reportingDimensionValuePutWithHttpInfo($dimension_id, $id, $dimension_value_model, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValuePutRequest($dimension_id, $id, $dimension_value_model, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\ReportingDimensionValueApiModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation reportingDimensionValuePutAsync + * + * Update Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValuePutAsync($dimension_id, $id, $dimension_value_model, $business_id) + { + return $this->reportingDimensionValuePutAsyncWithHttpInfo($dimension_id, $id, $dimension_value_model, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation reportingDimensionValuePutAsyncWithHttpInfo + * + * Update Dimension Value + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function reportingDimensionValuePutAsyncWithHttpInfo($dimension_id, $id, $dimension_value_model, $business_id) + { + $returnType = '\Swagger\Client\Model\ReportingDimensionValueApiModel'; + $request = $this->reportingDimensionValuePutRequest($dimension_id, $id, $dimension_value_model, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'reportingDimensionValuePut' + * + * @param int $dimension_id (required) + * @param int $id (required) + * @param \Swagger\Client\Model\ReportingDimensionValueApiModel $dimension_value_model (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function reportingDimensionValuePutRequest($dimension_id, $id, $dimension_value_model, $business_id) + { + // verify the required parameter 'dimension_id' is set + if ($dimension_id === null || (is_array($dimension_id) && count($dimension_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_id when calling reportingDimensionValuePut' + ); + } + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling reportingDimensionValuePut' + ); + } + // verify the required parameter 'dimension_value_model' is set + if ($dimension_value_model === null || (is_array($dimension_value_model) && count($dimension_value_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $dimension_value_model when calling reportingDimensionValuePut' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling reportingDimensionValuePut' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/dimension/{dimensionId}/value/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($dimension_id !== null) { + $resourcePath = str_replace( + '{' . 'dimensionId' . '}', + ObjectSerializer::toPathValue($dimension_id), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($dimension_value_model)) { + $_tempBody = $dimension_value_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/lib/Api/RosterShiftApi.php b/src/lib/Api/RosterShiftApi.php index 13c53bc..a034d29 100644 --- a/src/lib/Api/RosterShiftApi.php +++ b/src/lib/Api/RosterShiftApi.php @@ -1471,6 +1471,557 @@ protected function auRosterShiftNearbyRosterShiftsRequest($employee_id, $local_t ); } + /** + * Operation auRosterShiftPost + * + * Create roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model shift_model (required) + * @param bool $publish publish (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function auRosterShiftPost($shift_model, $publish, $business_id) + { + $this->auRosterShiftPostWithHttpInfo($shift_model, $publish, $business_id); + } + + /** + * Operation auRosterShiftPostWithHttpInfo + * + * Create roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function auRosterShiftPostWithHttpInfo($shift_model, $publish, $business_id) + { + $returnType = ''; + $request = $this->auRosterShiftPostRequest($shift_model, $publish, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation auRosterShiftPostAsync + * + * Create roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auRosterShiftPostAsync($shift_model, $publish, $business_id) + { + return $this->auRosterShiftPostAsyncWithHttpInfo($shift_model, $publish, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auRosterShiftPostAsyncWithHttpInfo + * + * Create roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auRosterShiftPostAsyncWithHttpInfo($shift_model, $publish, $business_id) + { + $returnType = ''; + $request = $this->auRosterShiftPostRequest($shift_model, $publish, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auRosterShiftPost' + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auRosterShiftPostRequest($shift_model, $publish, $business_id) + { + // verify the required parameter 'shift_model' is set + if ($shift_model === null || (is_array($shift_model) && count($shift_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $shift_model when calling auRosterShiftPost' + ); + } + // verify the required parameter 'publish' is set + if ($publish === null || (is_array($publish) && count($publish) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $publish when calling auRosterShiftPost' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling auRosterShiftPost' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/rostershift'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($publish !== null) { + $queryParams['publish'] = ObjectSerializer::toQueryValue($publish); + } + + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($shift_model)) { + $_tempBody = $shift_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation auRosterShiftPut + * + * Update roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model shift_model (required) + * @param int $roster_shift_id roster_shift_id (required) + * @param bool $publish publish (required) + * @param string $business_id business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function auRosterShiftPut($shift_model, $roster_shift_id, $publish, $business_id) + { + $this->auRosterShiftPutWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id); + } + + /** + * Operation auRosterShiftPutWithHttpInfo + * + * Update roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function auRosterShiftPutWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + { + $returnType = ''; + $request = $this->auRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation auRosterShiftPutAsync + * + * Update roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auRosterShiftPutAsync($shift_model, $roster_shift_id, $publish, $business_id) + { + return $this->auRosterShiftPutAsyncWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auRosterShiftPutAsyncWithHttpInfo + * + * Update roster shift + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auRosterShiftPutAsyncWithHttpInfo($shift_model, $roster_shift_id, $publish, $business_id) + { + $returnType = ''; + $request = $this->auRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auRosterShiftPut' + * + * @param \Swagger\Client\Model\AuRosterShiftEditModel $shift_model (required) + * @param int $roster_shift_id (required) + * @param bool $publish (required) + * @param string $business_id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auRosterShiftPutRequest($shift_model, $roster_shift_id, $publish, $business_id) + { + // verify the required parameter 'shift_model' is set + if ($shift_model === null || (is_array($shift_model) && count($shift_model) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $shift_model when calling auRosterShiftPut' + ); + } + // verify the required parameter 'roster_shift_id' is set + if ($roster_shift_id === null || (is_array($roster_shift_id) && count($roster_shift_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $roster_shift_id when calling auRosterShiftPut' + ); + } + // verify the required parameter 'publish' is set + if ($publish === null || (is_array($publish) && count($publish) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $publish when calling auRosterShiftPut' + ); + } + // verify the required parameter 'business_id' is set + if ($business_id === null || (is_array($business_id) && count($business_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $business_id when calling auRosterShiftPut' + ); + } + + $resourcePath = '/api/v2/business/{businessId}/rostershift/{rosterShiftId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($publish !== null) { + $queryParams['publish'] = ObjectSerializer::toQueryValue($publish); + } + + // path params + if ($roster_shift_id !== null) { + $resourcePath = str_replace( + '{' . 'rosterShiftId' . '}', + ObjectSerializer::toPathValue($roster_shift_id), + $resourcePath + ); + } + // path params + if ($business_id !== null) { + $resourcePath = str_replace( + '{' . 'businessId' . '}', + ObjectSerializer::toPathValue($business_id), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($shift_model)) { + $_tempBody = $shift_model; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + ['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation auRosterShiftStubShiftTimesheets * diff --git a/src/lib/Api/TimeAndAttendanceApi.php b/src/lib/Api/TimeAndAttendanceApi.php index 9be0e79..814440c 100644 --- a/src/lib/Api/TimeAndAttendanceApi.php +++ b/src/lib/Api/TimeAndAttendanceApi.php @@ -4309,16 +4309,17 @@ protected function genericTimeAndAttendanceGetShiftNotesRequest($kiosk_id, $shif * * List Kiosk Staff * - * @param int $kiosk_id kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \Swagger\Client\Model\BasicKioskEmployeeModel[] */ - public function genericTimeAndAttendanceGetStaff($kiosk_id, $business_id) + public function genericTimeAndAttendanceGetStaff($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { - list($response) = $this->genericTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id); + list($response) = $this->genericTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); return $response; } @@ -4327,17 +4328,18 @@ public function genericTimeAndAttendanceGetStaff($kiosk_id, $business_id) * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \Swagger\Client\Model\BasicKioskEmployeeModel[], HTTP status code, HTTP response headers (array of strings) */ - public function genericTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id) + public function genericTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { $returnType = '\Swagger\Client\Model\BasicKioskEmployeeModel[]'; - $request = $this->genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id); + $request = $this->genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); try { $options = $this->createHttpClientOption(); @@ -4403,15 +4405,16 @@ public function genericTimeAndAttendanceGetStaffWithHttpInfo($kiosk_id, $busines * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function genericTimeAndAttendanceGetStaffAsync($kiosk_id, $business_id) + public function genericTimeAndAttendanceGetStaffAsync($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { - return $this->genericTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id) + return $this->genericTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location) ->then( function ($response) { return $response[0]; @@ -4424,16 +4427,17 @@ function ($response) { * * List Kiosk Staff * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function genericTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id) + public function genericTimeAndAttendanceGetStaffAsyncWithHttpInfo($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { $returnType = '\Swagger\Client\Model\BasicKioskEmployeeModel[]'; - $request = $this->genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id); + $request = $this->genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4475,13 +4479,14 @@ function ($exception) { /** * Create request for operation 'genericTimeAndAttendanceGetStaff' * - * @param int $kiosk_id (required) + * @param int $kiosk_id The ID of the kiosk (required) * @param string $business_id (required) + * @param bool $restrict_current_shifts_to_current_kiosk_location The default value is set to false which will return current shifts for employees against this particular location. Setting the value to true will return employees shift details with access to this location. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id) + protected function genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_id, $restrict_current_shifts_to_current_kiosk_location = 'false') { // verify the required parameter 'kiosk_id' is set if ($kiosk_id === null || (is_array($kiosk_id) && count($kiosk_id) === 0)) { @@ -4503,6 +4508,10 @@ protected function genericTimeAndAttendanceGetStaffRequest($kiosk_id, $business_ $httpBody = ''; $multipart = false; + // query params + if ($restrict_current_shifts_to_current_kiosk_location !== null) { + $queryParams['restrictCurrentShiftsToCurrentKioskLocation'] = ObjectSerializer::toQueryValue($restrict_current_shifts_to_current_kiosk_location); + } // path params if ($kiosk_id !== null) { diff --git a/src/lib/Api/TimesheetsApi.php b/src/lib/Api/TimesheetsApi.php index 9af7c96..15e7386 100644 --- a/src/lib/Api/TimesheetsApi.php +++ b/src/lib/Api/TimesheetsApi.php @@ -627,11 +627,12 @@ protected function auTimesheetGetRequest($business_id) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \Swagger\Client\Model\AuSubmitTimesheetsResponse */ public function auTimesheetPost($request, $business_id) { - $this->auTimesheetPostWithHttpInfo($request, $business_id); + list($response) = $this->auTimesheetPostWithHttpInfo($request, $business_id); + return $response; } /** @@ -644,11 +645,11 @@ public function auTimesheetPost($request, $business_id) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \Swagger\Client\Model\AuSubmitTimesheetsResponse, HTTP status code, HTTP response headers (array of strings) */ public function auTimesheetPostWithHttpInfo($request, $business_id) { - $returnType = ''; + $returnType = '\Swagger\Client\Model\AuSubmitTimesheetsResponse'; $request = $this->auTimesheetPostRequest($request, $business_id); try { @@ -679,10 +680,32 @@ public function auTimesheetPostWithHttpInfo($request, $business_id) ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\AuSubmitTimesheetsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -722,14 +745,28 @@ function ($response) { */ public function auTimesheetPostAsyncWithHttpInfo($request, $business_id) { - $returnType = ''; + $returnType = '\Swagger\Client\Model\AuSubmitTimesheetsResponse'; $request = $this->auTimesheetPostRequest($request, $business_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -1166,11 +1203,12 @@ protected function auTimesheetPostIndividualRequest($request, $business_id) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \Swagger\Client\Model\AuSubmitTimesheetsResponse */ public function auTimesheetPut($request, $business_id) { - $this->auTimesheetPutWithHttpInfo($request, $business_id); + list($response) = $this->auTimesheetPutWithHttpInfo($request, $business_id); + return $response; } /** @@ -1183,11 +1221,11 @@ public function auTimesheetPut($request, $business_id) * * @throws \Swagger\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \Swagger\Client\Model\AuSubmitTimesheetsResponse, HTTP status code, HTTP response headers (array of strings) */ public function auTimesheetPutWithHttpInfo($request, $business_id) { - $returnType = ''; + $returnType = '\Swagger\Client\Model\AuSubmitTimesheetsResponse'; $request = $this->auTimesheetPutRequest($request, $business_id); try { @@ -1218,10 +1256,32 @@ public function auTimesheetPutWithHttpInfo($request, $business_id) ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\AuSubmitTimesheetsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } @@ -1261,14 +1321,28 @@ function ($response) { */ public function auTimesheetPutAsyncWithHttpInfo($request, $business_id) { - $returnType = ''; + $returnType = '\Swagger\Client\Model\AuSubmitTimesheetsResponse'; $request = $this->auTimesheetPutRequest($request, $business_id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); diff --git a/src/lib/Api/UserApi.php b/src/lib/Api/UserApi.php index 274b364..53f1e32 100644 --- a/src/lib/Api/UserApi.php +++ b/src/lib/Api/UserApi.php @@ -87,6 +87,270 @@ public function getConfig() return $this->config; } + /** + * Operation auUserAccountListBusinesses + * + * List Related Businesses for the provided user. + * + * @param string $username username (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\RelatedBusinessesModel + */ + public function auUserAccountListBusinesses($username = null) + { + list($response) = $this->auUserAccountListBusinessesWithHttpInfo($username); + return $response; + } + + /** + * Operation auUserAccountListBusinessesWithHttpInfo + * + * List Related Businesses for the provided user. + * + * @param string $username (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\RelatedBusinessesModel, HTTP status code, HTTP response headers (array of strings) + */ + public function auUserAccountListBusinessesWithHttpInfo($username = null) + { + $returnType = '\Swagger\Client\Model\RelatedBusinessesModel'; + $request = $this->auUserAccountListBusinessesRequest($username); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\RelatedBusinessesModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation auUserAccountListBusinessesAsync + * + * List Related Businesses for the provided user. + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auUserAccountListBusinessesAsync($username = null) + { + return $this->auUserAccountListBusinessesAsyncWithHttpInfo($username) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auUserAccountListBusinessesAsyncWithHttpInfo + * + * List Related Businesses for the provided user. + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auUserAccountListBusinessesAsyncWithHttpInfo($username = null) + { + $returnType = '\Swagger\Client\Model\RelatedBusinessesModel'; + $request = $this->auUserAccountListBusinessesRequest($username); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auUserAccountListBusinesses' + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auUserAccountListBusinessesRequest($username = null) + { + + $resourcePath = '/api/v2/user/account/businesses'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($username !== null) { + $queryParams['username'] = ObjectSerializer::toQueryValue($username); + } + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation auUserAccountMetadata * @@ -266,6 +530,270 @@ protected function auUserAccountMetadataRequest() + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json', 'text/json', 'application/xml', 'text/xml'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json', 'text/json', 'application/xml', 'text/xml'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('apiKey'); + if ($apiKey !== null) { + $headers['apiKey'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation auUserAccountPartnerMetadata + * + * List Related Partners + * + * @param string $username username (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Swagger\Client\Model\AuUserAccountPartnerMetadata + */ + public function auUserAccountPartnerMetadata($username = null) + { + list($response) = $this->auUserAccountPartnerMetadataWithHttpInfo($username); + return $response; + } + + /** + * Operation auUserAccountPartnerMetadataWithHttpInfo + * + * List Related Partners + * + * @param string $username (optional) + * + * @throws \Swagger\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Swagger\Client\Model\AuUserAccountPartnerMetadata, HTTP status code, HTTP response headers (array of strings) + */ + public function auUserAccountPartnerMetadataWithHttpInfo($username = null) + { + $returnType = '\Swagger\Client\Model\AuUserAccountPartnerMetadata'; + $request = $this->auUserAccountPartnerMetadataRequest($username); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Swagger\Client\Model\AuUserAccountPartnerMetadata', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation auUserAccountPartnerMetadataAsync + * + * List Related Partners + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auUserAccountPartnerMetadataAsync($username = null) + { + return $this->auUserAccountPartnerMetadataAsyncWithHttpInfo($username) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation auUserAccountPartnerMetadataAsyncWithHttpInfo + * + * List Related Partners + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function auUserAccountPartnerMetadataAsyncWithHttpInfo($username = null) + { + $returnType = '\Swagger\Client\Model\AuUserAccountPartnerMetadata'; + $request = $this->auUserAccountPartnerMetadataRequest($username); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'auUserAccountPartnerMetadata' + * + * @param string $username (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function auUserAccountPartnerMetadataRequest($username = null) + { + + $resourcePath = '/api/v2/user/account/partner/metadata'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($username !== null) { + $queryParams['username'] = ObjectSerializer::toQueryValue($username); + } + + // body params $_tempBody = null; diff --git a/src/lib/Model/AbbreviatedBusinessModel.php b/src/lib/Model/AbbreviatedBusinessModel.php new file mode 100644 index 0000000..f8b5d0e --- /dev/null +++ b/src/lib/Model/AbbreviatedBusinessModel.php @@ -0,0 +1,331 @@ + 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/AuAvailableBusinessModel.php b/src/lib/Model/AuAvailableBusinessModel.php index 9fe0035..c6075f2 100644 --- a/src/lib/Model/AuAvailableBusinessModel.php +++ b/src/lib/Model/AuAvailableBusinessModel.php @@ -80,12 +80,14 @@ class AuAvailableBusinessModel implements ModelInterface, ArrayAccess 'can_view_roster_shifts' => 'bool', 'can_manage_roster_shifts' => 'bool', 'billing_status' => 'string', + 'paid_breaks_enabled' => 'bool', 'location_permissions' => '\Swagger\Client\Model\LocationPermissionModel[]', 'employee_group_permissions' => '\Swagger\Client\Model\EmployeeGroupPermissionModel[]', 'id' => 'int', 'name' => 'string', 'region' => 'string', 'registration_number' => 'string', + 'registration_number_validation_bypassed' => 'bool', 'legal_name' => 'string', 'contact_name' => 'string', 'contact_email_address' => 'string', @@ -142,12 +144,14 @@ class AuAvailableBusinessModel implements ModelInterface, ArrayAccess 'can_view_roster_shifts' => null, 'can_manage_roster_shifts' => null, 'billing_status' => null, + 'paid_breaks_enabled' => null, 'location_permissions' => null, 'employee_group_permissions' => null, 'id' => 'int32', 'name' => null, 'region' => null, 'registration_number' => null, + 'registration_number_validation_bypassed' => null, 'legal_name' => null, 'contact_name' => null, 'contact_email_address' => null, @@ -225,12 +229,14 @@ public static function swaggerFormats() 'can_view_roster_shifts' => 'canViewRosterShifts', 'can_manage_roster_shifts' => 'canManageRosterShifts', 'billing_status' => 'billingStatus', + 'paid_breaks_enabled' => 'paidBreaksEnabled', 'location_permissions' => 'locationPermissions', 'employee_group_permissions' => 'employeeGroupPermissions', 'id' => 'id', 'name' => 'name', 'region' => 'region', 'registration_number' => 'registrationNumber', + 'registration_number_validation_bypassed' => 'registrationNumberValidationBypassed', 'legal_name' => 'legalName', 'contact_name' => 'contactName', 'contact_email_address' => 'contactEmailAddress', @@ -287,12 +293,14 @@ public static function swaggerFormats() 'can_view_roster_shifts' => 'setCanViewRosterShifts', 'can_manage_roster_shifts' => 'setCanManageRosterShifts', 'billing_status' => 'setBillingStatus', + 'paid_breaks_enabled' => 'setPaidBreaksEnabled', 'location_permissions' => 'setLocationPermissions', 'employee_group_permissions' => 'setEmployeeGroupPermissions', 'id' => 'setId', 'name' => 'setName', 'region' => 'setRegion', 'registration_number' => 'setRegistrationNumber', + 'registration_number_validation_bypassed' => 'setRegistrationNumberValidationBypassed', 'legal_name' => 'setLegalName', 'contact_name' => 'setContactName', 'contact_email_address' => 'setContactEmailAddress', @@ -349,12 +357,14 @@ public static function swaggerFormats() 'can_view_roster_shifts' => 'getCanViewRosterShifts', 'can_manage_roster_shifts' => 'getCanManageRosterShifts', 'billing_status' => 'getBillingStatus', + 'paid_breaks_enabled' => 'getPaidBreaksEnabled', 'location_permissions' => 'getLocationPermissions', 'employee_group_permissions' => 'getEmployeeGroupPermissions', 'id' => 'getId', 'name' => 'getName', 'region' => 'getRegion', 'registration_number' => 'getRegistrationNumber', + 'registration_number_validation_bypassed' => 'getRegistrationNumberValidationBypassed', 'legal_name' => 'getLegalName', 'contact_name' => 'getContactName', 'contact_email_address' => 'getContactEmailAddress', @@ -438,6 +448,8 @@ public function getModelName() const LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE = 'EmployeeStartDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE = 'SpecifiedDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR = 'CalendarYear'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH = 'RollingYear12Month'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH = 'RollingYear24Month'; @@ -497,6 +509,8 @@ public function getLeaveAccrualStartDateTypeAllowableValues() self::LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH, ]; } @@ -539,12 +553,14 @@ public function __construct(array $data = null) $this->container['can_view_roster_shifts'] = isset($data['can_view_roster_shifts']) ? $data['can_view_roster_shifts'] : null; $this->container['can_manage_roster_shifts'] = isset($data['can_manage_roster_shifts']) ? $data['can_manage_roster_shifts'] : null; $this->container['billing_status'] = isset($data['billing_status']) ? $data['billing_status'] : null; + $this->container['paid_breaks_enabled'] = isset($data['paid_breaks_enabled']) ? $data['paid_breaks_enabled'] : null; $this->container['location_permissions'] = isset($data['location_permissions']) ? $data['location_permissions'] : null; $this->container['employee_group_permissions'] = isset($data['employee_group_permissions']) ? $data['employee_group_permissions'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['region'] = isset($data['region']) ? $data['region'] : null; $this->container['registration_number'] = isset($data['registration_number']) ? $data['registration_number'] : null; + $this->container['registration_number_validation_bypassed'] = isset($data['registration_number_validation_bypassed']) ? $data['registration_number_validation_bypassed'] : null; $this->container['legal_name'] = isset($data['legal_name']) ? $data['legal_name'] : null; $this->container['contact_name'] = isset($data['contact_name']) ? $data['contact_name'] : null; $this->container['contact_email_address'] = isset($data['contact_email_address']) ? $data['contact_email_address'] : null; @@ -1189,6 +1205,30 @@ public function setBillingStatus($billing_status) return $this; } + /** + * Gets paid_breaks_enabled + * + * @return bool + */ + public function getPaidBreaksEnabled() + { + return $this->container['paid_breaks_enabled']; + } + + /** + * Sets paid_breaks_enabled + * + * @param bool $paid_breaks_enabled + * + * @return $this + */ + public function setPaidBreaksEnabled($paid_breaks_enabled) + { + $this->container['paid_breaks_enabled'] = $paid_breaks_enabled; + + return $this; + } + /** * Gets location_permissions * @@ -1333,6 +1373,30 @@ public function setRegistrationNumber($registration_number) return $this; } + /** + * Gets registration_number_validation_bypassed + * + * @return bool + */ + public function getRegistrationNumberValidationBypassed() + { + return $this->container['registration_number_validation_bypassed']; + } + + /** + * Sets registration_number_validation_bypassed + * + * @param bool $registration_number_validation_bypassed + * + * @return $this + */ + public function setRegistrationNumberValidationBypassed($registration_number_validation_bypassed) + { + $this->container['registration_number_validation_bypassed'] = $registration_number_validation_bypassed; + + return $this; + } + /** * Gets legal_name * diff --git a/src/lib/Model/AuBillingPlanResponseModel.php b/src/lib/Model/AuBillingPlanResponseModel.php index 94ab265..8e0abe3 100644 --- a/src/lib/Model/AuBillingPlanResponseModel.php +++ b/src/lib/Model/AuBillingPlanResponseModel.php @@ -69,7 +69,8 @@ class AuBillingPlanResponseModel implements ModelInterface, ArrayAccess 'function_rostering' => 'string', 'function_time_and_attendance' => 'string', 'function_employee_onboarding' => 'string', - 'description' => 'string' + 'description' => 'string', + 'is_hidden' => 'bool' ]; /** @@ -90,7 +91,8 @@ class AuBillingPlanResponseModel implements ModelInterface, ArrayAccess 'function_rostering' => null, 'function_time_and_attendance' => null, 'function_employee_onboarding' => null, - 'description' => null + 'description' => null, + 'is_hidden' => null ]; /** @@ -132,7 +134,8 @@ public static function swaggerFormats() 'function_rostering' => 'functionRostering', 'function_time_and_attendance' => 'functionTimeAndAttendance', 'function_employee_onboarding' => 'functionEmployeeOnboarding', - 'description' => 'description' + 'description' => 'description', + 'is_hidden' => 'isHidden' ]; /** @@ -153,7 +156,8 @@ public static function swaggerFormats() 'function_rostering' => 'setFunctionRostering', 'function_time_and_attendance' => 'setFunctionTimeAndAttendance', 'function_employee_onboarding' => 'setFunctionEmployeeOnboarding', - 'description' => 'setDescription' + 'description' => 'setDescription', + 'is_hidden' => 'setIsHidden' ]; /** @@ -174,7 +178,8 @@ public static function swaggerFormats() 'function_rostering' => 'getFunctionRostering', 'function_time_and_attendance' => 'getFunctionTimeAndAttendance', 'function_employee_onboarding' => 'getFunctionEmployeeOnboarding', - 'description' => 'getDescription' + 'description' => 'getDescription', + 'is_hidden' => 'getIsHidden' ]; /** @@ -381,6 +386,7 @@ public function __construct(array $data = null) $this->container['function_time_and_attendance'] = isset($data['function_time_and_attendance']) ? $data['function_time_and_attendance'] : null; $this->container['function_employee_onboarding'] = isset($data['function_employee_onboarding']) ? $data['function_employee_onboarding'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['is_hidden'] = isset($data['is_hidden']) ? $data['is_hidden'] : null; } /** @@ -837,6 +843,30 @@ public function setDescription($description) return $this; } + + /** + * Gets is_hidden + * + * @return bool + */ + public function getIsHidden() + { + return $this->container['is_hidden']; + } + + /** + * Sets is_hidden + * + * @param bool $is_hidden + * + * @return $this + */ + public function setIsHidden($is_hidden) + { + $this->container['is_hidden'] = $is_hidden; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuBusinessExportModel.php b/src/lib/Model/AuBusinessExportModel.php index 72749fb..1f8f34e 100644 --- a/src/lib/Model/AuBusinessExportModel.php +++ b/src/lib/Model/AuBusinessExportModel.php @@ -65,6 +65,7 @@ class AuBusinessExportModel implements ModelInterface, ArrayAccess 'sbr_software_id' => 'string', 'is_foreign_entity' => 'bool', 'foreign_entity_country' => 'string', + 'default_super_rate' => 'double', 'id' => 'int', 'name' => 'string', 'region' => 'string', @@ -85,11 +86,15 @@ class AuBusinessExportModel implements ModelInterface, ArrayAccess 'address_line2' => 'string', 'post_code' => 'string', 'white_label_name' => 'string', + 'white_label_id' => 'int', 'promo_code' => 'string', 'date_created' => '\DateTime', 'leave_accrual_start_date_type' => 'string', 'leave_year_start' => '\DateTime', - 'source' => 'string' + 'source' => 'string', + 'number_of_employees' => 'string', + 'industry_name' => 'string', + 'pay_cycle_frequency' => 'string' ]; /** @@ -106,6 +111,7 @@ class AuBusinessExportModel implements ModelInterface, ArrayAccess 'sbr_software_id' => null, 'is_foreign_entity' => null, 'foreign_entity_country' => null, + 'default_super_rate' => 'double', 'id' => 'int32', 'name' => null, 'region' => null, @@ -126,11 +132,15 @@ class AuBusinessExportModel implements ModelInterface, ArrayAccess 'address_line2' => null, 'post_code' => null, 'white_label_name' => null, + 'white_label_id' => 'int32', 'promo_code' => null, 'date_created' => 'date-time', 'leave_accrual_start_date_type' => null, 'leave_year_start' => 'date-time', - 'source' => null + 'source' => null, + 'number_of_employees' => null, + 'industry_name' => null, + 'pay_cycle_frequency' => null ]; /** @@ -168,6 +178,7 @@ public static function swaggerFormats() 'sbr_software_id' => 'sbrSoftwareId', 'is_foreign_entity' => 'isForeignEntity', 'foreign_entity_country' => 'foreignEntityCountry', + 'default_super_rate' => 'defaultSuperRate', 'id' => 'id', 'name' => 'name', 'region' => 'region', @@ -188,11 +199,15 @@ public static function swaggerFormats() 'address_line2' => 'addressLine2', 'post_code' => 'postCode', 'white_label_name' => 'whiteLabelName', + 'white_label_id' => 'whiteLabelId', 'promo_code' => 'promoCode', 'date_created' => 'dateCreated', 'leave_accrual_start_date_type' => 'leaveAccrualStartDateType', 'leave_year_start' => 'leaveYearStart', - 'source' => 'source' + 'source' => 'source', + 'number_of_employees' => 'numberOfEmployees', + 'industry_name' => 'industryName', + 'pay_cycle_frequency' => 'payCycleFrequency' ]; /** @@ -209,6 +224,7 @@ public static function swaggerFormats() 'sbr_software_id' => 'setSbrSoftwareId', 'is_foreign_entity' => 'setIsForeignEntity', 'foreign_entity_country' => 'setForeignEntityCountry', + 'default_super_rate' => 'setDefaultSuperRate', 'id' => 'setId', 'name' => 'setName', 'region' => 'setRegion', @@ -229,11 +245,15 @@ public static function swaggerFormats() 'address_line2' => 'setAddressLine2', 'post_code' => 'setPostCode', 'white_label_name' => 'setWhiteLabelName', + 'white_label_id' => 'setWhiteLabelId', 'promo_code' => 'setPromoCode', 'date_created' => 'setDateCreated', 'leave_accrual_start_date_type' => 'setLeaveAccrualStartDateType', 'leave_year_start' => 'setLeaveYearStart', - 'source' => 'setSource' + 'source' => 'setSource', + 'number_of_employees' => 'setNumberOfEmployees', + 'industry_name' => 'setIndustryName', + 'pay_cycle_frequency' => 'setPayCycleFrequency' ]; /** @@ -250,6 +270,7 @@ public static function swaggerFormats() 'sbr_software_id' => 'getSbrSoftwareId', 'is_foreign_entity' => 'getIsForeignEntity', 'foreign_entity_country' => 'getForeignEntityCountry', + 'default_super_rate' => 'getDefaultSuperRate', 'id' => 'getId', 'name' => 'getName', 'region' => 'getRegion', @@ -270,11 +291,15 @@ public static function swaggerFormats() 'address_line2' => 'getAddressLine2', 'post_code' => 'getPostCode', 'white_label_name' => 'getWhiteLabelName', + 'white_label_id' => 'getWhiteLabelId', 'promo_code' => 'getPromoCode', 'date_created' => 'getDateCreated', 'leave_accrual_start_date_type' => 'getLeaveAccrualStartDateType', 'leave_year_start' => 'getLeaveYearStart', - 'source' => 'getSource' + 'source' => 'getSource', + 'number_of_employees' => 'getNumberOfEmployees', + 'industry_name' => 'getIndustryName', + 'pay_cycle_frequency' => 'getPayCycleFrequency' ]; /** @@ -330,6 +355,8 @@ public function getModelName() const LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE = 'EmployeeStartDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE = 'SpecifiedDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR = 'CalendarYear'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH = 'RollingYear12Month'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH = 'RollingYear24Month'; const SOURCE_NONE = 'None'; const SOURCE_SAASU = 'Saasu'; const SOURCE_XERO = 'Xero'; @@ -400,6 +427,22 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; + const NUMBER_OF_EMPLOYEES_ONE_TO_TEN = 'OneToTen'; + const NUMBER_OF_EMPLOYEES_ELEVEN_TO_FIFTY = 'ElevenToFifty'; + const NUMBER_OF_EMPLOYEES_FIFTY_ONE_TO_TWO_FIFTY = 'FiftyOneToTwoFifty'; + const NUMBER_OF_EMPLOYEES_TWO_FIFTY_ONE_AND_UP = 'TwoFiftyOneAndUp'; + const PAY_CYCLE_FREQUENCY_WEEKLY = 'Weekly'; + const PAY_CYCLE_FREQUENCY_FORTNIGHTLY = 'Fortnightly'; + const PAY_CYCLE_FREQUENCY_MONTHLY = 'Monthly'; + const PAY_CYCLE_FREQUENCY_FOUR_WEEKLY = 'FourWeekly'; + const PAY_CYCLE_FREQUENCY_QUARTERLY = 'Quarterly'; + const PAY_CYCLE_FREQUENCY_ANNUALLY = 'Annually'; + const PAY_CYCLE_FREQUENCY_HALF_MONTHLY = 'HalfMonthly'; @@ -445,6 +488,8 @@ public function getLeaveAccrualStartDateTypeAllowableValues() self::LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH, ]; } @@ -526,6 +571,44 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getNumberOfEmployeesAllowableValues() + { + return [ + self::NUMBER_OF_EMPLOYEES_ONE_TO_TEN, + self::NUMBER_OF_EMPLOYEES_ELEVEN_TO_FIFTY, + self::NUMBER_OF_EMPLOYEES_FIFTY_ONE_TO_TWO_FIFTY, + self::NUMBER_OF_EMPLOYEES_TWO_FIFTY_ONE_AND_UP, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPayCycleFrequencyAllowableValues() + { + return [ + self::PAY_CYCLE_FREQUENCY_WEEKLY, + self::PAY_CYCLE_FREQUENCY_FORTNIGHTLY, + self::PAY_CYCLE_FREQUENCY_MONTHLY, + self::PAY_CYCLE_FREQUENCY_FOUR_WEEKLY, + self::PAY_CYCLE_FREQUENCY_QUARTERLY, + self::PAY_CYCLE_FREQUENCY_ANNUALLY, + self::PAY_CYCLE_FREQUENCY_HALF_MONTHLY, ]; } @@ -553,6 +636,7 @@ public function __construct(array $data = null) $this->container['sbr_software_id'] = isset($data['sbr_software_id']) ? $data['sbr_software_id'] : null; $this->container['is_foreign_entity'] = isset($data['is_foreign_entity']) ? $data['is_foreign_entity'] : null; $this->container['foreign_entity_country'] = isset($data['foreign_entity_country']) ? $data['foreign_entity_country'] : null; + $this->container['default_super_rate'] = isset($data['default_super_rate']) ? $data['default_super_rate'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['region'] = isset($data['region']) ? $data['region'] : null; @@ -573,11 +657,15 @@ public function __construct(array $data = null) $this->container['address_line2'] = isset($data['address_line2']) ? $data['address_line2'] : null; $this->container['post_code'] = isset($data['post_code']) ? $data['post_code'] : null; $this->container['white_label_name'] = isset($data['white_label_name']) ? $data['white_label_name'] : null; + $this->container['white_label_id'] = isset($data['white_label_id']) ? $data['white_label_id'] : null; $this->container['promo_code'] = isset($data['promo_code']) ? $data['promo_code'] : null; $this->container['date_created'] = isset($data['date_created']) ? $data['date_created'] : null; $this->container['leave_accrual_start_date_type'] = isset($data['leave_accrual_start_date_type']) ? $data['leave_accrual_start_date_type'] : null; $this->container['leave_year_start'] = isset($data['leave_year_start']) ? $data['leave_year_start'] : null; $this->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['number_of_employees'] = isset($data['number_of_employees']) ? $data['number_of_employees'] : null; + $this->container['industry_name'] = isset($data['industry_name']) ? $data['industry_name'] : null; + $this->container['pay_cycle_frequency'] = isset($data['pay_cycle_frequency']) ? $data['pay_cycle_frequency'] : null; } /** @@ -621,6 +709,22 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getNumberOfEmployeesAllowableValues(); + if (!is_null($this->container['number_of_employees']) && !in_array($this->container['number_of_employees'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'number_of_employees', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + $allowedValues = $this->getPayCycleFrequencyAllowableValues(); + if (!is_null($this->container['pay_cycle_frequency']) && !in_array($this->container['pay_cycle_frequency'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'pay_cycle_frequency', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -828,6 +932,30 @@ public function setForeignEntityCountry($foreign_entity_country) return $this; } + /** + * Gets default_super_rate + * + * @return double + */ + public function getDefaultSuperRate() + { + return $this->container['default_super_rate']; + } + + /** + * Sets default_super_rate + * + * @param double $default_super_rate + * + * @return $this + */ + public function setDefaultSuperRate($default_super_rate) + { + $this->container['default_super_rate'] = $default_super_rate; + + return $this; + } + /** * Gets id * @@ -1326,6 +1454,30 @@ public function setWhiteLabelName($white_label_name) return $this; } + /** + * Gets white_label_id + * + * @return int + */ + public function getWhiteLabelId() + { + return $this->container['white_label_id']; + } + + /** + * Sets white_label_id + * + * @param int $white_label_id + * + * @return $this + */ + public function setWhiteLabelId($white_label_id) + { + $this->container['white_label_id'] = $white_label_id; + + return $this; + } + /** * Gets promo_code * @@ -1463,6 +1615,96 @@ public function setSource($source) return $this; } + + /** + * Gets number_of_employees + * + * @return string + */ + public function getNumberOfEmployees() + { + return $this->container['number_of_employees']; + } + + /** + * Sets number_of_employees + * + * @param string $number_of_employees + * + * @return $this + */ + public function setNumberOfEmployees($number_of_employees) + { + $allowedValues = $this->getNumberOfEmployeesAllowableValues(); + if (!is_null($number_of_employees) && !in_array($number_of_employees, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'number_of_employees', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['number_of_employees'] = $number_of_employees; + + return $this; + } + + /** + * Gets industry_name + * + * @return string + */ + public function getIndustryName() + { + return $this->container['industry_name']; + } + + /** + * Sets industry_name + * + * @param string $industry_name + * + * @return $this + */ + public function setIndustryName($industry_name) + { + $this->container['industry_name'] = $industry_name; + + return $this; + } + + /** + * Gets pay_cycle_frequency + * + * @return string + */ + public function getPayCycleFrequency() + { + return $this->container['pay_cycle_frequency']; + } + + /** + * Sets pay_cycle_frequency + * + * @param string $pay_cycle_frequency + * + * @return $this + */ + public function setPayCycleFrequency($pay_cycle_frequency) + { + $allowedValues = $this->getPayCycleFrequencyAllowableValues(); + if (!is_null($pay_cycle_frequency) && !in_array($pay_cycle_frequency, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'pay_cycle_frequency', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['pay_cycle_frequency'] = $pay_cycle_frequency; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuBusinessTimesheetSettingsModel.php b/src/lib/Model/AuBusinessTimesheetSettingsModel.php index d3c75ea..84bb4d6 100644 --- a/src/lib/Model/AuBusinessTimesheetSettingsModel.php +++ b/src/lib/Model/AuBusinessTimesheetSettingsModel.php @@ -66,7 +66,10 @@ class AuBusinessTimesheetSettingsModel implements ModelInterface, ArrayAccess 'timesheet_rejection_notifications' => 'bool', 'managers_can_create_timesheets_for_employees_that_are_not_enabled' => 'bool', 'timesheets_enabled' => 'bool', - 'approve_if_matches_roster_shift' => 'bool' + 'approve_if_matches_roster_shift' => 'bool', + 'allow_paid_breaks' => 'bool', + 'has_maximum_paid_break_duration' => 'bool', + 'maximum_paid_break_duration' => 'int' ]; /** @@ -84,7 +87,10 @@ class AuBusinessTimesheetSettingsModel implements ModelInterface, ArrayAccess 'timesheet_rejection_notifications' => null, 'managers_can_create_timesheets_for_employees_that_are_not_enabled' => null, 'timesheets_enabled' => null, - 'approve_if_matches_roster_shift' => null + 'approve_if_matches_roster_shift' => null, + 'allow_paid_breaks' => null, + 'has_maximum_paid_break_duration' => null, + 'maximum_paid_break_duration' => 'int32' ]; /** @@ -123,7 +129,10 @@ public static function swaggerFormats() 'timesheet_rejection_notifications' => 'timesheetRejectionNotifications', 'managers_can_create_timesheets_for_employees_that_are_not_enabled' => 'managersCanCreateTimesheetsForEmployeesThatAreNotEnabled', 'timesheets_enabled' => 'timesheetsEnabled', - 'approve_if_matches_roster_shift' => 'approveIfMatchesRosterShift' + 'approve_if_matches_roster_shift' => 'approveIfMatchesRosterShift', + 'allow_paid_breaks' => 'allowPaidBreaks', + 'has_maximum_paid_break_duration' => 'hasMaximumPaidBreakDuration', + 'maximum_paid_break_duration' => 'maximumPaidBreakDuration' ]; /** @@ -141,7 +150,10 @@ public static function swaggerFormats() 'timesheet_rejection_notifications' => 'setTimesheetRejectionNotifications', 'managers_can_create_timesheets_for_employees_that_are_not_enabled' => 'setManagersCanCreateTimesheetsForEmployeesThatAreNotEnabled', 'timesheets_enabled' => 'setTimesheetsEnabled', - 'approve_if_matches_roster_shift' => 'setApproveIfMatchesRosterShift' + 'approve_if_matches_roster_shift' => 'setApproveIfMatchesRosterShift', + 'allow_paid_breaks' => 'setAllowPaidBreaks', + 'has_maximum_paid_break_duration' => 'setHasMaximumPaidBreakDuration', + 'maximum_paid_break_duration' => 'setMaximumPaidBreakDuration' ]; /** @@ -159,7 +171,10 @@ public static function swaggerFormats() 'timesheet_rejection_notifications' => 'getTimesheetRejectionNotifications', 'managers_can_create_timesheets_for_employees_that_are_not_enabled' => 'getManagersCanCreateTimesheetsForEmployeesThatAreNotEnabled', 'timesheets_enabled' => 'getTimesheetsEnabled', - 'approve_if_matches_roster_shift' => 'getApproveIfMatchesRosterShift' + 'approve_if_matches_roster_shift' => 'getApproveIfMatchesRosterShift', + 'allow_paid_breaks' => 'getAllowPaidBreaks', + 'has_maximum_paid_break_duration' => 'getHasMaximumPaidBreakDuration', + 'maximum_paid_break_duration' => 'getMaximumPaidBreakDuration' ]; /** @@ -232,6 +247,9 @@ public function __construct(array $data = null) $this->container['managers_can_create_timesheets_for_employees_that_are_not_enabled'] = isset($data['managers_can_create_timesheets_for_employees_that_are_not_enabled']) ? $data['managers_can_create_timesheets_for_employees_that_are_not_enabled'] : null; $this->container['timesheets_enabled'] = isset($data['timesheets_enabled']) ? $data['timesheets_enabled'] : null; $this->container['approve_if_matches_roster_shift'] = isset($data['approve_if_matches_roster_shift']) ? $data['approve_if_matches_roster_shift'] : null; + $this->container['allow_paid_breaks'] = isset($data['allow_paid_breaks']) ? $data['allow_paid_breaks'] : null; + $this->container['has_maximum_paid_break_duration'] = isset($data['has_maximum_paid_break_duration']) ? $data['has_maximum_paid_break_duration'] : null; + $this->container['maximum_paid_break_duration'] = isset($data['maximum_paid_break_duration']) ? $data['maximum_paid_break_duration'] : null; } /** @@ -497,6 +515,78 @@ public function setApproveIfMatchesRosterShift($approve_if_matches_roster_shift) return $this; } + + /** + * Gets allow_paid_breaks + * + * @return bool + */ + public function getAllowPaidBreaks() + { + return $this->container['allow_paid_breaks']; + } + + /** + * Sets allow_paid_breaks + * + * @param bool $allow_paid_breaks + * + * @return $this + */ + public function setAllowPaidBreaks($allow_paid_breaks) + { + $this->container['allow_paid_breaks'] = $allow_paid_breaks; + + return $this; + } + + /** + * Gets has_maximum_paid_break_duration + * + * @return bool + */ + public function getHasMaximumPaidBreakDuration() + { + return $this->container['has_maximum_paid_break_duration']; + } + + /** + * Sets has_maximum_paid_break_duration + * + * @param bool $has_maximum_paid_break_duration + * + * @return $this + */ + public function setHasMaximumPaidBreakDuration($has_maximum_paid_break_duration) + { + $this->container['has_maximum_paid_break_duration'] = $has_maximum_paid_break_duration; + + return $this; + } + + /** + * Gets maximum_paid_break_duration + * + * @return int + */ + public function getMaximumPaidBreakDuration() + { + return $this->container['maximum_paid_break_duration']; + } + + /** + * Sets maximum_paid_break_duration + * + * @param int $maximum_paid_break_duration + * + * @return $this + */ + public function setMaximumPaidBreakDuration($maximum_paid_break_duration) + { + $this->container['maximum_paid_break_duration'] = $maximum_paid_break_duration; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuDashboardModel.php b/src/lib/Model/AuDashboardModel.php index 948a7b2..89e9aa2 100644 --- a/src/lib/Model/AuDashboardModel.php +++ b/src/lib/Model/AuDashboardModel.php @@ -75,6 +75,7 @@ class AuDashboardModel implements ModelInterface, ArrayAccess 'expenses' => '\Swagger\Client\Model\EssCurrentExpensesModel', 'pending_shift_count' => 'int', 'proposed_swap_count' => 'int', + 'pending_leave_count' => 'int', 'current_shift' => '\Swagger\Client\Model\EssCurrentShiftModel', 'documents_requiring_acknowledgement_count' => 'int', 'region' => 'string', @@ -110,6 +111,7 @@ class AuDashboardModel implements ModelInterface, ArrayAccess 'expenses' => null, 'pending_shift_count' => 'int32', 'proposed_swap_count' => 'int32', + 'pending_leave_count' => 'int32', 'current_shift' => null, 'documents_requiring_acknowledgement_count' => 'int32', 'region' => null, @@ -166,6 +168,7 @@ public static function swaggerFormats() 'expenses' => 'expenses', 'pending_shift_count' => 'pendingShiftCount', 'proposed_swap_count' => 'proposedSwapCount', + 'pending_leave_count' => 'pendingLeaveCount', 'current_shift' => 'currentShift', 'documents_requiring_acknowledgement_count' => 'documentsRequiringAcknowledgementCount', 'region' => 'region', @@ -201,6 +204,7 @@ public static function swaggerFormats() 'expenses' => 'setExpenses', 'pending_shift_count' => 'setPendingShiftCount', 'proposed_swap_count' => 'setProposedSwapCount', + 'pending_leave_count' => 'setPendingLeaveCount', 'current_shift' => 'setCurrentShift', 'documents_requiring_acknowledgement_count' => 'setDocumentsRequiringAcknowledgementCount', 'region' => 'setRegion', @@ -236,6 +240,7 @@ public static function swaggerFormats() 'expenses' => 'getExpenses', 'pending_shift_count' => 'getPendingShiftCount', 'proposed_swap_count' => 'getProposedSwapCount', + 'pending_leave_count' => 'getPendingLeaveCount', 'current_shift' => 'getCurrentShift', 'documents_requiring_acknowledgement_count' => 'getDocumentsRequiringAcknowledgementCount', 'region' => 'getRegion', @@ -325,6 +330,7 @@ public function __construct(array $data = null) $this->container['expenses'] = isset($data['expenses']) ? $data['expenses'] : null; $this->container['pending_shift_count'] = isset($data['pending_shift_count']) ? $data['pending_shift_count'] : null; $this->container['proposed_swap_count'] = isset($data['proposed_swap_count']) ? $data['proposed_swap_count'] : null; + $this->container['pending_leave_count'] = isset($data['pending_leave_count']) ? $data['pending_leave_count'] : null; $this->container['current_shift'] = isset($data['current_shift']) ? $data['current_shift'] : null; $this->container['documents_requiring_acknowledgement_count'] = isset($data['documents_requiring_acknowledgement_count']) ? $data['documents_requiring_acknowledgement_count'] : null; $this->container['region'] = isset($data['region']) ? $data['region'] : null; @@ -792,6 +798,30 @@ public function setProposedSwapCount($proposed_swap_count) return $this; } + /** + * Gets pending_leave_count + * + * @return int + */ + public function getPendingLeaveCount() + { + return $this->container['pending_leave_count']; + } + + /** + * Sets pending_leave_count + * + * @param int $pending_leave_count + * + * @return $this + */ + public function setPendingLeaveCount($pending_leave_count) + { + $this->container['pending_leave_count'] = $pending_leave_count; + + return $this; + } + /** * Gets current_shift * diff --git a/src/lib/Model/AuDeductionCategoryModel.php b/src/lib/Model/AuDeductionCategoryModel.php index 934e877..f21f77c 100644 --- a/src/lib/Model/AuDeductionCategoryModel.php +++ b/src/lib/Model/AuDeductionCategoryModel.php @@ -287,6 +287,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -399,6 +404,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/AuDeductionModel.php b/src/lib/Model/AuDeductionModel.php index 9b2658e..50ccfbe 100644 --- a/src/lib/Model/AuDeductionModel.php +++ b/src/lib/Model/AuDeductionModel.php @@ -63,6 +63,7 @@ class AuDeductionModel implements ModelInterface, ArrayAccess 'notes' => 'string', 'payment_reference' => 'string', 'note' => 'string', + 'associated_employee_deduction_category_id' => 'int', 'pay_to_bank_account_bsb' => 'string', 'pay_to_bank_account_bank_code' => 'string', 'pay_to_bank_account_number' => 'string', @@ -91,6 +92,7 @@ class AuDeductionModel implements ModelInterface, ArrayAccess 'notes' => null, 'payment_reference' => null, 'note' => null, + 'associated_employee_deduction_category_id' => 'int32', 'pay_to_bank_account_bsb' => null, 'pay_to_bank_account_bank_code' => null, 'pay_to_bank_account_number' => null, @@ -140,6 +142,7 @@ public static function swaggerFormats() 'notes' => 'notes', 'payment_reference' => 'paymentReference', 'note' => 'note', + 'associated_employee_deduction_category_id' => 'associatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'payToBankAccountBSB', 'pay_to_bank_account_bank_code' => 'payToBankAccountBankCode', 'pay_to_bank_account_number' => 'payToBankAccountNumber', @@ -168,6 +171,7 @@ public static function swaggerFormats() 'notes' => 'setNotes', 'payment_reference' => 'setPaymentReference', 'note' => 'setNote', + 'associated_employee_deduction_category_id' => 'setAssociatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'setPayToBankAccountBsb', 'pay_to_bank_account_bank_code' => 'setPayToBankAccountBankCode', 'pay_to_bank_account_number' => 'setPayToBankAccountNumber', @@ -196,6 +200,7 @@ public static function swaggerFormats() 'notes' => 'getNotes', 'payment_reference' => 'getPaymentReference', 'note' => 'getNote', + 'associated_employee_deduction_category_id' => 'getAssociatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'getPayToBankAccountBsb', 'pay_to_bank_account_bank_code' => 'getPayToBankAccountBankCode', 'pay_to_bank_account_number' => 'getPayToBankAccountNumber', @@ -278,6 +283,7 @@ public function __construct(array $data = null) $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; $this->container['payment_reference'] = isset($data['payment_reference']) ? $data['payment_reference'] : null; $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['associated_employee_deduction_category_id'] = isset($data['associated_employee_deduction_category_id']) ? $data['associated_employee_deduction_category_id'] : null; $this->container['pay_to_bank_account_bsb'] = isset($data['pay_to_bank_account_bsb']) ? $data['pay_to_bank_account_bsb'] : null; $this->container['pay_to_bank_account_bank_code'] = isset($data['pay_to_bank_account_bank_code']) ? $data['pay_to_bank_account_bank_code'] : null; $this->container['pay_to_bank_account_number'] = isset($data['pay_to_bank_account_number']) ? $data['pay_to_bank_account_number'] : null; @@ -462,6 +468,30 @@ public function setNote($note) return $this; } + /** + * Gets associated_employee_deduction_category_id + * + * @return int + */ + public function getAssociatedEmployeeDeductionCategoryId() + { + return $this->container['associated_employee_deduction_category_id']; + } + + /** + * Sets associated_employee_deduction_category_id + * + * @param int $associated_employee_deduction_category_id + * + * @return $this + */ + public function setAssociatedEmployeeDeductionCategoryId($associated_employee_deduction_category_id) + { + $this->container['associated_employee_deduction_category_id'] = $associated_employee_deduction_category_id; + + return $this; + } + /** * Gets pay_to_bank_account_bsb * diff --git a/src/lib/Model/AuEarningsLineModel.php b/src/lib/Model/AuEarningsLineModel.php index 061cc72..e1e1dee 100644 --- a/src/lib/Model/AuEarningsLineModel.php +++ b/src/lib/Model/AuEarningsLineModel.php @@ -72,6 +72,9 @@ class AuEarningsLineModel implements ModelInterface, ArrayAccess 'lump_sum_e_financial_year' => 'int', 'timesheet_line_id' => 'int', 'timesheet_line_external_id' => 'string', + 'reporting_dimension_value_ids' => 'int[]', + 'reporting_dimension_value_names' => 'map[string,string[]]', + 'net_payment' => 'double', 'id' => 'int', 'external_id' => 'string', 'location_id' => 'string', @@ -102,6 +105,9 @@ class AuEarningsLineModel implements ModelInterface, ArrayAccess 'lump_sum_e_financial_year' => 'int32', 'timesheet_line_id' => 'int32', 'timesheet_line_external_id' => null, + 'reporting_dimension_value_ids' => 'int32', + 'reporting_dimension_value_names' => null, + 'net_payment' => 'double', 'id' => 'int64', 'external_id' => null, 'location_id' => null, @@ -153,6 +159,9 @@ public static function swaggerFormats() 'lump_sum_e_financial_year' => 'lumpSumEFinancialYear', 'timesheet_line_id' => 'timesheetLineId', 'timesheet_line_external_id' => 'timesheetLineExternalId', + 'reporting_dimension_value_ids' => 'reportingDimensionValueIds', + 'reporting_dimension_value_names' => 'reportingDimensionValueNames', + 'net_payment' => 'netPayment', 'id' => 'id', 'external_id' => 'externalId', 'location_id' => 'locationId', @@ -183,6 +192,9 @@ public static function swaggerFormats() 'lump_sum_e_financial_year' => 'setLumpSumEFinancialYear', 'timesheet_line_id' => 'setTimesheetLineId', 'timesheet_line_external_id' => 'setTimesheetLineExternalId', + 'reporting_dimension_value_ids' => 'setReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'setReportingDimensionValueNames', + 'net_payment' => 'setNetPayment', 'id' => 'setId', 'external_id' => 'setExternalId', 'location_id' => 'setLocationId', @@ -213,6 +225,9 @@ public static function swaggerFormats() 'lump_sum_e_financial_year' => 'getLumpSumEFinancialYear', 'timesheet_line_id' => 'getTimesheetLineId', 'timesheet_line_external_id' => 'getTimesheetLineExternalId', + 'reporting_dimension_value_ids' => 'getReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'getReportingDimensionValueNames', + 'net_payment' => 'getNetPayment', 'id' => 'getId', 'external_id' => 'getExternalId', 'location_id' => 'getLocationId', @@ -314,6 +329,9 @@ public function __construct(array $data = null) $this->container['lump_sum_e_financial_year'] = isset($data['lump_sum_e_financial_year']) ? $data['lump_sum_e_financial_year'] : null; $this->container['timesheet_line_id'] = isset($data['timesheet_line_id']) ? $data['timesheet_line_id'] : null; $this->container['timesheet_line_external_id'] = isset($data['timesheet_line_external_id']) ? $data['timesheet_line_external_id'] : null; + $this->container['reporting_dimension_value_ids'] = isset($data['reporting_dimension_value_ids']) ? $data['reporting_dimension_value_ids'] : null; + $this->container['reporting_dimension_value_names'] = isset($data['reporting_dimension_value_names']) ? $data['reporting_dimension_value_names'] : null; + $this->container['net_payment'] = isset($data['net_payment']) ? $data['net_payment'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -724,6 +742,78 @@ public function setTimesheetLineExternalId($timesheet_line_external_id) return $this; } + /** + * Gets reporting_dimension_value_ids + * + * @return int[] + */ + public function getReportingDimensionValueIds() + { + return $this->container['reporting_dimension_value_ids']; + } + + /** + * Sets reporting_dimension_value_ids + * + * @param int[] $reporting_dimension_value_ids Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an array of dimension value ids (normally only one-per dimension) eg [1,3,7].

If you prefer to specify dimension values by name, use the ReportingDimensionValueNames field instead.

If this field is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueIds($reporting_dimension_value_ids) + { + $this->container['reporting_dimension_value_ids'] = $reporting_dimension_value_ids; + + return $this; + } + + /** + * Gets reporting_dimension_value_names + * + * @return map[string,string[]] + */ + public function getReportingDimensionValueNames() + { + return $this->container['reporting_dimension_value_names']; + } + + /** + * Sets reporting_dimension_value_names + * + * @param map[string,string[]] $reporting_dimension_value_names Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an object with dimension names and for each one, specify an array of associated value names (normally one-per dimension) eg { \"Department\": [\"Accounting\"], \"Job Code\": [\"JC1\"] }.

If you prefer to specify dimension values directly by Id, use the ReportingDimensionValueIds field instead.

If ReportingDimensionValueIds is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueNames($reporting_dimension_value_names) + { + $this->container['reporting_dimension_value_names'] = $reporting_dimension_value_names; + + return $this; + } + + /** + * Gets net_payment + * + * @return double + */ + public function getNetPayment() + { + return $this->container['net_payment']; + } + + /** + * Sets net_payment + * + * @param double $net_payment + * + * @return $this + */ + public function setNetPayment($net_payment) + { + $this->container['net_payment'] = $net_payment; + + return $this; + } + /** * Gets id * diff --git a/src/lib/Model/AuEmployeeRecurringDeductionModel.php b/src/lib/Model/AuEmployeeRecurringDeductionModel.php index 57b9884..462d455 100644 --- a/src/lib/Model/AuEmployeeRecurringDeductionModel.php +++ b/src/lib/Model/AuEmployeeRecurringDeductionModel.php @@ -280,6 +280,7 @@ public function getModelName() const DEDUCTION_TYPE_PERCENTAGE_STUDENT_LOAN = 'PercentageStudentLoan'; const DEDUCTION_TYPE_PERCENTAGE_NET = 'PercentageNet'; const DEDUCTION_TYPE_TIERED = 'Tiered'; + const DEDUCTION_TYPE_CUSTOM = 'Custom'; const PAID_TO_MANUAL = 'Manual'; const PAID_TO_BANK_ACCOUNT = 'BankAccount'; const PAID_TO_SUPER_FUND = 'SuperFund'; @@ -310,6 +311,7 @@ public function getDeductionTypeAllowableValues() self::DEDUCTION_TYPE_PERCENTAGE_STUDENT_LOAN, self::DEDUCTION_TYPE_PERCENTAGE_NET, self::DEDUCTION_TYPE_TIERED, + self::DEDUCTION_TYPE_CUSTOM, ]; } diff --git a/src/lib/Model/AuEssRosterShiftModel.php b/src/lib/Model/AuEssRosterShiftModel.php index ca3cf41..e132598 100644 --- a/src/lib/Model/AuEssRosterShiftModel.php +++ b/src/lib/Model/AuEssRosterShiftModel.php @@ -78,7 +78,8 @@ class AuEssRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => '\Swagger\Client\Model\RosterShiftSwapModel', 'date_published' => '\DateTime', 'biddable' => 'bool', - 'shift_swap_cutoff_time' => '\DateTime' + 'shift_swap_cutoff_time' => '\DateTime', + 'shift_assignment_status' => 'string' ]; /** @@ -108,7 +109,8 @@ class AuEssRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => null, 'date_published' => 'date-time', 'biddable' => null, - 'shift_swap_cutoff_time' => 'date-time' + 'shift_swap_cutoff_time' => 'date-time', + 'shift_assignment_status' => null ]; /** @@ -159,7 +161,8 @@ public static function swaggerFormats() 'pending_swap' => 'pendingSwap', 'date_published' => 'datePublished', 'biddable' => 'biddable', - 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime', + 'shift_assignment_status' => 'shiftAssignmentStatus' ]; /** @@ -189,7 +192,8 @@ public static function swaggerFormats() 'pending_swap' => 'setPendingSwap', 'date_published' => 'setDatePublished', 'biddable' => 'setBiddable', - 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime', + 'shift_assignment_status' => 'setShiftAssignmentStatus' ]; /** @@ -219,7 +223,8 @@ public static function swaggerFormats() 'pending_swap' => 'getPendingSwap', 'date_published' => 'getDatePublished', 'biddable' => 'getBiddable', - 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime', + 'shift_assignment_status' => 'getShiftAssignmentStatus' ]; /** @@ -263,9 +268,34 @@ public function getModelName() return self::$swaggerModelName; } + const SHIFT_ASSIGNMENT_STATUS_PENDING = 'Pending'; + const SHIFT_ASSIGNMENT_STATUS_ASSIGNED = 'Assigned'; + const SHIFT_ASSIGNMENT_STATUS_BIDDING = 'Bidding'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP = 'PendingShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL = 'PendingShiftSwapAwaitingApproval'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP = 'ProposedShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL = 'ProposedShiftSwapAwaitingApproval'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShiftAssignmentStatusAllowableValues() + { + return [ + self::SHIFT_ASSIGNMENT_STATUS_PENDING, + self::SHIFT_ASSIGNMENT_STATUS_ASSIGNED, + self::SHIFT_ASSIGNMENT_STATUS_BIDDING, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL, + ]; + } + /** * Associative array for storing property values @@ -304,6 +334,7 @@ public function __construct(array $data = null) $this->container['date_published'] = isset($data['date_published']) ? $data['date_published'] : null; $this->container['biddable'] = isset($data['biddable']) ? $data['biddable'] : null; $this->container['shift_swap_cutoff_time'] = isset($data['shift_swap_cutoff_time']) ? $data['shift_swap_cutoff_time'] : null; + $this->container['shift_assignment_status'] = isset($data['shift_assignment_status']) ? $data['shift_assignment_status'] : null; } /** @@ -315,6 +346,14 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($this->container['shift_assignment_status']) && !in_array($this->container['shift_assignment_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -857,6 +896,39 @@ public function setShiftSwapCutoffTime($shift_swap_cutoff_time) return $this; } + + /** + * Gets shift_assignment_status + * + * @return string + */ + public function getShiftAssignmentStatus() + { + return $this->container['shift_assignment_status']; + } + + /** + * Sets shift_assignment_status + * + * @param string $shift_assignment_status + * + * @return $this + */ + public function setShiftAssignmentStatus($shift_assignment_status) + { + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($shift_assignment_status) && !in_array($shift_assignment_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['shift_assignment_status'] = $shift_assignment_status; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuFeaturesModel.php b/src/lib/Model/AuFeaturesModel.php index 01b2fe3..13054de 100644 --- a/src/lib/Model/AuFeaturesModel.php +++ b/src/lib/Model/AuFeaturesModel.php @@ -86,7 +86,9 @@ class AuFeaturesModel implements ModelInterface, ArrayAccess 'timesheets_require_work_type' => 'bool', 'enable_work_zone_clock_on' => 'bool', 'shift_bidding' => 'bool', - 'allow_to_select_higher_classification' => 'bool' + 'allow_to_select_higher_classification' => 'bool', + 'allow_employee_work_eligibility_self_service' => 'bool', + 'paid_breaks_enabled' => 'bool' ]; /** @@ -124,7 +126,9 @@ class AuFeaturesModel implements ModelInterface, ArrayAccess 'timesheets_require_work_type' => null, 'enable_work_zone_clock_on' => null, 'shift_bidding' => null, - 'allow_to_select_higher_classification' => null + 'allow_to_select_higher_classification' => null, + 'allow_employee_work_eligibility_self_service' => null, + 'paid_breaks_enabled' => null ]; /** @@ -183,7 +187,9 @@ public static function swaggerFormats() 'timesheets_require_work_type' => 'timesheetsRequireWorkType', 'enable_work_zone_clock_on' => 'enableWorkZoneClockOn', 'shift_bidding' => 'shiftBidding', - 'allow_to_select_higher_classification' => 'allowToSelectHigherClassification' + 'allow_to_select_higher_classification' => 'allowToSelectHigherClassification', + 'allow_employee_work_eligibility_self_service' => 'allowEmployeeWorkEligibilitySelfService', + 'paid_breaks_enabled' => 'paidBreaksEnabled' ]; /** @@ -221,7 +227,9 @@ public static function swaggerFormats() 'timesheets_require_work_type' => 'setTimesheetsRequireWorkType', 'enable_work_zone_clock_on' => 'setEnableWorkZoneClockOn', 'shift_bidding' => 'setShiftBidding', - 'allow_to_select_higher_classification' => 'setAllowToSelectHigherClassification' + 'allow_to_select_higher_classification' => 'setAllowToSelectHigherClassification', + 'allow_employee_work_eligibility_self_service' => 'setAllowEmployeeWorkEligibilitySelfService', + 'paid_breaks_enabled' => 'setPaidBreaksEnabled' ]; /** @@ -259,7 +267,9 @@ public static function swaggerFormats() 'timesheets_require_work_type' => 'getTimesheetsRequireWorkType', 'enable_work_zone_clock_on' => 'getEnableWorkZoneClockOn', 'shift_bidding' => 'getShiftBidding', - 'allow_to_select_higher_classification' => 'getAllowToSelectHigherClassification' + 'allow_to_select_higher_classification' => 'getAllowToSelectHigherClassification', + 'allow_employee_work_eligibility_self_service' => 'getAllowEmployeeWorkEligibilitySelfService', + 'paid_breaks_enabled' => 'getPaidBreaksEnabled' ]; /** @@ -373,6 +383,8 @@ public function __construct(array $data = null) $this->container['enable_work_zone_clock_on'] = isset($data['enable_work_zone_clock_on']) ? $data['enable_work_zone_clock_on'] : null; $this->container['shift_bidding'] = isset($data['shift_bidding']) ? $data['shift_bidding'] : null; $this->container['allow_to_select_higher_classification'] = isset($data['allow_to_select_higher_classification']) ? $data['allow_to_select_higher_classification'] : null; + $this->container['allow_employee_work_eligibility_self_service'] = isset($data['allow_employee_work_eligibility_self_service']) ? $data['allow_employee_work_eligibility_self_service'] : null; + $this->container['paid_breaks_enabled'] = isset($data['paid_breaks_enabled']) ? $data['paid_breaks_enabled'] : null; } /** @@ -1135,6 +1147,54 @@ public function setAllowToSelectHigherClassification($allow_to_select_higher_cla return $this; } + + /** + * Gets allow_employee_work_eligibility_self_service + * + * @return bool + */ + public function getAllowEmployeeWorkEligibilitySelfService() + { + return $this->container['allow_employee_work_eligibility_self_service']; + } + + /** + * Sets allow_employee_work_eligibility_self_service + * + * @param bool $allow_employee_work_eligibility_self_service + * + * @return $this + */ + public function setAllowEmployeeWorkEligibilitySelfService($allow_employee_work_eligibility_self_service) + { + $this->container['allow_employee_work_eligibility_self_service'] = $allow_employee_work_eligibility_self_service; + + return $this; + } + + /** + * Gets paid_breaks_enabled + * + * @return bool + */ + public function getPaidBreaksEnabled() + { + return $this->container['paid_breaks_enabled']; + } + + /** + * Sets paid_breaks_enabled + * + * @param bool $paid_breaks_enabled + * + * @return $this + */ + public function setPaidBreaksEnabled($paid_breaks_enabled) + { + $this->container['paid_breaks_enabled'] = $paid_breaks_enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuGrossToNetResponseModel.php b/src/lib/Model/AuGrossToNetResponseModel.php index 84b4f8e..72700e2 100644 --- a/src/lib/Model/AuGrossToNetResponseModel.php +++ b/src/lib/Model/AuGrossToNetResponseModel.php @@ -63,6 +63,7 @@ class AuGrossToNetResponseModel implements ModelInterface, ArrayAccess 'net_earnings' => 'double', 'sgc' => 'double', 'employer_contribution' => 'double', + 'non_resc_employer_contribution' => 'double', 'total_gross_plus_super' => 'double', 'employee_id' => 'int', 'first_name' => 'string', @@ -96,6 +97,7 @@ class AuGrossToNetResponseModel implements ModelInterface, ArrayAccess 'net_earnings' => 'double', 'sgc' => 'double', 'employer_contribution' => 'double', + 'non_resc_employer_contribution' => 'double', 'total_gross_plus_super' => 'double', 'employee_id' => 'int32', 'first_name' => null, @@ -150,6 +152,7 @@ public static function swaggerFormats() 'net_earnings' => 'netEarnings', 'sgc' => 'sgc', 'employer_contribution' => 'employerContribution', + 'non_resc_employer_contribution' => 'nonRescEmployerContribution', 'total_gross_plus_super' => 'totalGrossPlusSuper', 'employee_id' => 'employeeId', 'first_name' => 'firstName', @@ -183,6 +186,7 @@ public static function swaggerFormats() 'net_earnings' => 'setNetEarnings', 'sgc' => 'setSgc', 'employer_contribution' => 'setEmployerContribution', + 'non_resc_employer_contribution' => 'setNonRescEmployerContribution', 'total_gross_plus_super' => 'setTotalGrossPlusSuper', 'employee_id' => 'setEmployeeId', 'first_name' => 'setFirstName', @@ -216,6 +220,7 @@ public static function swaggerFormats() 'net_earnings' => 'getNetEarnings', 'sgc' => 'getSgc', 'employer_contribution' => 'getEmployerContribution', + 'non_resc_employer_contribution' => 'getNonRescEmployerContribution', 'total_gross_plus_super' => 'getTotalGrossPlusSuper', 'employee_id' => 'getEmployeeId', 'first_name' => 'getFirstName', @@ -303,6 +308,7 @@ public function __construct(array $data = null) $this->container['net_earnings'] = isset($data['net_earnings']) ? $data['net_earnings'] : null; $this->container['sgc'] = isset($data['sgc']) ? $data['sgc'] : null; $this->container['employer_contribution'] = isset($data['employer_contribution']) ? $data['employer_contribution'] : null; + $this->container['non_resc_employer_contribution'] = isset($data['non_resc_employer_contribution']) ? $data['non_resc_employer_contribution'] : null; $this->container['total_gross_plus_super'] = isset($data['total_gross_plus_super']) ? $data['total_gross_plus_super'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; @@ -492,6 +498,30 @@ public function setEmployerContribution($employer_contribution) return $this; } + /** + * Gets non_resc_employer_contribution + * + * @return double + */ + public function getNonRescEmployerContribution() + { + return $this->container['non_resc_employer_contribution']; + } + + /** + * Sets non_resc_employer_contribution + * + * @param double $non_resc_employer_contribution + * + * @return $this + */ + public function setNonRescEmployerContribution($non_resc_employer_contribution) + { + $this->container['non_resc_employer_contribution'] = $non_resc_employer_contribution; + + return $this; + } + /** * Gets total_gross_plus_super * diff --git a/src/lib/Model/AuIndividualTimesheetLineModel.php b/src/lib/Model/AuIndividualTimesheetLineModel.php index b65d51c..1005212 100644 --- a/src/lib/Model/AuIndividualTimesheetLineModel.php +++ b/src/lib/Model/AuIndividualTimesheetLineModel.php @@ -59,6 +59,7 @@ class AuIndividualTimesheetLineModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'classification_id' => 'int', 'classification' => 'string', + 'location_is_deleted' => 'bool', 'id' => 'int', 'employee_id' => 'int', 'start_time' => '\DateTime', @@ -91,6 +92,7 @@ class AuIndividualTimesheetLineModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'classification_id' => 'int32', 'classification' => null, + 'location_is_deleted' => null, 'id' => 'int32', 'employee_id' => 'int32', 'start_time' => 'date-time', @@ -144,6 +146,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'classification_id' => 'classificationId', 'classification' => 'classification', + 'location_is_deleted' => 'locationIsDeleted', 'id' => 'id', 'employee_id' => 'employeeId', 'start_time' => 'startTime', @@ -176,6 +179,7 @@ public static function swaggerFormats() protected static $setters = [ 'classification_id' => 'setClassificationId', 'classification' => 'setClassification', + 'location_is_deleted' => 'setLocationIsDeleted', 'id' => 'setId', 'employee_id' => 'setEmployeeId', 'start_time' => 'setStartTime', @@ -208,6 +212,7 @@ public static function swaggerFormats() protected static $getters = [ 'classification_id' => 'getClassificationId', 'classification' => 'getClassification', + 'location_is_deleted' => 'getLocationIsDeleted', 'id' => 'getId', 'employee_id' => 'getEmployeeId', 'start_time' => 'getStartTime', @@ -343,6 +348,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -424,6 +434,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -445,6 +460,7 @@ public function __construct(array $data = null) { $this->container['classification_id'] = isset($data['classification_id']) ? $data['classification_id'] : null; $this->container['classification'] = isset($data['classification']) ? $data['classification'] : null; + $this->container['location_is_deleted'] = isset($data['location_is_deleted']) ? $data['location_is_deleted'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; @@ -549,6 +565,30 @@ public function setClassification($classification) return $this; } + /** + * Gets location_is_deleted + * + * @return bool + */ + public function getLocationIsDeleted() + { + return $this->container['location_is_deleted']; + } + + /** + * Sets location_is_deleted + * + * @param bool $location_is_deleted + * + * @return $this + */ + public function setLocationIsDeleted($location_is_deleted) + { + $this->container['location_is_deleted'] = $location_is_deleted; + + return $this; + } + /** * Gets id * diff --git a/src/lib/Model/AuInitialEarningsModel.php b/src/lib/Model/AuInitialEarningsModel.php index 9ac1cbc..4610cd5 100644 --- a/src/lib/Model/AuInitialEarningsModel.php +++ b/src/lib/Model/AuInitialEarningsModel.php @@ -304,7 +304,7 @@ public function getPayCategoryType() /** * Sets pay_category_type * - * @param string $pay_category_type + * @param string $pay_category_type

Note: The amounts specified for any ETP-related pay categories (with the exception of Lump Sum D) must represent the total of the corresponding amounts supplied in the etps collection * * @return $this */ diff --git a/src/lib/Model/AuJournalItemResponse.php b/src/lib/Model/AuJournalItemResponse.php index 3170e1f..b514023 100644 --- a/src/lib/Model/AuJournalItemResponse.php +++ b/src/lib/Model/AuJournalItemResponse.php @@ -70,7 +70,9 @@ class AuJournalItemResponse implements ModelInterface, ArrayAccess 'location' => 'string', 'is_credit' => 'bool', 'is_debit' => 'bool', - 'location_external_reference_id' => 'string' + 'location_external_reference_id' => 'string', + 'reporting_dimension_value_ids' => 'int[]', + 'reporting_dimension_value_names' => 'map[string,string[]]' ]; /** @@ -92,7 +94,9 @@ class AuJournalItemResponse implements ModelInterface, ArrayAccess 'location' => null, 'is_credit' => null, 'is_debit' => null, - 'location_external_reference_id' => null + 'location_external_reference_id' => null, + 'reporting_dimension_value_ids' => 'int32', + 'reporting_dimension_value_names' => null ]; /** @@ -135,7 +139,9 @@ public static function swaggerFormats() 'location' => 'location', 'is_credit' => 'isCredit', 'is_debit' => 'isDebit', - 'location_external_reference_id' => 'locationExternalReferenceId' + 'location_external_reference_id' => 'locationExternalReferenceId', + 'reporting_dimension_value_ids' => 'reportingDimensionValueIds', + 'reporting_dimension_value_names' => 'reportingDimensionValueNames' ]; /** @@ -157,7 +163,9 @@ public static function swaggerFormats() 'location' => 'setLocation', 'is_credit' => 'setIsCredit', 'is_debit' => 'setIsDebit', - 'location_external_reference_id' => 'setLocationExternalReferenceId' + 'location_external_reference_id' => 'setLocationExternalReferenceId', + 'reporting_dimension_value_ids' => 'setReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'setReportingDimensionValueNames' ]; /** @@ -179,7 +187,9 @@ public static function swaggerFormats() 'location' => 'getLocation', 'is_credit' => 'getIsCredit', 'is_debit' => 'getIsDebit', - 'location_external_reference_id' => 'getLocationExternalReferenceId' + 'location_external_reference_id' => 'getLocationExternalReferenceId', + 'reporting_dimension_value_ids' => 'getReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'getReportingDimensionValueNames' ]; /** @@ -335,6 +345,8 @@ public function __construct(array $data = null) $this->container['is_credit'] = isset($data['is_credit']) ? $data['is_credit'] : null; $this->container['is_debit'] = isset($data['is_debit']) ? $data['is_debit'] : null; $this->container['location_external_reference_id'] = isset($data['location_external_reference_id']) ? $data['location_external_reference_id'] : null; + $this->container['reporting_dimension_value_ids'] = isset($data['reporting_dimension_value_ids']) ? $data['reporting_dimension_value_ids'] : null; + $this->container['reporting_dimension_value_names'] = isset($data['reporting_dimension_value_names']) ? $data['reporting_dimension_value_names'] : null; } /** @@ -713,6 +725,54 @@ public function setLocationExternalReferenceId($location_external_reference_id) return $this; } + + /** + * Gets reporting_dimension_value_ids + * + * @return int[] + */ + public function getReportingDimensionValueIds() + { + return $this->container['reporting_dimension_value_ids']; + } + + /** + * Sets reporting_dimension_value_ids + * + * @param int[] $reporting_dimension_value_ids Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an array of dimension value ids (normally only one-per dimension) eg [1,3,7].

If you prefer to specify dimension values by name, use the ReportingDimensionValueNames field instead.

If this field is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueIds($reporting_dimension_value_ids) + { + $this->container['reporting_dimension_value_ids'] = $reporting_dimension_value_ids; + + return $this; + } + + /** + * Gets reporting_dimension_value_names + * + * @return map[string,string[]] + */ + public function getReportingDimensionValueNames() + { + return $this->container['reporting_dimension_value_names']; + } + + /** + * Sets reporting_dimension_value_names + * + * @param map[string,string[]] $reporting_dimension_value_names Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an object with dimension names and for each one, specify an array of associated value names (normally one-per dimension) eg { \"Department\": [\"Accounting\"], \"Job Code\": [\"JC1\"] }.

If you prefer to specify dimension values directly by Id, use the ReportingDimensionValueIds field instead.

If ReportingDimensionValueIds is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueNames($reporting_dimension_value_names) + { + $this->container['reporting_dimension_value_names'] = $reporting_dimension_value_names; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuLeaveAccrualRuleModel.php b/src/lib/Model/AuLeaveAccrualRuleModel.php index 56319c0..e7ac9f7 100644 --- a/src/lib/Model/AuLeaveAccrualRuleModel.php +++ b/src/lib/Model/AuLeaveAccrualRuleModel.php @@ -199,6 +199,7 @@ public function getModelName() const CARRY_OVER_BEHAVIOUR_CARRY_HOURS = 'CarryHours'; const ACCRUAL_TYPE_ONGOING = 'Ongoing'; const ACCRUAL_TYPE_YEARLY = 'Yearly'; + const ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE = 'BasedOnLengthOfService'; @@ -238,6 +239,7 @@ public function getAccrualTypeAllowableValues() return [ self::ACCRUAL_TYPE_ONGOING, self::ACCRUAL_TYPE_YEARLY, + self::ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE, ]; } diff --git a/src/lib/Model/AuLeaveAllowanceTemplateLeaveCategoryApiModel.php b/src/lib/Model/AuLeaveAllowanceTemplateLeaveCategoryApiModel.php index 96985bf..6ced0b4 100644 --- a/src/lib/Model/AuLeaveAllowanceTemplateLeaveCategoryApiModel.php +++ b/src/lib/Model/AuLeaveAllowanceTemplateLeaveCategoryApiModel.php @@ -245,6 +245,7 @@ public function getModelName() const LEAVE_UNIT_TYPE_WEEKS = 'Weeks'; const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_ONGOING = 'Ongoing'; const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_YEARLY = 'Yearly'; + const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE = 'BasedOnLengthOfService'; const LEAVE_ACCRUAL_RULE_CAP_TYPE_NOT_LIMITED = 'NotLimited'; const LEAVE_ACCRUAL_RULE_CAP_TYPE_LIMITED = 'Limited'; const LEAVE_ACCRUAL_RULE_CARRY_OVER_BEHAVIOUR_CARRY_ENTIRE_AMOUNT = 'CarryEntireAmount'; @@ -294,6 +295,7 @@ public function getLeaveAccrualRuleAccrualTypeAllowableValues() return [ self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_ONGOING, self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_YEARLY, + self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE, ]; } diff --git a/src/lib/Model/AuLeaveAllowanceTemplateModel.php b/src/lib/Model/AuLeaveAllowanceTemplateModel.php index 8755e8b..8724624 100644 --- a/src/lib/Model/AuLeaveAllowanceTemplateModel.php +++ b/src/lib/Model/AuLeaveAllowanceTemplateModel.php @@ -273,9 +273,16 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; const LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE = 'EmployeeStartDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE = 'SpecifiedDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR = 'CalendarYear'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH = 'RollingYear12Month'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH = 'RollingYear24Month'; @@ -357,6 +364,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -371,6 +383,8 @@ public function getLeaveAccrualStartDateTypeAllowableValues() self::LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH, ]; } diff --git a/src/lib/Model/AuLeaveCategoryModel.php b/src/lib/Model/AuLeaveCategoryModel.php index 78697c1..900716f 100644 --- a/src/lib/Model/AuLeaveCategoryModel.php +++ b/src/lib/Model/AuLeaveCategoryModel.php @@ -81,7 +81,8 @@ class AuLeaveCategoryModel implements ModelInterface, ArrayAccess 'is_name_private' => 'bool', 'leave_unit_type' => 'string', 'payout_as_etp' => 'bool', - 'accrues_first_pay_run_per_period_only' => 'bool' + 'accrues_first_pay_run_per_period_only' => 'bool', + 'prevent_negative_balance_unpaid_leave_category_id' => 'int' ]; /** @@ -114,7 +115,8 @@ class AuLeaveCategoryModel implements ModelInterface, ArrayAccess 'is_name_private' => null, 'leave_unit_type' => null, 'payout_as_etp' => null, - 'accrues_first_pay_run_per_period_only' => null + 'accrues_first_pay_run_per_period_only' => null, + 'prevent_negative_balance_unpaid_leave_category_id' => 'int32' ]; /** @@ -168,7 +170,8 @@ public static function swaggerFormats() 'is_name_private' => 'isNamePrivate', 'leave_unit_type' => 'leaveUnitType', 'payout_as_etp' => 'payoutAsETP', - 'accrues_first_pay_run_per_period_only' => 'accruesFirstPayRunPerPeriodOnly' + 'accrues_first_pay_run_per_period_only' => 'accruesFirstPayRunPerPeriodOnly', + 'prevent_negative_balance_unpaid_leave_category_id' => 'preventNegativeBalanceUnpaidLeaveCategoryId' ]; /** @@ -201,7 +204,8 @@ public static function swaggerFormats() 'is_name_private' => 'setIsNamePrivate', 'leave_unit_type' => 'setLeaveUnitType', 'payout_as_etp' => 'setPayoutAsEtp', - 'accrues_first_pay_run_per_period_only' => 'setAccruesFirstPayRunPerPeriodOnly' + 'accrues_first_pay_run_per_period_only' => 'setAccruesFirstPayRunPerPeriodOnly', + 'prevent_negative_balance_unpaid_leave_category_id' => 'setPreventNegativeBalanceUnpaidLeaveCategoryId' ]; /** @@ -234,7 +238,8 @@ public static function swaggerFormats() 'is_name_private' => 'getIsNamePrivate', 'leave_unit_type' => 'getLeaveUnitType', 'payout_as_etp' => 'getPayoutAsEtp', - 'accrues_first_pay_run_per_period_only' => 'getAccruesFirstPayRunPerPeriodOnly' + 'accrues_first_pay_run_per_period_only' => 'getAccruesFirstPayRunPerPeriodOnly', + 'prevent_negative_balance_unpaid_leave_category_id' => 'getPreventNegativeBalanceUnpaidLeaveCategoryId' ]; /** @@ -381,6 +386,7 @@ public function __construct(array $data = null) $this->container['leave_unit_type'] = isset($data['leave_unit_type']) ? $data['leave_unit_type'] : null; $this->container['payout_as_etp'] = isset($data['payout_as_etp']) ? $data['payout_as_etp'] : null; $this->container['accrues_first_pay_run_per_period_only'] = isset($data['accrues_first_pay_run_per_period_only']) ? $data['accrues_first_pay_run_per_period_only'] : null; + $this->container['prevent_negative_balance_unpaid_leave_category_id'] = isset($data['prevent_negative_balance_unpaid_leave_category_id']) ? $data['prevent_negative_balance_unpaid_leave_category_id'] : null; } /** @@ -1057,6 +1063,30 @@ public function setAccruesFirstPayRunPerPeriodOnly($accrues_first_pay_run_per_pe return $this; } + + /** + * Gets prevent_negative_balance_unpaid_leave_category_id + * + * @return int + */ + public function getPreventNegativeBalanceUnpaidLeaveCategoryId() + { + return $this->container['prevent_negative_balance_unpaid_leave_category_id']; + } + + /** + * Sets prevent_negative_balance_unpaid_leave_category_id + * + * @param int $prevent_negative_balance_unpaid_leave_category_id + * + * @return $this + */ + public function setPreventNegativeBalanceUnpaidLeaveCategoryId($prevent_negative_balance_unpaid_leave_category_id) + { + $this->container['prevent_negative_balance_unpaid_leave_category_id'] = $prevent_negative_balance_unpaid_leave_category_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuManagerRosterShiftModel.php b/src/lib/Model/AuManagerRosterShiftModel.php index c201761..617df9f 100644 --- a/src/lib/Model/AuManagerRosterShiftModel.php +++ b/src/lib/Model/AuManagerRosterShiftModel.php @@ -84,7 +84,8 @@ class AuManagerRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => '\Swagger\Client\Model\RosterShiftSwapModel', 'date_published' => '\DateTime', 'biddable' => 'bool', - 'shift_swap_cutoff_time' => '\DateTime' + 'shift_swap_cutoff_time' => '\DateTime', + 'shift_assignment_status' => 'string' ]; /** @@ -120,7 +121,8 @@ class AuManagerRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => null, 'date_published' => 'date-time', 'biddable' => null, - 'shift_swap_cutoff_time' => 'date-time' + 'shift_swap_cutoff_time' => 'date-time', + 'shift_assignment_status' => null ]; /** @@ -177,7 +179,8 @@ public static function swaggerFormats() 'pending_swap' => 'pendingSwap', 'date_published' => 'datePublished', 'biddable' => 'biddable', - 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime', + 'shift_assignment_status' => 'shiftAssignmentStatus' ]; /** @@ -213,7 +216,8 @@ public static function swaggerFormats() 'pending_swap' => 'setPendingSwap', 'date_published' => 'setDatePublished', 'biddable' => 'setBiddable', - 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime', + 'shift_assignment_status' => 'setShiftAssignmentStatus' ]; /** @@ -249,7 +253,8 @@ public static function swaggerFormats() 'pending_swap' => 'getPendingSwap', 'date_published' => 'getDatePublished', 'biddable' => 'getBiddable', - 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime', + 'shift_assignment_status' => 'getShiftAssignmentStatus' ]; /** @@ -293,9 +298,34 @@ public function getModelName() return self::$swaggerModelName; } + const SHIFT_ASSIGNMENT_STATUS_PENDING = 'Pending'; + const SHIFT_ASSIGNMENT_STATUS_ASSIGNED = 'Assigned'; + const SHIFT_ASSIGNMENT_STATUS_BIDDING = 'Bidding'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP = 'PendingShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL = 'PendingShiftSwapAwaitingApproval'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP = 'ProposedShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL = 'ProposedShiftSwapAwaitingApproval'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShiftAssignmentStatusAllowableValues() + { + return [ + self::SHIFT_ASSIGNMENT_STATUS_PENDING, + self::SHIFT_ASSIGNMENT_STATUS_ASSIGNED, + self::SHIFT_ASSIGNMENT_STATUS_BIDDING, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL, + ]; + } + /** * Associative array for storing property values @@ -340,6 +370,7 @@ public function __construct(array $data = null) $this->container['date_published'] = isset($data['date_published']) ? $data['date_published'] : null; $this->container['biddable'] = isset($data['biddable']) ? $data['biddable'] : null; $this->container['shift_swap_cutoff_time'] = isset($data['shift_swap_cutoff_time']) ? $data['shift_swap_cutoff_time'] : null; + $this->container['shift_assignment_status'] = isset($data['shift_assignment_status']) ? $data['shift_assignment_status'] : null; } /** @@ -351,6 +382,14 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($this->container['shift_assignment_status']) && !in_array($this->container['shift_assignment_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1037,6 +1076,39 @@ public function setShiftSwapCutoffTime($shift_swap_cutoff_time) return $this; } + + /** + * Gets shift_assignment_status + * + * @return string + */ + public function getShiftAssignmentStatus() + { + return $this->container['shift_assignment_status']; + } + + /** + * Sets shift_assignment_status + * + * @param string $shift_assignment_status + * + * @return $this + */ + public function setShiftAssignmentStatus($shift_assignment_status) + { + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($shift_assignment_status) && !in_array($shift_assignment_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['shift_assignment_status'] = $shift_assignment_status; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuOpeningBalancesModel.php b/src/lib/Model/AuOpeningBalancesModel.php index d52591c..c7d542c 100644 --- a/src/lib/Model/AuOpeningBalancesModel.php +++ b/src/lib/Model/AuOpeningBalancesModel.php @@ -64,9 +64,9 @@ class AuOpeningBalancesModel implements ModelInterface, ArrayAccess 'help_amount' => 'double', 'super_contribution' => 'double', 'employer_contribution' => 'double', + 'non_resc_employer_contribution' => 'double', 'earnings_lines' => '\Swagger\Client\Model\AuInitialEarningsModel[]', - 'primary_etp_type' => '\Swagger\Client\Model\OpeningBalancesEtpModel', - 'secondary_etp_type' => '\Swagger\Client\Model\OpeningBalancesEtpModel', + 'etps' => '\Swagger\Client\Model\OpeningBalancesEtpModel[]', 'employee_id' => 'int', 'total_hours' => 'double', 'gross_earnings' => 'double', @@ -89,9 +89,9 @@ class AuOpeningBalancesModel implements ModelInterface, ArrayAccess 'help_amount' => 'double', 'super_contribution' => 'double', 'employer_contribution' => 'double', + 'non_resc_employer_contribution' => 'double', 'earnings_lines' => null, - 'primary_etp_type' => null, - 'secondary_etp_type' => null, + 'etps' => null, 'employee_id' => 'int32', 'total_hours' => 'double', 'gross_earnings' => 'double', @@ -135,9 +135,9 @@ public static function swaggerFormats() 'help_amount' => 'helpAmount', 'super_contribution' => 'superContribution', 'employer_contribution' => 'employerContribution', + 'non_resc_employer_contribution' => 'nonRescEmployerContribution', 'earnings_lines' => 'earningsLines', - 'primary_etp_type' => 'primaryEtpType', - 'secondary_etp_type' => 'secondaryEtpType', + 'etps' => 'etps', 'employee_id' => 'employeeId', 'total_hours' => 'totalHours', 'gross_earnings' => 'grossEarnings', @@ -160,9 +160,9 @@ public static function swaggerFormats() 'help_amount' => 'setHelpAmount', 'super_contribution' => 'setSuperContribution', 'employer_contribution' => 'setEmployerContribution', + 'non_resc_employer_contribution' => 'setNonRescEmployerContribution', 'earnings_lines' => 'setEarningsLines', - 'primary_etp_type' => 'setPrimaryEtpType', - 'secondary_etp_type' => 'setSecondaryEtpType', + 'etps' => 'setEtps', 'employee_id' => 'setEmployeeId', 'total_hours' => 'setTotalHours', 'gross_earnings' => 'setGrossEarnings', @@ -185,9 +185,9 @@ public static function swaggerFormats() 'help_amount' => 'getHelpAmount', 'super_contribution' => 'getSuperContribution', 'employer_contribution' => 'getEmployerContribution', + 'non_resc_employer_contribution' => 'getNonRescEmployerContribution', 'earnings_lines' => 'getEarningsLines', - 'primary_etp_type' => 'getPrimaryEtpType', - 'secondary_etp_type' => 'getSecondaryEtpType', + 'etps' => 'getEtps', 'employee_id' => 'getEmployeeId', 'total_hours' => 'getTotalHours', 'gross_earnings' => 'getGrossEarnings', @@ -264,9 +264,9 @@ public function __construct(array $data = null) $this->container['help_amount'] = isset($data['help_amount']) ? $data['help_amount'] : null; $this->container['super_contribution'] = isset($data['super_contribution']) ? $data['super_contribution'] : null; $this->container['employer_contribution'] = isset($data['employer_contribution']) ? $data['employer_contribution'] : null; + $this->container['non_resc_employer_contribution'] = isset($data['non_resc_employer_contribution']) ? $data['non_resc_employer_contribution'] : null; $this->container['earnings_lines'] = isset($data['earnings_lines']) ? $data['earnings_lines'] : null; - $this->container['primary_etp_type'] = isset($data['primary_etp_type']) ? $data['primary_etp_type'] : null; - $this->container['secondary_etp_type'] = isset($data['secondary_etp_type']) ? $data['secondary_etp_type'] : null; + $this->container['etps'] = isset($data['etps']) ? $data['etps'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['total_hours'] = isset($data['total_hours']) ? $data['total_hours'] : null; $this->container['gross_earnings'] = isset($data['gross_earnings']) ? $data['gross_earnings'] : null; @@ -469,73 +469,73 @@ public function setEmployerContribution($employer_contribution) } /** - * Gets earnings_lines + * Gets non_resc_employer_contribution * - * @return \Swagger\Client\Model\AuInitialEarningsModel[] + * @return double */ - public function getEarningsLines() + public function getNonRescEmployerContribution() { - return $this->container['earnings_lines']; + return $this->container['non_resc_employer_contribution']; } /** - * Sets earnings_lines + * Sets non_resc_employer_contribution * - * @param \Swagger\Client\Model\AuInitialEarningsModel[] $earnings_lines + * @param double $non_resc_employer_contribution * * @return $this */ - public function setEarningsLines($earnings_lines) + public function setNonRescEmployerContribution($non_resc_employer_contribution) { - $this->container['earnings_lines'] = $earnings_lines; + $this->container['non_resc_employer_contribution'] = $non_resc_employer_contribution; return $this; } /** - * Gets primary_etp_type + * Gets earnings_lines * - * @return \Swagger\Client\Model\OpeningBalancesEtpModel + * @return \Swagger\Client\Model\AuInitialEarningsModel[] */ - public function getPrimaryEtpType() + public function getEarningsLines() { - return $this->container['primary_etp_type']; + return $this->container['earnings_lines']; } /** - * Sets primary_etp_type + * Sets earnings_lines * - * @param \Swagger\Client\Model\OpeningBalancesEtpModel $primary_etp_type + * @param \Swagger\Client\Model\AuInitialEarningsModel[] $earnings_lines * * @return $this */ - public function setPrimaryEtpType($primary_etp_type) + public function setEarningsLines($earnings_lines) { - $this->container['primary_etp_type'] = $primary_etp_type; + $this->container['earnings_lines'] = $earnings_lines; return $this; } /** - * Gets secondary_etp_type + * Gets etps * - * @return \Swagger\Client\Model\OpeningBalancesEtpModel + * @return \Swagger\Client\Model\OpeningBalancesEtpModel[] */ - public function getSecondaryEtpType() + public function getEtps() { - return $this->container['secondary_etp_type']; + return $this->container['etps']; } /** - * Sets secondary_etp_type + * Sets etps * - * @param \Swagger\Client\Model\OpeningBalancesEtpModel $secondary_etp_type + * @param \Swagger\Client\Model\OpeningBalancesEtpModel[] $etps * * @return $this */ - public function setSecondaryEtpType($secondary_etp_type) + public function setEtps($etps) { - $this->container['secondary_etp_type'] = $secondary_etp_type; + $this->container['etps'] = $etps; return $this; } diff --git a/src/lib/Model/AuPayCategoryModel.php b/src/lib/Model/AuPayCategoryModel.php index a2a248c..beaed6c 100644 --- a/src/lib/Model/AuPayCategoryModel.php +++ b/src/lib/Model/AuPayCategoryModel.php @@ -338,6 +338,13 @@ public function getModelName() const PAYMENT_SUMMARY_CLASSIFICATION_ETP_DEATH_BENEFIT_CODE_B = 'EtpDeathBenefitCodeB'; const PAYMENT_SUMMARY_CLASSIFICATION_ETP_DEATH_BENEFIT_CODE_T = 'EtpDeathBenefitCodeT'; const PAYMENT_SUMMARY_CLASSIFICATION_RETURN_TO_WORK_PAYMENT = 'ReturnToWorkPayment'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_GRATUITY = 'SgGratuity'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_NOTICE_PAY = 'SgNoticePay'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_EX_GRATIA_PAYMENT = 'SgExGratiaPayment'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_OTHER_LUMP_SUM_PAYMENTS = 'SgOtherLumpSumPayments'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_COMPENSATION_LOSS_OF_OFFICE = 'SgCompensationLossOfOffice'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_RETIREMENT_BENEFITS_PRE1993 = 'SgRetirementBenefitsPre1993'; + const PAYMENT_SUMMARY_CLASSIFICATION_SG_RETIREMENT_BENEFITS_FROM1993 = 'SgRetirementBenefitsFrom1993'; const PAY_CATEGORY_TYPE_STANDARD = 'Standard'; const PAY_CATEGORY_TYPE_LEAVE_LOADING = 'LeaveLoading'; const PAY_CATEGORY_TYPE_GENUINE_REDUNDANCY_LEAVE_PAYMENT = 'GenuineRedundancyLeavePayment'; @@ -438,6 +445,13 @@ public function getPaymentSummaryClassificationAllowableValues() self::PAYMENT_SUMMARY_CLASSIFICATION_ETP_DEATH_BENEFIT_CODE_B, self::PAYMENT_SUMMARY_CLASSIFICATION_ETP_DEATH_BENEFIT_CODE_T, self::PAYMENT_SUMMARY_CLASSIFICATION_RETURN_TO_WORK_PAYMENT, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_GRATUITY, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_NOTICE_PAY, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_EX_GRATIA_PAYMENT, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_OTHER_LUMP_SUM_PAYMENTS, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_COMPENSATION_LOSS_OF_OFFICE, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_RETIREMENT_BENEFITS_PRE1993, + self::PAYMENT_SUMMARY_CLASSIFICATION_SG_RETIREMENT_BENEFITS_FROM1993, ]; } diff --git a/src/lib/Model/AuPayScheduleModel.php b/src/lib/Model/AuPayScheduleModel.php index 8cb03ca..47669f9 100644 --- a/src/lib/Model/AuPayScheduleModel.php +++ b/src/lib/Model/AuPayScheduleModel.php @@ -256,6 +256,7 @@ public function getModelName() const EMPLOYEE_SELECTION_STRATEGY_TIMESHEET_LOCATIONS = 'TimesheetLocations'; const EMPLOYEE_SELECTION_STRATEGY_PAY_RUN_DEFAULT_WITH_TIMESHEETS = 'PayRunDefaultWithTimesheets'; const EMPLOYEE_SELECTION_STRATEGY_ACTIVE_SUBCONTRACTORS = 'ActiveSubcontractors'; + const EMPLOYEE_SELECTION_STRATEGY_EMPLOYING_ENTITY = 'EmployingEntity'; @@ -286,6 +287,7 @@ public function getEmployeeSelectionStrategyAllowableValues() self::EMPLOYEE_SELECTION_STRATEGY_TIMESHEET_LOCATIONS, self::EMPLOYEE_SELECTION_STRATEGY_PAY_RUN_DEFAULT_WITH_TIMESHEETS, self::EMPLOYEE_SELECTION_STRATEGY_ACTIVE_SUBCONTRACTORS, + self::EMPLOYEE_SELECTION_STRATEGY_EMPLOYING_ENTITY, ]; } diff --git a/src/lib/Model/AuRosterShiftEditModel.php b/src/lib/Model/AuRosterShiftEditModel.php new file mode 100644 index 0000000..4e9af4a --- /dev/null +++ b/src/lib/Model/AuRosterShiftEditModel.php @@ -0,0 +1,721 @@ + 'int', + 'classification_name' => 'string', + 'id' => 'int', + 'qualifications' => '\Swagger\Client\Model\QualificationModel[]', + 'breaks' => '\Swagger\Client\Model\RosterShiftBreakApiModel[]', + 'employee_id' => 'int', + 'employee_name' => 'string', + 'location_id' => 'int', + 'location_name' => 'string', + 'work_type_id' => 'int', + 'work_type_name' => 'string', + 'role' => '\Swagger\Client\Model\RosterShiftRole', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'notes' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'classification_id' => 'int32', + 'classification_name' => null, + 'id' => 'int32', + 'qualifications' => null, + 'breaks' => null, + 'employee_id' => 'int32', + 'employee_name' => null, + 'location_id' => 'int32', + 'location_name' => null, + 'work_type_id' => 'int32', + 'work_type_name' => null, + 'role' => null, + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'notes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'classification_id' => 'classificationId', + 'classification_name' => 'classificationName', + 'id' => 'id', + 'qualifications' => 'qualifications', + 'breaks' => 'breaks', + 'employee_id' => 'employeeId', + 'employee_name' => 'employeeName', + 'location_id' => 'locationId', + 'location_name' => 'locationName', + 'work_type_id' => 'workTypeId', + 'work_type_name' => 'workTypeName', + 'role' => 'role', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'notes' => 'notes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'classification_id' => 'setClassificationId', + 'classification_name' => 'setClassificationName', + 'id' => 'setId', + 'qualifications' => 'setQualifications', + 'breaks' => 'setBreaks', + 'employee_id' => 'setEmployeeId', + 'employee_name' => 'setEmployeeName', + 'location_id' => 'setLocationId', + 'location_name' => 'setLocationName', + 'work_type_id' => 'setWorkTypeId', + 'work_type_name' => 'setWorkTypeName', + 'role' => 'setRole', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'notes' => 'setNotes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'classification_id' => 'getClassificationId', + 'classification_name' => 'getClassificationName', + 'id' => 'getId', + 'qualifications' => 'getQualifications', + 'breaks' => 'getBreaks', + 'employee_id' => 'getEmployeeId', + 'employee_name' => 'getEmployeeName', + 'location_id' => 'getLocationId', + 'location_name' => 'getLocationName', + 'work_type_id' => 'getWorkTypeId', + 'work_type_name' => 'getWorkTypeName', + 'role' => 'getRole', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'notes' => 'getNotes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['classification_id'] = isset($data['classification_id']) ? $data['classification_id'] : null; + $this->container['classification_name'] = isset($data['classification_name']) ? $data['classification_name'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['qualifications'] = isset($data['qualifications']) ? $data['qualifications'] : null; + $this->container['breaks'] = isset($data['breaks']) ? $data['breaks'] : null; + $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; + $this->container['employee_name'] = isset($data['employee_name']) ? $data['employee_name'] : null; + $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; + $this->container['location_name'] = isset($data['location_name']) ? $data['location_name'] : null; + $this->container['work_type_id'] = isset($data['work_type_id']) ? $data['work_type_id'] : null; + $this->container['work_type_name'] = isset($data['work_type_name']) ? $data['work_type_name'] : null; + $this->container['role'] = isset($data['role']) ? $data['role'] : null; + $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets classification_id + * + * @return int + */ + public function getClassificationId() + { + return $this->container['classification_id']; + } + + /** + * Sets classification_id + * + * @param int $classification_id + * + * @return $this + */ + public function setClassificationId($classification_id) + { + $this->container['classification_id'] = $classification_id; + + return $this; + } + + /** + * Gets classification_name + * + * @return string + */ + public function getClassificationName() + { + return $this->container['classification_name']; + } + + /** + * Sets classification_name + * + * @param string $classification_name + * + * @return $this + */ + public function setClassificationName($classification_name) + { + $this->container['classification_name'] = $classification_name; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets qualifications + * + * @return \Swagger\Client\Model\QualificationModel[] + */ + public function getQualifications() + { + return $this->container['qualifications']; + } + + /** + * Sets qualifications + * + * @param \Swagger\Client\Model\QualificationModel[] $qualifications + * + * @return $this + */ + public function setQualifications($qualifications) + { + $this->container['qualifications'] = $qualifications; + + return $this; + } + + /** + * Gets breaks + * + * @return \Swagger\Client\Model\RosterShiftBreakApiModel[] + */ + public function getBreaks() + { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \Swagger\Client\Model\RosterShiftBreakApiModel[] $breaks + * + * @return $this + */ + public function setBreaks($breaks) + { + $this->container['breaks'] = $breaks; + + return $this; + } + + /** + * Gets employee_id + * + * @return int + */ + public function getEmployeeId() + { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int $employee_id + * + * @return $this + */ + public function setEmployeeId($employee_id) + { + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets employee_name + * + * @return string + */ + public function getEmployeeName() + { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string $employee_name + * + * @return $this + */ + public function setEmployeeName($employee_name) + { + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets location_id + * + * @return int + */ + public function getLocationId() + { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int $location_id + * + * @return $this + */ + public function setLocationId($location_id) + { + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets location_name + * + * @return string + */ + public function getLocationName() + { + return $this->container['location_name']; + } + + /** + * Sets location_name + * + * @param string $location_name + * + * @return $this + */ + public function setLocationName($location_name) + { + $this->container['location_name'] = $location_name; + + return $this; + } + + /** + * Gets work_type_id + * + * @return int + */ + public function getWorkTypeId() + { + return $this->container['work_type_id']; + } + + /** + * Sets work_type_id + * + * @param int $work_type_id + * + * @return $this + */ + public function setWorkTypeId($work_type_id) + { + $this->container['work_type_id'] = $work_type_id; + + return $this; + } + + /** + * Gets work_type_name + * + * @return string + */ + public function getWorkTypeName() + { + return $this->container['work_type_name']; + } + + /** + * Sets work_type_name + * + * @param string $work_type_name + * + * @return $this + */ + public function setWorkTypeName($work_type_name) + { + $this->container['work_type_name'] = $work_type_name; + + return $this; + } + + /** + * Gets role + * + * @return \Swagger\Client\Model\RosterShiftRole + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param \Swagger\Client\Model\RosterShiftRole $role + * + * @return $this + */ + public function setRole($role) + { + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime $start_time + * + * @return $this + */ + public function setStartTime($start_time) + { + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime $end_time + * + * @return $this + */ + public function setEndTime($end_time) + { + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets notes + * + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param string $notes + * + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/AuRosterShiftGenerateTimesheetModel.php b/src/lib/Model/AuRosterShiftGenerateTimesheetModel.php index 2cc2706..2eeee85 100644 --- a/src/lib/Model/AuRosterShiftGenerateTimesheetModel.php +++ b/src/lib/Model/AuRosterShiftGenerateTimesheetModel.php @@ -82,7 +82,8 @@ class AuRosterShiftGenerateTimesheetModel implements ModelInterface, ArrayAccess 'pending_swap' => '\Swagger\Client\Model\RosterShiftSwapModel', 'date_published' => '\DateTime', 'biddable' => 'bool', - 'shift_swap_cutoff_time' => '\DateTime' + 'shift_swap_cutoff_time' => '\DateTime', + 'shift_assignment_status' => 'string' ]; /** @@ -116,7 +117,8 @@ class AuRosterShiftGenerateTimesheetModel implements ModelInterface, ArrayAccess 'pending_swap' => null, 'date_published' => 'date-time', 'biddable' => null, - 'shift_swap_cutoff_time' => 'date-time' + 'shift_swap_cutoff_time' => 'date-time', + 'shift_assignment_status' => null ]; /** @@ -171,7 +173,8 @@ public static function swaggerFormats() 'pending_swap' => 'pendingSwap', 'date_published' => 'datePublished', 'biddable' => 'biddable', - 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime', + 'shift_assignment_status' => 'shiftAssignmentStatus' ]; /** @@ -205,7 +208,8 @@ public static function swaggerFormats() 'pending_swap' => 'setPendingSwap', 'date_published' => 'setDatePublished', 'biddable' => 'setBiddable', - 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime', + 'shift_assignment_status' => 'setShiftAssignmentStatus' ]; /** @@ -239,7 +243,8 @@ public static function swaggerFormats() 'pending_swap' => 'getPendingSwap', 'date_published' => 'getDatePublished', 'biddable' => 'getBiddable', - 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime', + 'shift_assignment_status' => 'getShiftAssignmentStatus' ]; /** @@ -283,9 +288,34 @@ public function getModelName() return self::$swaggerModelName; } + const SHIFT_ASSIGNMENT_STATUS_PENDING = 'Pending'; + const SHIFT_ASSIGNMENT_STATUS_ASSIGNED = 'Assigned'; + const SHIFT_ASSIGNMENT_STATUS_BIDDING = 'Bidding'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP = 'PendingShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL = 'PendingShiftSwapAwaitingApproval'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP = 'ProposedShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL = 'ProposedShiftSwapAwaitingApproval'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShiftAssignmentStatusAllowableValues() + { + return [ + self::SHIFT_ASSIGNMENT_STATUS_PENDING, + self::SHIFT_ASSIGNMENT_STATUS_ASSIGNED, + self::SHIFT_ASSIGNMENT_STATUS_BIDDING, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL, + ]; + } + /** * Associative array for storing property values @@ -328,6 +358,7 @@ public function __construct(array $data = null) $this->container['date_published'] = isset($data['date_published']) ? $data['date_published'] : null; $this->container['biddable'] = isset($data['biddable']) ? $data['biddable'] : null; $this->container['shift_swap_cutoff_time'] = isset($data['shift_swap_cutoff_time']) ? $data['shift_swap_cutoff_time'] : null; + $this->container['shift_assignment_status'] = isset($data['shift_assignment_status']) ? $data['shift_assignment_status'] : null; } /** @@ -339,6 +370,14 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($this->container['shift_assignment_status']) && !in_array($this->container['shift_assignment_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -977,6 +1016,39 @@ public function setShiftSwapCutoffTime($shift_swap_cutoff_time) return $this; } + + /** + * Gets shift_assignment_status + * + * @return string + */ + public function getShiftAssignmentStatus() + { + return $this->container['shift_assignment_status']; + } + + /** + * Sets shift_assignment_status + * + * @param string $shift_assignment_status + * + * @return $this + */ + public function setShiftAssignmentStatus($shift_assignment_status) + { + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($shift_assignment_status) && !in_array($shift_assignment_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['shift_assignment_status'] = $shift_assignment_status; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuRosterTimesheetComparisonReportRequestModel.php b/src/lib/Model/AuRosterTimesheetComparisonReportRequestModel.php index 3fefa73..2d01f99 100644 --- a/src/lib/Model/AuRosterTimesheetComparisonReportRequestModel.php +++ b/src/lib/Model/AuRosterTimesheetComparisonReportRequestModel.php @@ -66,6 +66,7 @@ class AuRosterTimesheetComparisonReportRequestModel implements ModelInterface, A 'timesheet_location_id' => 'int', 'roster_statuses' => 'string[]', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -87,6 +88,7 @@ class AuRosterTimesheetComparisonReportRequestModel implements ModelInterface, A 'timesheet_location_id' => 'int32', 'roster_statuses' => null, 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -129,6 +131,7 @@ public static function swaggerFormats() 'timesheet_location_id' => 'timesheetLocationId', 'roster_statuses' => 'rosterStatuses', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -150,6 +153,7 @@ public static function swaggerFormats() 'timesheet_location_id' => 'setTimesheetLocationId', 'roster_statuses' => 'setRosterStatuses', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -171,6 +175,7 @@ public static function swaggerFormats() 'timesheet_location_id' => 'getTimesheetLocationId', 'roster_statuses' => 'getRosterStatuses', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -286,6 +291,7 @@ public function __construct(array $data = null) $this->container['timesheet_location_id'] = isset($data['timesheet_location_id']) ? $data['timesheet_location_id'] : null; $this->container['roster_statuses'] = isset($data['roster_statuses']) ? $data['roster_statuses'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -550,6 +556,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/AuSubmitTimesheetsRequest.php b/src/lib/Model/AuSubmitTimesheetsRequest.php index 178ee0b..7553159 100644 --- a/src/lib/Model/AuSubmitTimesheetsRequest.php +++ b/src/lib/Model/AuSubmitTimesheetsRequest.php @@ -64,6 +64,7 @@ class AuSubmitTimesheetsRequest implements ModelInterface, ArrayAccess 'employee_id_type' => 'string', 'location_id_type' => 'string', 'work_type_id_type' => 'string', + 'return_response' => 'bool', 'timesheets' => 'map[string,\Swagger\Client\Model\AuTimesheetLineModel[]]' ]; @@ -80,6 +81,7 @@ class AuSubmitTimesheetsRequest implements ModelInterface, ArrayAccess 'employee_id_type' => null, 'location_id_type' => null, 'work_type_id_type' => null, + 'return_response' => null, 'timesheets' => null ]; @@ -117,6 +119,7 @@ public static function swaggerFormats() 'employee_id_type' => 'employeeIdType', 'location_id_type' => 'locationIdType', 'work_type_id_type' => 'workTypeIdType', + 'return_response' => 'returnResponse', 'timesheets' => 'timesheets' ]; @@ -133,6 +136,7 @@ public static function swaggerFormats() 'employee_id_type' => 'setEmployeeIdType', 'location_id_type' => 'setLocationIdType', 'work_type_id_type' => 'setWorkTypeIdType', + 'return_response' => 'setReturnResponse', 'timesheets' => 'setTimesheets' ]; @@ -149,6 +153,7 @@ public static function swaggerFormats() 'employee_id_type' => 'getEmployeeIdType', 'location_id_type' => 'getLocationIdType', 'work_type_id_type' => 'getWorkTypeIdType', + 'return_response' => 'getReturnResponse', 'timesheets' => 'getTimesheets' ]; @@ -264,6 +269,7 @@ public function __construct(array $data = null) $this->container['employee_id_type'] = isset($data['employee_id_type']) ? $data['employee_id_type'] : null; $this->container['location_id_type'] = isset($data['location_id_type']) ? $data['location_id_type'] : null; $this->container['work_type_id_type'] = isset($data['work_type_id_type']) ? $data['work_type_id_type'] : null; + $this->container['return_response'] = isset($data['return_response']) ? $data['return_response'] : null; $this->container['timesheets'] = isset($data['timesheets']) ? $data['timesheets'] : null; } @@ -510,6 +516,30 @@ public function setWorkTypeIdType($work_type_id_type) return $this; } + /** + * Gets return_response + * + * @return bool + */ + public function getReturnResponse() + { + return $this->container['return_response']; + } + + /** + * Sets return_response + * + * @param bool $return_response + * + * @return $this + */ + public function setReturnResponse($return_response) + { + $this->container['return_response'] = $return_response; + + return $this; + } + /** * Gets timesheets * diff --git a/src/lib/Model/AuSubmitTimesheetsResponse.php b/src/lib/Model/AuSubmitTimesheetsResponse.php new file mode 100644 index 0000000..8fe51b6 --- /dev/null +++ b/src/lib/Model/AuSubmitTimesheetsResponse.php @@ -0,0 +1,301 @@ + 'map[string,\Swagger\Client\Model\AuIndividualTimesheetLineModel[]]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'timesheets' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'timesheets' => 'timesheets' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'timesheets' => 'setTimesheets' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'timesheets' => 'getTimesheets' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['timesheets'] = isset($data['timesheets']) ? $data['timesheets'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets timesheets + * + * @return map[string,\Swagger\Client\Model\AuIndividualTimesheetLineModel[]] + */ + public function getTimesheets() + { + return $this->container['timesheets']; + } + + /** + * Sets timesheets + * + * @param map[string,\Swagger\Client\Model\AuIndividualTimesheetLineModel[]] $timesheets + * + * @return $this + */ + public function setTimesheets($timesheets) + { + $this->container['timesheets'] = $timesheets; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/AuTimesheetLineModel.php b/src/lib/Model/AuTimesheetLineModel.php index f70c275..736f514 100644 --- a/src/lib/Model/AuTimesheetLineModel.php +++ b/src/lib/Model/AuTimesheetLineModel.php @@ -59,6 +59,7 @@ class AuTimesheetLineModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'classification_id' => 'string', 'classification' => 'string', + 'location_is_deleted' => 'bool', 'id' => 'int', 'employee_id' => 'int', 'start_time' => '\DateTime', @@ -92,6 +93,7 @@ class AuTimesheetLineModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'classification_id' => null, 'classification' => null, + 'location_is_deleted' => null, 'id' => 'int32', 'employee_id' => 'int32', 'start_time' => 'date-time', @@ -146,6 +148,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'classification_id' => 'classificationId', 'classification' => 'classification', + 'location_is_deleted' => 'locationIsDeleted', 'id' => 'id', 'employee_id' => 'employeeId', 'start_time' => 'startTime', @@ -179,6 +182,7 @@ public static function swaggerFormats() protected static $setters = [ 'classification_id' => 'setClassificationId', 'classification' => 'setClassification', + 'location_is_deleted' => 'setLocationIsDeleted', 'id' => 'setId', 'employee_id' => 'setEmployeeId', 'start_time' => 'setStartTime', @@ -212,6 +216,7 @@ public static function swaggerFormats() protected static $getters = [ 'classification_id' => 'getClassificationId', 'classification' => 'getClassification', + 'location_is_deleted' => 'getLocationIsDeleted', 'id' => 'getId', 'employee_id' => 'getEmployeeId', 'start_time' => 'getStartTime', @@ -348,6 +353,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -429,6 +439,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -450,6 +465,7 @@ public function __construct(array $data = null) { $this->container['classification_id'] = isset($data['classification_id']) ? $data['classification_id'] : null; $this->container['classification'] = isset($data['classification']) ? $data['classification'] : null; + $this->container['location_is_deleted'] = isset($data['location_is_deleted']) ? $data['location_is_deleted'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; @@ -555,6 +571,30 @@ public function setClassification($classification) return $this; } + /** + * Gets location_is_deleted + * + * @return bool + */ + public function getLocationIsDeleted() + { + return $this->container['location_is_deleted']; + } + + /** + * Sets location_is_deleted + * + * @param bool $location_is_deleted + * + * @return $this + */ + public function setLocationIsDeleted($location_is_deleted) + { + $this->container['location_is_deleted'] = $location_is_deleted; + + return $this; + } + /** * Gets id * diff --git a/src/lib/Model/AuUnstructuredEmployeeModel.php b/src/lib/Model/AuUnstructuredEmployeeModel.php index 601eece..f4a343b 100644 --- a/src/lib/Model/AuUnstructuredEmployeeModel.php +++ b/src/lib/Model/AuUnstructuredEmployeeModel.php @@ -73,11 +73,13 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'is_exempt_from_flood_levy' => 'bool', 'has_approved_working_holiday_visa' => 'bool', 'working_holiday_visa_country' => 'string', + 'working_holiday_visa_start_date' => '\DateTime', 'is_seasonal_worker' => 'bool', 'has_withholding_variation' => 'bool', 'tax_variation' => 'double', 'date_tax_file_declaration_signed' => '\DateTime', 'date_tax_file_declaration_reported' => '\DateTime', + 'business_award_package' => 'string', 'employment_agreement' => 'string', 'is_exempt_from_payroll_tax' => 'bool', 'bank_account1_bsb' => 'string', @@ -111,6 +113,7 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'postal_address_is_overseas' => 'bool', 'residential_address_is_overseas' => 'bool', 'employment_type' => 'string', + 'contractor_abn' => 'string', 'termination_reason' => 'string', 'tax_category' => 'string', 'medicare_levy_surcharge_withholding_tier' => 'string', @@ -184,7 +187,8 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'leave_accrual_start_date_type' => 'string', 'leave_year_start' => '\DateTime', 'status' => 'string', - 'date_created' => '\DateTime' + 'date_created' => '\DateTime', + 'reporting_dimension_values' => 'string' ]; /** @@ -209,11 +213,13 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'is_exempt_from_flood_levy' => null, 'has_approved_working_holiday_visa' => null, 'working_holiday_visa_country' => null, + 'working_holiday_visa_start_date' => 'date-time', 'is_seasonal_worker' => null, 'has_withholding_variation' => null, 'tax_variation' => 'double', 'date_tax_file_declaration_signed' => 'date-time', 'date_tax_file_declaration_reported' => 'date-time', + 'business_award_package' => null, 'employment_agreement' => null, 'is_exempt_from_payroll_tax' => null, 'bank_account1_bsb' => null, @@ -247,6 +253,7 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'postal_address_is_overseas' => null, 'residential_address_is_overseas' => null, 'employment_type' => null, + 'contractor_abn' => null, 'termination_reason' => null, 'tax_category' => null, 'medicare_levy_surcharge_withholding_tier' => null, @@ -320,7 +327,8 @@ class AuUnstructuredEmployeeModel implements ModelInterface, ArrayAccess 'leave_accrual_start_date_type' => null, 'leave_year_start' => 'date-time', 'status' => null, - 'date_created' => 'date-time' + 'date_created' => 'date-time', + 'reporting_dimension_values' => null ]; /** @@ -366,11 +374,13 @@ public static function swaggerFormats() 'is_exempt_from_flood_levy' => 'isExemptFromFloodLevy', 'has_approved_working_holiday_visa' => 'hasApprovedWorkingHolidayVisa', 'working_holiday_visa_country' => 'workingHolidayVisaCountry', + 'working_holiday_visa_start_date' => 'workingHolidayVisaStartDate', 'is_seasonal_worker' => 'isSeasonalWorker', 'has_withholding_variation' => 'hasWithholdingVariation', 'tax_variation' => 'taxVariation', 'date_tax_file_declaration_signed' => 'dateTaxFileDeclarationSigned', 'date_tax_file_declaration_reported' => 'dateTaxFileDeclarationReported', + 'business_award_package' => 'businessAwardPackage', 'employment_agreement' => 'employmentAgreement', 'is_exempt_from_payroll_tax' => 'isExemptFromPayrollTax', 'bank_account1_bsb' => 'bankAccount1_BSB', @@ -404,6 +414,7 @@ public static function swaggerFormats() 'postal_address_is_overseas' => 'postalAddressIsOverseas', 'residential_address_is_overseas' => 'residentialAddressIsOverseas', 'employment_type' => 'employmentType', + 'contractor_abn' => 'contractorABN', 'termination_reason' => 'terminationReason', 'tax_category' => 'taxCategory', 'medicare_levy_surcharge_withholding_tier' => 'medicareLevySurchargeWithholdingTier', @@ -477,7 +488,8 @@ public static function swaggerFormats() 'leave_accrual_start_date_type' => 'leaveAccrualStartDateType', 'leave_year_start' => 'leaveYearStart', 'status' => 'status', - 'date_created' => 'dateCreated' + 'date_created' => 'dateCreated', + 'reporting_dimension_values' => 'reportingDimensionValues' ]; /** @@ -502,11 +514,13 @@ public static function swaggerFormats() 'is_exempt_from_flood_levy' => 'setIsExemptFromFloodLevy', 'has_approved_working_holiday_visa' => 'setHasApprovedWorkingHolidayVisa', 'working_holiday_visa_country' => 'setWorkingHolidayVisaCountry', + 'working_holiday_visa_start_date' => 'setWorkingHolidayVisaStartDate', 'is_seasonal_worker' => 'setIsSeasonalWorker', 'has_withholding_variation' => 'setHasWithholdingVariation', 'tax_variation' => 'setTaxVariation', 'date_tax_file_declaration_signed' => 'setDateTaxFileDeclarationSigned', 'date_tax_file_declaration_reported' => 'setDateTaxFileDeclarationReported', + 'business_award_package' => 'setBusinessAwardPackage', 'employment_agreement' => 'setEmploymentAgreement', 'is_exempt_from_payroll_tax' => 'setIsExemptFromPayrollTax', 'bank_account1_bsb' => 'setBankAccount1Bsb', @@ -540,6 +554,7 @@ public static function swaggerFormats() 'postal_address_is_overseas' => 'setPostalAddressIsOverseas', 'residential_address_is_overseas' => 'setResidentialAddressIsOverseas', 'employment_type' => 'setEmploymentType', + 'contractor_abn' => 'setContractorAbn', 'termination_reason' => 'setTerminationReason', 'tax_category' => 'setTaxCategory', 'medicare_levy_surcharge_withholding_tier' => 'setMedicareLevySurchargeWithholdingTier', @@ -613,7 +628,8 @@ public static function swaggerFormats() 'leave_accrual_start_date_type' => 'setLeaveAccrualStartDateType', 'leave_year_start' => 'setLeaveYearStart', 'status' => 'setStatus', - 'date_created' => 'setDateCreated' + 'date_created' => 'setDateCreated', + 'reporting_dimension_values' => 'setReportingDimensionValues' ]; /** @@ -638,11 +654,13 @@ public static function swaggerFormats() 'is_exempt_from_flood_levy' => 'getIsExemptFromFloodLevy', 'has_approved_working_holiday_visa' => 'getHasApprovedWorkingHolidayVisa', 'working_holiday_visa_country' => 'getWorkingHolidayVisaCountry', + 'working_holiday_visa_start_date' => 'getWorkingHolidayVisaStartDate', 'is_seasonal_worker' => 'getIsSeasonalWorker', 'has_withholding_variation' => 'getHasWithholdingVariation', 'tax_variation' => 'getTaxVariation', 'date_tax_file_declaration_signed' => 'getDateTaxFileDeclarationSigned', 'date_tax_file_declaration_reported' => 'getDateTaxFileDeclarationReported', + 'business_award_package' => 'getBusinessAwardPackage', 'employment_agreement' => 'getEmploymentAgreement', 'is_exempt_from_payroll_tax' => 'getIsExemptFromPayrollTax', 'bank_account1_bsb' => 'getBankAccount1Bsb', @@ -676,6 +694,7 @@ public static function swaggerFormats() 'postal_address_is_overseas' => 'getPostalAddressIsOverseas', 'residential_address_is_overseas' => 'getResidentialAddressIsOverseas', 'employment_type' => 'getEmploymentType', + 'contractor_abn' => 'getContractorAbn', 'termination_reason' => 'getTerminationReason', 'tax_category' => 'getTaxCategory', 'medicare_levy_surcharge_withholding_tier' => 'getMedicareLevySurchargeWithholdingTier', @@ -749,7 +768,8 @@ public static function swaggerFormats() 'leave_accrual_start_date_type' => 'getLeaveAccrualStartDateType', 'leave_year_start' => 'getLeaveYearStart', 'status' => 'getStatus', - 'date_created' => 'getDateCreated' + 'date_created' => 'getDateCreated', + 'reporting_dimension_values' => 'getReportingDimensionValues' ]; /** @@ -819,6 +839,8 @@ public function getModelName() const LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE = 'EmployeeStartDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE = 'SpecifiedDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR = 'CalendarYear'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH = 'RollingYear12Month'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH = 'RollingYear24Month'; const STATUS_ACTIVE = 'Active'; const STATUS_TERMINATED = 'Terminated'; const STATUS_INCOMPLETE = 'Incomplete'; @@ -903,6 +925,8 @@ public function getLeaveAccrualStartDateTypeAllowableValues() self::LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH, ]; } @@ -952,11 +976,13 @@ public function __construct(array $data = null) $this->container['is_exempt_from_flood_levy'] = isset($data['is_exempt_from_flood_levy']) ? $data['is_exempt_from_flood_levy'] : null; $this->container['has_approved_working_holiday_visa'] = isset($data['has_approved_working_holiday_visa']) ? $data['has_approved_working_holiday_visa'] : null; $this->container['working_holiday_visa_country'] = isset($data['working_holiday_visa_country']) ? $data['working_holiday_visa_country'] : null; + $this->container['working_holiday_visa_start_date'] = isset($data['working_holiday_visa_start_date']) ? $data['working_holiday_visa_start_date'] : null; $this->container['is_seasonal_worker'] = isset($data['is_seasonal_worker']) ? $data['is_seasonal_worker'] : null; $this->container['has_withholding_variation'] = isset($data['has_withholding_variation']) ? $data['has_withholding_variation'] : null; $this->container['tax_variation'] = isset($data['tax_variation']) ? $data['tax_variation'] : null; $this->container['date_tax_file_declaration_signed'] = isset($data['date_tax_file_declaration_signed']) ? $data['date_tax_file_declaration_signed'] : null; $this->container['date_tax_file_declaration_reported'] = isset($data['date_tax_file_declaration_reported']) ? $data['date_tax_file_declaration_reported'] : null; + $this->container['business_award_package'] = isset($data['business_award_package']) ? $data['business_award_package'] : null; $this->container['employment_agreement'] = isset($data['employment_agreement']) ? $data['employment_agreement'] : null; $this->container['is_exempt_from_payroll_tax'] = isset($data['is_exempt_from_payroll_tax']) ? $data['is_exempt_from_payroll_tax'] : null; $this->container['bank_account1_bsb'] = isset($data['bank_account1_bsb']) ? $data['bank_account1_bsb'] : null; @@ -990,6 +1016,7 @@ public function __construct(array $data = null) $this->container['postal_address_is_overseas'] = isset($data['postal_address_is_overseas']) ? $data['postal_address_is_overseas'] : null; $this->container['residential_address_is_overseas'] = isset($data['residential_address_is_overseas']) ? $data['residential_address_is_overseas'] : null; $this->container['employment_type'] = isset($data['employment_type']) ? $data['employment_type'] : null; + $this->container['contractor_abn'] = isset($data['contractor_abn']) ? $data['contractor_abn'] : null; $this->container['termination_reason'] = isset($data['termination_reason']) ? $data['termination_reason'] : null; $this->container['tax_category'] = isset($data['tax_category']) ? $data['tax_category'] : null; $this->container['medicare_levy_surcharge_withholding_tier'] = isset($data['medicare_levy_surcharge_withholding_tier']) ? $data['medicare_levy_surcharge_withholding_tier'] : null; @@ -1064,6 +1091,7 @@ public function __construct(array $data = null) $this->container['leave_year_start'] = isset($data['leave_year_start']) ? $data['leave_year_start'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['date_created'] = isset($data['date_created']) ? $data['date_created'] : null; + $this->container['reporting_dimension_values'] = isset($data['reporting_dimension_values']) ? $data['reporting_dimension_values'] : null; } /** @@ -1602,6 +1630,30 @@ public function setWorkingHolidayVisaCountry($working_holiday_visa_country) return $this; } + /** + * Gets working_holiday_visa_start_date + * + * @return \DateTime + */ + public function getWorkingHolidayVisaStartDate() + { + return $this->container['working_holiday_visa_start_date']; + } + + /** + * Sets working_holiday_visa_start_date + * + * @param \DateTime $working_holiday_visa_start_date + * + * @return $this + */ + public function setWorkingHolidayVisaStartDate($working_holiday_visa_start_date) + { + $this->container['working_holiday_visa_start_date'] = $working_holiday_visa_start_date; + + return $this; + } + /** * Gets is_seasonal_worker * @@ -1722,6 +1774,30 @@ public function setDateTaxFileDeclarationReported($date_tax_file_declaration_rep return $this; } + /** + * Gets business_award_package + * + * @return string + */ + public function getBusinessAwardPackage() + { + return $this->container['business_award_package']; + } + + /** + * Sets business_award_package + * + * @param string $business_award_package + * + * @return $this + */ + public function setBusinessAwardPackage($business_award_package) + { + $this->container['business_award_package'] = $business_award_package; + + return $this; + } + /** * Gets employment_agreement * @@ -2532,6 +2608,30 @@ public function setEmploymentType($employment_type) return $this; } + /** + * Gets contractor_abn + * + * @return string + */ + public function getContractorAbn() + { + return $this->container['contractor_abn']; + } + + /** + * Sets contractor_abn + * + * @param string $contractor_abn + * + * @return $this + */ + public function setContractorAbn($contractor_abn) + { + $this->container['contractor_abn'] = $contractor_abn; + + return $this; + } + /** * Gets termination_reason * @@ -4413,6 +4513,30 @@ public function setDateCreated($date_created) return $this; } + + /** + * Gets reporting_dimension_values + * + * @return string + */ + public function getReportingDimensionValues() + { + return $this->container['reporting_dimension_values']; + } + + /** + * Sets reporting_dimension_values + * + * @param string $reporting_dimension_values + * + * @return $this + */ + public function setReportingDimensionValues($reporting_dimension_values) + { + $this->container['reporting_dimension_values'] = $reporting_dimension_values; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/AuUserAccountPartnerMetadata.php b/src/lib/Model/AuUserAccountPartnerMetadata.php new file mode 100644 index 0000000..6d61af6 --- /dev/null +++ b/src/lib/Model/AuUserAccountPartnerMetadata.php @@ -0,0 +1,361 @@ + 'int', + 'email' => 'string', + 'partner_ids' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'email' => null, + 'partner_ids' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'email' => 'email', + 'partner_ids' => 'partnerIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'email' => 'setEmail', + 'partner_ids' => 'setPartnerIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'email' => 'getEmail', + 'partner_ids' => 'getPartnerIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; + $this->container['partner_ids'] = isset($data['partner_ids']) ? $data['partner_ids'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets partner_ids + * + * @return int[] + */ + public function getPartnerIds() + { + return $this->container['partner_ids']; + } + + /** + * Sets partner_ids + * + * @param int[] $partner_ids + * + * @return $this + */ + public function setPartnerIds($partner_ids) + { + $this->container['partner_ids'] = $partner_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/BankAccountEditModel.php b/src/lib/Model/BankAccountEditModel.php index 0a70cc5..0468742 100644 --- a/src/lib/Model/BankAccountEditModel.php +++ b/src/lib/Model/BankAccountEditModel.php @@ -308,6 +308,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; const ACCOUNT_TYPE_ELECTRONIC = 'Electronic'; const ACCOUNT_TYPE_MANUAL_DEPOSIT = 'ManualDeposit'; const ACCOUNT_TYPE_CASH_OR_CHEQUE = 'CashOrCheque'; @@ -393,6 +398,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/BasicEmploymentAgreementModel.php b/src/lib/Model/BasicEmploymentAgreementModel.php index f051e85..6f1b977 100644 --- a/src/lib/Model/BasicEmploymentAgreementModel.php +++ b/src/lib/Model/BasicEmploymentAgreementModel.php @@ -62,7 +62,8 @@ class BasicEmploymentAgreementModel implements ModelInterface, ArrayAccess 'employment_type' => 'string', 'name' => 'string', 'award_name' => 'string', - 'rank' => 'int' + 'rank' => 'int', + 'external_id' => 'string' ]; /** @@ -76,7 +77,8 @@ class BasicEmploymentAgreementModel implements ModelInterface, ArrayAccess 'employment_type' => null, 'name' => null, 'award_name' => null, - 'rank' => 'int32' + 'rank' => 'int32', + 'external_id' => null ]; /** @@ -111,7 +113,8 @@ public static function swaggerFormats() 'employment_type' => 'employmentType', 'name' => 'name', 'award_name' => 'awardName', - 'rank' => 'rank' + 'rank' => 'rank', + 'external_id' => 'externalId' ]; /** @@ -125,7 +128,8 @@ public static function swaggerFormats() 'employment_type' => 'setEmploymentType', 'name' => 'setName', 'award_name' => 'setAwardName', - 'rank' => 'setRank' + 'rank' => 'setRank', + 'external_id' => 'setExternalId' ]; /** @@ -139,7 +143,8 @@ public static function swaggerFormats() 'employment_type' => 'getEmploymentType', 'name' => 'getName', 'award_name' => 'getAwardName', - 'rank' => 'getRank' + 'rank' => 'getRank', + 'external_id' => 'getExternalId' ]; /** @@ -231,6 +236,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['award_name'] = isset($data['award_name']) ? $data['award_name'] : null; $this->container['rank'] = isset($data['rank']) ? $data['rank'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; } /** @@ -417,6 +423,30 @@ public function setRank($rank) return $this; } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/BulkApplyLeaveRequestModel.php b/src/lib/Model/BulkApplyLeaveRequestModel.php index d9900bf..806185b 100644 --- a/src/lib/Model/BulkApplyLeaveRequestModel.php +++ b/src/lib/Model/BulkApplyLeaveRequestModel.php @@ -57,7 +57,8 @@ class BulkApplyLeaveRequestModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ - 'leave_request_ids' => 'int[]' + 'leave_request_ids' => 'int[]', + 'align_to_pay_run_period' => 'bool' ]; /** @@ -66,7 +67,8 @@ class BulkApplyLeaveRequestModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ - 'leave_request_ids' => 'int32' + 'leave_request_ids' => 'int32', + 'align_to_pay_run_period' => null ]; /** @@ -96,7 +98,8 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ - 'leave_request_ids' => 'leaveRequestIds' + 'leave_request_ids' => 'leaveRequestIds', + 'align_to_pay_run_period' => 'alignToPayRunPeriod' ]; /** @@ -105,7 +108,8 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ - 'leave_request_ids' => 'setLeaveRequestIds' + 'leave_request_ids' => 'setLeaveRequestIds', + 'align_to_pay_run_period' => 'setAlignToPayRunPeriod' ]; /** @@ -114,7 +118,8 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ - 'leave_request_ids' => 'getLeaveRequestIds' + 'leave_request_ids' => 'getLeaveRequestIds', + 'align_to_pay_run_period' => 'getAlignToPayRunPeriod' ]; /** @@ -178,6 +183,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['leave_request_ids'] = isset($data['leave_request_ids']) ? $data['leave_request_ids'] : null; + $this->container['align_to_pay_run_period'] = isset($data['align_to_pay_run_period']) ? $data['align_to_pay_run_period'] : null; } /** @@ -227,6 +233,30 @@ public function setLeaveRequestIds($leave_request_ids) return $this; } + + /** + * Gets align_to_pay_run_period + * + * @return bool + */ + public function getAlignToPayRunPeriod() + { + return $this->container['align_to_pay_run_period']; + } + + /** + * Sets align_to_pay_run_period + * + * @param bool $align_to_pay_run_period + * + * @return $this + */ + public function setAlignToPayRunPeriod($align_to_pay_run_period) + { + $this->container['align_to_pay_run_period'] = $align_to_pay_run_period; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/BusinessTemplateModel.php b/src/lib/Model/BusinessTemplateModel.php new file mode 100644 index 0000000..cc3f685 --- /dev/null +++ b/src/lib/Model/BusinessTemplateModel.php @@ -0,0 +1,331 @@ + 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ClockOffModel.php b/src/lib/Model/ClockOffModel.php index fad6f9b..b805899 100644 --- a/src/lib/Model/ClockOffModel.php +++ b/src/lib/Model/ClockOffModel.php @@ -58,6 +58,7 @@ class ClockOffModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'note' => 'string', + 'is_paid_break' => 'bool', 'employee_id' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -77,6 +78,7 @@ class ClockOffModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'note' => null, + 'is_paid_break' => null, 'employee_id' => 'int32', 'latitude' => 'double', 'longitude' => 'double', @@ -117,6 +119,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'note' => 'note', + 'is_paid_break' => 'isPaidBreak', 'employee_id' => 'employeeId', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -136,6 +139,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'note' => 'setNote', + 'is_paid_break' => 'setIsPaidBreak', 'employee_id' => 'setEmployeeId', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -155,6 +159,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'note' => 'getNote', + 'is_paid_break' => 'getIsPaidBreak', 'employee_id' => 'getEmployeeId', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -243,6 +248,7 @@ public function getNoteVisibilityAllowableValues() public function __construct(array $data = null) { $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; @@ -315,6 +321,30 @@ public function setNote($note) return $this; } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets employee_id * diff --git a/src/lib/Model/CostingReportRequestModel.php b/src/lib/Model/CostingReportRequestModel.php index c81c76f..8544ba1 100644 --- a/src/lib/Model/CostingReportRequestModel.php +++ b/src/lib/Model/CostingReportRequestModel.php @@ -59,6 +59,7 @@ class CostingReportRequestModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'show_zero_pay_categories' => 'bool', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -73,6 +74,7 @@ class CostingReportRequestModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'show_zero_pay_categories' => null, 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -108,6 +110,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'show_zero_pay_categories' => 'showZeroPayCategories', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -122,6 +125,7 @@ public static function swaggerFormats() protected static $setters = [ 'show_zero_pay_categories' => 'setShowZeroPayCategories', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -136,6 +140,7 @@ public static function swaggerFormats() protected static $getters = [ 'show_zero_pay_categories' => 'getShowZeroPayCategories', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -204,6 +209,7 @@ public function __construct(array $data = null) { $this->container['show_zero_pay_categories'] = isset($data['show_zero_pay_categories']) ? $data['show_zero_pay_categories'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -282,6 +288,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/CreateBusinessAccessModel.php b/src/lib/Model/CreateBusinessAccessModel.php index 71b9634..5090dc5 100644 --- a/src/lib/Model/CreateBusinessAccessModel.php +++ b/src/lib/Model/CreateBusinessAccessModel.php @@ -58,6 +58,7 @@ class CreateBusinessAccessModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'suppress_notification_emails' => 'bool', + 'merge_existing_access' => 'bool', 'access_type' => 'string', 'employee_groups' => '\Swagger\Client\Model\EmployeeGroupAccessModel[]', 'location_access' => '\Swagger\Client\Model\LocationAccessModel[]', @@ -74,6 +75,7 @@ class CreateBusinessAccessModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'suppress_notification_emails' => null, + 'merge_existing_access' => null, 'access_type' => null, 'employee_groups' => null, 'location_access' => null, @@ -111,6 +113,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'suppress_notification_emails' => 'suppressNotificationEmails', + 'merge_existing_access' => 'mergeExistingAccess', 'access_type' => 'accessType', 'employee_groups' => 'employeeGroups', 'location_access' => 'locationAccess', @@ -127,6 +130,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'suppress_notification_emails' => 'setSuppressNotificationEmails', + 'merge_existing_access' => 'setMergeExistingAccess', 'access_type' => 'setAccessType', 'employee_groups' => 'setEmployeeGroups', 'location_access' => 'setLocationAccess', @@ -143,6 +147,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'suppress_notification_emails' => 'getSuppressNotificationEmails', + 'merge_existing_access' => 'getMergeExistingAccess', 'access_type' => 'getAccessType', 'employee_groups' => 'getEmployeeGroups', 'location_access' => 'getLocationAccess', @@ -228,6 +233,7 @@ public function getAccessTypeAllowableValues() public function __construct(array $data = null) { $this->container['suppress_notification_emails'] = isset($data['suppress_notification_emails']) ? $data['suppress_notification_emails'] : null; + $this->container['merge_existing_access'] = isset($data['merge_existing_access']) ? $data['merge_existing_access'] : null; $this->container['access_type'] = isset($data['access_type']) ? $data['access_type'] : null; $this->container['employee_groups'] = isset($data['employee_groups']) ? $data['employee_groups'] : null; $this->container['location_access'] = isset($data['location_access']) ? $data['location_access'] : null; @@ -293,6 +299,30 @@ public function setSuppressNotificationEmails($suppress_notification_emails) return $this; } + /** + * Gets merge_existing_access + * + * @return bool + */ + public function getMergeExistingAccess() + { + return $this->container['merge_existing_access']; + } + + /** + * Sets merge_existing_access + * + * @param bool $merge_existing_access + * + * @return $this + */ + public function setMergeExistingAccess($merge_existing_access) + { + $this->container['merge_existing_access'] = $merge_existing_access; + + return $this; + } + /** * Gets access_type * diff --git a/src/lib/Model/DeductionModel.php b/src/lib/Model/DeductionModel.php index a7f7e5f..608b366 100644 --- a/src/lib/Model/DeductionModel.php +++ b/src/lib/Model/DeductionModel.php @@ -63,6 +63,7 @@ class DeductionModel implements ModelInterface, ArrayAccess 'notes' => 'string', 'payment_reference' => 'string', 'note' => 'string', + 'associated_employee_deduction_category_id' => 'int', 'pay_to_bank_account_bsb' => 'string', 'pay_to_bank_account_swift' => 'string', 'pay_to_bank_account_bank_code' => 'string', @@ -92,6 +93,7 @@ class DeductionModel implements ModelInterface, ArrayAccess 'notes' => null, 'payment_reference' => null, 'note' => null, + 'associated_employee_deduction_category_id' => 'int32', 'pay_to_bank_account_bsb' => null, 'pay_to_bank_account_swift' => null, 'pay_to_bank_account_bank_code' => null, @@ -142,6 +144,7 @@ public static function swaggerFormats() 'notes' => 'notes', 'payment_reference' => 'paymentReference', 'note' => 'note', + 'associated_employee_deduction_category_id' => 'associatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'payToBankAccountBSB', 'pay_to_bank_account_swift' => 'payToBankAccountSwift', 'pay_to_bank_account_bank_code' => 'payToBankAccountBankCode', @@ -171,6 +174,7 @@ public static function swaggerFormats() 'notes' => 'setNotes', 'payment_reference' => 'setPaymentReference', 'note' => 'setNote', + 'associated_employee_deduction_category_id' => 'setAssociatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'setPayToBankAccountBsb', 'pay_to_bank_account_swift' => 'setPayToBankAccountSwift', 'pay_to_bank_account_bank_code' => 'setPayToBankAccountBankCode', @@ -200,6 +204,7 @@ public static function swaggerFormats() 'notes' => 'getNotes', 'payment_reference' => 'getPaymentReference', 'note' => 'getNote', + 'associated_employee_deduction_category_id' => 'getAssociatedEmployeeDeductionCategoryId', 'pay_to_bank_account_bsb' => 'getPayToBankAccountBsb', 'pay_to_bank_account_swift' => 'getPayToBankAccountSwift', 'pay_to_bank_account_bank_code' => 'getPayToBankAccountBankCode', @@ -283,6 +288,7 @@ public function __construct(array $data = null) $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; $this->container['payment_reference'] = isset($data['payment_reference']) ? $data['payment_reference'] : null; $this->container['note'] = isset($data['note']) ? $data['note'] : null; + $this->container['associated_employee_deduction_category_id'] = isset($data['associated_employee_deduction_category_id']) ? $data['associated_employee_deduction_category_id'] : null; $this->container['pay_to_bank_account_bsb'] = isset($data['pay_to_bank_account_bsb']) ? $data['pay_to_bank_account_bsb'] : null; $this->container['pay_to_bank_account_swift'] = isset($data['pay_to_bank_account_swift']) ? $data['pay_to_bank_account_swift'] : null; $this->container['pay_to_bank_account_bank_code'] = isset($data['pay_to_bank_account_bank_code']) ? $data['pay_to_bank_account_bank_code'] : null; @@ -468,6 +474,30 @@ public function setNote($note) return $this; } + /** + * Gets associated_employee_deduction_category_id + * + * @return int + */ + public function getAssociatedEmployeeDeductionCategoryId() + { + return $this->container['associated_employee_deduction_category_id']; + } + + /** + * Sets associated_employee_deduction_category_id + * + * @param int $associated_employee_deduction_category_id + * + * @return $this + */ + public function setAssociatedEmployeeDeductionCategoryId($associated_employee_deduction_category_id) + { + $this->container['associated_employee_deduction_category_id'] = $associated_employee_deduction_category_id; + + return $this; + } + /** * Gets pay_to_bank_account_bsb * diff --git a/src/lib/Model/DeductionsReportExportModel.php b/src/lib/Model/DeductionsReportExportModel.php index ae1dd56..e8b3a8d 100644 --- a/src/lib/Model/DeductionsReportExportModel.php +++ b/src/lib/Model/DeductionsReportExportModel.php @@ -64,7 +64,8 @@ class DeductionsReportExportModel implements ModelInterface, ArrayAccess 'surname' => 'string', 'external_id' => 'string', 'location' => 'string', - 'amounts' => '\Swagger\Client\Model\DeductionsReportDeductionAmountModel[]' + 'amounts' => '\Swagger\Client\Model\DeductionsReportDeductionAmountModel[]', + 'note' => 'string' ]; /** @@ -80,7 +81,8 @@ class DeductionsReportExportModel implements ModelInterface, ArrayAccess 'surname' => null, 'external_id' => null, 'location' => null, - 'amounts' => null + 'amounts' => null, + 'note' => null ]; /** @@ -117,7 +119,8 @@ public static function swaggerFormats() 'surname' => 'surname', 'external_id' => 'externalId', 'location' => 'location', - 'amounts' => 'amounts' + 'amounts' => 'amounts', + 'note' => 'note' ]; /** @@ -133,7 +136,8 @@ public static function swaggerFormats() 'surname' => 'setSurname', 'external_id' => 'setExternalId', 'location' => 'setLocation', - 'amounts' => 'setAmounts' + 'amounts' => 'setAmounts', + 'note' => 'setNote' ]; /** @@ -149,7 +153,8 @@ public static function swaggerFormats() 'surname' => 'getSurname', 'external_id' => 'getExternalId', 'location' => 'getLocation', - 'amounts' => 'getAmounts' + 'amounts' => 'getAmounts', + 'note' => 'getNote' ]; /** @@ -220,6 +225,7 @@ public function __construct(array $data = null) $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; $this->container['location'] = isset($data['location']) ? $data['location'] : null; $this->container['amounts'] = isset($data['amounts']) ? $data['amounts'] : null; + $this->container['note'] = isset($data['note']) ? $data['note'] : null; } /** @@ -437,6 +443,30 @@ public function setAmounts($amounts) return $this; } + + /** + * Gets note + * + * @return string + */ + public function getNote() + { + return $this->container['note']; + } + + /** + * Sets note + * + * @param string $note + * + * @return $this + */ + public function setNote($note) + { + $this->container['note'] = $note; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/DeductionsReportRequestModel.php b/src/lib/Model/DeductionsReportRequestModel.php index baa5498..99cf536 100644 --- a/src/lib/Model/DeductionsReportRequestModel.php +++ b/src/lib/Model/DeductionsReportRequestModel.php @@ -61,6 +61,7 @@ class DeductionsReportRequestModel implements ModelInterface, ArrayAccess 'deduction_category_id' => 'int', 'disable_rollup_reporting' => 'bool', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -77,6 +78,7 @@ class DeductionsReportRequestModel implements ModelInterface, ArrayAccess 'deduction_category_id' => 'int32', 'disable_rollup_reporting' => null, 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -114,6 +116,7 @@ public static function swaggerFormats() 'deduction_category_id' => 'deductionCategoryId', 'disable_rollup_reporting' => 'disableRollupReporting', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -130,6 +133,7 @@ public static function swaggerFormats() 'deduction_category_id' => 'setDeductionCategoryId', 'disable_rollup_reporting' => 'setDisableRollupReporting', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -146,6 +150,7 @@ public static function swaggerFormats() 'deduction_category_id' => 'getDeductionCategoryId', 'disable_rollup_reporting' => 'getDisableRollupReporting', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -216,6 +221,7 @@ public function __construct(array $data = null) $this->container['deduction_category_id'] = isset($data['deduction_category_id']) ? $data['deduction_category_id'] : null; $this->container['disable_rollup_reporting'] = isset($data['disable_rollup_reporting']) ? $data['disable_rollup_reporting'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -342,6 +348,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/DimensionEarningsLineSplitApiModel.php b/src/lib/Model/DimensionEarningsLineSplitApiModel.php new file mode 100644 index 0000000..d83fa1d --- /dev/null +++ b/src/lib/Model/DimensionEarningsLineSplitApiModel.php @@ -0,0 +1,391 @@ + 'int', + 'reporting_dimension_values' => '\Swagger\Client\Model\ReducedReportingDimensionValueApiModel[]', + 'allocated_percentage' => 'double', + 'allocate_balance' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'reporting_dimension_values' => null, + 'allocated_percentage' => 'double', + 'allocate_balance' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'reporting_dimension_values' => 'reportingDimensionValues', + 'allocated_percentage' => 'allocatedPercentage', + 'allocate_balance' => 'allocateBalance' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'reporting_dimension_values' => 'setReportingDimensionValues', + 'allocated_percentage' => 'setAllocatedPercentage', + 'allocate_balance' => 'setAllocateBalance' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'reporting_dimension_values' => 'getReportingDimensionValues', + 'allocated_percentage' => 'getAllocatedPercentage', + 'allocate_balance' => 'getAllocateBalance' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['reporting_dimension_values'] = isset($data['reporting_dimension_values']) ? $data['reporting_dimension_values'] : null; + $this->container['allocated_percentage'] = isset($data['allocated_percentage']) ? $data['allocated_percentage'] : null; + $this->container['allocate_balance'] = isset($data['allocate_balance']) ? $data['allocate_balance'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets reporting_dimension_values + * + * @return \Swagger\Client\Model\ReducedReportingDimensionValueApiModel[] + */ + public function getReportingDimensionValues() + { + return $this->container['reporting_dimension_values']; + } + + /** + * Sets reporting_dimension_values + * + * @param \Swagger\Client\Model\ReducedReportingDimensionValueApiModel[] $reporting_dimension_values + * + * @return $this + */ + public function setReportingDimensionValues($reporting_dimension_values) + { + $this->container['reporting_dimension_values'] = $reporting_dimension_values; + + return $this; + } + + /** + * Gets allocated_percentage + * + * @return double + */ + public function getAllocatedPercentage() + { + return $this->container['allocated_percentage']; + } + + /** + * Sets allocated_percentage + * + * @param double $allocated_percentage + * + * @return $this + */ + public function setAllocatedPercentage($allocated_percentage) + { + $this->container['allocated_percentage'] = $allocated_percentage; + + return $this; + } + + /** + * Gets allocate_balance + * + * @return bool + */ + public function getAllocateBalance() + { + return $this->container['allocate_balance']; + } + + /** + * Sets allocate_balance + * + * @param bool $allocate_balance + * + * @return $this + */ + public function setAllocateBalance($allocate_balance) + { + $this->container['allocate_balance'] = $allocate_balance; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/EarningsLineSplitEditModel.php b/src/lib/Model/EarningsLineSplitEditModel.php index a8c84a4..789a22b 100644 --- a/src/lib/Model/EarningsLineSplitEditModel.php +++ b/src/lib/Model/EarningsLineSplitEditModel.php @@ -59,7 +59,8 @@ class EarningsLineSplitEditModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'location_id' => 'int', 'allocated_percentage' => 'double', - 'allocate_balance' => 'bool' + 'allocate_balance' => 'bool', + 'reporting_dimension_value_ids' => 'int[]' ]; /** @@ -70,7 +71,8 @@ class EarningsLineSplitEditModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'location_id' => 'int32', 'allocated_percentage' => 'double', - 'allocate_balance' => null + 'allocate_balance' => null, + 'reporting_dimension_value_ids' => 'int32' ]; /** @@ -102,7 +104,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'location_id' => 'locationId', 'allocated_percentage' => 'allocatedPercentage', - 'allocate_balance' => 'allocateBalance' + 'allocate_balance' => 'allocateBalance', + 'reporting_dimension_value_ids' => 'reportingDimensionValueIds' ]; /** @@ -113,7 +116,8 @@ public static function swaggerFormats() protected static $setters = [ 'location_id' => 'setLocationId', 'allocated_percentage' => 'setAllocatedPercentage', - 'allocate_balance' => 'setAllocateBalance' + 'allocate_balance' => 'setAllocateBalance', + 'reporting_dimension_value_ids' => 'setReportingDimensionValueIds' ]; /** @@ -124,7 +128,8 @@ public static function swaggerFormats() protected static $getters = [ 'location_id' => 'getLocationId', 'allocated_percentage' => 'getAllocatedPercentage', - 'allocate_balance' => 'getAllocateBalance' + 'allocate_balance' => 'getAllocateBalance', + 'reporting_dimension_value_ids' => 'getReportingDimensionValueIds' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; $this->container['allocated_percentage'] = isset($data['allocated_percentage']) ? $data['allocated_percentage'] : null; $this->container['allocate_balance'] = isset($data['allocate_balance']) ? $data['allocate_balance'] : null; + $this->container['reporting_dimension_value_ids'] = isset($data['reporting_dimension_value_ids']) ? $data['reporting_dimension_value_ids'] : null; } /** @@ -287,6 +293,30 @@ public function setAllocateBalance($allocate_balance) return $this; } + + /** + * Gets reporting_dimension_value_ids + * + * @return int[] + */ + public function getReportingDimensionValueIds() + { + return $this->container['reporting_dimension_value_ids']; + } + + /** + * Sets reporting_dimension_value_ids + * + * @param int[] $reporting_dimension_value_ids + * + * @return $this + */ + public function setReportingDimensionValueIds($reporting_dimension_value_ids) + { + $this->container['reporting_dimension_value_ids'] = $reporting_dimension_value_ids; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/EmployeeDetailsAuditReportRequestModel.php b/src/lib/Model/EmployeeDetailsAuditReportRequestModel.php index c51c5fd..5cecb44 100644 --- a/src/lib/Model/EmployeeDetailsAuditReportRequestModel.php +++ b/src/lib/Model/EmployeeDetailsAuditReportRequestModel.php @@ -60,6 +60,7 @@ class EmployeeDetailsAuditReportRequestModel implements ModelInterface, ArrayAcc 'employee_id' => 'int', 'section' => 'string', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -75,6 +76,7 @@ class EmployeeDetailsAuditReportRequestModel implements ModelInterface, ArrayAcc 'employee_id' => 'int32', 'section' => null, 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -111,6 +113,7 @@ public static function swaggerFormats() 'employee_id' => 'employeeId', 'section' => 'section', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -126,6 +129,7 @@ public static function swaggerFormats() 'employee_id' => 'setEmployeeId', 'section' => 'setSection', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -141,6 +145,7 @@ public static function swaggerFormats() 'employee_id' => 'getEmployeeId', 'section' => 'getSection', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -287,6 +292,7 @@ public function __construct(array $data = null) $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['section'] = isset($data['section']) ? $data['section'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -406,6 +412,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/EmployeeExpenseModel.php b/src/lib/Model/EmployeeExpenseModel.php index a32be8e..3eab406 100644 --- a/src/lib/Model/EmployeeExpenseModel.php +++ b/src/lib/Model/EmployeeExpenseModel.php @@ -64,6 +64,8 @@ class EmployeeExpenseModel implements ModelInterface, ArrayAccess 'tax_code' => 'string', 'tax_rate' => 'double', 'tax_code_display_name' => 'string', + 'reporting_dimension_value_ids' => 'int[]', + 'reporting_dimension_value_names' => 'map[string,string[]]', 'id' => 'int', 'external_id' => 'string', 'location_id' => 'string', @@ -86,6 +88,8 @@ class EmployeeExpenseModel implements ModelInterface, ArrayAccess 'tax_code' => null, 'tax_rate' => 'double', 'tax_code_display_name' => null, + 'reporting_dimension_value_ids' => 'int32', + 'reporting_dimension_value_names' => null, 'id' => 'int32', 'external_id' => null, 'location_id' => null, @@ -129,6 +133,8 @@ public static function swaggerFormats() 'tax_code' => 'taxCode', 'tax_rate' => 'taxRate', 'tax_code_display_name' => 'taxCodeDisplayName', + 'reporting_dimension_value_ids' => 'reportingDimensionValueIds', + 'reporting_dimension_value_names' => 'reportingDimensionValueNames', 'id' => 'id', 'external_id' => 'externalId', 'location_id' => 'locationId', @@ -151,6 +157,8 @@ public static function swaggerFormats() 'tax_code' => 'setTaxCode', 'tax_rate' => 'setTaxRate', 'tax_code_display_name' => 'setTaxCodeDisplayName', + 'reporting_dimension_value_ids' => 'setReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'setReportingDimensionValueNames', 'id' => 'setId', 'external_id' => 'setExternalId', 'location_id' => 'setLocationId', @@ -173,6 +181,8 @@ public static function swaggerFormats() 'tax_code' => 'getTaxCode', 'tax_rate' => 'getTaxRate', 'tax_code_display_name' => 'getTaxCodeDisplayName', + 'reporting_dimension_value_ids' => 'getReportingDimensionValueIds', + 'reporting_dimension_value_names' => 'getReportingDimensionValueNames', 'id' => 'getId', 'external_id' => 'getExternalId', 'location_id' => 'getLocationId', @@ -249,6 +259,8 @@ public function __construct(array $data = null) $this->container['tax_code'] = isset($data['tax_code']) ? $data['tax_code'] : null; $this->container['tax_rate'] = isset($data['tax_rate']) ? $data['tax_rate'] : null; $this->container['tax_code_display_name'] = isset($data['tax_code_display_name']) ? $data['tax_code_display_name'] : null; + $this->container['reporting_dimension_value_ids'] = isset($data['reporting_dimension_value_ids']) ? $data['reporting_dimension_value_ids'] : null; + $this->container['reporting_dimension_value_names'] = isset($data['reporting_dimension_value_names']) ? $data['reporting_dimension_value_names'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -450,6 +462,54 @@ public function setTaxCodeDisplayName($tax_code_display_name) return $this; } + /** + * Gets reporting_dimension_value_ids + * + * @return int[] + */ + public function getReportingDimensionValueIds() + { + return $this->container['reporting_dimension_value_ids']; + } + + /** + * Sets reporting_dimension_value_ids + * + * @param int[] $reporting_dimension_value_ids Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an array of dimension value ids (normally only one-per dimension) eg [1,3,7].

If you prefer to specify dimension values by name, use the ReportingDimensionValueNames field instead.

If this field is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueIds($reporting_dimension_value_ids) + { + $this->container['reporting_dimension_value_ids'] = $reporting_dimension_value_ids; + + return $this; + } + + /** + * Gets reporting_dimension_value_names + * + * @return map[string,string[]] + */ + public function getReportingDimensionValueNames() + { + return $this->container['reporting_dimension_value_names']; + } + + /** + * Sets reporting_dimension_value_names + * + * @param map[string,string[]] $reporting_dimension_value_names Nullable

Note: Only applicable to businesses where the Dimensions feature is enabled.

Specify an object with dimension names and for each one, specify an array of associated value names (normally one-per dimension) eg { \"Department\": [\"Accounting\"], \"Job Code\": [\"JC1\"] }.

If you prefer to specify dimension values directly by Id, use the ReportingDimensionValueIds field instead.

If ReportingDimensionValueIds is used, ReportingDimensionValueNames will be ignored (the Ids take precedence) + * + * @return $this + */ + public function setReportingDimensionValueNames($reporting_dimension_value_names) + { + $this->container['reporting_dimension_value_names'] = $reporting_dimension_value_names; + + return $this; + } + /** * Gets id * diff --git a/src/lib/Model/EmployeeGroupAccessModel.php b/src/lib/Model/EmployeeGroupAccessModel.php index 65b61e8..94f78fb 100644 --- a/src/lib/Model/EmployeeGroupAccessModel.php +++ b/src/lib/Model/EmployeeGroupAccessModel.php @@ -184,6 +184,7 @@ public function getModelName() const PERMISSIONS_VIEW_EMPLOYEE_DETAILS = 'ViewEmployeeDetails'; const PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS = 'EditBasicEmployeeDetails'; const PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS = 'EditAllEmployeeDetails'; + const PERMISSIONS_VIEW_TIMESHEET_REPORTS = 'ViewTimesheetReports'; @@ -216,6 +217,7 @@ public function getPermissionsAllowableValues() self::PERMISSIONS_VIEW_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS, + self::PERMISSIONS_VIEW_TIMESHEET_REPORTS, ]; } diff --git a/src/lib/Model/EmployeeItemCountModel.php b/src/lib/Model/EmployeeItemCountModel.php new file mode 100644 index 0000000..e8766c2 --- /dev/null +++ b/src/lib/Model/EmployeeItemCountModel.php @@ -0,0 +1,331 @@ + 'int', + 'item_count' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'employee_id' => 'int32', + 'item_count' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'employee_id' => 'employeeId', + 'item_count' => 'itemCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'employee_id' => 'setEmployeeId', + 'item_count' => 'setItemCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'employee_id' => 'getEmployeeId', + 'item_count' => 'getItemCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; + $this->container['item_count'] = isset($data['item_count']) ? $data['item_count'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets employee_id + * + * @return int + */ + public function getEmployeeId() + { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int $employee_id + * + * @return $this + */ + public function setEmployeeId($employee_id) + { + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets item_count + * + * @return int + */ + public function getItemCount() + { + return $this->container['item_count']; + } + + /** + * Sets item_count + * + * @param int $item_count + * + * @return $this + */ + public function setItemCount($item_count) + { + $this->container['item_count'] = $item_count; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/EmployeePartialEditModel.php b/src/lib/Model/EmployeePartialEditModel.php index 376890d..4435419 100644 --- a/src/lib/Model/EmployeePartialEditModel.php +++ b/src/lib/Model/EmployeePartialEditModel.php @@ -57,6 +57,7 @@ class EmployeePartialEditModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'id' => 'int', 'anniversary_date' => '\DateTime', 'external_id' => 'string', 'start_date' => '\DateTime', @@ -124,6 +125,7 @@ class EmployeePartialEditModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'id' => 'int32', 'anniversary_date' => 'date-time', 'external_id' => null, 'start_date' => 'date-time', @@ -212,6 +214,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', 'anniversary_date' => 'anniversaryDate', 'external_id' => 'externalId', 'start_date' => 'startDate', @@ -279,6 +282,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', 'anniversary_date' => 'setAnniversaryDate', 'external_id' => 'setExternalId', 'start_date' => 'setStartDate', @@ -346,6 +350,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', 'anniversary_date' => 'getAnniversaryDate', 'external_id' => 'getExternalId', 'start_date' => 'getStartDate', @@ -520,6 +525,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; const TIMESHEET_SETTING_DISABLED = 'Disabled'; const TIMESHEET_SETTING_ENABLED = 'Enabled'; const TIMESHEET_SETTING_ENABLED_FOR_EXCEPTIONS = 'EnabledForExceptions'; @@ -623,6 +633,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -684,6 +699,7 @@ public function getPostalAddressTypeAllowableValues() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['anniversary_date'] = isset($data['anniversary_date']) ? $data['anniversary_date'] : null; $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; @@ -809,6 +825,30 @@ public function valid() } + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets anniversary_date * diff --git a/src/lib/Model/EmployeeRecurringSuperAdjustmentModel.php b/src/lib/Model/EmployeeRecurringSuperAdjustmentModel.php index 0ea90bc..b77ffe8 100644 --- a/src/lib/Model/EmployeeRecurringSuperAdjustmentModel.php +++ b/src/lib/Model/EmployeeRecurringSuperAdjustmentModel.php @@ -212,6 +212,7 @@ public function getModelName() const CONTRIBUTION_TYPE_SALARY_SACRIFICE = 'SalarySacrifice'; const CONTRIBUTION_TYPE_MEMBER_VOLUNTARY = 'MemberVoluntary'; const CONTRIBUTION_TYPE_EMPLOYER_CONTRIBUTION = 'EmployerContribution'; + const CONTRIBUTION_TYPE_NON_RESC_EMPLOYER_CONTRIBUTION = 'NonRescEmployerContribution'; const ADJUSTMENT_TYPE_FIXED = 'Fixed'; const ADJUSTMENT_TYPE_PERCENTAGE_GROSS = 'PercentageGross'; const ADJUSTMENT_TYPE_PERCENTAGE_OTE = 'PercentageOTE'; @@ -231,6 +232,7 @@ public function getContributionTypeAllowableValues() self::CONTRIBUTION_TYPE_SALARY_SACRIFICE, self::CONTRIBUTION_TYPE_MEMBER_VOLUNTARY, self::CONTRIBUTION_TYPE_EMPLOYER_CONTRIBUTION, + self::CONTRIBUTION_TYPE_NON_RESC_EMPLOYER_CONTRIBUTION, ]; } diff --git a/src/lib/Model/EmployerRecurringLiabilityModel.php b/src/lib/Model/EmployerRecurringLiabilityModel.php index 059047a..bf36dd3 100644 --- a/src/lib/Model/EmployerRecurringLiabilityModel.php +++ b/src/lib/Model/EmployerRecurringLiabilityModel.php @@ -296,6 +296,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -391,6 +396,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/EmploymentAgreementModel.php b/src/lib/Model/EmploymentAgreementModel.php index 5149303..b92e770 100644 --- a/src/lib/Model/EmploymentAgreementModel.php +++ b/src/lib/Model/EmploymentAgreementModel.php @@ -295,6 +295,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -410,6 +415,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/EndBreakModel.php b/src/lib/Model/EndBreakModel.php index 9c31061..e0ff0d2 100644 --- a/src/lib/Model/EndBreakModel.php +++ b/src/lib/Model/EndBreakModel.php @@ -57,6 +57,7 @@ class EndBreakModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'is_paid_break' => 'bool', 'employee_id' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -75,6 +76,7 @@ class EndBreakModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'is_paid_break' => null, 'employee_id' => 'int32', 'latitude' => 'double', 'longitude' => 'double', @@ -114,6 +116,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'is_paid_break' => 'isPaidBreak', 'employee_id' => 'employeeId', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -132,6 +135,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'is_paid_break' => 'setIsPaidBreak', 'employee_id' => 'setEmployeeId', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -150,6 +154,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'is_paid_break' => 'getIsPaidBreak', 'employee_id' => 'getEmployeeId', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -237,6 +242,7 @@ public function getNoteVisibilityAllowableValues() */ public function __construct(array $data = null) { + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; @@ -285,6 +291,30 @@ public function valid() } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets employee_id * diff --git a/src/lib/Model/EssCurrentShiftModel.php b/src/lib/Model/EssCurrentShiftModel.php index 0de7e12..c74cda3 100644 --- a/src/lib/Model/EssCurrentShiftModel.php +++ b/src/lib/Model/EssCurrentShiftModel.php @@ -61,7 +61,8 @@ class EssCurrentShiftModel implements ModelInterface, ArrayAccess 'clock_on_time_utc' => '\DateTime', 'break_start_time_utc' => '\DateTime', 'status' => 'string', - 'long_shift' => 'bool' + 'long_shift' => 'bool', + 'is_paid_break' => 'bool' ]; /** @@ -74,7 +75,8 @@ class EssCurrentShiftModel implements ModelInterface, ArrayAccess 'clock_on_time_utc' => 'date-time', 'break_start_time_utc' => 'date-time', 'status' => null, - 'long_shift' => null + 'long_shift' => null, + 'is_paid_break' => null ]; /** @@ -108,7 +110,8 @@ public static function swaggerFormats() 'clock_on_time_utc' => 'clockOnTimeUtc', 'break_start_time_utc' => 'breakStartTimeUtc', 'status' => 'status', - 'long_shift' => 'longShift' + 'long_shift' => 'longShift', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -121,7 +124,8 @@ public static function swaggerFormats() 'clock_on_time_utc' => 'setClockOnTimeUtc', 'break_start_time_utc' => 'setBreakStartTimeUtc', 'status' => 'setStatus', - 'long_shift' => 'setLongShift' + 'long_shift' => 'setLongShift', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -134,7 +138,8 @@ public static function swaggerFormats() 'clock_on_time_utc' => 'getClockOnTimeUtc', 'break_start_time_utc' => 'getBreakStartTimeUtc', 'status' => 'getStatus', - 'long_shift' => 'getLongShift' + 'long_shift' => 'getLongShift', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -221,6 +226,7 @@ public function __construct(array $data = null) $this->container['break_start_time_utc'] = isset($data['break_start_time_utc']) ? $data['break_start_time_utc'] : null; $this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['long_shift'] = isset($data['long_shift']) ? $data['long_shift'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -383,6 +389,30 @@ public function setLongShift($long_shift) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/EssEmployeeDetailsModel.php b/src/lib/Model/EssEmployeeDetailsModel.php index 9634767..4c8d970 100644 --- a/src/lib/Model/EssEmployeeDetailsModel.php +++ b/src/lib/Model/EssEmployeeDetailsModel.php @@ -130,7 +130,9 @@ class EssEmployeeDetailsModel implements ModelInterface, ArrayAccess 'termination_description' => 'string', 'termination_reasons' => '\Swagger\Client\Model\NumericSelectListItem[]', 'has_sole_user' => 'bool', - 'fields' => '\Swagger\Client\Model\EmployeeDetailsFields' + 'fields' => '\Swagger\Client\Model\EmployeeDetailsFields', + 'pending_email_update' => 'bool', + 'new_email' => 'string' ]; /** @@ -211,7 +213,9 @@ class EssEmployeeDetailsModel implements ModelInterface, ArrayAccess 'termination_description' => null, 'termination_reasons' => null, 'has_sole_user' => null, - 'fields' => null + 'fields' => null, + 'pending_email_update' => null, + 'new_email' => null ]; /** @@ -313,7 +317,9 @@ public static function swaggerFormats() 'termination_description' => 'terminationDescription', 'termination_reasons' => 'terminationReasons', 'has_sole_user' => 'hasSoleUser', - 'fields' => 'fields' + 'fields' => 'fields', + 'pending_email_update' => 'pendingEmailUpdate', + 'new_email' => 'newEmail' ]; /** @@ -394,7 +400,9 @@ public static function swaggerFormats() 'termination_description' => 'setTerminationDescription', 'termination_reasons' => 'setTerminationReasons', 'has_sole_user' => 'setHasSoleUser', - 'fields' => 'setFields' + 'fields' => 'setFields', + 'pending_email_update' => 'setPendingEmailUpdate', + 'new_email' => 'setNewEmail' ]; /** @@ -475,7 +483,9 @@ public static function swaggerFormats() 'termination_description' => 'getTerminationDescription', 'termination_reasons' => 'getTerminationReasons', 'has_sole_user' => 'getHasSoleUser', - 'fields' => 'getFields' + 'fields' => 'getFields', + 'pending_email_update' => 'getPendingEmailUpdate', + 'new_email' => 'getNewEmail' ]; /** @@ -706,6 +716,8 @@ public function __construct(array $data = null) $this->container['termination_reasons'] = isset($data['termination_reasons']) ? $data['termination_reasons'] : null; $this->container['has_sole_user'] = isset($data['has_sole_user']) ? $data['has_sole_user'] : null; $this->container['fields'] = isset($data['fields']) ? $data['fields'] : null; + $this->container['pending_email_update'] = isset($data['pending_email_update']) ? $data['pending_email_update'] : null; + $this->container['new_email'] = isset($data['new_email']) ? $data['new_email'] : null; } /** @@ -2568,6 +2580,54 @@ public function setFields($fields) return $this; } + + /** + * Gets pending_email_update + * + * @return bool + */ + public function getPendingEmailUpdate() + { + return $this->container['pending_email_update']; + } + + /** + * Sets pending_email_update + * + * @param bool $pending_email_update + * + * @return $this + */ + public function setPendingEmailUpdate($pending_email_update) + { + $this->container['pending_email_update'] = $pending_email_update; + + return $this; + } + + /** + * Gets new_email + * + * @return string + */ + public function getNewEmail() + { + return $this->container['new_email']; + } + + /** + * Sets new_email + * + * @param string $new_email + * + * @return $this + */ + public function setNewEmail($new_email) + { + $this->container['new_email'] = $new_email; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/EssTimesheetModel.php b/src/lib/Model/EssTimesheetModel.php index fc4e929..7197671 100644 --- a/src/lib/Model/EssTimesheetModel.php +++ b/src/lib/Model/EssTimesheetModel.php @@ -65,6 +65,7 @@ class EssTimesheetModel implements ModelInterface, ArrayAccess 'breaks_duration_in_minutes' => 'int', 'total_duration_in_minutes' => 'int', 'auto_approved_by_roster_shift_id' => 'int', + 'location_is_deleted' => 'bool', 'employee_name' => 'string', 'id' => 'int', 'employee_id' => 'int', @@ -95,6 +96,8 @@ class EssTimesheetModel implements ModelInterface, ArrayAccess 'is_locked' => 'bool', 'cost' => 'double', 'costing_data' => '\Swagger\Client\Model\ShiftCostingData', + 'cost_by_location' => 'double', + 'costing_data_by_location' => '\Swagger\Client\Model\ShiftCostingData', 'discard' => 'bool', 'shift_condition_ids' => 'int[]', 'is_overlapping' => 'bool', @@ -120,6 +123,7 @@ class EssTimesheetModel implements ModelInterface, ArrayAccess 'breaks_duration_in_minutes' => 'int32', 'total_duration_in_minutes' => 'int32', 'auto_approved_by_roster_shift_id' => 'int32', + 'location_is_deleted' => null, 'employee_name' => null, 'id' => 'int32', 'employee_id' => 'int32', @@ -150,6 +154,8 @@ class EssTimesheetModel implements ModelInterface, ArrayAccess 'is_locked' => null, 'cost' => 'double', 'costing_data' => null, + 'cost_by_location' => 'double', + 'costing_data_by_location' => null, 'discard' => null, 'shift_condition_ids' => 'int32', 'is_overlapping' => null, @@ -196,6 +202,7 @@ public static function swaggerFormats() 'breaks_duration_in_minutes' => 'breaksDurationInMinutes', 'total_duration_in_minutes' => 'totalDurationInMinutes', 'auto_approved_by_roster_shift_id' => 'autoApprovedByRosterShiftId', + 'location_is_deleted' => 'locationIsDeleted', 'employee_name' => 'employeeName', 'id' => 'id', 'employee_id' => 'employeeId', @@ -226,6 +233,8 @@ public static function swaggerFormats() 'is_locked' => 'isLocked', 'cost' => 'cost', 'costing_data' => 'costingData', + 'cost_by_location' => 'costByLocation', + 'costing_data_by_location' => 'costingDataByLocation', 'discard' => 'discard', 'shift_condition_ids' => 'shiftConditionIds', 'is_overlapping' => 'isOverlapping', @@ -251,6 +260,7 @@ public static function swaggerFormats() 'breaks_duration_in_minutes' => 'setBreaksDurationInMinutes', 'total_duration_in_minutes' => 'setTotalDurationInMinutes', 'auto_approved_by_roster_shift_id' => 'setAutoApprovedByRosterShiftId', + 'location_is_deleted' => 'setLocationIsDeleted', 'employee_name' => 'setEmployeeName', 'id' => 'setId', 'employee_id' => 'setEmployeeId', @@ -281,6 +291,8 @@ public static function swaggerFormats() 'is_locked' => 'setIsLocked', 'cost' => 'setCost', 'costing_data' => 'setCostingData', + 'cost_by_location' => 'setCostByLocation', + 'costing_data_by_location' => 'setCostingDataByLocation', 'discard' => 'setDiscard', 'shift_condition_ids' => 'setShiftConditionIds', 'is_overlapping' => 'setIsOverlapping', @@ -306,6 +318,7 @@ public static function swaggerFormats() 'breaks_duration_in_minutes' => 'getBreaksDurationInMinutes', 'total_duration_in_minutes' => 'getTotalDurationInMinutes', 'auto_approved_by_roster_shift_id' => 'getAutoApprovedByRosterShiftId', + 'location_is_deleted' => 'getLocationIsDeleted', 'employee_name' => 'getEmployeeName', 'id' => 'getId', 'employee_id' => 'getEmployeeId', @@ -336,6 +349,8 @@ public static function swaggerFormats() 'is_locked' => 'getIsLocked', 'cost' => 'getCost', 'costing_data' => 'getCostingData', + 'cost_by_location' => 'getCostByLocation', + 'costing_data_by_location' => 'getCostingDataByLocation', 'discard' => 'getDiscard', 'shift_condition_ids' => 'getShiftConditionIds', 'is_overlapping' => 'getIsOverlapping', @@ -463,6 +478,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -560,6 +580,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -587,6 +612,7 @@ public function __construct(array $data = null) $this->container['breaks_duration_in_minutes'] = isset($data['breaks_duration_in_minutes']) ? $data['breaks_duration_in_minutes'] : null; $this->container['total_duration_in_minutes'] = isset($data['total_duration_in_minutes']) ? $data['total_duration_in_minutes'] : null; $this->container['auto_approved_by_roster_shift_id'] = isset($data['auto_approved_by_roster_shift_id']) ? $data['auto_approved_by_roster_shift_id'] : null; + $this->container['location_is_deleted'] = isset($data['location_is_deleted']) ? $data['location_is_deleted'] : null; $this->container['employee_name'] = isset($data['employee_name']) ? $data['employee_name'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; @@ -617,6 +643,8 @@ public function __construct(array $data = null) $this->container['is_locked'] = isset($data['is_locked']) ? $data['is_locked'] : null; $this->container['cost'] = isset($data['cost']) ? $data['cost'] : null; $this->container['costing_data'] = isset($data['costing_data']) ? $data['costing_data'] : null; + $this->container['cost_by_location'] = isset($data['cost_by_location']) ? $data['cost_by_location'] : null; + $this->container['costing_data_by_location'] = isset($data['costing_data_by_location']) ? $data['costing_data_by_location'] : null; $this->container['discard'] = isset($data['discard']) ? $data['discard'] : null; $this->container['shift_condition_ids'] = isset($data['shift_condition_ids']) ? $data['shift_condition_ids'] : null; $this->container['is_overlapping'] = isset($data['is_overlapping']) ? $data['is_overlapping'] : null; @@ -860,6 +888,30 @@ public function setAutoApprovedByRosterShiftId($auto_approved_by_roster_shift_id return $this; } + /** + * Gets location_is_deleted + * + * @return bool + */ + public function getLocationIsDeleted() + { + return $this->container['location_is_deleted']; + } + + /** + * Sets location_is_deleted + * + * @param bool $location_is_deleted + * + * @return $this + */ + public function setLocationIsDeleted($location_is_deleted) + { + $this->container['location_is_deleted'] = $location_is_deleted; + + return $this; + } + /** * Gets employee_name * @@ -1598,6 +1650,54 @@ public function setCostingData($costing_data) return $this; } + /** + * Gets cost_by_location + * + * @return double + */ + public function getCostByLocation() + { + return $this->container['cost_by_location']; + } + + /** + * Sets cost_by_location + * + * @param double $cost_by_location + * + * @return $this + */ + public function setCostByLocation($cost_by_location) + { + $this->container['cost_by_location'] = $cost_by_location; + + return $this; + } + + /** + * Gets costing_data_by_location + * + * @return \Swagger\Client\Model\ShiftCostingData + */ + public function getCostingDataByLocation() + { + return $this->container['costing_data_by_location']; + } + + /** + * Sets costing_data_by_location + * + * @param \Swagger\Client\Model\ShiftCostingData $costing_data_by_location + * + * @return $this + */ + public function setCostingDataByLocation($costing_data_by_location) + { + $this->container['costing_data_by_location'] = $costing_data_by_location; + + return $this; + } + /** * Gets discard * diff --git a/src/lib/Model/EssUnavailabilityModel.php b/src/lib/Model/EssUnavailabilityModel.php index fedcc5f..c94c15e 100644 --- a/src/lib/Model/EssUnavailabilityModel.php +++ b/src/lib/Model/EssUnavailabilityModel.php @@ -64,6 +64,8 @@ class EssUnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => 'string', 'recurring' => 'bool', 'recurring_day' => 'string', + 'recurring_days' => 'string', + 'recurring_days_csv' => 'string', 'is_all_day' => 'bool', 'view_only' => 'bool' ]; @@ -81,6 +83,8 @@ class EssUnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => null, 'recurring' => null, 'recurring_day' => null, + 'recurring_days' => null, + 'recurring_days_csv' => null, 'is_all_day' => null, 'view_only' => null ]; @@ -119,6 +123,8 @@ public static function swaggerFormats() 'reason' => 'reason', 'recurring' => 'recurring', 'recurring_day' => 'recurringDay', + 'recurring_days' => 'recurringDays', + 'recurring_days_csv' => 'recurringDaysCsv', 'is_all_day' => 'isAllDay', 'view_only' => 'viewOnly' ]; @@ -136,6 +142,8 @@ public static function swaggerFormats() 'reason' => 'setReason', 'recurring' => 'setRecurring', 'recurring_day' => 'setRecurringDay', + 'recurring_days' => 'setRecurringDays', + 'recurring_days_csv' => 'setRecurringDaysCsv', 'is_all_day' => 'setIsAllDay', 'view_only' => 'setViewOnly' ]; @@ -153,6 +161,8 @@ public static function swaggerFormats() 'reason' => 'getReason', 'recurring' => 'getRecurring', 'recurring_day' => 'getRecurringDay', + 'recurring_days' => 'getRecurringDays', + 'recurring_days_csv' => 'getRecurringDaysCsv', 'is_all_day' => 'getIsAllDay', 'view_only' => 'getViewOnly' ]; @@ -205,6 +215,13 @@ public function getModelName() const RECURRING_DAY_THURSDAY = 'Thursday'; const RECURRING_DAY_FRIDAY = 'Friday'; const RECURRING_DAY_SATURDAY = 'Saturday'; + const RECURRING_DAYS_SUNDAY = 'Sunday'; + const RECURRING_DAYS_MONDAY = 'Monday'; + const RECURRING_DAYS_TUESDAY = 'Tuesday'; + const RECURRING_DAYS_WEDNESDAY = 'Wednesday'; + const RECURRING_DAYS_THURSDAY = 'Thursday'; + const RECURRING_DAYS_FRIDAY = 'Friday'; + const RECURRING_DAYS_SATURDAY = 'Saturday'; @@ -226,6 +243,24 @@ public function getRecurringDayAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringDaysAllowableValues() + { + return [ + self::RECURRING_DAYS_SUNDAY, + self::RECURRING_DAYS_MONDAY, + self::RECURRING_DAYS_TUESDAY, + self::RECURRING_DAYS_WEDNESDAY, + self::RECURRING_DAYS_THURSDAY, + self::RECURRING_DAYS_FRIDAY, + self::RECURRING_DAYS_SATURDAY, + ]; + } + /** * Associative array for storing property values @@ -249,6 +284,8 @@ public function __construct(array $data = null) $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; $this->container['recurring_day'] = isset($data['recurring_day']) ? $data['recurring_day'] : null; + $this->container['recurring_days'] = isset($data['recurring_days']) ? $data['recurring_days'] : null; + $this->container['recurring_days_csv'] = isset($data['recurring_days_csv']) ? $data['recurring_days_csv'] : null; $this->container['is_all_day'] = isset($data['is_all_day']) ? $data['is_all_day'] : null; $this->container['view_only'] = isset($data['view_only']) ? $data['view_only'] : null; } @@ -270,6 +307,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($this->container['recurring_days']) && !in_array($this->container['recurring_days'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -462,6 +507,63 @@ public function setRecurringDay($recurring_day) return $this; } + /** + * Gets recurring_days + * + * @return string + */ + public function getRecurringDays() + { + return $this->container['recurring_days']; + } + + /** + * Sets recurring_days + * + * @param string $recurring_days + * + * @return $this + */ + public function setRecurringDays($recurring_days) + { + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($recurring_days) && !in_array($recurring_days, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurring_days'] = $recurring_days; + + return $this; + } + + /** + * Gets recurring_days_csv + * + * @return string + */ + public function getRecurringDaysCsv() + { + return $this->container['recurring_days_csv']; + } + + /** + * Sets recurring_days_csv + * + * @param string $recurring_days_csv + * + * @return $this + */ + public function setRecurringDaysCsv($recurring_days_csv) + { + $this->container['recurring_days_csv'] = $recurring_days_csv; + + return $this; + } + /** * Gets is_all_day * diff --git a/src/lib/Model/GrossToNetReportRequest.php b/src/lib/Model/GrossToNetReportRequest.php index b619b2c..861a283 100644 --- a/src/lib/Model/GrossToNetReportRequest.php +++ b/src/lib/Model/GrossToNetReportRequest.php @@ -60,6 +60,7 @@ class GrossToNetReportRequest implements ModelInterface, ArrayAccess 'employee_id' => 'int', 'pay_category_ids' => 'int[]', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -75,6 +76,7 @@ class GrossToNetReportRequest implements ModelInterface, ArrayAccess 'employee_id' => 'int32', 'pay_category_ids' => 'int32', 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -111,6 +113,7 @@ public static function swaggerFormats() 'employee_id' => 'employeeId', 'pay_category_ids' => 'payCategoryIds', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -126,6 +129,7 @@ public static function swaggerFormats() 'employee_id' => 'setEmployeeId', 'pay_category_ids' => 'setPayCategoryIds', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -141,6 +145,7 @@ public static function swaggerFormats() 'employee_id' => 'getEmployeeId', 'pay_category_ids' => 'getPayCategoryIds', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -210,6 +215,7 @@ public function __construct(array $data = null) $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['pay_category_ids'] = isset($data['pay_category_ids']) ? $data['pay_category_ids'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -312,6 +318,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/JournalExportResult.php b/src/lib/Model/JournalExportResult.php index 5f59271..f666ce0 100644 --- a/src/lib/Model/JournalExportResult.php +++ b/src/lib/Model/JournalExportResult.php @@ -188,6 +188,8 @@ public function getModelName() const STATUS_FAILURE_GST_SETUP = 'FailureGSTSetup'; const STATUS_FAILURE_KNOWN_ERROR = 'FailureKnownError'; const STATUS_FAILURES_TENANT_NOT_SUPPLIED = 'FailuresTenantNotSupplied'; + const STATUS_FAILURE_NO_JOURNAL_ID = 'FailureNoJournalId'; + const STATUS_FAILURE_API_ERROR = 'FailureAPIError'; const STATUS_RESULT_UNKNOWN = 'ResultUnknown'; const JOURNAL_SOURCE_NONE = 'None'; const JOURNAL_SOURCE_SAASU = 'Saasu'; @@ -259,6 +261,11 @@ public function getModelName() const JOURNAL_SOURCE_QUICKFILE = 'Quickfile'; const JOURNAL_SOURCE_TIDE = 'Tide'; const JOURNAL_SOURCE_TIDE_SSO = 'TideSso'; + const JOURNAL_SOURCE_FREE_AGENT = 'FreeAgent'; + const JOURNAL_SOURCE_AKAHU = 'Akahu'; + const JOURNAL_SOURCE_INSTA_PAY = 'InstaPay'; + const JOURNAL_SOURCE_ZEPTO = 'Zepto'; + const JOURNAL_SOURCE_SLACK = 'Slack'; @@ -285,6 +292,8 @@ public function getStatusAllowableValues() self::STATUS_FAILURE_GST_SETUP, self::STATUS_FAILURE_KNOWN_ERROR, self::STATUS_FAILURES_TENANT_NOT_SUPPLIED, + self::STATUS_FAILURE_NO_JOURNAL_ID, + self::STATUS_FAILURE_API_ERROR, self::STATUS_RESULT_UNKNOWN, ]; } @@ -367,6 +376,11 @@ public function getJournalSourceAllowableValues() self::JOURNAL_SOURCE_QUICKFILE, self::JOURNAL_SOURCE_TIDE, self::JOURNAL_SOURCE_TIDE_SSO, + self::JOURNAL_SOURCE_FREE_AGENT, + self::JOURNAL_SOURCE_AKAHU, + self::JOURNAL_SOURCE_INSTA_PAY, + self::JOURNAL_SOURCE_ZEPTO, + self::JOURNAL_SOURCE_SLACK, ]; } diff --git a/src/lib/Model/KioskAccessModel.php b/src/lib/Model/KioskAccessModel.php index 169e965..00656bd 100644 --- a/src/lib/Model/KioskAccessModel.php +++ b/src/lib/Model/KioskAccessModel.php @@ -192,6 +192,7 @@ public function getModelName() const PERMISSIONS_VIEW_EMPLOYEE_DETAILS = 'ViewEmployeeDetails'; const PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS = 'EditBasicEmployeeDetails'; const PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS = 'EditAllEmployeeDetails'; + const PERMISSIONS_VIEW_TIMESHEET_REPORTS = 'ViewTimesheetReports'; @@ -238,6 +239,7 @@ public function getPermissionsAllowableValues() self::PERMISSIONS_VIEW_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS, + self::PERMISSIONS_VIEW_TIMESHEET_REPORTS, ]; } diff --git a/src/lib/Model/LeaveAllowanceTemplateLeaveCategoryModel.php b/src/lib/Model/LeaveAllowanceTemplateLeaveCategoryModel.php index b65d43c..08e4ac0 100644 --- a/src/lib/Model/LeaveAllowanceTemplateLeaveCategoryModel.php +++ b/src/lib/Model/LeaveAllowanceTemplateLeaveCategoryModel.php @@ -232,6 +232,7 @@ public function getModelName() const UNIT_TYPE_DAY_PER_CALENDAR_DAY = 'DayPerCalendarDay'; const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_ONGOING = 'Ongoing'; const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_YEARLY = 'Yearly'; + const LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE = 'BasedOnLengthOfService'; const LEAVE_ACCRUAL_RULE_CAP_TYPE_NOT_LIMITED = 'NotLimited'; const LEAVE_ACCRUAL_RULE_CAP_TYPE_LIMITED = 'Limited'; const LEAVE_ACCRUAL_RULE_CARRY_OVER_BEHAVIOUR_CARRY_ENTIRE_AMOUNT = 'CarryEntireAmount'; @@ -267,6 +268,7 @@ public function getLeaveAccrualRuleAccrualTypeAllowableValues() return [ self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_ONGOING, self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_YEARLY, + self::LEAVE_ACCRUAL_RULE_ACCRUAL_TYPE_BASED_ON_LENGTH_OF_SERVICE, ]; } diff --git a/src/lib/Model/LeaveAllowanceTemplateModel.php b/src/lib/Model/LeaveAllowanceTemplateModel.php index 147a23a..f7d33ad 100644 --- a/src/lib/Model/LeaveAllowanceTemplateModel.php +++ b/src/lib/Model/LeaveAllowanceTemplateModel.php @@ -263,9 +263,16 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; const LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE = 'EmployeeStartDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE = 'SpecifiedDate'; const LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR = 'CalendarYear'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH = 'RollingYear12Month'; + const LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH = 'RollingYear24Month'; @@ -347,6 +354,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -361,6 +373,8 @@ public function getLeaveAccrualStartDateTypeAllowableValues() self::LEAVE_ACCRUAL_START_DATE_TYPE_EMPLOYEE_START_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_SPECIFIED_DATE, self::LEAVE_ACCRUAL_START_DATE_TYPE_CALENDAR_YEAR, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR12_MONTH, + self::LEAVE_ACCRUAL_START_DATE_TYPE_ROLLING_YEAR24_MONTH, ]; } diff --git a/src/lib/Model/LocationAccessModel.php b/src/lib/Model/LocationAccessModel.php index b957526..c80282a 100644 --- a/src/lib/Model/LocationAccessModel.php +++ b/src/lib/Model/LocationAccessModel.php @@ -191,6 +191,7 @@ public function getModelName() const PERMISSIONS_VIEW_EMPLOYEE_DETAILS = 'ViewEmployeeDetails'; const PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS = 'EditBasicEmployeeDetails'; const PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS = 'EditAllEmployeeDetails'; + const PERMISSIONS_VIEW_TIMESHEET_REPORTS = 'ViewTimesheetReports'; @@ -236,6 +237,7 @@ public function getPermissionsAllowableValues() self::PERMISSIONS_VIEW_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_BASIC_EMPLOYEE_DETAILS, self::PERMISSIONS_EDIT_ALL_EMPLOYEE_DETAILS, + self::PERMISSIONS_VIEW_TIMESHEET_REPORTS, ]; } diff --git a/src/lib/Model/ManagerBiddableRosterShiftModel.php b/src/lib/Model/ManagerBiddableRosterShiftModel.php index b76b9f4..c8323a7 100644 --- a/src/lib/Model/ManagerBiddableRosterShiftModel.php +++ b/src/lib/Model/ManagerBiddableRosterShiftModel.php @@ -84,7 +84,8 @@ class ManagerBiddableRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => '\Swagger\Client\Model\RosterShiftSwapModel', 'date_published' => '\DateTime', 'biddable' => 'bool', - 'shift_swap_cutoff_time' => '\DateTime' + 'shift_swap_cutoff_time' => '\DateTime', + 'shift_assignment_status' => 'string' ]; /** @@ -120,7 +121,8 @@ class ManagerBiddableRosterShiftModel implements ModelInterface, ArrayAccess 'pending_swap' => null, 'date_published' => 'date-time', 'biddable' => null, - 'shift_swap_cutoff_time' => 'date-time' + 'shift_swap_cutoff_time' => 'date-time', + 'shift_assignment_status' => null ]; /** @@ -177,7 +179,8 @@ public static function swaggerFormats() 'pending_swap' => 'pendingSwap', 'date_published' => 'datePublished', 'biddable' => 'biddable', - 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'shiftSwapCutoffTime', + 'shift_assignment_status' => 'shiftAssignmentStatus' ]; /** @@ -213,7 +216,8 @@ public static function swaggerFormats() 'pending_swap' => 'setPendingSwap', 'date_published' => 'setDatePublished', 'biddable' => 'setBiddable', - 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'setShiftSwapCutoffTime', + 'shift_assignment_status' => 'setShiftAssignmentStatus' ]; /** @@ -249,7 +253,8 @@ public static function swaggerFormats() 'pending_swap' => 'getPendingSwap', 'date_published' => 'getDatePublished', 'biddable' => 'getBiddable', - 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime' + 'shift_swap_cutoff_time' => 'getShiftSwapCutoffTime', + 'shift_assignment_status' => 'getShiftAssignmentStatus' ]; /** @@ -293,9 +298,34 @@ public function getModelName() return self::$swaggerModelName; } + const SHIFT_ASSIGNMENT_STATUS_PENDING = 'Pending'; + const SHIFT_ASSIGNMENT_STATUS_ASSIGNED = 'Assigned'; + const SHIFT_ASSIGNMENT_STATUS_BIDDING = 'Bidding'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP = 'PendingShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL = 'PendingShiftSwapAwaitingApproval'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP = 'ProposedShiftSwap'; + const SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL = 'ProposedShiftSwapAwaitingApproval'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getShiftAssignmentStatusAllowableValues() + { + return [ + self::SHIFT_ASSIGNMENT_STATUS_PENDING, + self::SHIFT_ASSIGNMENT_STATUS_ASSIGNED, + self::SHIFT_ASSIGNMENT_STATUS_BIDDING, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PENDING_SHIFT_SWAP_AWAITING_APPROVAL, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP, + self::SHIFT_ASSIGNMENT_STATUS_PROPOSED_SHIFT_SWAP_AWAITING_APPROVAL, + ]; + } + /** * Associative array for storing property values @@ -340,6 +370,7 @@ public function __construct(array $data = null) $this->container['date_published'] = isset($data['date_published']) ? $data['date_published'] : null; $this->container['biddable'] = isset($data['biddable']) ? $data['biddable'] : null; $this->container['shift_swap_cutoff_time'] = isset($data['shift_swap_cutoff_time']) ? $data['shift_swap_cutoff_time'] : null; + $this->container['shift_assignment_status'] = isset($data['shift_assignment_status']) ? $data['shift_assignment_status'] : null; } /** @@ -351,6 +382,14 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($this->container['shift_assignment_status']) && !in_array($this->container['shift_assignment_status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -1037,6 +1076,39 @@ public function setShiftSwapCutoffTime($shift_swap_cutoff_time) return $this; } + + /** + * Gets shift_assignment_status + * + * @return string + */ + public function getShiftAssignmentStatus() + { + return $this->container['shift_assignment_status']; + } + + /** + * Sets shift_assignment_status + * + * @param string $shift_assignment_status + * + * @return $this + */ + public function setShiftAssignmentStatus($shift_assignment_status) + { + $allowedValues = $this->getShiftAssignmentStatusAllowableValues(); + if (!is_null($shift_assignment_status) && !in_array($shift_assignment_status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'shift_assignment_status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['shift_assignment_status'] = $shift_assignment_status; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/ManagerDashboardModel.php b/src/lib/Model/ManagerDashboardModel.php new file mode 100644 index 0000000..d761872 --- /dev/null +++ b/src/lib/Model/ManagerDashboardModel.php @@ -0,0 +1,361 @@ + '\Swagger\Client\Model\ManagerItemCountModel', + 'submitted_timesheets' => '\Swagger\Client\Model\ManagerItemCountModel', + 'pending_expense_requests' => '\Swagger\Client\Model\ManagerItemCountModel' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'pending_leave_requests' => null, + 'submitted_timesheets' => null, + 'pending_expense_requests' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pending_leave_requests' => 'pendingLeaveRequests', + 'submitted_timesheets' => 'submittedTimesheets', + 'pending_expense_requests' => 'pendingExpenseRequests' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pending_leave_requests' => 'setPendingLeaveRequests', + 'submitted_timesheets' => 'setSubmittedTimesheets', + 'pending_expense_requests' => 'setPendingExpenseRequests' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pending_leave_requests' => 'getPendingLeaveRequests', + 'submitted_timesheets' => 'getSubmittedTimesheets', + 'pending_expense_requests' => 'getPendingExpenseRequests' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['pending_leave_requests'] = isset($data['pending_leave_requests']) ? $data['pending_leave_requests'] : null; + $this->container['submitted_timesheets'] = isset($data['submitted_timesheets']) ? $data['submitted_timesheets'] : null; + $this->container['pending_expense_requests'] = isset($data['pending_expense_requests']) ? $data['pending_expense_requests'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pending_leave_requests + * + * @return \Swagger\Client\Model\ManagerItemCountModel + */ + public function getPendingLeaveRequests() + { + return $this->container['pending_leave_requests']; + } + + /** + * Sets pending_leave_requests + * + * @param \Swagger\Client\Model\ManagerItemCountModel $pending_leave_requests + * + * @return $this + */ + public function setPendingLeaveRequests($pending_leave_requests) + { + $this->container['pending_leave_requests'] = $pending_leave_requests; + + return $this; + } + + /** + * Gets submitted_timesheets + * + * @return \Swagger\Client\Model\ManagerItemCountModel + */ + public function getSubmittedTimesheets() + { + return $this->container['submitted_timesheets']; + } + + /** + * Sets submitted_timesheets + * + * @param \Swagger\Client\Model\ManagerItemCountModel $submitted_timesheets + * + * @return $this + */ + public function setSubmittedTimesheets($submitted_timesheets) + { + $this->container['submitted_timesheets'] = $submitted_timesheets; + + return $this; + } + + /** + * Gets pending_expense_requests + * + * @return \Swagger\Client\Model\ManagerItemCountModel + */ + public function getPendingExpenseRequests() + { + return $this->container['pending_expense_requests']; + } + + /** + * Sets pending_expense_requests + * + * @param \Swagger\Client\Model\ManagerItemCountModel $pending_expense_requests + * + * @return $this + */ + public function setPendingExpenseRequests($pending_expense_requests) + { + $this->container['pending_expense_requests'] = $pending_expense_requests; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ManagerItemCountModel.php b/src/lib/Model/ManagerItemCountModel.php new file mode 100644 index 0000000..3bbb5ab --- /dev/null +++ b/src/lib/Model/ManagerItemCountModel.php @@ -0,0 +1,331 @@ + 'int', + 'item_count_by_employee_id' => '\Swagger\Client\Model\EmployeeItemCountModel[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'item_count' => 'int32', + 'item_count_by_employee_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'item_count' => 'itemCount', + 'item_count_by_employee_id' => 'itemCountByEmployeeId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'item_count' => 'setItemCount', + 'item_count_by_employee_id' => 'setItemCountByEmployeeId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'item_count' => 'getItemCount', + 'item_count_by_employee_id' => 'getItemCountByEmployeeId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['item_count'] = isset($data['item_count']) ? $data['item_count'] : null; + $this->container['item_count_by_employee_id'] = isset($data['item_count_by_employee_id']) ? $data['item_count_by_employee_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets item_count + * + * @return int + */ + public function getItemCount() + { + return $this->container['item_count']; + } + + /** + * Sets item_count + * + * @param int $item_count + * + * @return $this + */ + public function setItemCount($item_count) + { + $this->container['item_count'] = $item_count; + + return $this; + } + + /** + * Gets item_count_by_employee_id + * + * @return \Swagger\Client\Model\EmployeeItemCountModel[] + */ + public function getItemCountByEmployeeId() + { + return $this->container['item_count_by_employee_id']; + } + + /** + * Sets item_count_by_employee_id + * + * @param \Swagger\Client\Model\EmployeeItemCountModel[] $item_count_by_employee_id + * + * @return $this + */ + public function setItemCountByEmployeeId($item_count_by_employee_id) + { + $this->container['item_count_by_employee_id'] = $item_count_by_employee_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ManagerTimesheetLineModel.php b/src/lib/Model/ManagerTimesheetLineModel.php index e887ae0..25925be 100644 --- a/src/lib/Model/ManagerTimesheetLineModel.php +++ b/src/lib/Model/ManagerTimesheetLineModel.php @@ -498,6 +498,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -595,6 +600,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/ManagerTimesheetSubmitModel.php b/src/lib/Model/ManagerTimesheetSubmitModel.php index 00a6dc7..8c4b86f 100644 --- a/src/lib/Model/ManagerTimesheetSubmitModel.php +++ b/src/lib/Model/ManagerTimesheetSubmitModel.php @@ -76,7 +76,8 @@ class ManagerTimesheetSubmitModel implements ModelInterface, ArrayAccess 'hidden_comments' => 'string', 'breaks' => '\Swagger\Client\Model\TimesheetBreakSubmitModel[]', 'attachment' => '\Swagger\Client\Model\Attachment', - 'source' => 'string' + 'source' => 'string', + 'location_is_deleted' => 'bool' ]; /** @@ -104,7 +105,8 @@ class ManagerTimesheetSubmitModel implements ModelInterface, ArrayAccess 'hidden_comments' => null, 'breaks' => null, 'attachment' => null, - 'source' => null + 'source' => null, + 'location_is_deleted' => null ]; /** @@ -153,7 +155,8 @@ public static function swaggerFormats() 'hidden_comments' => 'hiddenComments', 'breaks' => 'breaks', 'attachment' => 'attachment', - 'source' => 'source' + 'source' => 'source', + 'location_is_deleted' => 'locationIsDeleted' ]; /** @@ -181,7 +184,8 @@ public static function swaggerFormats() 'hidden_comments' => 'setHiddenComments', 'breaks' => 'setBreaks', 'attachment' => 'setAttachment', - 'source' => 'setSource' + 'source' => 'setSource', + 'location_is_deleted' => 'setLocationIsDeleted' ]; /** @@ -209,7 +213,8 @@ public static function swaggerFormats() 'hidden_comments' => 'getHiddenComments', 'breaks' => 'getBreaks', 'attachment' => 'getAttachment', - 'source' => 'getSource' + 'source' => 'getSource', + 'location_is_deleted' => 'getLocationIsDeleted' ]; /** @@ -323,6 +328,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -404,6 +414,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -443,6 +458,7 @@ public function __construct(array $data = null) $this->container['breaks'] = isset($data['breaks']) ? $data['breaks'] : null; $this->container['attachment'] = isset($data['attachment']) ? $data['attachment'] : null; $this->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['location_is_deleted'] = isset($data['location_is_deleted']) ? $data['location_is_deleted'] : null; } /** @@ -965,6 +981,30 @@ public function setSource($source) return $this; } + + /** + * Gets location_is_deleted + * + * @return bool + */ + public function getLocationIsDeleted() + { + return $this->container['location_is_deleted']; + } + + /** + * Sets location_is_deleted + * + * @param bool $location_is_deleted + * + * @return $this + */ + public function setLocationIsDeleted($location_is_deleted) + { + $this->container['location_is_deleted'] = $location_is_deleted; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/ManagerUnavailabilityModel.php b/src/lib/Model/ManagerUnavailabilityModel.php index 38fc61e..8dbcaf6 100644 --- a/src/lib/Model/ManagerUnavailabilityModel.php +++ b/src/lib/Model/ManagerUnavailabilityModel.php @@ -67,6 +67,8 @@ class ManagerUnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => 'string', 'recurring' => 'bool', 'recurring_day' => 'string', + 'recurring_days' => 'string', + 'recurring_days_csv' => 'string', 'is_all_day' => 'bool', 'view_only' => 'bool' ]; @@ -87,6 +89,8 @@ class ManagerUnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => null, 'recurring' => null, 'recurring_day' => null, + 'recurring_days' => null, + 'recurring_days_csv' => null, 'is_all_day' => null, 'view_only' => null ]; @@ -128,6 +132,8 @@ public static function swaggerFormats() 'reason' => 'reason', 'recurring' => 'recurring', 'recurring_day' => 'recurringDay', + 'recurring_days' => 'recurringDays', + 'recurring_days_csv' => 'recurringDaysCsv', 'is_all_day' => 'isAllDay', 'view_only' => 'viewOnly' ]; @@ -148,6 +154,8 @@ public static function swaggerFormats() 'reason' => 'setReason', 'recurring' => 'setRecurring', 'recurring_day' => 'setRecurringDay', + 'recurring_days' => 'setRecurringDays', + 'recurring_days_csv' => 'setRecurringDaysCsv', 'is_all_day' => 'setIsAllDay', 'view_only' => 'setViewOnly' ]; @@ -168,6 +176,8 @@ public static function swaggerFormats() 'reason' => 'getReason', 'recurring' => 'getRecurring', 'recurring_day' => 'getRecurringDay', + 'recurring_days' => 'getRecurringDays', + 'recurring_days_csv' => 'getRecurringDaysCsv', 'is_all_day' => 'getIsAllDay', 'view_only' => 'getViewOnly' ]; @@ -220,6 +230,13 @@ public function getModelName() const RECURRING_DAY_THURSDAY = 'Thursday'; const RECURRING_DAY_FRIDAY = 'Friday'; const RECURRING_DAY_SATURDAY = 'Saturday'; + const RECURRING_DAYS_SUNDAY = 'Sunday'; + const RECURRING_DAYS_MONDAY = 'Monday'; + const RECURRING_DAYS_TUESDAY = 'Tuesday'; + const RECURRING_DAYS_WEDNESDAY = 'Wednesday'; + const RECURRING_DAYS_THURSDAY = 'Thursday'; + const RECURRING_DAYS_FRIDAY = 'Friday'; + const RECURRING_DAYS_SATURDAY = 'Saturday'; @@ -241,6 +258,24 @@ public function getRecurringDayAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringDaysAllowableValues() + { + return [ + self::RECURRING_DAYS_SUNDAY, + self::RECURRING_DAYS_MONDAY, + self::RECURRING_DAYS_TUESDAY, + self::RECURRING_DAYS_WEDNESDAY, + self::RECURRING_DAYS_THURSDAY, + self::RECURRING_DAYS_FRIDAY, + self::RECURRING_DAYS_SATURDAY, + ]; + } + /** * Associative array for storing property values @@ -267,6 +302,8 @@ public function __construct(array $data = null) $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; $this->container['recurring_day'] = isset($data['recurring_day']) ? $data['recurring_day'] : null; + $this->container['recurring_days'] = isset($data['recurring_days']) ? $data['recurring_days'] : null; + $this->container['recurring_days_csv'] = isset($data['recurring_days_csv']) ? $data['recurring_days_csv'] : null; $this->container['is_all_day'] = isset($data['is_all_day']) ? $data['is_all_day'] : null; $this->container['view_only'] = isset($data['view_only']) ? $data['view_only'] : null; } @@ -288,6 +325,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($this->container['recurring_days']) && !in_array($this->container['recurring_days'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -552,6 +597,63 @@ public function setRecurringDay($recurring_day) return $this; } + /** + * Gets recurring_days + * + * @return string + */ + public function getRecurringDays() + { + return $this->container['recurring_days']; + } + + /** + * Sets recurring_days + * + * @param string $recurring_days + * + * @return $this + */ + public function setRecurringDays($recurring_days) + { + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($recurring_days) && !in_array($recurring_days, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurring_days'] = $recurring_days; + + return $this; + } + + /** + * Gets recurring_days_csv + * + * @return string + */ + public function getRecurringDaysCsv() + { + return $this->container['recurring_days_csv']; + } + + /** + * Sets recurring_days_csv + * + * @param string $recurring_days_csv + * + * @return $this + */ + public function setRecurringDaysCsv($recurring_days_csv) + { + $this->container['recurring_days_csv'] = $recurring_days_csv; + + return $this; + } + /** * Gets is_all_day * diff --git a/src/lib/Model/NewUserCreatedModel.php b/src/lib/Model/NewUserCreatedModel.php index 6965cb2..08d376b 100644 --- a/src/lib/Model/NewUserCreatedModel.php +++ b/src/lib/Model/NewUserCreatedModel.php @@ -57,6 +57,7 @@ class NewUserCreatedModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'id' => 'int', 'username' => 'string', 'display_name' => 'string', 'time_zone' => 'string', @@ -71,6 +72,7 @@ class NewUserCreatedModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'id' => 'int32', 'username' => null, 'display_name' => null, 'time_zone' => null, @@ -106,6 +108,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', 'username' => 'username', 'display_name' => 'displayName', 'time_zone' => 'timeZone', @@ -120,6 +123,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', 'username' => 'setUsername', 'display_name' => 'setDisplayName', 'time_zone' => 'setTimeZone', @@ -134,6 +138,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', 'username' => 'getUsername', 'display_name' => 'getDisplayName', 'time_zone' => 'getTimeZone', @@ -202,6 +207,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['username'] = isset($data['username']) ? $data['username'] : null; $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; $this->container['time_zone'] = isset($data['time_zone']) ? $data['time_zone'] : null; @@ -234,6 +240,30 @@ public function valid() } + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets username * diff --git a/src/lib/Model/ODataQueryOptionsReportingDimension.php b/src/lib/Model/ODataQueryOptionsReportingDimension.php new file mode 100644 index 0000000..41cda76 --- /dev/null +++ b/src/lib/Model/ODataQueryOptionsReportingDimension.php @@ -0,0 +1,631 @@ + 'object', + 'if_none_match' => 'object', + 'context' => '\Swagger\Client\Model\ODataQueryContext', + 'request' => 'object', + 'raw_values' => '\Swagger\Client\Model\ODataRawQueryOptions', + 'select_expand' => '\Swagger\Client\Model\SelectExpandQueryOption', + 'filter' => '\Swagger\Client\Model\FilterQueryOption', + 'order_by' => '\Swagger\Client\Model\OrderByQueryOption', + 'skip' => '\Swagger\Client\Model\SkipQueryOption', + 'top' => '\Swagger\Client\Model\TopQueryOption', + 'inline_count' => '\Swagger\Client\Model\InlineCountQueryOption', + 'validator' => '\Swagger\Client\Model\ODataQueryValidator' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'if_match' => null, + 'if_none_match' => null, + 'context' => null, + 'request' => null, + 'raw_values' => null, + 'select_expand' => null, + 'filter' => null, + 'order_by' => null, + 'skip' => null, + 'top' => null, + 'inline_count' => null, + 'validator' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'if_match' => 'ifMatch', + 'if_none_match' => 'ifNoneMatch', + 'context' => 'context', + 'request' => 'request', + 'raw_values' => 'rawValues', + 'select_expand' => 'selectExpand', + 'filter' => 'filter', + 'order_by' => 'orderBy', + 'skip' => 'skip', + 'top' => 'top', + 'inline_count' => 'inlineCount', + 'validator' => 'validator' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'if_match' => 'setIfMatch', + 'if_none_match' => 'setIfNoneMatch', + 'context' => 'setContext', + 'request' => 'setRequest', + 'raw_values' => 'setRawValues', + 'select_expand' => 'setSelectExpand', + 'filter' => 'setFilter', + 'order_by' => 'setOrderBy', + 'skip' => 'setSkip', + 'top' => 'setTop', + 'inline_count' => 'setInlineCount', + 'validator' => 'setValidator' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'if_match' => 'getIfMatch', + 'if_none_match' => 'getIfNoneMatch', + 'context' => 'getContext', + 'request' => 'getRequest', + 'raw_values' => 'getRawValues', + 'select_expand' => 'getSelectExpand', + 'filter' => 'getFilter', + 'order_by' => 'getOrderBy', + 'skip' => 'getSkip', + 'top' => 'getTop', + 'inline_count' => 'getInlineCount', + 'validator' => 'getValidator' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['if_match'] = isset($data['if_match']) ? $data['if_match'] : null; + $this->container['if_none_match'] = isset($data['if_none_match']) ? $data['if_none_match'] : null; + $this->container['context'] = isset($data['context']) ? $data['context'] : null; + $this->container['request'] = isset($data['request']) ? $data['request'] : null; + $this->container['raw_values'] = isset($data['raw_values']) ? $data['raw_values'] : null; + $this->container['select_expand'] = isset($data['select_expand']) ? $data['select_expand'] : null; + $this->container['filter'] = isset($data['filter']) ? $data['filter'] : null; + $this->container['order_by'] = isset($data['order_by']) ? $data['order_by'] : null; + $this->container['skip'] = isset($data['skip']) ? $data['skip'] : null; + $this->container['top'] = isset($data['top']) ? $data['top'] : null; + $this->container['inline_count'] = isset($data['inline_count']) ? $data['inline_count'] : null; + $this->container['validator'] = isset($data['validator']) ? $data['validator'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets if_match + * + * @return object + */ + public function getIfMatch() + { + return $this->container['if_match']; + } + + /** + * Sets if_match + * + * @param object $if_match + * + * @return $this + */ + public function setIfMatch($if_match) + { + $this->container['if_match'] = $if_match; + + return $this; + } + + /** + * Gets if_none_match + * + * @return object + */ + public function getIfNoneMatch() + { + return $this->container['if_none_match']; + } + + /** + * Sets if_none_match + * + * @param object $if_none_match + * + * @return $this + */ + public function setIfNoneMatch($if_none_match) + { + $this->container['if_none_match'] = $if_none_match; + + return $this; + } + + /** + * Gets context + * + * @return \Swagger\Client\Model\ODataQueryContext + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param \Swagger\Client\Model\ODataQueryContext $context + * + * @return $this + */ + public function setContext($context) + { + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets request + * + * @return object + */ + public function getRequest() + { + return $this->container['request']; + } + + /** + * Sets request + * + * @param object $request + * + * @return $this + */ + public function setRequest($request) + { + $this->container['request'] = $request; + + return $this; + } + + /** + * Gets raw_values + * + * @return \Swagger\Client\Model\ODataRawQueryOptions + */ + public function getRawValues() + { + return $this->container['raw_values']; + } + + /** + * Sets raw_values + * + * @param \Swagger\Client\Model\ODataRawQueryOptions $raw_values + * + * @return $this + */ + public function setRawValues($raw_values) + { + $this->container['raw_values'] = $raw_values; + + return $this; + } + + /** + * Gets select_expand + * + * @return \Swagger\Client\Model\SelectExpandQueryOption + */ + public function getSelectExpand() + { + return $this->container['select_expand']; + } + + /** + * Sets select_expand + * + * @param \Swagger\Client\Model\SelectExpandQueryOption $select_expand + * + * @return $this + */ + public function setSelectExpand($select_expand) + { + $this->container['select_expand'] = $select_expand; + + return $this; + } + + /** + * Gets filter + * + * @return \Swagger\Client\Model\FilterQueryOption + */ + public function getFilter() + { + return $this->container['filter']; + } + + /** + * Sets filter + * + * @param \Swagger\Client\Model\FilterQueryOption $filter + * + * @return $this + */ + public function setFilter($filter) + { + $this->container['filter'] = $filter; + + return $this; + } + + /** + * Gets order_by + * + * @return \Swagger\Client\Model\OrderByQueryOption + */ + public function getOrderBy() + { + return $this->container['order_by']; + } + + /** + * Sets order_by + * + * @param \Swagger\Client\Model\OrderByQueryOption $order_by + * + * @return $this + */ + public function setOrderBy($order_by) + { + $this->container['order_by'] = $order_by; + + return $this; + } + + /** + * Gets skip + * + * @return \Swagger\Client\Model\SkipQueryOption + */ + public function getSkip() + { + return $this->container['skip']; + } + + /** + * Sets skip + * + * @param \Swagger\Client\Model\SkipQueryOption $skip + * + * @return $this + */ + public function setSkip($skip) + { + $this->container['skip'] = $skip; + + return $this; + } + + /** + * Gets top + * + * @return \Swagger\Client\Model\TopQueryOption + */ + public function getTop() + { + return $this->container['top']; + } + + /** + * Sets top + * + * @param \Swagger\Client\Model\TopQueryOption $top + * + * @return $this + */ + public function setTop($top) + { + $this->container['top'] = $top; + + return $this; + } + + /** + * Gets inline_count + * + * @return \Swagger\Client\Model\InlineCountQueryOption + */ + public function getInlineCount() + { + return $this->container['inline_count']; + } + + /** + * Sets inline_count + * + * @param \Swagger\Client\Model\InlineCountQueryOption $inline_count + * + * @return $this + */ + public function setInlineCount($inline_count) + { + $this->container['inline_count'] = $inline_count; + + return $this; + } + + /** + * Gets validator + * + * @return \Swagger\Client\Model\ODataQueryValidator + */ + public function getValidator() + { + return $this->container['validator']; + } + + /** + * Sets validator + * + * @param \Swagger\Client\Model\ODataQueryValidator $validator + * + * @return $this + */ + public function setValidator($validator) + { + $this->container['validator'] = $validator; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ODataQueryOptionsReportingDimensionValue.php b/src/lib/Model/ODataQueryOptionsReportingDimensionValue.php new file mode 100644 index 0000000..afc2103 --- /dev/null +++ b/src/lib/Model/ODataQueryOptionsReportingDimensionValue.php @@ -0,0 +1,631 @@ + 'object', + 'if_none_match' => 'object', + 'context' => '\Swagger\Client\Model\ODataQueryContext', + 'request' => 'object', + 'raw_values' => '\Swagger\Client\Model\ODataRawQueryOptions', + 'select_expand' => '\Swagger\Client\Model\SelectExpandQueryOption', + 'filter' => '\Swagger\Client\Model\FilterQueryOption', + 'order_by' => '\Swagger\Client\Model\OrderByQueryOption', + 'skip' => '\Swagger\Client\Model\SkipQueryOption', + 'top' => '\Swagger\Client\Model\TopQueryOption', + 'inline_count' => '\Swagger\Client\Model\InlineCountQueryOption', + 'validator' => '\Swagger\Client\Model\ODataQueryValidator' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'if_match' => null, + 'if_none_match' => null, + 'context' => null, + 'request' => null, + 'raw_values' => null, + 'select_expand' => null, + 'filter' => null, + 'order_by' => null, + 'skip' => null, + 'top' => null, + 'inline_count' => null, + 'validator' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'if_match' => 'ifMatch', + 'if_none_match' => 'ifNoneMatch', + 'context' => 'context', + 'request' => 'request', + 'raw_values' => 'rawValues', + 'select_expand' => 'selectExpand', + 'filter' => 'filter', + 'order_by' => 'orderBy', + 'skip' => 'skip', + 'top' => 'top', + 'inline_count' => 'inlineCount', + 'validator' => 'validator' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'if_match' => 'setIfMatch', + 'if_none_match' => 'setIfNoneMatch', + 'context' => 'setContext', + 'request' => 'setRequest', + 'raw_values' => 'setRawValues', + 'select_expand' => 'setSelectExpand', + 'filter' => 'setFilter', + 'order_by' => 'setOrderBy', + 'skip' => 'setSkip', + 'top' => 'setTop', + 'inline_count' => 'setInlineCount', + 'validator' => 'setValidator' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'if_match' => 'getIfMatch', + 'if_none_match' => 'getIfNoneMatch', + 'context' => 'getContext', + 'request' => 'getRequest', + 'raw_values' => 'getRawValues', + 'select_expand' => 'getSelectExpand', + 'filter' => 'getFilter', + 'order_by' => 'getOrderBy', + 'skip' => 'getSkip', + 'top' => 'getTop', + 'inline_count' => 'getInlineCount', + 'validator' => 'getValidator' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['if_match'] = isset($data['if_match']) ? $data['if_match'] : null; + $this->container['if_none_match'] = isset($data['if_none_match']) ? $data['if_none_match'] : null; + $this->container['context'] = isset($data['context']) ? $data['context'] : null; + $this->container['request'] = isset($data['request']) ? $data['request'] : null; + $this->container['raw_values'] = isset($data['raw_values']) ? $data['raw_values'] : null; + $this->container['select_expand'] = isset($data['select_expand']) ? $data['select_expand'] : null; + $this->container['filter'] = isset($data['filter']) ? $data['filter'] : null; + $this->container['order_by'] = isset($data['order_by']) ? $data['order_by'] : null; + $this->container['skip'] = isset($data['skip']) ? $data['skip'] : null; + $this->container['top'] = isset($data['top']) ? $data['top'] : null; + $this->container['inline_count'] = isset($data['inline_count']) ? $data['inline_count'] : null; + $this->container['validator'] = isset($data['validator']) ? $data['validator'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets if_match + * + * @return object + */ + public function getIfMatch() + { + return $this->container['if_match']; + } + + /** + * Sets if_match + * + * @param object $if_match + * + * @return $this + */ + public function setIfMatch($if_match) + { + $this->container['if_match'] = $if_match; + + return $this; + } + + /** + * Gets if_none_match + * + * @return object + */ + public function getIfNoneMatch() + { + return $this->container['if_none_match']; + } + + /** + * Sets if_none_match + * + * @param object $if_none_match + * + * @return $this + */ + public function setIfNoneMatch($if_none_match) + { + $this->container['if_none_match'] = $if_none_match; + + return $this; + } + + /** + * Gets context + * + * @return \Swagger\Client\Model\ODataQueryContext + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param \Swagger\Client\Model\ODataQueryContext $context + * + * @return $this + */ + public function setContext($context) + { + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets request + * + * @return object + */ + public function getRequest() + { + return $this->container['request']; + } + + /** + * Sets request + * + * @param object $request + * + * @return $this + */ + public function setRequest($request) + { + $this->container['request'] = $request; + + return $this; + } + + /** + * Gets raw_values + * + * @return \Swagger\Client\Model\ODataRawQueryOptions + */ + public function getRawValues() + { + return $this->container['raw_values']; + } + + /** + * Sets raw_values + * + * @param \Swagger\Client\Model\ODataRawQueryOptions $raw_values + * + * @return $this + */ + public function setRawValues($raw_values) + { + $this->container['raw_values'] = $raw_values; + + return $this; + } + + /** + * Gets select_expand + * + * @return \Swagger\Client\Model\SelectExpandQueryOption + */ + public function getSelectExpand() + { + return $this->container['select_expand']; + } + + /** + * Sets select_expand + * + * @param \Swagger\Client\Model\SelectExpandQueryOption $select_expand + * + * @return $this + */ + public function setSelectExpand($select_expand) + { + $this->container['select_expand'] = $select_expand; + + return $this; + } + + /** + * Gets filter + * + * @return \Swagger\Client\Model\FilterQueryOption + */ + public function getFilter() + { + return $this->container['filter']; + } + + /** + * Sets filter + * + * @param \Swagger\Client\Model\FilterQueryOption $filter + * + * @return $this + */ + public function setFilter($filter) + { + $this->container['filter'] = $filter; + + return $this; + } + + /** + * Gets order_by + * + * @return \Swagger\Client\Model\OrderByQueryOption + */ + public function getOrderBy() + { + return $this->container['order_by']; + } + + /** + * Sets order_by + * + * @param \Swagger\Client\Model\OrderByQueryOption $order_by + * + * @return $this + */ + public function setOrderBy($order_by) + { + $this->container['order_by'] = $order_by; + + return $this; + } + + /** + * Gets skip + * + * @return \Swagger\Client\Model\SkipQueryOption + */ + public function getSkip() + { + return $this->container['skip']; + } + + /** + * Sets skip + * + * @param \Swagger\Client\Model\SkipQueryOption $skip + * + * @return $this + */ + public function setSkip($skip) + { + $this->container['skip'] = $skip; + + return $this; + } + + /** + * Gets top + * + * @return \Swagger\Client\Model\TopQueryOption + */ + public function getTop() + { + return $this->container['top']; + } + + /** + * Sets top + * + * @param \Swagger\Client\Model\TopQueryOption $top + * + * @return $this + */ + public function setTop($top) + { + $this->container['top'] = $top; + + return $this; + } + + /** + * Gets inline_count + * + * @return \Swagger\Client\Model\InlineCountQueryOption + */ + public function getInlineCount() + { + return $this->container['inline_count']; + } + + /** + * Sets inline_count + * + * @param \Swagger\Client\Model\InlineCountQueryOption $inline_count + * + * @return $this + */ + public function setInlineCount($inline_count) + { + $this->container['inline_count'] = $inline_count; + + return $this; + } + + /** + * Gets validator + * + * @return \Swagger\Client\Model\ODataQueryValidator + */ + public function getValidator() + { + return $this->container['validator']; + } + + /** + * Sets validator + * + * @param \Swagger\Client\Model\ODataQueryValidator $validator + * + * @return $this + */ + public function setValidator($validator) + { + $this->container['validator'] = $validator; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/OpeningBalancesEtpModel.php b/src/lib/Model/OpeningBalancesEtpModel.php index 03991d9..4aaaf50 100644 --- a/src/lib/Model/OpeningBalancesEtpModel.php +++ b/src/lib/Model/OpeningBalancesEtpModel.php @@ -57,11 +57,11 @@ class OpeningBalancesEtpModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'id' => 'int', 'etp_type' => 'string', 'tax_free_component' => 'double', 'taxable_component' => 'double', 'tax_withheld' => 'double', - 'lump_sum_d' => 'double', 'is_amended' => 'bool', 'payment_date' => '\DateTime', 'generate_payment_summary' => 'bool' @@ -73,11 +73,11 @@ class OpeningBalancesEtpModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'id' => 'int32', 'etp_type' => null, 'tax_free_component' => 'double', 'taxable_component' => 'double', 'tax_withheld' => 'double', - 'lump_sum_d' => 'double', 'is_amended' => null, 'payment_date' => 'date-time', 'generate_payment_summary' => null @@ -110,11 +110,11 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', 'etp_type' => 'etpType', 'tax_free_component' => 'taxFreeComponent', 'taxable_component' => 'taxableComponent', 'tax_withheld' => 'taxWithheld', - 'lump_sum_d' => 'lumpSumD', 'is_amended' => 'isAmended', 'payment_date' => 'paymentDate', 'generate_payment_summary' => 'generatePaymentSummary' @@ -126,11 +126,11 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', 'etp_type' => 'setEtpType', 'tax_free_component' => 'setTaxFreeComponent', 'taxable_component' => 'setTaxableComponent', 'tax_withheld' => 'setTaxWithheld', - 'lump_sum_d' => 'setLumpSumD', 'is_amended' => 'setIsAmended', 'payment_date' => 'setPaymentDate', 'generate_payment_summary' => 'setGeneratePaymentSummary' @@ -142,11 +142,11 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', 'etp_type' => 'getEtpType', 'tax_free_component' => 'getTaxFreeComponent', 'taxable_component' => 'getTaxableComponent', 'tax_withheld' => 'getTaxWithheld', - 'lump_sum_d' => 'getLumpSumD', 'is_amended' => 'getIsAmended', 'payment_date' => 'getPaymentDate', 'generate_payment_summary' => 'getGeneratePaymentSummary' @@ -231,11 +231,11 @@ public function getEtpTypeAllowableValues() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['etp_type'] = isset($data['etp_type']) ? $data['etp_type'] : null; $this->container['tax_free_component'] = isset($data['tax_free_component']) ? $data['tax_free_component'] : null; $this->container['taxable_component'] = isset($data['taxable_component']) ? $data['taxable_component'] : null; $this->container['tax_withheld'] = isset($data['tax_withheld']) ? $data['tax_withheld'] : null; - $this->container['lump_sum_d'] = isset($data['lump_sum_d']) ? $data['lump_sum_d'] : null; $this->container['is_amended'] = isset($data['is_amended']) ? $data['is_amended'] : null; $this->container['payment_date'] = isset($data['payment_date']) ? $data['payment_date'] : null; $this->container['generate_payment_summary'] = isset($data['generate_payment_summary']) ? $data['generate_payment_summary'] : null; @@ -273,6 +273,30 @@ public function valid() } + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** * Gets etp_type * @@ -378,30 +402,6 @@ public function setTaxWithheld($tax_withheld) return $this; } - /** - * Gets lump_sum_d - * - * @return double - */ - public function getLumpSumD() - { - return $this->container['lump_sum_d']; - } - - /** - * Sets lump_sum_d - * - * @param double $lump_sum_d - * - * @return $this - */ - public function setLumpSumD($lump_sum_d) - { - $this->container['lump_sum_d'] = $lump_sum_d; - - return $this; - } - /** * Gets is_amended * diff --git a/src/lib/Model/PayRunWarningDto.php b/src/lib/Model/PayRunWarningDto.php index 0cfc04f..43e729f 100644 --- a/src/lib/Model/PayRunWarningDto.php +++ b/src/lib/Model/PayRunWarningDto.php @@ -269,7 +269,15 @@ public function getModelName() const WARNING_TYPE_CIS_SUBCONTRACTOR_UNMATCHED = 'CisSubcontractorUnmatched'; const WARNING_TYPE_CPF_REFUND_REQUIRED = 'CpfRefundRequired'; const WARNING_TYPE_CPF_YEAR_END_RECALCULATION_REQUIRED = 'CpfYearEndRecalculationRequired'; + const WARNING_TYPE_TAX_CODE_DISPLAY_NAME_TOO_LONG = 'TaxCodeDisplayNameTooLong'; const WARNING_TYPE_TIMESHEET_OUT_OF_SEQUENCE = 'TimesheetOutOfSequence'; + const WARNING_TYPE_EXPIRED_CONTRACTOR_TAX_RATE = 'ExpiredContractorTaxRate'; + const WARNING_TYPE_CONCURRENT_PAY_RUN = 'ConcurrentPayRun'; + const WARNING_TYPE_STUDENT_LOAN_ADJUSTMENT = 'StudentLoanAdjustment'; + const WARNING_TYPE_UNPAID_LEAVE_WITH_AVAILABLE_BALANCE = 'UnpaidLeaveWithAvailableBalance'; + const WARNING_TYPE_OCCUPATIONAL_LEAVE_APPLIED = 'OccupationalLeaveApplied'; + const WARNING_TYPE_OCCUPATIONAL_LEAVE_APPLIED_PREVIOUS = 'OccupationalLeaveAppliedPrevious'; + const WARNING_TYPE_OCCUPATIONAL_LEAVE_ENTITLEMENT_EXHAUSTED = 'OccupationalLeaveEntitlementExhausted'; @@ -352,7 +360,15 @@ public function getWarningTypeAllowableValues() self::WARNING_TYPE_CIS_SUBCONTRACTOR_UNMATCHED, self::WARNING_TYPE_CPF_REFUND_REQUIRED, self::WARNING_TYPE_CPF_YEAR_END_RECALCULATION_REQUIRED, + self::WARNING_TYPE_TAX_CODE_DISPLAY_NAME_TOO_LONG, self::WARNING_TYPE_TIMESHEET_OUT_OF_SEQUENCE, + self::WARNING_TYPE_EXPIRED_CONTRACTOR_TAX_RATE, + self::WARNING_TYPE_CONCURRENT_PAY_RUN, + self::WARNING_TYPE_STUDENT_LOAN_ADJUSTMENT, + self::WARNING_TYPE_UNPAID_LEAVE_WITH_AVAILABLE_BALANCE, + self::WARNING_TYPE_OCCUPATIONAL_LEAVE_APPLIED, + self::WARNING_TYPE_OCCUPATIONAL_LEAVE_APPLIED_PREVIOUS, + self::WARNING_TYPE_OCCUPATIONAL_LEAVE_ENTITLEMENT_EXHAUSTED, ]; } diff --git a/src/lib/Model/RateOverride.php b/src/lib/Model/RateOverride.php new file mode 100644 index 0000000..614a409 --- /dev/null +++ b/src/lib/Model/RateOverride.php @@ -0,0 +1,361 @@ + 'int', + 'rate' => 'double', + 'use_rate_as_is' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'pay_category_id' => 'int32', + 'rate' => 'double', + 'use_rate_as_is' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'pay_category_id' => 'payCategoryId', + 'rate' => 'rate', + 'use_rate_as_is' => 'useRateAsIs' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'pay_category_id' => 'setPayCategoryId', + 'rate' => 'setRate', + 'use_rate_as_is' => 'setUseRateAsIs' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'pay_category_id' => 'getPayCategoryId', + 'rate' => 'getRate', + 'use_rate_as_is' => 'getUseRateAsIs' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['pay_category_id'] = isset($data['pay_category_id']) ? $data['pay_category_id'] : null; + $this->container['rate'] = isset($data['rate']) ? $data['rate'] : null; + $this->container['use_rate_as_is'] = isset($data['use_rate_as_is']) ? $data['use_rate_as_is'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets pay_category_id + * + * @return int + */ + public function getPayCategoryId() + { + return $this->container['pay_category_id']; + } + + /** + * Sets pay_category_id + * + * @param int $pay_category_id + * + * @return $this + */ + public function setPayCategoryId($pay_category_id) + { + $this->container['pay_category_id'] = $pay_category_id; + + return $this; + } + + /** + * Gets rate + * + * @return double + */ + public function getRate() + { + return $this->container['rate']; + } + + /** + * Sets rate + * + * @param double $rate + * + * @return $this + */ + public function setRate($rate) + { + $this->container['rate'] = $rate; + + return $this; + } + + /** + * Gets use_rate_as_is + * + * @return bool + */ + public function getUseRateAsIs() + { + return $this->container['use_rate_as_is']; + } + + /** + * Sets use_rate_as_is + * + * @param bool $use_rate_as_is Nullable

Note:If set to \"true\", the system assumes the Rate value is inclusive of rate loading and penalty loading. + * + * @return $this + */ + public function setUseRateAsIs($use_rate_as_is) + { + $this->container['use_rate_as_is'] = $use_rate_as_is; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/RecoverPasswordModel.php b/src/lib/Model/RecoverPasswordModel.php index 9506942..5008d2f 100644 --- a/src/lib/Model/RecoverPasswordModel.php +++ b/src/lib/Model/RecoverPasswordModel.php @@ -267,6 +267,21 @@ public function getModelName() const MESSAGE_TYPE_QUALIFICATION_EXPIRED_NOTIFICATION = 'QualificationExpiredNotification'; const MESSAGE_TYPE_CREDIT_CARD_EXPIRING_REMINDER = 'CreditCardExpiringReminder'; const MESSAGE_TYPE_RESEND_PAYMENT_AND_DEDUCTION_STATEMENT = 'ResendPaymentAndDeductionStatement'; + const MESSAGE_TYPE_EMPLOYEE_SELF_SETUP_REMINDER = 'EmployeeSelfSetupReminder'; + const MESSAGE_TYPE_EMPLOYEE_ONBOARDING_P45_UPLOADED = 'EmployeeOnboardingP45Uploaded'; + const MESSAGE_TYPE_INITIATE_EMPLOYEE_ONBOARDING_WITH_CONTRACT = 'InitiateEmployeeOnboardingWithContract'; + const MESSAGE_TYPE_SIGNATORY_CONTRACT = 'SignatoryContract'; + const MESSAGE_TYPE_WORK_ELIGIBILITY_EXPIRING_NOTIFICATION = 'WorkEligibilityExpiringNotification'; + const MESSAGE_TYPE_WORK_ELIGIBILITY_EXPIRED_NOTIFICATION = 'WorkEligibilityExpiredNotification'; + const MESSAGE_TYPE_CONTRACT_SIGNED_EMPLOYEE_NOTIFICATION = 'ContractSignedEmployeeNotification'; + const MESSAGE_TYPE_CONTRACT_SIGNED_EMPLOYER_NOTIFICATION = 'ContractSignedEmployerNotification'; + const MESSAGE_TYPE_INITIATE_EMPLOYEE_ONBOARDING_WITH_LOGIN = 'InitiateEmployeeOnboardingWithLogin'; + const MESSAGE_TYPE_AUTHORISING_SIGNATORY_NOTIFICATION = 'AuthorisingSignatoryNotification'; + const MESSAGE_TYPE_INTEGRATION_CUSTOM_FEATURE_REQUEST = 'IntegrationCustomFeatureRequest'; + const MESSAGE_TYPE_EMAIL_ADDRESS_CHANGED = 'EmailAddressChanged'; + const MESSAGE_TYPE_EMAIL_ADDRESS_CONFIRM_CHANGED = 'EmailAddressConfirmChanged'; + const MESSAGE_TYPE_RECOVERY_EMAIL_ADDRESS_CHANGED = 'RecoveryEmailAddressChanged'; + const MESSAGE_TYPE_RECOVERY_EMAIL_ADDRESS_CONFIRM_CHANGED = 'RecoveryEmailAddressConfirmChanged'; @@ -382,6 +397,21 @@ public function getMessageTypeAllowableValues() self::MESSAGE_TYPE_QUALIFICATION_EXPIRED_NOTIFICATION, self::MESSAGE_TYPE_CREDIT_CARD_EXPIRING_REMINDER, self::MESSAGE_TYPE_RESEND_PAYMENT_AND_DEDUCTION_STATEMENT, + self::MESSAGE_TYPE_EMPLOYEE_SELF_SETUP_REMINDER, + self::MESSAGE_TYPE_EMPLOYEE_ONBOARDING_P45_UPLOADED, + self::MESSAGE_TYPE_INITIATE_EMPLOYEE_ONBOARDING_WITH_CONTRACT, + self::MESSAGE_TYPE_SIGNATORY_CONTRACT, + self::MESSAGE_TYPE_WORK_ELIGIBILITY_EXPIRING_NOTIFICATION, + self::MESSAGE_TYPE_WORK_ELIGIBILITY_EXPIRED_NOTIFICATION, + self::MESSAGE_TYPE_CONTRACT_SIGNED_EMPLOYEE_NOTIFICATION, + self::MESSAGE_TYPE_CONTRACT_SIGNED_EMPLOYER_NOTIFICATION, + self::MESSAGE_TYPE_INITIATE_EMPLOYEE_ONBOARDING_WITH_LOGIN, + self::MESSAGE_TYPE_AUTHORISING_SIGNATORY_NOTIFICATION, + self::MESSAGE_TYPE_INTEGRATION_CUSTOM_FEATURE_REQUEST, + self::MESSAGE_TYPE_EMAIL_ADDRESS_CHANGED, + self::MESSAGE_TYPE_EMAIL_ADDRESS_CONFIRM_CHANGED, + self::MESSAGE_TYPE_RECOVERY_EMAIL_ADDRESS_CHANGED, + self::MESSAGE_TYPE_RECOVERY_EMAIL_ADDRESS_CONFIRM_CHANGED, ]; } diff --git a/src/lib/Model/ReducedReportingDimensionValueApiModel.php b/src/lib/Model/ReducedReportingDimensionValueApiModel.php new file mode 100644 index 0000000..df2fb02 --- /dev/null +++ b/src/lib/Model/ReducedReportingDimensionValueApiModel.php @@ -0,0 +1,361 @@ + 'int', + 'name' => 'string', + 'reporting_dimension_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null, + 'reporting_dimension_id' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'reporting_dimension_id' => 'reportingDimensionId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'reporting_dimension_id' => 'setReportingDimensionId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'reporting_dimension_id' => 'getReportingDimensionId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['reporting_dimension_id'] = isset($data['reporting_dimension_id']) ? $data['reporting_dimension_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets reporting_dimension_id + * + * @return int + */ + public function getReportingDimensionId() + { + return $this->container['reporting_dimension_id']; + } + + /** + * Sets reporting_dimension_id + * + * @param int $reporting_dimension_id + * + * @return $this + */ + public function setReportingDimensionId($reporting_dimension_id) + { + $this->container['reporting_dimension_id'] = $reporting_dimension_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/RelatedBusinessesModel.php b/src/lib/Model/RelatedBusinessesModel.php new file mode 100644 index 0000000..bdc7a86 --- /dev/null +++ b/src/lib/Model/RelatedBusinessesModel.php @@ -0,0 +1,331 @@ + '\Swagger\Client\Model\AbbreviatedBusinessModel[]', + 'user_id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'related_businesses' => null, + 'user_id' => 'int32' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'related_businesses' => 'relatedBusinesses', + 'user_id' => 'userId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'related_businesses' => 'setRelatedBusinesses', + 'user_id' => 'setUserId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'related_businesses' => 'getRelatedBusinesses', + 'user_id' => 'getUserId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['related_businesses'] = isset($data['related_businesses']) ? $data['related_businesses'] : null; + $this->container['user_id'] = isset($data['user_id']) ? $data['user_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets related_businesses + * + * @return \Swagger\Client\Model\AbbreviatedBusinessModel[] + */ + public function getRelatedBusinesses() + { + return $this->container['related_businesses']; + } + + /** + * Sets related_businesses + * + * @param \Swagger\Client\Model\AbbreviatedBusinessModel[] $related_businesses + * + * @return $this + */ + public function setRelatedBusinesses($related_businesses) + { + $this->container['related_businesses'] = $related_businesses; + + return $this; + } + + /** + * Gets user_id + * + * @return int + */ + public function getUserId() + { + return $this->container['user_id']; + } + + /** + * Sets user_id + * + * @param int $user_id + * + * @return $this + */ + public function setUserId($user_id) + { + $this->container['user_id'] = $user_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ReportAccessModel.php b/src/lib/Model/ReportAccessModel.php index 2413f7b..d68ba36 100644 --- a/src/lib/Model/ReportAccessModel.php +++ b/src/lib/Model/ReportAccessModel.php @@ -252,9 +252,19 @@ public function getModelName() const SPECIFIC_REPORTS_IRB_FORM_CP8D = 'IrbFormCp8d'; const SPECIFIC_REPORTS_DOCUMENT_ACKNOWLEDGEMENTS_REPORT = 'DocumentAcknowledgementsReport'; const SPECIFIC_REPORTS_PAYMENT_AND_DEDUCTION_STATEMENT_REPORT = 'PaymentAndDeductionStatementReport'; + const SPECIFIC_REPORTS_UK_GENDER_PAY_GAP_DATA_REPORT = 'UkGenderPayGapDataReport'; const SPECIFIC_REPORTS_CIS300 = 'Cis300'; const SPECIFIC_REPORTS_ZAKAT = 'Zakat'; const SPECIFIC_REPORTS_EIS_CONTRIBUTIONS_REPORT = 'EisContributionsReport'; + const SPECIFIC_REPORTS_EMPLOYEE_LEAVE_RATES_REPORT = 'EmployeeLeaveRatesReport'; + const SPECIFIC_REPORTS_P11 = 'P11'; + const SPECIFIC_REPORTS_P60 = 'P60'; + const SPECIFIC_REPORTS_AVERAGE_HOURS_REPORT = 'AverageHoursReport'; + const SPECIFIC_REPORTS_UK_COURT_ORDER_REPORT = 'UkCourtOrderReport'; + const SPECIFIC_REPORTS_UK_OCCUPATIONAL_PAY_REPORT = 'UkOccupationalPayReport'; + const SPECIFIC_REPORTS_EIS_SOCSO_COMBINED_CONTRIBUTIONS_REPORT = 'EisSocsoCombinedContributionsReport'; + const SPECIFIC_REPORTS_P45_REPORT = 'P45Report'; + const SPECIFIC_REPORTS_CPF_OW_AND_AW_RECONCILIATION_REPORT = 'CpfOwAndAwReconciliationReport'; @@ -361,9 +371,19 @@ public function getSpecificReportsAllowableValues() self::SPECIFIC_REPORTS_IRB_FORM_CP8D, self::SPECIFIC_REPORTS_DOCUMENT_ACKNOWLEDGEMENTS_REPORT, self::SPECIFIC_REPORTS_PAYMENT_AND_DEDUCTION_STATEMENT_REPORT, + self::SPECIFIC_REPORTS_UK_GENDER_PAY_GAP_DATA_REPORT, self::SPECIFIC_REPORTS_CIS300, self::SPECIFIC_REPORTS_ZAKAT, self::SPECIFIC_REPORTS_EIS_CONTRIBUTIONS_REPORT, + self::SPECIFIC_REPORTS_EMPLOYEE_LEAVE_RATES_REPORT, + self::SPECIFIC_REPORTS_P11, + self::SPECIFIC_REPORTS_P60, + self::SPECIFIC_REPORTS_AVERAGE_HOURS_REPORT, + self::SPECIFIC_REPORTS_UK_COURT_ORDER_REPORT, + self::SPECIFIC_REPORTS_UK_OCCUPATIONAL_PAY_REPORT, + self::SPECIFIC_REPORTS_EIS_SOCSO_COMBINED_CONTRIBUTIONS_REPORT, + self::SPECIFIC_REPORTS_P45_REPORT, + self::SPECIFIC_REPORTS_CPF_OW_AND_AW_RECONCILIATION_REPORT, ]; } diff --git a/src/lib/Model/ReportRequestWithPayScheduleModel.php b/src/lib/Model/ReportRequestWithPayScheduleModel.php index 0ae4c87..f9a8f91 100644 --- a/src/lib/Model/ReportRequestWithPayScheduleModel.php +++ b/src/lib/Model/ReportRequestWithPayScheduleModel.php @@ -58,6 +58,7 @@ class ReportRequestWithPayScheduleModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -71,6 +72,7 @@ class ReportRequestWithPayScheduleModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -105,6 +107,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -118,6 +121,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -131,6 +135,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -198,6 +203,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -252,6 +258,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/ReportingDimensionApiModel.php b/src/lib/Model/ReportingDimensionApiModel.php new file mode 100644 index 0000000..dbef068 --- /dev/null +++ b/src/lib/Model/ReportingDimensionApiModel.php @@ -0,0 +1,569 @@ + 'int', + 'name' => 'string', + 'source' => 'string', + 'external_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null, + 'source' => null, + 'external_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'source' => 'source', + 'external_id' => 'externalId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'source' => 'setSource', + 'external_id' => 'setExternalId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'source' => 'getSource', + 'external_id' => 'getExternalId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const SOURCE_NONE = 'None'; + const SOURCE_SAASU = 'Saasu'; + const SOURCE_XERO = 'Xero'; + const SOURCE_MYOB = 'MYOB'; + const SOURCE_DEPUTY = 'Deputy'; + const SOURCE_EMPLOYEE_TIME_PUNCH = 'EmployeeTimePunch'; + const SOURCE_CLICK_SUPER = 'ClickSuper'; + const SOURCE_INTEGRATED_TIMESHEETS = 'IntegratedTimesheets'; + const SOURCE_FILE_IMPORT = 'FileImport'; + const SOURCE_FILE_EXPORT = 'FileExport'; + const SOURCE_QUICK_BOOKS = 'QuickBooks'; + const SOURCE_HARMONY = 'Harmony'; + const SOURCE_AWARD_STORE = 'AwardStore'; + const SOURCE_ATTACHE = 'Attache'; + const SOURCE_INTEGRATED_ROSTERING = 'IntegratedRostering'; + const SOURCE_RECKON_ACCOUNTS = 'ReckonAccounts'; + const SOURCE_API = 'API'; + const SOURCE_MICRO_POWER = 'MicroPower'; + const SOURCE_ROSTER_LIVE = 'RosterLive'; + const SOURCE_NET_SUITE = 'NetSuite'; + const SOURCE_KOUNTA = 'Kounta'; + const SOURCE_TIME_AND_ATTENDANCE_KIOSK = 'TimeAndAttendanceKiosk'; + const SOURCE_DETAILED_FILE_EXPORT = 'DetailedFileExport'; + const SOURCE_JONAS_PREMIER = 'JonasPremier'; + const SOURCE_WAGE_EASY = 'WageEasy'; + const SOURCE_MAESTRANO = 'Maestrano'; + const SOURCE_WORK_ZONE = 'WorkZone'; + const SOURCE_EMPLOYEE_PORTAL = 'EmployeePortal'; + const SOURCE_ROSTER_TEMPLATE = 'RosterTemplate'; + const SOURCE_ONBOARDING = 'Onboarding'; + const SOURCE_ADMIN = 'Admin'; + const SOURCE_WORK_ZONE_CLOCK_ON_OFF = 'WorkZoneClockOnOff'; + const SOURCE_NET_SUITE_ONE_WORLD = 'NetSuiteOneWorld'; + const SOURCE_SAGE50 = 'Sage50'; + const SOURCE_PENSION_SYNC = 'PensionSync'; + const SOURCE_FINANCIALS_OFFICE = 'FinancialsOffice'; + const SOURCE_PRONTO_XI = 'ProntoXI'; + const SOURCE_PAY_RUN_DEFAULT = 'PayRunDefault'; + const SOURCE_STANDARD_WORK_DAY = 'StandardWorkDay'; + const SOURCE_BEAM = 'Beam'; + const SOURCE_PAY_RUN_AUTOMATION = 'PayRunAutomation'; + const SOURCE_BUREAU_DASHBOARD = 'BureauDashboard'; + const SOURCE_WIISE = 'Wiise'; + const SOURCE_QBO_MIGRATION_TOOL = 'QBOMigrationTool'; + const SOURCE_ABRIDGED_FILE_IMPORT = 'AbridgedFileImport'; + const SOURCE_QBO_FORCED_MIGRATION = 'QBOForcedMigration'; + const SOURCE_HMRC_DPS_UPDATE = 'HmrcDpsUpdate'; + const SOURCE_HMRC_DPS_STUDENT_LOAN = 'HmrcDpsStudentLoan'; + const SOURCE_HMRC_DPS_POST_GRAD_LOAN = 'HmrcDpsPostGradLoan'; + const SOURCE_SAGE50_FILE_IMPORTER = 'Sage50FileImporter'; + const SOURCE_FPS_FILE_IMPORTER = 'FPSFileImporter'; + const SOURCE_O_AUTH = 'OAuth'; + const SOURCE_FRESH_BOOKS = 'FreshBooks'; + const SOURCE_STAR_FILE_IMPORTER = 'StarFileImporter'; + const SOURCE_ACTIVE_CAMPAIGN = 'ActiveCampaign'; + const SOURCE_SUMMARY_AND_DETAILS_EXPORT = 'SummaryAndDetailsExport'; + const SOURCE_TELLEROO = 'Telleroo'; + const SOURCE_EMPLOYEE_ADVANCED_HOURS_UPLOAD = 'EmployeeAdvancedHoursUpload'; + const SOURCE_BUSINESS_CENTRAL = 'BusinessCentral'; + const SOURCE_PAYTRON = 'Paytron'; + const SOURCE_ACCESS_FINANCIALS = 'AccessFinancials'; + const SOURCE_COMMA = 'Comma'; + const SOURCE_ZOHO = 'Zoho'; + const SOURCE_FLAT_FILE_EMPLOYEE_IMPORTER = 'FlatFileEmployeeImporter'; + const SOURCE_TWINFIELD = 'Twinfield'; + const SOURCE_SAGE_ACCOUNTING = 'SageAccounting'; + const SOURCE_SQUARE = 'Square'; + const SOURCE_QUICKFILE = 'Quickfile'; + const SOURCE_TIDE = 'Tide'; + const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_NONE, + self::SOURCE_SAASU, + self::SOURCE_XERO, + self::SOURCE_MYOB, + self::SOURCE_DEPUTY, + self::SOURCE_EMPLOYEE_TIME_PUNCH, + self::SOURCE_CLICK_SUPER, + self::SOURCE_INTEGRATED_TIMESHEETS, + self::SOURCE_FILE_IMPORT, + self::SOURCE_FILE_EXPORT, + self::SOURCE_QUICK_BOOKS, + self::SOURCE_HARMONY, + self::SOURCE_AWARD_STORE, + self::SOURCE_ATTACHE, + self::SOURCE_INTEGRATED_ROSTERING, + self::SOURCE_RECKON_ACCOUNTS, + self::SOURCE_API, + self::SOURCE_MICRO_POWER, + self::SOURCE_ROSTER_LIVE, + self::SOURCE_NET_SUITE, + self::SOURCE_KOUNTA, + self::SOURCE_TIME_AND_ATTENDANCE_KIOSK, + self::SOURCE_DETAILED_FILE_EXPORT, + self::SOURCE_JONAS_PREMIER, + self::SOURCE_WAGE_EASY, + self::SOURCE_MAESTRANO, + self::SOURCE_WORK_ZONE, + self::SOURCE_EMPLOYEE_PORTAL, + self::SOURCE_ROSTER_TEMPLATE, + self::SOURCE_ONBOARDING, + self::SOURCE_ADMIN, + self::SOURCE_WORK_ZONE_CLOCK_ON_OFF, + self::SOURCE_NET_SUITE_ONE_WORLD, + self::SOURCE_SAGE50, + self::SOURCE_PENSION_SYNC, + self::SOURCE_FINANCIALS_OFFICE, + self::SOURCE_PRONTO_XI, + self::SOURCE_PAY_RUN_DEFAULT, + self::SOURCE_STANDARD_WORK_DAY, + self::SOURCE_BEAM, + self::SOURCE_PAY_RUN_AUTOMATION, + self::SOURCE_BUREAU_DASHBOARD, + self::SOURCE_WIISE, + self::SOURCE_QBO_MIGRATION_TOOL, + self::SOURCE_ABRIDGED_FILE_IMPORT, + self::SOURCE_QBO_FORCED_MIGRATION, + self::SOURCE_HMRC_DPS_UPDATE, + self::SOURCE_HMRC_DPS_STUDENT_LOAN, + self::SOURCE_HMRC_DPS_POST_GRAD_LOAN, + self::SOURCE_SAGE50_FILE_IMPORTER, + self::SOURCE_FPS_FILE_IMPORTER, + self::SOURCE_O_AUTH, + self::SOURCE_FRESH_BOOKS, + self::SOURCE_STAR_FILE_IMPORTER, + self::SOURCE_ACTIVE_CAMPAIGN, + self::SOURCE_SUMMARY_AND_DETAILS_EXPORT, + self::SOURCE_TELLEROO, + self::SOURCE_EMPLOYEE_ADVANCED_HOURS_UPLOAD, + self::SOURCE_BUSINESS_CENTRAL, + self::SOURCE_PAYTRON, + self::SOURCE_ACCESS_FINANCIALS, + self::SOURCE_COMMA, + self::SOURCE_ZOHO, + self::SOURCE_FLAT_FILE_EMPLOYEE_IMPORTER, + self::SOURCE_TWINFIELD, + self::SOURCE_SAGE_ACCOUNTING, + self::SOURCE_SQUARE, + self::SOURCE_QUICKFILE, + self::SOURCE_TIDE, + self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source + * + * @return $this + */ + public function setSource($source) + { + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($source) && !in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ReportingDimensionValueApiModel.php b/src/lib/Model/ReportingDimensionValueApiModel.php new file mode 100644 index 0000000..68e31ff --- /dev/null +++ b/src/lib/Model/ReportingDimensionValueApiModel.php @@ -0,0 +1,719 @@ + 'int', + 'name' => 'string', + 'reporting_dimension_id' => 'int', + 'source' => 'string', + 'external_id' => 'string', + 'all_employees' => 'bool', + 'specific_employees' => 'string', + 'filter_combination_strategy' => 'string', + 'filters' => '\Swagger\Client\Model\ReportingDimensionValueFilterApiModel[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null, + 'reporting_dimension_id' => 'int32', + 'source' => null, + 'external_id' => null, + 'all_employees' => null, + 'specific_employees' => null, + 'filter_combination_strategy' => null, + 'filters' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'reporting_dimension_id' => 'reportingDimensionId', + 'source' => 'source', + 'external_id' => 'externalId', + 'all_employees' => 'allEmployees', + 'specific_employees' => 'specificEmployees', + 'filter_combination_strategy' => 'filterCombinationStrategy', + 'filters' => 'filters' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'reporting_dimension_id' => 'setReportingDimensionId', + 'source' => 'setSource', + 'external_id' => 'setExternalId', + 'all_employees' => 'setAllEmployees', + 'specific_employees' => 'setSpecificEmployees', + 'filter_combination_strategy' => 'setFilterCombinationStrategy', + 'filters' => 'setFilters' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'reporting_dimension_id' => 'getReportingDimensionId', + 'source' => 'getSource', + 'external_id' => 'getExternalId', + 'all_employees' => 'getAllEmployees', + 'specific_employees' => 'getSpecificEmployees', + 'filter_combination_strategy' => 'getFilterCombinationStrategy', + 'filters' => 'getFilters' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const SOURCE_NONE = 'None'; + const SOURCE_SAASU = 'Saasu'; + const SOURCE_XERO = 'Xero'; + const SOURCE_MYOB = 'MYOB'; + const SOURCE_DEPUTY = 'Deputy'; + const SOURCE_EMPLOYEE_TIME_PUNCH = 'EmployeeTimePunch'; + const SOURCE_CLICK_SUPER = 'ClickSuper'; + const SOURCE_INTEGRATED_TIMESHEETS = 'IntegratedTimesheets'; + const SOURCE_FILE_IMPORT = 'FileImport'; + const SOURCE_FILE_EXPORT = 'FileExport'; + const SOURCE_QUICK_BOOKS = 'QuickBooks'; + const SOURCE_HARMONY = 'Harmony'; + const SOURCE_AWARD_STORE = 'AwardStore'; + const SOURCE_ATTACHE = 'Attache'; + const SOURCE_INTEGRATED_ROSTERING = 'IntegratedRostering'; + const SOURCE_RECKON_ACCOUNTS = 'ReckonAccounts'; + const SOURCE_API = 'API'; + const SOURCE_MICRO_POWER = 'MicroPower'; + const SOURCE_ROSTER_LIVE = 'RosterLive'; + const SOURCE_NET_SUITE = 'NetSuite'; + const SOURCE_KOUNTA = 'Kounta'; + const SOURCE_TIME_AND_ATTENDANCE_KIOSK = 'TimeAndAttendanceKiosk'; + const SOURCE_DETAILED_FILE_EXPORT = 'DetailedFileExport'; + const SOURCE_JONAS_PREMIER = 'JonasPremier'; + const SOURCE_WAGE_EASY = 'WageEasy'; + const SOURCE_MAESTRANO = 'Maestrano'; + const SOURCE_WORK_ZONE = 'WorkZone'; + const SOURCE_EMPLOYEE_PORTAL = 'EmployeePortal'; + const SOURCE_ROSTER_TEMPLATE = 'RosterTemplate'; + const SOURCE_ONBOARDING = 'Onboarding'; + const SOURCE_ADMIN = 'Admin'; + const SOURCE_WORK_ZONE_CLOCK_ON_OFF = 'WorkZoneClockOnOff'; + const SOURCE_NET_SUITE_ONE_WORLD = 'NetSuiteOneWorld'; + const SOURCE_SAGE50 = 'Sage50'; + const SOURCE_PENSION_SYNC = 'PensionSync'; + const SOURCE_FINANCIALS_OFFICE = 'FinancialsOffice'; + const SOURCE_PRONTO_XI = 'ProntoXI'; + const SOURCE_PAY_RUN_DEFAULT = 'PayRunDefault'; + const SOURCE_STANDARD_WORK_DAY = 'StandardWorkDay'; + const SOURCE_BEAM = 'Beam'; + const SOURCE_PAY_RUN_AUTOMATION = 'PayRunAutomation'; + const SOURCE_BUREAU_DASHBOARD = 'BureauDashboard'; + const SOURCE_WIISE = 'Wiise'; + const SOURCE_QBO_MIGRATION_TOOL = 'QBOMigrationTool'; + const SOURCE_ABRIDGED_FILE_IMPORT = 'AbridgedFileImport'; + const SOURCE_QBO_FORCED_MIGRATION = 'QBOForcedMigration'; + const SOURCE_HMRC_DPS_UPDATE = 'HmrcDpsUpdate'; + const SOURCE_HMRC_DPS_STUDENT_LOAN = 'HmrcDpsStudentLoan'; + const SOURCE_HMRC_DPS_POST_GRAD_LOAN = 'HmrcDpsPostGradLoan'; + const SOURCE_SAGE50_FILE_IMPORTER = 'Sage50FileImporter'; + const SOURCE_FPS_FILE_IMPORTER = 'FPSFileImporter'; + const SOURCE_O_AUTH = 'OAuth'; + const SOURCE_FRESH_BOOKS = 'FreshBooks'; + const SOURCE_STAR_FILE_IMPORTER = 'StarFileImporter'; + const SOURCE_ACTIVE_CAMPAIGN = 'ActiveCampaign'; + const SOURCE_SUMMARY_AND_DETAILS_EXPORT = 'SummaryAndDetailsExport'; + const SOURCE_TELLEROO = 'Telleroo'; + const SOURCE_EMPLOYEE_ADVANCED_HOURS_UPLOAD = 'EmployeeAdvancedHoursUpload'; + const SOURCE_BUSINESS_CENTRAL = 'BusinessCentral'; + const SOURCE_PAYTRON = 'Paytron'; + const SOURCE_ACCESS_FINANCIALS = 'AccessFinancials'; + const SOURCE_COMMA = 'Comma'; + const SOURCE_ZOHO = 'Zoho'; + const SOURCE_FLAT_FILE_EMPLOYEE_IMPORTER = 'FlatFileEmployeeImporter'; + const SOURCE_TWINFIELD = 'Twinfield'; + const SOURCE_SAGE_ACCOUNTING = 'SageAccounting'; + const SOURCE_SQUARE = 'Square'; + const SOURCE_QUICKFILE = 'Quickfile'; + const SOURCE_TIDE = 'Tide'; + const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSourceAllowableValues() + { + return [ + self::SOURCE_NONE, + self::SOURCE_SAASU, + self::SOURCE_XERO, + self::SOURCE_MYOB, + self::SOURCE_DEPUTY, + self::SOURCE_EMPLOYEE_TIME_PUNCH, + self::SOURCE_CLICK_SUPER, + self::SOURCE_INTEGRATED_TIMESHEETS, + self::SOURCE_FILE_IMPORT, + self::SOURCE_FILE_EXPORT, + self::SOURCE_QUICK_BOOKS, + self::SOURCE_HARMONY, + self::SOURCE_AWARD_STORE, + self::SOURCE_ATTACHE, + self::SOURCE_INTEGRATED_ROSTERING, + self::SOURCE_RECKON_ACCOUNTS, + self::SOURCE_API, + self::SOURCE_MICRO_POWER, + self::SOURCE_ROSTER_LIVE, + self::SOURCE_NET_SUITE, + self::SOURCE_KOUNTA, + self::SOURCE_TIME_AND_ATTENDANCE_KIOSK, + self::SOURCE_DETAILED_FILE_EXPORT, + self::SOURCE_JONAS_PREMIER, + self::SOURCE_WAGE_EASY, + self::SOURCE_MAESTRANO, + self::SOURCE_WORK_ZONE, + self::SOURCE_EMPLOYEE_PORTAL, + self::SOURCE_ROSTER_TEMPLATE, + self::SOURCE_ONBOARDING, + self::SOURCE_ADMIN, + self::SOURCE_WORK_ZONE_CLOCK_ON_OFF, + self::SOURCE_NET_SUITE_ONE_WORLD, + self::SOURCE_SAGE50, + self::SOURCE_PENSION_SYNC, + self::SOURCE_FINANCIALS_OFFICE, + self::SOURCE_PRONTO_XI, + self::SOURCE_PAY_RUN_DEFAULT, + self::SOURCE_STANDARD_WORK_DAY, + self::SOURCE_BEAM, + self::SOURCE_PAY_RUN_AUTOMATION, + self::SOURCE_BUREAU_DASHBOARD, + self::SOURCE_WIISE, + self::SOURCE_QBO_MIGRATION_TOOL, + self::SOURCE_ABRIDGED_FILE_IMPORT, + self::SOURCE_QBO_FORCED_MIGRATION, + self::SOURCE_HMRC_DPS_UPDATE, + self::SOURCE_HMRC_DPS_STUDENT_LOAN, + self::SOURCE_HMRC_DPS_POST_GRAD_LOAN, + self::SOURCE_SAGE50_FILE_IMPORTER, + self::SOURCE_FPS_FILE_IMPORTER, + self::SOURCE_O_AUTH, + self::SOURCE_FRESH_BOOKS, + self::SOURCE_STAR_FILE_IMPORTER, + self::SOURCE_ACTIVE_CAMPAIGN, + self::SOURCE_SUMMARY_AND_DETAILS_EXPORT, + self::SOURCE_TELLEROO, + self::SOURCE_EMPLOYEE_ADVANCED_HOURS_UPLOAD, + self::SOURCE_BUSINESS_CENTRAL, + self::SOURCE_PAYTRON, + self::SOURCE_ACCESS_FINANCIALS, + self::SOURCE_COMMA, + self::SOURCE_ZOHO, + self::SOURCE_FLAT_FILE_EMPLOYEE_IMPORTER, + self::SOURCE_TWINFIELD, + self::SOURCE_SAGE_ACCOUNTING, + self::SOURCE_SQUARE, + self::SOURCE_QUICKFILE, + self::SOURCE_TIDE, + self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['reporting_dimension_id'] = isset($data['reporting_dimension_id']) ? $data['reporting_dimension_id'] : null; + $this->container['source'] = isset($data['source']) ? $data['source'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; + $this->container['all_employees'] = isset($data['all_employees']) ? $data['all_employees'] : null; + $this->container['specific_employees'] = isset($data['specific_employees']) ? $data['specific_employees'] : null; + $this->container['filter_combination_strategy'] = isset($data['filter_combination_strategy']) ? $data['filter_combination_strategy'] : null; + $this->container['filters'] = isset($data['filters']) ? $data['filters'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($this->container['source']) && !in_array($this->container['source'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets reporting_dimension_id + * + * @return int + */ + public function getReportingDimensionId() + { + return $this->container['reporting_dimension_id']; + } + + /** + * Sets reporting_dimension_id + * + * @param int $reporting_dimension_id + * + * @return $this + */ + public function setReportingDimensionId($reporting_dimension_id) + { + $this->container['reporting_dimension_id'] = $reporting_dimension_id; + + return $this; + } + + /** + * Gets source + * + * @return string + */ + public function getSource() + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param string $source + * + * @return $this + */ + public function setSource($source) + { + $allowedValues = $this->getSourceAllowableValues(); + if (!is_null($source) && !in_array($source, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'source', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['source'] = $source; + + return $this; + } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + + /** + * Gets all_employees + * + * @return bool + */ + public function getAllEmployees() + { + return $this->container['all_employees']; + } + + /** + * Sets all_employees + * + * @param bool $all_employees + * + * @return $this + */ + public function setAllEmployees($all_employees) + { + $this->container['all_employees'] = $all_employees; + + return $this; + } + + /** + * Gets specific_employees + * + * @return string + */ + public function getSpecificEmployees() + { + return $this->container['specific_employees']; + } + + /** + * Sets specific_employees + * + * @param string $specific_employees + * + * @return $this + */ + public function setSpecificEmployees($specific_employees) + { + $this->container['specific_employees'] = $specific_employees; + + return $this; + } + + /** + * Gets filter_combination_strategy + * + * @return string + */ + public function getFilterCombinationStrategy() + { + return $this->container['filter_combination_strategy']; + } + + /** + * Sets filter_combination_strategy + * + * @param string $filter_combination_strategy + * + * @return $this + */ + public function setFilterCombinationStrategy($filter_combination_strategy) + { + $this->container['filter_combination_strategy'] = $filter_combination_strategy; + + return $this; + } + + /** + * Gets filters + * + * @return \Swagger\Client\Model\ReportingDimensionValueFilterApiModel[] + */ + public function getFilters() + { + return $this->container['filters']; + } + + /** + * Sets filters + * + * @param \Swagger\Client\Model\ReportingDimensionValueFilterApiModel[] $filters + * + * @return $this + */ + public function setFilters($filters) + { + $this->container['filters'] = $filters; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/ReportingDimensionValueFilterApiModel.php b/src/lib/Model/ReportingDimensionValueFilterApiModel.php new file mode 100644 index 0000000..73032e5 --- /dev/null +++ b/src/lib/Model/ReportingDimensionValueFilterApiModel.php @@ -0,0 +1,331 @@ + 'string', + 'value' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'filter_type' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'filter_type' => 'filterType', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'filter_type' => 'setFilterType', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'filter_type' => 'getFilterType', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['filter_type'] = isset($data['filter_type']) ? $data['filter_type'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets filter_type + * + * @return string + */ + public function getFilterType() + { + return $this->container['filter_type']; + } + + /** + * Sets filter_type + * + * @param string $filter_type + * + * @return $this + */ + public function setFilterType($filter_type) + { + $this->container['filter_type'] = $filter_type; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/RosterShiftBreakApiModel.php b/src/lib/Model/RosterShiftBreakApiModel.php index 5ac8864..d948511 100644 --- a/src/lib/Model/RosterShiftBreakApiModel.php +++ b/src/lib/Model/RosterShiftBreakApiModel.php @@ -59,7 +59,8 @@ class RosterShiftBreakApiModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'id' => 'int', 'start_time' => '\DateTime', - 'end_time' => '\DateTime' + 'end_time' => '\DateTime', + 'is_paid_break' => 'bool' ]; /** @@ -70,7 +71,8 @@ class RosterShiftBreakApiModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'id' => 'int32', 'start_time' => 'date-time', - 'end_time' => 'date-time' + 'end_time' => 'date-time', + 'is_paid_break' => null ]; /** @@ -102,7 +104,8 @@ public static function swaggerFormats() protected static $attributeMap = [ 'id' => 'id', 'start_time' => 'startTime', - 'end_time' => 'endTime' + 'end_time' => 'endTime', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -113,7 +116,8 @@ public static function swaggerFormats() protected static $setters = [ 'id' => 'setId', 'start_time' => 'setStartTime', - 'end_time' => 'setEndTime' + 'end_time' => 'setEndTime', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -124,7 +128,8 @@ public static function swaggerFormats() protected static $getters = [ 'id' => 'getId', 'start_time' => 'getStartTime', - 'end_time' => 'getEndTime' + 'end_time' => 'getEndTime', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -287,6 +293,30 @@ public function setEndTime($end_time) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/RosterShiftEditModel.php b/src/lib/Model/RosterShiftEditModel.php new file mode 100644 index 0000000..736d88f --- /dev/null +++ b/src/lib/Model/RosterShiftEditModel.php @@ -0,0 +1,661 @@ + 'int', + 'qualifications' => '\Swagger\Client\Model\QualificationModel[]', + 'breaks' => '\Swagger\Client\Model\RosterShiftBreakApiModel[]', + 'employee_id' => 'int', + 'employee_name' => 'string', + 'location_id' => 'int', + 'location_name' => 'string', + 'work_type_id' => 'int', + 'work_type_name' => 'string', + 'role' => '\Swagger\Client\Model\RosterShiftRole', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'notes' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'qualifications' => null, + 'breaks' => null, + 'employee_id' => 'int32', + 'employee_name' => null, + 'location_id' => 'int32', + 'location_name' => null, + 'work_type_id' => 'int32', + 'work_type_name' => null, + 'role' => null, + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'notes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'qualifications' => 'qualifications', + 'breaks' => 'breaks', + 'employee_id' => 'employeeId', + 'employee_name' => 'employeeName', + 'location_id' => 'locationId', + 'location_name' => 'locationName', + 'work_type_id' => 'workTypeId', + 'work_type_name' => 'workTypeName', + 'role' => 'role', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'notes' => 'notes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'qualifications' => 'setQualifications', + 'breaks' => 'setBreaks', + 'employee_id' => 'setEmployeeId', + 'employee_name' => 'setEmployeeName', + 'location_id' => 'setLocationId', + 'location_name' => 'setLocationName', + 'work_type_id' => 'setWorkTypeId', + 'work_type_name' => 'setWorkTypeName', + 'role' => 'setRole', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'notes' => 'setNotes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'qualifications' => 'getQualifications', + 'breaks' => 'getBreaks', + 'employee_id' => 'getEmployeeId', + 'employee_name' => 'getEmployeeName', + 'location_id' => 'getLocationId', + 'location_name' => 'getLocationName', + 'work_type_id' => 'getWorkTypeId', + 'work_type_name' => 'getWorkTypeName', + 'role' => 'getRole', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'notes' => 'getNotes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['qualifications'] = isset($data['qualifications']) ? $data['qualifications'] : null; + $this->container['breaks'] = isset($data['breaks']) ? $data['breaks'] : null; + $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; + $this->container['employee_name'] = isset($data['employee_name']) ? $data['employee_name'] : null; + $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; + $this->container['location_name'] = isset($data['location_name']) ? $data['location_name'] : null; + $this->container['work_type_id'] = isset($data['work_type_id']) ? $data['work_type_id'] : null; + $this->container['work_type_name'] = isset($data['work_type_name']) ? $data['work_type_name'] : null; + $this->container['role'] = isset($data['role']) ? $data['role'] : null; + $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; + $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['notes'] = isset($data['notes']) ? $data['notes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets qualifications + * + * @return \Swagger\Client\Model\QualificationModel[] + */ + public function getQualifications() + { + return $this->container['qualifications']; + } + + /** + * Sets qualifications + * + * @param \Swagger\Client\Model\QualificationModel[] $qualifications + * + * @return $this + */ + public function setQualifications($qualifications) + { + $this->container['qualifications'] = $qualifications; + + return $this; + } + + /** + * Gets breaks + * + * @return \Swagger\Client\Model\RosterShiftBreakApiModel[] + */ + public function getBreaks() + { + return $this->container['breaks']; + } + + /** + * Sets breaks + * + * @param \Swagger\Client\Model\RosterShiftBreakApiModel[] $breaks + * + * @return $this + */ + public function setBreaks($breaks) + { + $this->container['breaks'] = $breaks; + + return $this; + } + + /** + * Gets employee_id + * + * @return int + */ + public function getEmployeeId() + { + return $this->container['employee_id']; + } + + /** + * Sets employee_id + * + * @param int $employee_id + * + * @return $this + */ + public function setEmployeeId($employee_id) + { + $this->container['employee_id'] = $employee_id; + + return $this; + } + + /** + * Gets employee_name + * + * @return string + */ + public function getEmployeeName() + { + return $this->container['employee_name']; + } + + /** + * Sets employee_name + * + * @param string $employee_name + * + * @return $this + */ + public function setEmployeeName($employee_name) + { + $this->container['employee_name'] = $employee_name; + + return $this; + } + + /** + * Gets location_id + * + * @return int + */ + public function getLocationId() + { + return $this->container['location_id']; + } + + /** + * Sets location_id + * + * @param int $location_id + * + * @return $this + */ + public function setLocationId($location_id) + { + $this->container['location_id'] = $location_id; + + return $this; + } + + /** + * Gets location_name + * + * @return string + */ + public function getLocationName() + { + return $this->container['location_name']; + } + + /** + * Sets location_name + * + * @param string $location_name + * + * @return $this + */ + public function setLocationName($location_name) + { + $this->container['location_name'] = $location_name; + + return $this; + } + + /** + * Gets work_type_id + * + * @return int + */ + public function getWorkTypeId() + { + return $this->container['work_type_id']; + } + + /** + * Sets work_type_id + * + * @param int $work_type_id + * + * @return $this + */ + public function setWorkTypeId($work_type_id) + { + $this->container['work_type_id'] = $work_type_id; + + return $this; + } + + /** + * Gets work_type_name + * + * @return string + */ + public function getWorkTypeName() + { + return $this->container['work_type_name']; + } + + /** + * Sets work_type_name + * + * @param string $work_type_name + * + * @return $this + */ + public function setWorkTypeName($work_type_name) + { + $this->container['work_type_name'] = $work_type_name; + + return $this; + } + + /** + * Gets role + * + * @return \Swagger\Client\Model\RosterShiftRole + */ + public function getRole() + { + return $this->container['role']; + } + + /** + * Sets role + * + * @param \Swagger\Client\Model\RosterShiftRole $role + * + * @return $this + */ + public function setRole($role) + { + $this->container['role'] = $role; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime + */ + public function getStartTime() + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime $start_time + * + * @return $this + */ + public function setStartTime($start_time) + { + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime + */ + public function getEndTime() + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime $end_time + * + * @return $this + */ + public function setEndTime($end_time) + { + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets notes + * + * @return string + */ + public function getNotes() + { + return $this->container['notes']; + } + + /** + * Sets notes + * + * @param string $notes + * + * @return $this + */ + public function setNotes($notes) + { + $this->container['notes'] = $notes; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/SelfManagedSuperFundModel.php b/src/lib/Model/SelfManagedSuperFundModel.php index 368566e..10989d1 100644 --- a/src/lib/Model/SelfManagedSuperFundModel.php +++ b/src/lib/Model/SelfManagedSuperFundModel.php @@ -65,7 +65,8 @@ class SelfManagedSuperFundModel implements ModelInterface, ArrayAccess 'bsb' => 'string', 'electronic_service_address' => 'string', 'email' => 'string', - 'employee_id' => 'int' + 'employee_id' => 'int', + 'external_id' => 'string' ]; /** @@ -82,7 +83,8 @@ class SelfManagedSuperFundModel implements ModelInterface, ArrayAccess 'bsb' => null, 'electronic_service_address' => null, 'email' => null, - 'employee_id' => 'int32' + 'employee_id' => 'int32', + 'external_id' => null ]; /** @@ -120,7 +122,8 @@ public static function swaggerFormats() 'bsb' => 'bsb', 'electronic_service_address' => 'electronicServiceAddress', 'email' => 'email', - 'employee_id' => 'employeeId' + 'employee_id' => 'employeeId', + 'external_id' => 'externalId' ]; /** @@ -137,7 +140,8 @@ public static function swaggerFormats() 'bsb' => 'setBsb', 'electronic_service_address' => 'setElectronicServiceAddress', 'email' => 'setEmail', - 'employee_id' => 'setEmployeeId' + 'employee_id' => 'setEmployeeId', + 'external_id' => 'setExternalId' ]; /** @@ -154,7 +158,8 @@ public static function swaggerFormats() 'bsb' => 'getBsb', 'electronic_service_address' => 'getElectronicServiceAddress', 'email' => 'getEmail', - 'employee_id' => 'getEmployeeId' + 'employee_id' => 'getEmployeeId', + 'external_id' => 'getExternalId' ]; /** @@ -226,6 +231,7 @@ public function __construct(array $data = null) $this->container['electronic_service_address'] = isset($data['electronic_service_address']) ? $data['electronic_service_address'] : null; $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; + $this->container['external_id'] = isset($data['external_id']) ? $data['external_id'] : null; } /** @@ -467,6 +473,30 @@ public function setEmployeeId($employee_id) return $this; } + + /** + * Gets external_id + * + * @return string + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string $external_id + * + * @return $this + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/ShiftBreakModel.php b/src/lib/Model/ShiftBreakModel.php index bf5f59c..ff2703b 100644 --- a/src/lib/Model/ShiftBreakModel.php +++ b/src/lib/Model/ShiftBreakModel.php @@ -59,6 +59,7 @@ class ShiftBreakModel implements ModelInterface, ArrayAccess protected static $swaggerTypes = [ 'start' => '\Swagger\Client\Model\StartBreakModel', 'end' => '\Swagger\Client\Model\EndBreakModel', + 'is_paid_break' => 'bool', 'employee_id' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -79,6 +80,7 @@ class ShiftBreakModel implements ModelInterface, ArrayAccess protected static $swaggerFormats = [ 'start' => null, 'end' => null, + 'is_paid_break' => null, 'employee_id' => 'int32', 'latitude' => 'double', 'longitude' => 'double', @@ -120,6 +122,7 @@ public static function swaggerFormats() protected static $attributeMap = [ 'start' => 'start', 'end' => 'end', + 'is_paid_break' => 'isPaidBreak', 'employee_id' => 'employeeId', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -140,6 +143,7 @@ public static function swaggerFormats() protected static $setters = [ 'start' => 'setStart', 'end' => 'setEnd', + 'is_paid_break' => 'setIsPaidBreak', 'employee_id' => 'setEmployeeId', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -160,6 +164,7 @@ public static function swaggerFormats() protected static $getters = [ 'start' => 'getStart', 'end' => 'getEnd', + 'is_paid_break' => 'getIsPaidBreak', 'employee_id' => 'getEmployeeId', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -249,6 +254,7 @@ public function __construct(array $data = null) { $this->container['start'] = isset($data['start']) ? $data['start'] : null; $this->container['end'] = isset($data['end']) ? $data['end'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; @@ -345,6 +351,30 @@ public function setEnd($end) return $this; } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets employee_id * diff --git a/src/lib/Model/ShiftCostingsRequestModel.php b/src/lib/Model/ShiftCostingsRequestModel.php index c830281..ede666d 100644 --- a/src/lib/Model/ShiftCostingsRequestModel.php +++ b/src/lib/Model/ShiftCostingsRequestModel.php @@ -62,7 +62,8 @@ class ShiftCostingsRequestModel implements ModelInterface, ArrayAccess 'work_type_id_type' => 'string', 'include_evaluation_results' => 'bool', 'employee' => '\Swagger\Client\Model\ShiftCostingsEmployeeModel', - 'shifts' => '\Swagger\Client\Model\ShiftCostingsRequestShiftModel[]' + 'shifts' => '\Swagger\Client\Model\ShiftCostingsRequestShiftModel[]', + 'override_rates' => '\Swagger\Client\Model\RateOverride[]' ]; /** @@ -76,7 +77,8 @@ class ShiftCostingsRequestModel implements ModelInterface, ArrayAccess 'work_type_id_type' => null, 'include_evaluation_results' => null, 'employee' => null, - 'shifts' => null + 'shifts' => null, + 'override_rates' => null ]; /** @@ -111,7 +113,8 @@ public static function swaggerFormats() 'work_type_id_type' => 'workTypeIdType', 'include_evaluation_results' => 'includeEvaluationResults', 'employee' => 'employee', - 'shifts' => 'shifts' + 'shifts' => 'shifts', + 'override_rates' => 'overrideRates' ]; /** @@ -125,7 +128,8 @@ public static function swaggerFormats() 'work_type_id_type' => 'setWorkTypeIdType', 'include_evaluation_results' => 'setIncludeEvaluationResults', 'employee' => 'setEmployee', - 'shifts' => 'setShifts' + 'shifts' => 'setShifts', + 'override_rates' => 'setOverrideRates' ]; /** @@ -139,7 +143,8 @@ public static function swaggerFormats() 'work_type_id_type' => 'getWorkTypeIdType', 'include_evaluation_results' => 'getIncludeEvaluationResults', 'employee' => 'getEmployee', - 'shifts' => 'getShifts' + 'shifts' => 'getShifts', + 'override_rates' => 'getOverrideRates' ]; /** @@ -238,6 +243,7 @@ public function __construct(array $data = null) $this->container['include_evaluation_results'] = isset($data['include_evaluation_results']) ? $data['include_evaluation_results'] : null; $this->container['employee'] = isset($data['employee']) ? $data['employee'] : null; $this->container['shifts'] = isset($data['shifts']) ? $data['shifts'] : null; + $this->container['override_rates'] = isset($data['override_rates']) ? $data['override_rates'] : null; } /** @@ -441,6 +447,30 @@ public function setShifts($shifts) return $this; } + + /** + * Gets override_rates + * + * @return \Swagger\Client\Model\RateOverride[] + */ + public function getOverrideRates() + { + return $this->container['override_rates']; + } + + /** + * Sets override_rates + * + * @param \Swagger\Client\Model\RateOverride[] $override_rates + * + * @return $this + */ + public function setOverrideRates($override_rates) + { + $this->container['override_rates'] = $override_rates; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/ShiftCostingsRequestShiftModel.php b/src/lib/Model/ShiftCostingsRequestShiftModel.php index 95a442e..5387a39 100644 --- a/src/lib/Model/ShiftCostingsRequestShiftModel.php +++ b/src/lib/Model/ShiftCostingsRequestShiftModel.php @@ -57,9 +57,12 @@ class ShiftCostingsRequestShiftModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'shift_id' => 'string', 'state' => 'string', + 'override_rates' => '\Swagger\Client\Model\RateOverride[]', 'classification_id' => 'string', 'classification' => 'string', + 'location_is_deleted' => 'bool', 'id' => 'int', 'employee_id' => 'int', 'start_time' => '\DateTime', @@ -91,9 +94,12 @@ class ShiftCostingsRequestShiftModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'shift_id' => null, 'state' => null, + 'override_rates' => null, 'classification_id' => null, 'classification' => null, + 'location_is_deleted' => null, 'id' => 'int32', 'employee_id' => 'int32', 'start_time' => 'date-time', @@ -146,9 +152,12 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'shift_id' => 'shiftId', 'state' => 'state', + 'override_rates' => 'overrideRates', 'classification_id' => 'classificationId', 'classification' => 'classification', + 'location_is_deleted' => 'locationIsDeleted', 'id' => 'id', 'employee_id' => 'employeeId', 'start_time' => 'startTime', @@ -180,9 +189,12 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'shift_id' => 'setShiftId', 'state' => 'setState', + 'override_rates' => 'setOverrideRates', 'classification_id' => 'setClassificationId', 'classification' => 'setClassification', + 'location_is_deleted' => 'setLocationIsDeleted', 'id' => 'setId', 'employee_id' => 'setEmployeeId', 'start_time' => 'setStartTime', @@ -214,9 +226,12 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'shift_id' => 'getShiftId', 'state' => 'getState', + 'override_rates' => 'getOverrideRates', 'classification_id' => 'getClassificationId', 'classification' => 'getClassification', + 'location_is_deleted' => 'getLocationIsDeleted', 'id' => 'getId', 'employee_id' => 'getEmployeeId', 'start_time' => 'getStartTime', @@ -353,6 +368,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -434,6 +454,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } @@ -453,9 +478,12 @@ public function getSourceAllowableValues() */ public function __construct(array $data = null) { + $this->container['shift_id'] = isset($data['shift_id']) ? $data['shift_id'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; + $this->container['override_rates'] = isset($data['override_rates']) ? $data['override_rates'] : null; $this->container['classification_id'] = isset($data['classification_id']) ? $data['classification_id'] : null; $this->container['classification'] = isset($data['classification']) ? $data['classification'] : null; + $this->container['location_is_deleted'] = isset($data['location_is_deleted']) ? $data['location_is_deleted'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; @@ -513,6 +541,30 @@ public function valid() } + /** + * Gets shift_id + * + * @return string + */ + public function getShiftId() + { + return $this->container['shift_id']; + } + + /** + * Sets shift_id + * + * @param string $shift_id + * + * @return $this + */ + public function setShiftId($shift_id) + { + $this->container['shift_id'] = $shift_id; + + return $this; + } + /** * Gets state * @@ -537,6 +589,30 @@ public function setState($state) return $this; } + /** + * Gets override_rates + * + * @return \Swagger\Client\Model\RateOverride[] + */ + public function getOverrideRates() + { + return $this->container['override_rates']; + } + + /** + * Sets override_rates + * + * @param \Swagger\Client\Model\RateOverride[] $override_rates + * + * @return $this + */ + public function setOverrideRates($override_rates) + { + $this->container['override_rates'] = $override_rates; + + return $this; + } + /** * Gets classification_id * @@ -585,6 +661,30 @@ public function setClassification($classification) return $this; } + /** + * Gets location_is_deleted + * + * @return bool + */ + public function getLocationIsDeleted() + { + return $this->container['location_is_deleted']; + } + + /** + * Sets location_is_deleted + * + * @param bool $location_is_deleted + * + * @return $this + */ + public function setLocationIsDeleted($location_is_deleted) + { + $this->container['location_is_deleted'] = $location_is_deleted; + + return $this; + } + /** * Gets id * diff --git a/src/lib/Model/ShiftPartModel.php b/src/lib/Model/ShiftPartModel.php index 45ddadf..463ee69 100644 --- a/src/lib/Model/ShiftPartModel.php +++ b/src/lib/Model/ShiftPartModel.php @@ -58,6 +58,7 @@ class ShiftPartModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'is_break' => 'bool', + 'is_paid_break' => 'bool', 'start_time' => '\DateTime', 'end_time' => '\DateTime', 'effective_duration' => 'string', @@ -83,6 +84,7 @@ class ShiftPartModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'is_break' => null, + 'is_paid_break' => null, 'start_time' => 'date-time', 'end_time' => 'date-time', 'effective_duration' => null, @@ -129,6 +131,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'is_break' => 'isBreak', + 'is_paid_break' => 'isPaidBreak', 'start_time' => 'startTime', 'end_time' => 'endTime', 'effective_duration' => 'effectiveDuration', @@ -154,6 +157,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'is_break' => 'setIsBreak', + 'is_paid_break' => 'setIsPaidBreak', 'start_time' => 'setStartTime', 'end_time' => 'setEndTime', 'effective_duration' => 'setEffectiveDuration', @@ -179,6 +183,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'is_break' => 'getIsBreak', + 'is_paid_break' => 'getIsPaidBreak', 'start_time' => 'getStartTime', 'end_time' => 'getEndTime', 'effective_duration' => 'getEffectiveDuration', @@ -258,6 +263,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['is_break'] = isset($data['is_break']) ? $data['is_break'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; $this->container['effective_duration'] = isset($data['effective_duration']) ? $data['effective_duration'] : null; @@ -324,6 +330,30 @@ public function setIsBreak($is_break) return $this; } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets start_time * diff --git a/src/lib/Model/SingleSignOnRequestAdditionalDataModel.php b/src/lib/Model/SingleSignOnRequestAdditionalDataModel.php new file mode 100644 index 0000000..ae1b2e8 --- /dev/null +++ b/src/lib/Model/SingleSignOnRequestAdditionalDataModel.php @@ -0,0 +1,331 @@ + 'string', + 'member_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'organisation_id' => null, + 'member_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'organisation_id' => 'organisationId', + 'member_id' => 'memberId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'organisation_id' => 'setOrganisationId', + 'member_id' => 'setMemberId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'organisation_id' => 'getOrganisationId', + 'member_id' => 'getMemberId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['organisation_id'] = isset($data['organisation_id']) ? $data['organisation_id'] : null; + $this->container['member_id'] = isset($data['member_id']) ? $data['member_id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets organisation_id + * + * @return string + */ + public function getOrganisationId() + { + return $this->container['organisation_id']; + } + + /** + * Sets organisation_id + * + * @param string $organisation_id + * + * @return $this + */ + public function setOrganisationId($organisation_id) + { + $this->container['organisation_id'] = $organisation_id; + + return $this; + } + + /** + * Gets member_id + * + * @return string + */ + public function getMemberId() + { + return $this->container['member_id']; + } + + /** + * Sets member_id + * + * @param string $member_id + * + * @return $this + */ + public function setMemberId($member_id) + { + $this->container['member_id'] = $member_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/SingleSignOnRequestModel.php b/src/lib/Model/SingleSignOnRequestModel.php index da01bf5..af3509d 100644 --- a/src/lib/Model/SingleSignOnRequestModel.php +++ b/src/lib/Model/SingleSignOnRequestModel.php @@ -182,6 +182,7 @@ public function getModelName() const NAVIGATION_PRIMARY = 'Primary'; const NAVIGATION_SECONDARY = 'Secondary'; const NAVIGATION_NONE = 'None'; + const NAVIGATION_HIDE_INTERNAL_PAGE_NAV = 'HideInternalPageNav'; @@ -197,6 +198,7 @@ public function getNavigationAllowableValues() self::NAVIGATION_PRIMARY, self::NAVIGATION_SECONDARY, self::NAVIGATION_NONE, + self::NAVIGATION_HIDE_INTERNAL_PAGE_NAV, ]; } diff --git a/src/lib/Model/StartBreakModel.php b/src/lib/Model/StartBreakModel.php index 494884d..0afb98e 100644 --- a/src/lib/Model/StartBreakModel.php +++ b/src/lib/Model/StartBreakModel.php @@ -57,6 +57,7 @@ class StartBreakModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerTypes = [ + 'is_paid_break' => 'bool', 'employee_id' => 'int', 'latitude' => 'double', 'longitude' => 'double', @@ -75,6 +76,7 @@ class StartBreakModel implements ModelInterface, ArrayAccess * @var string[] */ protected static $swaggerFormats = [ + 'is_paid_break' => null, 'employee_id' => 'int32', 'latitude' => 'double', 'longitude' => 'double', @@ -114,6 +116,7 @@ public static function swaggerFormats() * @var string[] */ protected static $attributeMap = [ + 'is_paid_break' => 'isPaidBreak', 'employee_id' => 'employeeId', 'latitude' => 'latitude', 'longitude' => 'longitude', @@ -132,6 +135,7 @@ public static function swaggerFormats() * @var string[] */ protected static $setters = [ + 'is_paid_break' => 'setIsPaidBreak', 'employee_id' => 'setEmployeeId', 'latitude' => 'setLatitude', 'longitude' => 'setLongitude', @@ -150,6 +154,7 @@ public static function swaggerFormats() * @var string[] */ protected static $getters = [ + 'is_paid_break' => 'getIsPaidBreak', 'employee_id' => 'getEmployeeId', 'latitude' => 'getLatitude', 'longitude' => 'getLongitude', @@ -237,6 +242,7 @@ public function getNoteVisibilityAllowableValues() */ public function __construct(array $data = null) { + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['employee_id'] = isset($data['employee_id']) ? $data['employee_id'] : null; $this->container['latitude'] = isset($data['latitude']) ? $data['latitude'] : null; $this->container['longitude'] = isset($data['longitude']) ? $data['longitude'] : null; @@ -285,6 +291,30 @@ public function valid() } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets employee_id * diff --git a/src/lib/Model/SuperAccrualExportModel.php b/src/lib/Model/SuperAccrualExportModel.php index 5ccd18d..d84c243 100644 --- a/src/lib/Model/SuperAccrualExportModel.php +++ b/src/lib/Model/SuperAccrualExportModel.php @@ -66,7 +66,8 @@ class SuperAccrualExportModel implements ModelInterface, ArrayAccess 'accrual_date' => '\DateTime', 'accrual_type' => 'string', 'accrual_amount' => 'double', - 'batch_id' => 'int' + 'batch_id' => 'int', + 'status' => 'string' ]; /** @@ -84,7 +85,8 @@ class SuperAccrualExportModel implements ModelInterface, ArrayAccess 'accrual_date' => 'date-time', 'accrual_type' => null, 'accrual_amount' => 'double', - 'batch_id' => 'int32' + 'batch_id' => 'int32', + 'status' => null ]; /** @@ -123,7 +125,8 @@ public static function swaggerFormats() 'accrual_date' => 'accrualDate', 'accrual_type' => 'accrualType', 'accrual_amount' => 'accrualAmount', - 'batch_id' => 'batchId' + 'batch_id' => 'batchId', + 'status' => 'status' ]; /** @@ -141,7 +144,8 @@ public static function swaggerFormats() 'accrual_date' => 'setAccrualDate', 'accrual_type' => 'setAccrualType', 'accrual_amount' => 'setAccrualAmount', - 'batch_id' => 'setBatchId' + 'batch_id' => 'setBatchId', + 'status' => 'setStatus' ]; /** @@ -159,7 +163,8 @@ public static function swaggerFormats() 'accrual_date' => 'getAccrualDate', 'accrual_type' => 'getAccrualType', 'accrual_amount' => 'getAccrualAmount', - 'batch_id' => 'getBatchId' + 'batch_id' => 'getBatchId', + 'status' => 'getStatus' ]; /** @@ -203,9 +208,56 @@ public function getModelName() return self::$swaggerModelName; } + const STATUS__NEW = 'New'; + const STATUS_SUBMITTED_FOR_PROCESSING = 'SubmittedForProcessing'; + const STATUS_SUBMISSION_FAILED = 'SubmissionFailed'; + const STATUS_SUBMISSION_PROCESSED = 'SubmissionProcessed'; + const STATUS_SUBMISSION_QUEUED_FOR_PAYMENT = 'SubmissionQueuedForPayment'; + const STATUS_SUBMISSION_PAID = 'SubmissionPaid'; + const STATUS_AWAITING_PAYMENT = 'AwaitingPayment'; + const STATUS_AWAITING_CLEARANCE = 'AwaitingClearance'; + const STATUS_RECONCILED = 'Reconciled'; + const STATUS_SENT_TO_FUND = 'SentToFund'; + const STATUS_SENT_TO_FUND_WITH_RESPONSE = 'SentToFundWithResponse'; + const STATUS_SENT_TO_FUND_WITH_REFUND = 'SentToFundWithRefund'; + const STATUS_CANCELLED = 'Cancelled'; + const STATUS_SUBMITTED = 'Submitted'; + const STATUS_REFUNDED = 'Refunded'; + const STATUS_CANCELLING = 'Cancelling'; + const STATUS_PAID = 'Paid'; + const STATUS_PAYMENT_FAILED = 'PaymentFailed'; + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS__NEW, + self::STATUS_SUBMITTED_FOR_PROCESSING, + self::STATUS_SUBMISSION_FAILED, + self::STATUS_SUBMISSION_PROCESSED, + self::STATUS_SUBMISSION_QUEUED_FOR_PAYMENT, + self::STATUS_SUBMISSION_PAID, + self::STATUS_AWAITING_PAYMENT, + self::STATUS_AWAITING_CLEARANCE, + self::STATUS_RECONCILED, + self::STATUS_SENT_TO_FUND, + self::STATUS_SENT_TO_FUND_WITH_RESPONSE, + self::STATUS_SENT_TO_FUND_WITH_REFUND, + self::STATUS_CANCELLED, + self::STATUS_SUBMITTED, + self::STATUS_REFUNDED, + self::STATUS_CANCELLING, + self::STATUS_PAID, + self::STATUS_PAYMENT_FAILED, + ]; + } + /** * Associative array for storing property values @@ -232,6 +284,7 @@ public function __construct(array $data = null) $this->container['accrual_type'] = isset($data['accrual_type']) ? $data['accrual_type'] : null; $this->container['accrual_amount'] = isset($data['accrual_amount']) ? $data['accrual_amount'] : null; $this->container['batch_id'] = isset($data['batch_id']) ? $data['batch_id'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; } /** @@ -243,6 +296,14 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -497,6 +558,39 @@ public function setBatchId($batch_id) return $this; } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($status) && !in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/SuperProductEditModel.php b/src/lib/Model/SuperProductEditModel.php index c036b4f..de798f3 100644 --- a/src/lib/Model/SuperProductEditModel.php +++ b/src/lib/Model/SuperProductEditModel.php @@ -298,6 +298,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -379,6 +384,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/SuperProductModel.php b/src/lib/Model/SuperProductModel.php index 37ba3cb..ed70af6 100644 --- a/src/lib/Model/SuperProductModel.php +++ b/src/lib/Model/SuperProductModel.php @@ -293,6 +293,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -374,6 +379,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/TagViewModel.php b/src/lib/Model/TagViewModel.php new file mode 100644 index 0000000..6337a12 --- /dev/null +++ b/src/lib/Model/TagViewModel.php @@ -0,0 +1,331 @@ + 'int', + 'name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int32', + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/lib/Model/TimeAndAttendanceBreakModel.php b/src/lib/Model/TimeAndAttendanceBreakModel.php index 907e2f4..9ed9de9 100644 --- a/src/lib/Model/TimeAndAttendanceBreakModel.php +++ b/src/lib/Model/TimeAndAttendanceBreakModel.php @@ -60,7 +60,8 @@ class TimeAndAttendanceBreakModel implements ModelInterface, ArrayAccess 'start_time_utc' => '\DateTime', 'start_time_local' => '\DateTime', 'end_time_utc' => '\DateTime', - 'end_time_local' => '\DateTime' + 'end_time_local' => '\DateTime', + 'is_paid_break' => 'bool' ]; /** @@ -72,7 +73,8 @@ class TimeAndAttendanceBreakModel implements ModelInterface, ArrayAccess 'start_time_utc' => 'date-time', 'start_time_local' => 'date-time', 'end_time_utc' => 'date-time', - 'end_time_local' => 'date-time' + 'end_time_local' => 'date-time', + 'is_paid_break' => null ]; /** @@ -105,7 +107,8 @@ public static function swaggerFormats() 'start_time_utc' => 'startTimeUtc', 'start_time_local' => 'startTimeLocal', 'end_time_utc' => 'endTimeUtc', - 'end_time_local' => 'endTimeLocal' + 'end_time_local' => 'endTimeLocal', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -117,7 +120,8 @@ public static function swaggerFormats() 'start_time_utc' => 'setStartTimeUtc', 'start_time_local' => 'setStartTimeLocal', 'end_time_utc' => 'setEndTimeUtc', - 'end_time_local' => 'setEndTimeLocal' + 'end_time_local' => 'setEndTimeLocal', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -129,7 +133,8 @@ public static function swaggerFormats() 'start_time_utc' => 'getStartTimeUtc', 'start_time_local' => 'getStartTimeLocal', 'end_time_utc' => 'getEndTimeUtc', - 'end_time_local' => 'getEndTimeLocal' + 'end_time_local' => 'getEndTimeLocal', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -196,6 +201,7 @@ public function __construct(array $data = null) $this->container['start_time_local'] = isset($data['start_time_local']) ? $data['start_time_local'] : null; $this->container['end_time_utc'] = isset($data['end_time_utc']) ? $data['end_time_utc'] : null; $this->container['end_time_local'] = isset($data['end_time_local']) ? $data['end_time_local'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -317,6 +323,30 @@ public function setEndTimeLocal($end_time_local) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimeAndAttendanceKioskModel.php b/src/lib/Model/TimeAndAttendanceKioskModel.php index ce445ce..1a8459f 100644 --- a/src/lib/Model/TimeAndAttendanceKioskModel.php +++ b/src/lib/Model/TimeAndAttendanceKioskModel.php @@ -73,7 +73,8 @@ class TimeAndAttendanceKioskModel implements ModelInterface, ArrayAccess 'iana_time_zone' => 'string', 'is_photo_required' => 'bool', 'can_add_employees' => 'bool', - 'available_to_all_restricted_users_with_kiosk_access' => 'bool' + 'available_to_all_restricted_users_with_kiosk_access' => 'bool', + 'paid_breaks_enabled' => 'bool' ]; /** @@ -98,7 +99,8 @@ class TimeAndAttendanceKioskModel implements ModelInterface, ArrayAccess 'iana_time_zone' => null, 'is_photo_required' => null, 'can_add_employees' => null, - 'available_to_all_restricted_users_with_kiosk_access' => null + 'available_to_all_restricted_users_with_kiosk_access' => null, + 'paid_breaks_enabled' => null ]; /** @@ -144,7 +146,8 @@ public static function swaggerFormats() 'iana_time_zone' => 'ianaTimeZone', 'is_photo_required' => 'isPhotoRequired', 'can_add_employees' => 'canAddEmployees', - 'available_to_all_restricted_users_with_kiosk_access' => 'availableToAllRestrictedUsersWithKioskAccess' + 'available_to_all_restricted_users_with_kiosk_access' => 'availableToAllRestrictedUsersWithKioskAccess', + 'paid_breaks_enabled' => 'paidBreaksEnabled' ]; /** @@ -169,7 +172,8 @@ public static function swaggerFormats() 'iana_time_zone' => 'setIanaTimeZone', 'is_photo_required' => 'setIsPhotoRequired', 'can_add_employees' => 'setCanAddEmployees', - 'available_to_all_restricted_users_with_kiosk_access' => 'setAvailableToAllRestrictedUsersWithKioskAccess' + 'available_to_all_restricted_users_with_kiosk_access' => 'setAvailableToAllRestrictedUsersWithKioskAccess', + 'paid_breaks_enabled' => 'setPaidBreaksEnabled' ]; /** @@ -194,7 +198,8 @@ public static function swaggerFormats() 'iana_time_zone' => 'getIanaTimeZone', 'is_photo_required' => 'getIsPhotoRequired', 'can_add_employees' => 'getCanAddEmployees', - 'available_to_all_restricted_users_with_kiosk_access' => 'getAvailableToAllRestrictedUsersWithKioskAccess' + 'available_to_all_restricted_users_with_kiosk_access' => 'getAvailableToAllRestrictedUsersWithKioskAccess', + 'paid_breaks_enabled' => 'getPaidBreaksEnabled' ]; /** @@ -274,6 +279,7 @@ public function __construct(array $data = null) $this->container['is_photo_required'] = isset($data['is_photo_required']) ? $data['is_photo_required'] : null; $this->container['can_add_employees'] = isset($data['can_add_employees']) ? $data['can_add_employees'] : null; $this->container['available_to_all_restricted_users_with_kiosk_access'] = isset($data['available_to_all_restricted_users_with_kiosk_access']) ? $data['available_to_all_restricted_users_with_kiosk_access'] : null; + $this->container['paid_breaks_enabled'] = isset($data['paid_breaks_enabled']) ? $data['paid_breaks_enabled'] : null; } /** @@ -707,6 +713,30 @@ public function setAvailableToAllRestrictedUsersWithKioskAccess($available_to_al return $this; } + + /** + * Gets paid_breaks_enabled + * + * @return bool + */ + public function getPaidBreaksEnabled() + { + return $this->container['paid_breaks_enabled']; + } + + /** + * Sets paid_breaks_enabled + * + * @param bool $paid_breaks_enabled + * + * @return $this + */ + public function setPaidBreaksEnabled($paid_breaks_enabled) + { + $this->container['paid_breaks_enabled'] = $paid_breaks_enabled; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimesheetBreakManagerModel.php b/src/lib/Model/TimesheetBreakManagerModel.php index 83f8fb8..1e4467d 100644 --- a/src/lib/Model/TimesheetBreakManagerModel.php +++ b/src/lib/Model/TimesheetBreakManagerModel.php @@ -63,7 +63,8 @@ class TimesheetBreakManagerModel implements ModelInterface, ArrayAccess 'submitted_start' => '\DateTime', 'submitted_end' => '\DateTime', 'formatted_start' => 'string', - 'formatted_end' => 'string' + 'formatted_end' => 'string', + 'is_paid_break' => 'bool' ]; /** @@ -78,7 +79,8 @@ class TimesheetBreakManagerModel implements ModelInterface, ArrayAccess 'submitted_start' => 'date-time', 'submitted_end' => 'date-time', 'formatted_start' => null, - 'formatted_end' => null + 'formatted_end' => null, + 'is_paid_break' => null ]; /** @@ -114,7 +116,8 @@ public static function swaggerFormats() 'submitted_start' => 'submittedStart', 'submitted_end' => 'submittedEnd', 'formatted_start' => 'formattedStart', - 'formatted_end' => 'formattedEnd' + 'formatted_end' => 'formattedEnd', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -129,7 +132,8 @@ public static function swaggerFormats() 'submitted_start' => 'setSubmittedStart', 'submitted_end' => 'setSubmittedEnd', 'formatted_start' => 'setFormattedStart', - 'formatted_end' => 'setFormattedEnd' + 'formatted_end' => 'setFormattedEnd', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -144,7 +148,8 @@ public static function swaggerFormats() 'submitted_start' => 'getSubmittedStart', 'submitted_end' => 'getSubmittedEnd', 'formatted_start' => 'getFormattedStart', - 'formatted_end' => 'getFormattedEnd' + 'formatted_end' => 'getFormattedEnd', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -214,6 +219,7 @@ public function __construct(array $data = null) $this->container['submitted_end'] = isset($data['submitted_end']) ? $data['submitted_end'] : null; $this->container['formatted_start'] = isset($data['formatted_start']) ? $data['formatted_start'] : null; $this->container['formatted_end'] = isset($data['formatted_end']) ? $data['formatted_end'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -407,6 +413,30 @@ public function setFormattedEnd($formatted_end) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimesheetBreakModel.php b/src/lib/Model/TimesheetBreakModel.php index 29e4de2..aab5bb1 100644 --- a/src/lib/Model/TimesheetBreakModel.php +++ b/src/lib/Model/TimesheetBreakModel.php @@ -58,7 +58,8 @@ class TimesheetBreakModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'start_time' => '\DateTime', - 'end_time' => '\DateTime' + 'end_time' => '\DateTime', + 'is_paid_break' => 'bool' ]; /** @@ -68,7 +69,8 @@ class TimesheetBreakModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'start_time' => 'date-time', - 'end_time' => 'date-time' + 'end_time' => 'date-time', + 'is_paid_break' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'start_time' => 'startTime', - 'end_time' => 'endTime' + 'end_time' => 'endTime', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'start_time' => 'setStartTime', - 'end_time' => 'setEndTime' + 'end_time' => 'setEndTime', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'start_time' => 'getStartTime', - 'end_time' => 'getEndTime' + 'end_time' => 'getEndTime', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -257,6 +263,30 @@ public function setEndTime($end_time) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimesheetBreakModelv3.php b/src/lib/Model/TimesheetBreakModelv3.php index 4fb2595..0e7e293 100644 --- a/src/lib/Model/TimesheetBreakModelv3.php +++ b/src/lib/Model/TimesheetBreakModelv3.php @@ -58,7 +58,8 @@ class TimesheetBreakModelv3 implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'start_time' => '\DateTime', - 'end_time' => '\DateTime' + 'end_time' => '\DateTime', + 'is_paid_break' => 'bool' ]; /** @@ -68,7 +69,8 @@ class TimesheetBreakModelv3 implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'start_time' => 'date-time', - 'end_time' => 'date-time' + 'end_time' => 'date-time', + 'is_paid_break' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'start_time' => 'startTime', - 'end_time' => 'endTime' + 'end_time' => 'endTime', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'start_time' => 'setStartTime', - 'end_time' => 'setEndTime' + 'end_time' => 'setEndTime', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'start_time' => 'getStartTime', - 'end_time' => 'getEndTime' + 'end_time' => 'getEndTime', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['start_time'] = isset($data['start_time']) ? $data['start_time'] : null; $this->container['end_time'] = isset($data['end_time']) ? $data['end_time'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -257,6 +263,30 @@ public function setEndTime($end_time) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimesheetBreakSubmitModel.php b/src/lib/Model/TimesheetBreakSubmitModel.php index 8129afb..314b3e4 100644 --- a/src/lib/Model/TimesheetBreakSubmitModel.php +++ b/src/lib/Model/TimesheetBreakSubmitModel.php @@ -58,7 +58,8 @@ class TimesheetBreakSubmitModel implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'start' => '\DateTime', - 'end' => '\DateTime' + 'end' => '\DateTime', + 'is_paid_break' => 'bool' ]; /** @@ -68,7 +69,8 @@ class TimesheetBreakSubmitModel implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'start' => 'date-time', - 'end' => 'date-time' + 'end' => 'date-time', + 'is_paid_break' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'start' => 'start', - 'end' => 'end' + 'end' => 'end', + 'is_paid_break' => 'isPaidBreak' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'start' => 'setStart', - 'end' => 'setEnd' + 'end' => 'setEnd', + 'is_paid_break' => 'setIsPaidBreak' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'start' => 'getStart', - 'end' => 'getEnd' + 'end' => 'getEnd', + 'is_paid_break' => 'getIsPaidBreak' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['start'] = isset($data['start']) ? $data['start'] : null; $this->container['end'] = isset($data['end']) ? $data['end'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; } /** @@ -257,6 +263,30 @@ public function setEnd($end) return $this; } + + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/lib/Model/TimesheetBreakViewModel.php b/src/lib/Model/TimesheetBreakViewModel.php index 71e176a..77e9186 100644 --- a/src/lib/Model/TimesheetBreakViewModel.php +++ b/src/lib/Model/TimesheetBreakViewModel.php @@ -62,6 +62,7 @@ class TimesheetBreakViewModel implements ModelInterface, ArrayAccess 'end' => '\DateTime', 'submitted_start' => '\DateTime', 'submitted_end' => '\DateTime', + 'is_paid_break' => 'bool', 'formatted_start' => 'string', 'formatted_end' => 'string' ]; @@ -77,6 +78,7 @@ class TimesheetBreakViewModel implements ModelInterface, ArrayAccess 'end' => 'date-time', 'submitted_start' => 'date-time', 'submitted_end' => 'date-time', + 'is_paid_break' => null, 'formatted_start' => null, 'formatted_end' => null ]; @@ -113,6 +115,7 @@ public static function swaggerFormats() 'end' => 'end', 'submitted_start' => 'submittedStart', 'submitted_end' => 'submittedEnd', + 'is_paid_break' => 'isPaidBreak', 'formatted_start' => 'formattedStart', 'formatted_end' => 'formattedEnd' ]; @@ -128,6 +131,7 @@ public static function swaggerFormats() 'end' => 'setEnd', 'submitted_start' => 'setSubmittedStart', 'submitted_end' => 'setSubmittedEnd', + 'is_paid_break' => 'setIsPaidBreak', 'formatted_start' => 'setFormattedStart', 'formatted_end' => 'setFormattedEnd' ]; @@ -143,6 +147,7 @@ public static function swaggerFormats() 'end' => 'getEnd', 'submitted_start' => 'getSubmittedStart', 'submitted_end' => 'getSubmittedEnd', + 'is_paid_break' => 'getIsPaidBreak', 'formatted_start' => 'getFormattedStart', 'formatted_end' => 'getFormattedEnd' ]; @@ -212,6 +217,7 @@ public function __construct(array $data = null) $this->container['end'] = isset($data['end']) ? $data['end'] : null; $this->container['submitted_start'] = isset($data['submitted_start']) ? $data['submitted_start'] : null; $this->container['submitted_end'] = isset($data['submitted_end']) ? $data['submitted_end'] : null; + $this->container['is_paid_break'] = isset($data['is_paid_break']) ? $data['is_paid_break'] : null; $this->container['formatted_start'] = isset($data['formatted_start']) ? $data['formatted_start'] : null; $this->container['formatted_end'] = isset($data['formatted_end']) ? $data['formatted_end'] : null; } @@ -360,6 +366,30 @@ public function setSubmittedEnd($submitted_end) return $this; } + /** + * Gets is_paid_break + * + * @return bool + */ + public function getIsPaidBreak() + { + return $this->container['is_paid_break']; + } + + /** + * Sets is_paid_break + * + * @param bool $is_paid_break + * + * @return $this + */ + public function setIsPaidBreak($is_paid_break) + { + $this->container['is_paid_break'] = $is_paid_break; + + return $this; + } + /** * Gets formatted_start * diff --git a/src/lib/Model/TimesheetLineModel.php b/src/lib/Model/TimesheetLineModel.php index 02f6d14..4571d19 100644 --- a/src/lib/Model/TimesheetLineModel.php +++ b/src/lib/Model/TimesheetLineModel.php @@ -343,6 +343,11 @@ public function getModelName() const SOURCE_QUICKFILE = 'Quickfile'; const SOURCE_TIDE = 'Tide'; const SOURCE_TIDE_SSO = 'TideSso'; + const SOURCE_FREE_AGENT = 'FreeAgent'; + const SOURCE_AKAHU = 'Akahu'; + const SOURCE_INSTA_PAY = 'InstaPay'; + const SOURCE_ZEPTO = 'Zepto'; + const SOURCE_SLACK = 'Slack'; @@ -424,6 +429,11 @@ public function getSourceAllowableValues() self::SOURCE_QUICKFILE, self::SOURCE_TIDE, self::SOURCE_TIDE_SSO, + self::SOURCE_FREE_AGENT, + self::SOURCE_AKAHU, + self::SOURCE_INSTA_PAY, + self::SOURCE_ZEPTO, + self::SOURCE_SLACK, ]; } diff --git a/src/lib/Model/TimesheetReportRequestModel.php b/src/lib/Model/TimesheetReportRequestModel.php index 118d88f..71ec909 100644 --- a/src/lib/Model/TimesheetReportRequestModel.php +++ b/src/lib/Model/TimesheetReportRequestModel.php @@ -62,6 +62,7 @@ class TimesheetReportRequestModel implements ModelInterface, ArrayAccess 'statuses' => 'string[]', 'work_type_id' => 'int', 'pay_schedule_id' => 'int', + 'include_post_tax_deductions' => 'bool', 'from_date' => '\DateTime', 'to_date' => '\DateTime', 'location_id' => 'int', @@ -79,6 +80,7 @@ class TimesheetReportRequestModel implements ModelInterface, ArrayAccess 'statuses' => null, 'work_type_id' => 'int32', 'pay_schedule_id' => 'int32', + 'include_post_tax_deductions' => null, 'from_date' => 'date-time', 'to_date' => 'date-time', 'location_id' => 'int32', @@ -117,6 +119,7 @@ public static function swaggerFormats() 'statuses' => 'statuses', 'work_type_id' => 'workTypeId', 'pay_schedule_id' => 'payScheduleId', + 'include_post_tax_deductions' => 'includePostTaxDeductions', 'from_date' => 'fromDate', 'to_date' => 'toDate', 'location_id' => 'locationId', @@ -134,6 +137,7 @@ public static function swaggerFormats() 'statuses' => 'setStatuses', 'work_type_id' => 'setWorkTypeId', 'pay_schedule_id' => 'setPayScheduleId', + 'include_post_tax_deductions' => 'setIncludePostTaxDeductions', 'from_date' => 'setFromDate', 'to_date' => 'setToDate', 'location_id' => 'setLocationId', @@ -151,6 +155,7 @@ public static function swaggerFormats() 'statuses' => 'getStatuses', 'work_type_id' => 'getWorkTypeId', 'pay_schedule_id' => 'getPayScheduleId', + 'include_post_tax_deductions' => 'getIncludePostTaxDeductions', 'from_date' => 'getFromDate', 'to_date' => 'getToDate', 'location_id' => 'getLocationId', @@ -243,6 +248,7 @@ public function __construct(array $data = null) $this->container['statuses'] = isset($data['statuses']) ? $data['statuses'] : null; $this->container['work_type_id'] = isset($data['work_type_id']) ? $data['work_type_id'] : null; $this->container['pay_schedule_id'] = isset($data['pay_schedule_id']) ? $data['pay_schedule_id'] : null; + $this->container['include_post_tax_deductions'] = isset($data['include_post_tax_deductions']) ? $data['include_post_tax_deductions'] : null; $this->container['from_date'] = isset($data['from_date']) ? $data['from_date'] : null; $this->container['to_date'] = isset($data['to_date']) ? $data['to_date'] : null; $this->container['location_id'] = isset($data['location_id']) ? $data['location_id'] : null; @@ -402,6 +408,30 @@ public function setPayScheduleId($pay_schedule_id) return $this; } + /** + * Gets include_post_tax_deductions + * + * @return bool + */ + public function getIncludePostTaxDeductions() + { + return $this->container['include_post_tax_deductions']; + } + + /** + * Sets include_post_tax_deductions + * + * @param bool $include_post_tax_deductions + * + * @return $this + */ + public function setIncludePostTaxDeductions($include_post_tax_deductions) + { + $this->container['include_post_tax_deductions'] = $include_post_tax_deductions; + + return $this; + } + /** * Gets from_date * diff --git a/src/lib/Model/UnavailabilityEditModel.php b/src/lib/Model/UnavailabilityEditModel.php index 370b09f..ae2c21e 100644 --- a/src/lib/Model/UnavailabilityEditModel.php +++ b/src/lib/Model/UnavailabilityEditModel.php @@ -64,6 +64,8 @@ class UnavailabilityEditModel implements ModelInterface, ArrayAccess 'reason' => 'string', 'recurring' => 'bool', 'recurring_day' => 'string', + 'recurring_days' => 'string', + 'recurring_days_csv' => 'string', 'is_all_day' => 'bool', 'view_only' => 'bool' ]; @@ -81,6 +83,8 @@ class UnavailabilityEditModel implements ModelInterface, ArrayAccess 'reason' => null, 'recurring' => null, 'recurring_day' => null, + 'recurring_days' => null, + 'recurring_days_csv' => null, 'is_all_day' => null, 'view_only' => null ]; @@ -119,6 +123,8 @@ public static function swaggerFormats() 'reason' => 'reason', 'recurring' => 'recurring', 'recurring_day' => 'recurringDay', + 'recurring_days' => 'recurringDays', + 'recurring_days_csv' => 'recurringDaysCsv', 'is_all_day' => 'isAllDay', 'view_only' => 'viewOnly' ]; @@ -136,6 +142,8 @@ public static function swaggerFormats() 'reason' => 'setReason', 'recurring' => 'setRecurring', 'recurring_day' => 'setRecurringDay', + 'recurring_days' => 'setRecurringDays', + 'recurring_days_csv' => 'setRecurringDaysCsv', 'is_all_day' => 'setIsAllDay', 'view_only' => 'setViewOnly' ]; @@ -153,6 +161,8 @@ public static function swaggerFormats() 'reason' => 'getReason', 'recurring' => 'getRecurring', 'recurring_day' => 'getRecurringDay', + 'recurring_days' => 'getRecurringDays', + 'recurring_days_csv' => 'getRecurringDaysCsv', 'is_all_day' => 'getIsAllDay', 'view_only' => 'getViewOnly' ]; @@ -205,6 +215,13 @@ public function getModelName() const RECURRING_DAY_THURSDAY = 'Thursday'; const RECURRING_DAY_FRIDAY = 'Friday'; const RECURRING_DAY_SATURDAY = 'Saturday'; + const RECURRING_DAYS_SUNDAY = 'Sunday'; + const RECURRING_DAYS_MONDAY = 'Monday'; + const RECURRING_DAYS_TUESDAY = 'Tuesday'; + const RECURRING_DAYS_WEDNESDAY = 'Wednesday'; + const RECURRING_DAYS_THURSDAY = 'Thursday'; + const RECURRING_DAYS_FRIDAY = 'Friday'; + const RECURRING_DAYS_SATURDAY = 'Saturday'; @@ -226,6 +243,24 @@ public function getRecurringDayAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringDaysAllowableValues() + { + return [ + self::RECURRING_DAYS_SUNDAY, + self::RECURRING_DAYS_MONDAY, + self::RECURRING_DAYS_TUESDAY, + self::RECURRING_DAYS_WEDNESDAY, + self::RECURRING_DAYS_THURSDAY, + self::RECURRING_DAYS_FRIDAY, + self::RECURRING_DAYS_SATURDAY, + ]; + } + /** * Associative array for storing property values @@ -249,6 +284,8 @@ public function __construct(array $data = null) $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; $this->container['recurring_day'] = isset($data['recurring_day']) ? $data['recurring_day'] : null; + $this->container['recurring_days'] = isset($data['recurring_days']) ? $data['recurring_days'] : null; + $this->container['recurring_days_csv'] = isset($data['recurring_days_csv']) ? $data['recurring_days_csv'] : null; $this->container['is_all_day'] = isset($data['is_all_day']) ? $data['is_all_day'] : null; $this->container['view_only'] = isset($data['view_only']) ? $data['view_only'] : null; } @@ -270,6 +307,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($this->container['recurring_days']) && !in_array($this->container['recurring_days'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -462,6 +507,63 @@ public function setRecurringDay($recurring_day) return $this; } + /** + * Gets recurring_days + * + * @return string + */ + public function getRecurringDays() + { + return $this->container['recurring_days']; + } + + /** + * Sets recurring_days + * + * @param string $recurring_days + * + * @return $this + */ + public function setRecurringDays($recurring_days) + { + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($recurring_days) && !in_array($recurring_days, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurring_days'] = $recurring_days; + + return $this; + } + + /** + * Gets recurring_days_csv + * + * @return string + */ + public function getRecurringDaysCsv() + { + return $this->container['recurring_days_csv']; + } + + /** + * Sets recurring_days_csv + * + * @param string $recurring_days_csv + * + * @return $this + */ + public function setRecurringDaysCsv($recurring_days_csv) + { + $this->container['recurring_days_csv'] = $recurring_days_csv; + + return $this; + } + /** * Gets is_all_day * diff --git a/src/lib/Model/UnavailabilityModel.php b/src/lib/Model/UnavailabilityModel.php index cf3ba1d..e9b8c8a 100644 --- a/src/lib/Model/UnavailabilityModel.php +++ b/src/lib/Model/UnavailabilityModel.php @@ -65,6 +65,8 @@ class UnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => 'string', 'recurring' => 'bool', 'recurring_day' => 'string', + 'recurring_days' => 'string', + 'recurring_days_csv' => 'string', 'is_all_day' => 'bool', 'view_only' => 'bool' ]; @@ -83,6 +85,8 @@ class UnavailabilityModel implements ModelInterface, ArrayAccess 'reason' => null, 'recurring' => null, 'recurring_day' => null, + 'recurring_days' => null, + 'recurring_days_csv' => null, 'is_all_day' => null, 'view_only' => null ]; @@ -122,6 +126,8 @@ public static function swaggerFormats() 'reason' => 'reason', 'recurring' => 'recurring', 'recurring_day' => 'recurringDay', + 'recurring_days' => 'recurringDays', + 'recurring_days_csv' => 'recurringDaysCsv', 'is_all_day' => 'isAllDay', 'view_only' => 'viewOnly' ]; @@ -140,6 +146,8 @@ public static function swaggerFormats() 'reason' => 'setReason', 'recurring' => 'setRecurring', 'recurring_day' => 'setRecurringDay', + 'recurring_days' => 'setRecurringDays', + 'recurring_days_csv' => 'setRecurringDaysCsv', 'is_all_day' => 'setIsAllDay', 'view_only' => 'setViewOnly' ]; @@ -158,6 +166,8 @@ public static function swaggerFormats() 'reason' => 'getReason', 'recurring' => 'getRecurring', 'recurring_day' => 'getRecurringDay', + 'recurring_days' => 'getRecurringDays', + 'recurring_days_csv' => 'getRecurringDaysCsv', 'is_all_day' => 'getIsAllDay', 'view_only' => 'getViewOnly' ]; @@ -210,6 +220,13 @@ public function getModelName() const RECURRING_DAY_THURSDAY = 'Thursday'; const RECURRING_DAY_FRIDAY = 'Friday'; const RECURRING_DAY_SATURDAY = 'Saturday'; + const RECURRING_DAYS_SUNDAY = 'Sunday'; + const RECURRING_DAYS_MONDAY = 'Monday'; + const RECURRING_DAYS_TUESDAY = 'Tuesday'; + const RECURRING_DAYS_WEDNESDAY = 'Wednesday'; + const RECURRING_DAYS_THURSDAY = 'Thursday'; + const RECURRING_DAYS_FRIDAY = 'Friday'; + const RECURRING_DAYS_SATURDAY = 'Saturday'; @@ -231,6 +248,24 @@ public function getRecurringDayAllowableValues() ]; } + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getRecurringDaysAllowableValues() + { + return [ + self::RECURRING_DAYS_SUNDAY, + self::RECURRING_DAYS_MONDAY, + self::RECURRING_DAYS_TUESDAY, + self::RECURRING_DAYS_WEDNESDAY, + self::RECURRING_DAYS_THURSDAY, + self::RECURRING_DAYS_FRIDAY, + self::RECURRING_DAYS_SATURDAY, + ]; + } + /** * Associative array for storing property values @@ -255,6 +290,8 @@ public function __construct(array $data = null) $this->container['reason'] = isset($data['reason']) ? $data['reason'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; $this->container['recurring_day'] = isset($data['recurring_day']) ? $data['recurring_day'] : null; + $this->container['recurring_days'] = isset($data['recurring_days']) ? $data['recurring_days'] : null; + $this->container['recurring_days_csv'] = isset($data['recurring_days_csv']) ? $data['recurring_days_csv'] : null; $this->container['is_all_day'] = isset($data['is_all_day']) ? $data['is_all_day'] : null; $this->container['view_only'] = isset($data['view_only']) ? $data['view_only'] : null; } @@ -276,6 +313,14 @@ public function listInvalidProperties() ); } + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($this->container['recurring_days']) && !in_array($this->container['recurring_days'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + return $invalidProperties; } @@ -492,6 +537,63 @@ public function setRecurringDay($recurring_day) return $this; } + /** + * Gets recurring_days + * + * @return string + */ + public function getRecurringDays() + { + return $this->container['recurring_days']; + } + + /** + * Sets recurring_days + * + * @param string $recurring_days + * + * @return $this + */ + public function setRecurringDays($recurring_days) + { + $allowedValues = $this->getRecurringDaysAllowableValues(); + if (!is_null($recurring_days) && !in_array($recurring_days, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'recurring_days', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['recurring_days'] = $recurring_days; + + return $this; + } + + /** + * Gets recurring_days_csv + * + * @return string + */ + public function getRecurringDaysCsv() + { + return $this->container['recurring_days_csv']; + } + + /** + * Sets recurring_days_csv + * + * @param string $recurring_days_csv + * + * @return $this + */ + public function setRecurringDaysCsv($recurring_days_csv) + { + $this->container['recurring_days_csv'] = $recurring_days_csv; + + return $this; + } + /** * Gets is_all_day * diff --git a/src/lib/Model/WebHook.php b/src/lib/Model/WebHook.php index 4ddae46..7e0118a 100644 --- a/src/lib/Model/WebHook.php +++ b/src/lib/Model/WebHook.php @@ -231,9 +231,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['web_hook_uri'] === null) { - $invalidProperties[] = "'web_hook_uri' can't be null"; - } return $invalidProperties; } @@ -286,7 +283,7 @@ public function getWebHookUri() /** * Sets web_hook_uri * - * @param string $web_hook_uri Required + * @param string $web_hook_uri * * @return $this */