timeAc
partial void OnCreated();
///
- /// date of last balance
+ /// The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
///
- /// date of last balance
+ /// The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
[JsonPropertyName("last_balance_date")]
public DateOnly? LastBalanceDate { get; set; }
diff --git a/sdk/java-restclient/src/main/java/com/timr/api/apis/TimeAccountApi.java b/sdk/java-restclient/src/main/java/com/timr/api/apis/TimeAccountApi.java
index 82bde3e..5e290e2 100644
--- a/sdk/java-restclient/src/main/java/com/timr/api/apis/TimeAccountApi.java
+++ b/sdk/java-restclient/src/main/java/com/timr/api/apis/TimeAccountApi.java
@@ -48,7 +48,7 @@ public void setApiClient(ApiClient apiClient) {
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* 200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -93,7 +93,7 @@ private ResponseSpec getUserAccountsRequestCreation(String id, LocalDate date) t
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
*
200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -109,7 +109,7 @@ public Accounts getUserAccounts(String id, LocalDate date) throws RestClientResp
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
*
200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -125,7 +125,7 @@ public ResponseEntity getUserAccountsWithHttpInfo(String id, LocalDate
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* 200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -137,96 +137,4 @@ public ResponseEntity getUserAccountsWithHttpInfo(String id, LocalDate
public ResponseSpec getUserAccountsWithResponseSpec(String id, LocalDate date) throws RestClientResponseException {
return getUserAccountsRequestCreation(id, date);
}
-
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * 200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return Accounts
- * @throws RestClientResponseException if an error occurs while attempting to invoke the API
- */
- private ResponseSpec getUserWorkingTimeAccountsRequestCreation(String id, LocalDate date) throws RestClientResponseException {
- Object postBody = null;
- // verify the required parameter 'id' is set
- if (id == null) {
- throw new RestClientResponseException("Missing the required parameter 'id' when calling getUserWorkingTimeAccounts", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
- }
- // verify the required parameter 'date' is set
- if (date == null) {
- throw new RestClientResponseException("Missing the required parameter 'date' when calling getUserWorkingTimeAccounts", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
- }
- // create path and map variables
- final Map pathParams = new HashMap<>();
-
- pathParams.put("id", id);
- pathParams.put("date", date);
-
- final MultiValueMap localVarQueryParams = new LinkedMultiValueMap<>();
- final HttpHeaders headerParams = new HttpHeaders();
- final MultiValueMap cookieParams = new LinkedMultiValueMap<>();
- final MultiValueMap formParams = new LinkedMultiValueMap<>();
-
- final String[] localVarAccepts = {
- "application/json", "application/problem+json"
- };
- final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- final String[] localVarContentTypes = { };
- final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
-
- String[] localVarAuthNames = new String[] { "OAuth2", "OAuth2" };
-
- ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
- return apiClient.invokeAPI("/users/{id}/working-time-accounts/{date}", HttpMethod.GET, pathParams, localVarQueryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
- }
-
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * 200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return Accounts
- * @throws RestClientResponseException if an error occurs while attempting to invoke the API
- */
- public Accounts getUserWorkingTimeAccounts(String id, LocalDate date) throws RestClientResponseException {
- ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
- return getUserWorkingTimeAccountsRequestCreation(id, date).body(localVarReturnType);
- }
-
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * 200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return ResponseEntity<Accounts>
- * @throws RestClientResponseException if an error occurs while attempting to invoke the API
- */
- public ResponseEntity getUserWorkingTimeAccountsWithHttpInfo(String id, LocalDate date) throws RestClientResponseException {
- ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference<>() {};
- return getUserWorkingTimeAccountsRequestCreation(id, date).toEntity(localVarReturnType);
- }
-
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * 200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return ResponseSpec
- * @throws RestClientResponseException if an error occurs while attempting to invoke the API
- */
- public ResponseSpec getUserWorkingTimeAccountsWithResponseSpec(String id, LocalDate date) throws RestClientResponseException {
- return getUserWorkingTimeAccountsRequestCreation(id, date);
- }
}
diff --git a/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java b/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java
index aec232a..df1fa02 100644
--- a/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java
+++ b/sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java
@@ -74,7 +74,7 @@ public Accounts lastBalanceDate(@Nullable LocalDate lastBalanceDate) {
}
/**
- * date of last balance
+ * The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
* @return lastBalanceDate
*/
diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TimeAccountApi.java b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TimeAccountApi.java
index 5116acd..1a38b80 100644
--- a/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TimeAccountApi.java
+++ b/sdk/java-resttemplate/src/main/java/com/timr/api/apis/TimeAccountApi.java
@@ -43,7 +43,7 @@ public TimeAccountApi(ApiClient apiClient) {
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
*
200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -58,7 +58,7 @@ public Accounts getUserAccounts(@jakarta.annotation.Nonnull String id, @jakarta.
/**
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
*
200 - The User's account balances on the given day.
*
403 - Forbidden
*
404 - Not Found
@@ -102,67 +102,6 @@ public ResponseEntity getUserAccountsWithHttpInfo(@jakarta.annotation.
ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/users/{id}/accounts/{date}", HttpMethod.GET, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * 200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User. (required)
- * @param date Day to return the balances for. (required)
- * @return Accounts
- * @throws RestClientException if an error occurs while attempting to invoke the API
- */
- public Accounts getUserWorkingTimeAccounts(@jakarta.annotation.Nonnull String id, @jakarta.annotation.Nonnull LocalDate date) throws RestClientException {
- return getUserWorkingTimeAccountsWithHttpInfo(id, date).getBody();
- }
-
- /**
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- *
200 - The User's working time account balances on the given day.
- *
403 - Forbidden
- *
404 - Not Found
- * @param id ID of the User. (required)
- * @param date Day to return the balances for. (required)
- * @return ResponseEntity<Accounts>
- * @throws RestClientException if an error occurs while attempting to invoke the API
- */
- public ResponseEntity getUserWorkingTimeAccountsWithHttpInfo(@jakarta.annotation.Nonnull String id, @jakarta.annotation.Nonnull LocalDate date) throws RestClientException {
- Object localVarPostBody = null;
-
- // verify the required parameter 'id' is set
- if (id == null) {
- throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'id' when calling getUserWorkingTimeAccounts");
- }
-
- // verify the required parameter 'date' is set
- if (date == null) {
- throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'date' when calling getUserWorkingTimeAccounts");
- }
-
- // create path and map variables
- final Map uriVariables = new HashMap();
- uriVariables.put("id", id);
- uriVariables.put("date", date);
-
- final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
- final HttpHeaders localVarHeaderParams = new HttpHeaders();
- final MultiValueMap localVarCookieParams = new LinkedMultiValueMap();
- final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
-
- final String[] localVarAccepts = {
- "application/json", "application/problem+json"
- };
- final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- final String[] localVarContentTypes = { };
- final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
-
- String[] localVarAuthNames = new String[] { "OAuth2", "OAuth2" };
-
- ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {};
- return apiClient.invokeAPI("/users/{id}/working-time-accounts/{date}", HttpMethod.GET, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
- }
@Override
public ResponseEntity invokeAPI(String url, HttpMethod method, Object request, ParameterizedTypeReference returnType) throws RestClientException {
diff --git a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java
index 34319d1..a012e0d 100644
--- a/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java
+++ b/sdk/java-resttemplate/src/main/java/com/timr/api/models/Accounts.java
@@ -73,7 +73,7 @@ public Accounts lastBalanceDate(@jakarta.annotation.Nullable LocalDate lastBalan
}
/**
- * date of last balance
+ * The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
* @return lastBalanceDate
*/
@jakarta.annotation.Nullable
diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/apis/TimeAccountApi.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/apis/TimeAccountApi.kt
index 8a12b84..df635e2 100644
--- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/apis/TimeAccountApi.kt
+++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/apis/TimeAccountApi.kt
@@ -59,7 +59,7 @@ open class TimeAccountApi(basePath: kotlin.String = defaultBasePath, client: Cal
/**
* GET /users/{id}/accounts/{date}
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* @param id ID of the User.
* @param date Day to return the balances for.
* @return Accounts
@@ -92,7 +92,7 @@ open class TimeAccountApi(basePath: kotlin.String = defaultBasePath, client: Cal
/**
* GET /users/{id}/accounts/{date}
* Get a User's accounts
- * Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* @param id ID of the User.
* @param date Day to return the balances for.
* @return ApiResponse
@@ -132,82 +132,6 @@ open class TimeAccountApi(basePath: kotlin.String = defaultBasePath, client: Cal
)
}
- /**
- * GET /users/{id}/working-time-accounts/{date}
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return Accounts
- * @throws IllegalStateException If the request is not correctly configured
- * @throws IOException Rethrows the OkHttp execute method exception
- * @throws UnsupportedOperationException If the API returns an informational or redirection response
- * @throws ClientException If the API returns a client error response
- * @throws ServerException If the API returns a server error response
- */
- @Suppress("UNCHECKED_CAST")
- @Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
- suspend fun getUserWorkingTimeAccounts(id: kotlin.String, date: java.time.LocalDate) : Accounts = withContext(Dispatchers.IO) {
- val localVarResponse = getUserWorkingTimeAccountsWithHttpInfo(id = id, date = date)
-
- return@withContext when (localVarResponse.responseType) {
- ResponseType.Success -> (localVarResponse as Success<*>).data as Accounts
- ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
- ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
- ResponseType.ClientError -> {
- val localVarError = localVarResponse as ClientError<*>
- throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
- }
- ResponseType.ServerError -> {
- val localVarError = localVarResponse as ServerError<*>
- throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
- }
- }
- }
-
- /**
- * GET /users/{id}/working-time-accounts/{date}
- * Get a User's working time accounts
- * Returns the User's working time account balances as of the given day.
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return ApiResponse
- * @throws IllegalStateException If the request is not correctly configured
- * @throws IOException Rethrows the OkHttp execute method exception
- */
- @Suppress("UNCHECKED_CAST")
- @Throws(IllegalStateException::class, IOException::class)
- suspend fun getUserWorkingTimeAccountsWithHttpInfo(id: kotlin.String, date: java.time.LocalDate) : ApiResponse = withContext(Dispatchers.IO) {
- val localVariableConfig = getUserWorkingTimeAccountsRequestConfig(id = id, date = date)
-
- return@withContext request(
- localVariableConfig
- )
- }
-
- /**
- * To obtain the request config of the operation getUserWorkingTimeAccounts
- *
- * @param id ID of the User.
- * @param date Day to return the balances for.
- * @return RequestConfig
- */
- fun getUserWorkingTimeAccountsRequestConfig(id: kotlin.String, date: java.time.LocalDate) : RequestConfig {
- val localVariableBody = null
- val localVariableQuery: MultiValueMap = mutableMapOf()
- val localVariableHeaders: MutableMap = mutableMapOf()
- localVariableHeaders["Accept"] = "application/json, application/problem+json"
-
- return RequestConfig(
- method = RequestMethod.GET,
- path = "/users/{id}/working-time-accounts/{date}".replace("{"+"id"+"}", encodeURIComponent(id.toString())).replace("{"+"date"+"}", encodeURIComponent(date.toString())),
- query = localVariableQuery,
- headers = localVariableHeaders,
- requiresAuthentication = true,
- body = localVariableBody
- )
- }
-
private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
diff --git a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt
index a936f8a..be1cdd4 100644
--- a/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt
+++ b/sdk/kotlin-okhttp/src/main/kotlin/com/timr/api/models/Accounts.kt
@@ -32,7 +32,7 @@ import com.google.gson.annotations.SerializedName
/**
*
*
- * @param lastBalanceDate date of last balance
+ * @param lastBalanceDate The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
* @param timeAccount
* @param overtimeSurchargeAccounts
* @param vacationAccount
@@ -41,7 +41,7 @@ import com.google.gson.annotations.SerializedName
data class Accounts (
- /* date of last balance */
+ /* The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself. */
@SerializedName("last_balance_date")
val lastBalanceDate: java.time.LocalDate?,
diff --git a/sdk/python/timr_api/api/time_account_api.py b/sdk/python/timr_api/api/time_account_api.py
index cd78eed..545b735 100644
--- a/sdk/python/timr_api/api/time_account_api.py
+++ b/sdk/python/timr_api/api/time_account_api.py
@@ -58,7 +58,7 @@ def get_user_accounts(
) -> Accounts:
"""Get a User's accounts
- Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
:param id: ID of the User. (required)
:type id: str
@@ -131,7 +131,7 @@ def get_user_accounts_with_http_info(
) -> ApiResponse[Accounts]:
"""Get a User's accounts
- Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
:param id: ID of the User. (required)
:type id: str
@@ -204,7 +204,7 @@ def get_user_accounts_without_preload_content(
) -> RESTResponseType:
"""Get a User's accounts
- Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
:param id: ID of the User. (required)
:type id: str
@@ -320,287 +320,3 @@ def _get_user_accounts_serialize(
)
-
-
- @validate_call
- def get_user_working_time_accounts(
- self,
- id: Annotated[StrictStr, Field(description="ID of the User.")],
- var_date: Annotated[date, Field(description="Day to return the balances for.")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
- ]
- ] = None,
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
- _content_type: Optional[StrictStr] = None,
- _headers: Optional[Dict[StrictStr, Any]] = None,
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> Accounts:
- """Get a User's working time accounts
-
- Returns the User's working time account balances as of the given day.
-
- :param id: ID of the User. (required)
- :type id: str
- :param var_date: Day to return the balances for. (required)
- :type var_date: date
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :type _request_timeout: int, tuple(int, int), optional
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the
- authentication in the spec for a single request.
- :type _request_auth: dict, optional
- :param _content_type: force content-type for the request.
- :type _content_type: str, Optional
- :param _headers: set to override the headers for a single
- request; this effectively ignores the headers
- in the spec for a single request.
- :type _headers: dict, optional
- :param _host_index: set to override the host_index for a single
- request; this effectively ignores the host_index
- in the spec for a single request.
- :type _host_index: int, optional
- :return: Returns the result object.
- """ # noqa: E501
-
- _param = self._get_user_working_time_accounts_serialize(
- id=id,
- var_date=var_date,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "Accounts",
- '403': "Error",
- '404': "Error",
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- response_data.read()
- return self.api_client.response_deserialize(
- response_data=response_data,
- response_types_map=_response_types_map,
- ).data
-
-
- @validate_call
- def get_user_working_time_accounts_with_http_info(
- self,
- id: Annotated[StrictStr, Field(description="ID of the User.")],
- var_date: Annotated[date, Field(description="Day to return the balances for.")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
- ]
- ] = None,
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
- _content_type: Optional[StrictStr] = None,
- _headers: Optional[Dict[StrictStr, Any]] = None,
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> ApiResponse[Accounts]:
- """Get a User's working time accounts
-
- Returns the User's working time account balances as of the given day.
-
- :param id: ID of the User. (required)
- :type id: str
- :param var_date: Day to return the balances for. (required)
- :type var_date: date
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :type _request_timeout: int, tuple(int, int), optional
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the
- authentication in the spec for a single request.
- :type _request_auth: dict, optional
- :param _content_type: force content-type for the request.
- :type _content_type: str, Optional
- :param _headers: set to override the headers for a single
- request; this effectively ignores the headers
- in the spec for a single request.
- :type _headers: dict, optional
- :param _host_index: set to override the host_index for a single
- request; this effectively ignores the host_index
- in the spec for a single request.
- :type _host_index: int, optional
- :return: Returns the result object.
- """ # noqa: E501
-
- _param = self._get_user_working_time_accounts_serialize(
- id=id,
- var_date=var_date,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "Accounts",
- '403': "Error",
- '404': "Error",
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- response_data.read()
- return self.api_client.response_deserialize(
- response_data=response_data,
- response_types_map=_response_types_map,
- )
-
-
- @validate_call
- def get_user_working_time_accounts_without_preload_content(
- self,
- id: Annotated[StrictStr, Field(description="ID of the User.")],
- var_date: Annotated[date, Field(description="Day to return the balances for.")],
- _request_timeout: Union[
- None,
- Annotated[StrictFloat, Field(gt=0)],
- Tuple[
- Annotated[StrictFloat, Field(gt=0)],
- Annotated[StrictFloat, Field(gt=0)]
- ]
- ] = None,
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
- _content_type: Optional[StrictStr] = None,
- _headers: Optional[Dict[StrictStr, Any]] = None,
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
- ) -> RESTResponseType:
- """Get a User's working time accounts
-
- Returns the User's working time account balances as of the given day.
-
- :param id: ID of the User. (required)
- :type id: str
- :param var_date: Day to return the balances for. (required)
- :type var_date: date
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :type _request_timeout: int, tuple(int, int), optional
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the
- authentication in the spec for a single request.
- :type _request_auth: dict, optional
- :param _content_type: force content-type for the request.
- :type _content_type: str, Optional
- :param _headers: set to override the headers for a single
- request; this effectively ignores the headers
- in the spec for a single request.
- :type _headers: dict, optional
- :param _host_index: set to override the host_index for a single
- request; this effectively ignores the host_index
- in the spec for a single request.
- :type _host_index: int, optional
- :return: Returns the result object.
- """ # noqa: E501
-
- _param = self._get_user_working_time_accounts_serialize(
- id=id,
- var_date=var_date,
- _request_auth=_request_auth,
- _content_type=_content_type,
- _headers=_headers,
- _host_index=_host_index
- )
-
- _response_types_map: Dict[str, Optional[str]] = {
- '200': "Accounts",
- '403': "Error",
- '404': "Error",
- }
- response_data = self.api_client.call_api(
- *_param,
- _request_timeout=_request_timeout
- )
- return response_data.response
-
-
- def _get_user_working_time_accounts_serialize(
- self,
- id,
- var_date,
- _request_auth,
- _content_type,
- _headers,
- _host_index,
- ) -> RequestSerialized:
-
- _host = None
-
- _collection_formats: Dict[str, str] = {
- }
-
- _path_params: Dict[str, str] = {}
- _query_params: List[Tuple[str, str]] = []
- _header_params: Dict[str, Optional[str]] = _headers or {}
- _form_params: List[Tuple[str, str]] = []
- _files: Dict[
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
- ] = {}
- _body_params: Optional[bytes] = None
-
- # process the path parameters
- if id is not None:
- _path_params['id'] = id
- if var_date is not None:
- _path_params['date'] = var_date
- # process the query parameters
- # process the header parameters
- # process the form parameters
- # process the body parameter
-
-
- # set the HTTP header `Accept`
- if 'Accept' not in _header_params:
- _header_params['Accept'] = self.api_client.select_header_accept(
- [
- 'application/json',
- 'application/problem+json'
- ]
- )
-
-
- # authentication setting
- _auth_settings: List[str] = [
- 'OAuth2',
- 'OAuth2'
- ]
-
- return self.api_client.param_serialize(
- method='GET',
- resource_path='/users/{id}/working-time-accounts/{date}',
- path_params=_path_params,
- query_params=_query_params,
- header_params=_header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- auth_settings=_auth_settings,
- collection_formats=_collection_formats,
- _host=_host,
- _request_auth=_request_auth
- )
-
-
diff --git a/sdk/python/timr_api/configuration.py b/sdk/python/timr_api/configuration.py
index e0d0e24..d48217f 100644
--- a/sdk/python/timr_api/configuration.py
+++ b/sdk/python/timr_api/configuration.py
@@ -569,7 +569,7 @@ def to_debug_report(self) -> str:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: 1.0.0\n"\
+ "Version of the API: 1.0.1\n"\
"SDK Package Version: 2.0.0".\
format(env=sys.platform, pyversion=sys.version)
diff --git a/sdk/python/timr_api/models/accounts.py b/sdk/python/timr_api/models/accounts.py
index 117ce8c..d3b7434 100644
--- a/sdk/python/timr_api/models/accounts.py
+++ b/sdk/python/timr_api/models/accounts.py
@@ -31,7 +31,7 @@ class Accounts(BaseModel):
"""
Accounts
""" # noqa: E501
- last_balance_date: Optional[date] = Field(description="date of last balance")
+ last_balance_date: Optional[date] = Field(description="The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.")
time_account: Optional[TimeAccount] = None
overtime_surcharge_accounts: Optional[List[OvertimeSurchargeAccounts]] = None
vacation_account: Optional[VacationAccount] = None
diff --git a/sdk/swift/TimrApi/APIs/TimeAccountAPI.swift b/sdk/swift/TimrApi/APIs/TimeAccountAPI.swift
index 870b0a5..714dccd 100644
--- a/sdk/swift/TimrApi/APIs/TimeAccountAPI.swift
+++ b/sdk/swift/TimrApi/APIs/TimeAccountAPI.swift
@@ -27,7 +27,7 @@ open class TimeAccountAPI {
/**
Get a User's accounts
- GET /users/{id}/accounts/{date}
- - Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ - Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
- OAuth:
- type: oauth2
- name: OAuth2
@@ -61,54 +61,4 @@ open class TimeAccountAPI {
return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true)
}
-
- /**
- Get a User's working time accounts
-
- - parameter id: (path) ID of the User.
- - parameter date: (path) Day to return the balances for.
- - returns: Accounts
- */
- @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
- open class func getUserWorkingTimeAccounts(id: String, date: Date) async throws -> Accounts {
- return try await getUserWorkingTimeAccountsWithRequestBuilder(id: id, date: date).execute().body
- }
-
- /**
- Get a User's working time accounts
- - GET /users/{id}/working-time-accounts/{date}
- - Returns the User's working time account balances as of the given day.
- - OAuth:
- - type: oauth2
- - name: OAuth2
- - OAuth:
- - type: oauth2
- - name: OAuth2
- - parameter id: (path) ID of the User.
- - parameter date: (path) Day to return the balances for.
- - returns: RequestBuilder
- */
- open class func getUserWorkingTimeAccountsWithRequestBuilder(id: String, date: Date) -> RequestBuilder {
- var localVariablePath = "/users/{id}/working-time-accounts/{date}"
- let idPreEscape = "\(APIHelper.mapValueToPathItem(id))"
- let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
- localVariablePath = localVariablePath.replacingOccurrences(of: "{id}", with: idPostEscape, options: .literal, range: nil)
- let datePreEscape = "\(APIHelper.mapValueToPathItem(date))"
- let datePostEscape = datePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
- localVariablePath = localVariablePath.replacingOccurrences(of: "{date}", with: datePostEscape, options: .literal, range: nil)
- let localVariableURLString = TimrAPI.basePath + localVariablePath
- let localVariableParameters: [String: Any]? = nil
-
- let localVariableUrlComponents = URLComponents(string: localVariableURLString)
-
- let localVariableNillableHeaders: [String: Any?] = [
- :
- ]
-
- let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders)
-
- let localVariableRequestBuilder: RequestBuilder.Type = TimrAPI.requestBuilderFactory.getBuilder()
-
- return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true)
- }
}
diff --git a/sdk/swift/TimrApi/Models/Accounts.swift b/sdk/swift/TimrApi/Models/Accounts.swift
index f5926c9..154db8f 100644
--- a/sdk/swift/TimrApi/Models/Accounts.swift
+++ b/sdk/swift/TimrApi/Models/Accounts.swift
@@ -12,7 +12,7 @@ import AnyCodable
public struct Accounts: Codable, JSONEncodable, Hashable {
- /** date of last balance */
+ /** The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself. */
public var lastBalanceDate: Date?
public var timeAccount: TimeAccount?
public var overtimeSurchargeAccounts: [OvertimeSurchargeAccounts]?
diff --git a/sdk/typescript-fetch/src/apis/TimeAccountApi.ts b/sdk/typescript-fetch/src/apis/TimeAccountApi.ts
index 523afaf..5895282 100644
--- a/sdk/typescript-fetch/src/apis/TimeAccountApi.ts
+++ b/sdk/typescript-fetch/src/apis/TimeAccountApi.ts
@@ -33,17 +33,6 @@ export interface GetUserAccountsRequest {
date: Date;
}
-export interface GetUserWorkingTimeAccountsRequest {
- /**
- * ID of the User.
- */
- id: string;
- /**
- * Day to return the balances for.
- */
- date: Date;
-}
-
/**
*
*/
@@ -99,7 +88,7 @@ export class TimeAccountApi extends runtime.BaseAPI {
}
/**
- * Returns all of the User\'s account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User\'s account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User\'s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User\'s Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* Get a User\'s accounts
*/
async getUserAccountsRaw(requestParameters: GetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
@@ -110,7 +99,7 @@ export class TimeAccountApi extends runtime.BaseAPI {
}
/**
- * Returns all of the User\'s account balances as of the given day, including overtime and surcharge accounts.
+ * Returns all of the User\'s account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged. If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time. **Important:** The target working time is calculated using the User\'s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User\'s Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances. `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
* Get a User\'s accounts
*/
async getUserAccounts(id: string, date: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
@@ -118,73 +107,4 @@ export class TimeAccountApi extends runtime.BaseAPI {
return await response.value();
}
- /**
- * Creates request options for getUserWorkingTimeAccounts without sending the request
- */
- async getUserWorkingTimeAccountsRequestOpts(requestParameters: GetUserWorkingTimeAccountsRequest): Promise {
- if (requestParameters['id'] == null) {
- throw new runtime.RequiredError(
- 'id',
- 'Required parameter "id" was null or undefined when calling getUserWorkingTimeAccounts().'
- );
- }
-
- if (requestParameters['date'] == null) {
- throw new runtime.RequiredError(
- 'date',
- 'Required parameter "date" was null or undefined when calling getUserWorkingTimeAccounts().'
- );
- }
-
- const queryParameters: any = {};
-
- const headerParameters: runtime.HTTPHeaders = {};
-
- if (this.configuration && this.configuration.accessToken) {
- // oauth required
- headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
- }
-
- if (this.configuration && this.configuration.accessToken) {
- // oauth required
- headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
- }
-
-
- let urlPath = `/users/{id}/working-time-accounts/{date}`;
- urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
- if (requestParameters['date'] instanceof Date) {
- urlPath = urlPath.replace('{date}', encodeURIComponent(runtime.serializeDate(requestParameters['date'])));
- } else {
- urlPath = urlPath.replace('{date}', encodeURIComponent(String(requestParameters['date'])));
- }
-
- return {
- path: urlPath,
- method: 'GET',
- headers: headerParameters,
- query: queryParameters,
- };
- }
-
- /**
- * Returns the User\'s working time account balances as of the given day.
- * Get a User\'s working time accounts
- */
- async getUserWorkingTimeAccountsRaw(requestParameters: GetUserWorkingTimeAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> {
- const requestOptions = await this.getUserWorkingTimeAccountsRequestOpts(requestParameters);
- const response = await this.request(requestOptions, initOverrides);
-
- return new runtime.JSONApiResponse(response, (jsonValue) => AccountsFromJSON(jsonValue));
- }
-
- /**
- * Returns the User\'s working time account balances as of the given day.
- * Get a User\'s working time accounts
- */
- async getUserWorkingTimeAccounts(id: string, date: Date, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise {
- const response = await this.getUserWorkingTimeAccountsRaw({ id: id, date: date, }, initOverrides);
- return await response.value();
- }
-
}
diff --git a/sdk/typescript-fetch/src/models/Accounts.ts b/sdk/typescript-fetch/src/models/Accounts.ts
index 5c2d90c..0053119 100644
--- a/sdk/typescript-fetch/src/models/Accounts.ts
+++ b/sdk/typescript-fetch/src/models/Accounts.ts
@@ -41,7 +41,7 @@ import {
*/
export interface Accounts {
/**
- * date of last balance
+ * The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
*/
lastBalanceDate: Date | null;
/**
diff --git a/spec/openapi.yaml b/spec/openapi.yaml
index 948647f..39d9259 100644
--- a/spec/openapi.yaml
+++ b/spec/openapi.yaml
@@ -10,7 +10,7 @@ info:
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
- version: 1.0.0
+ version: 1.0.1
servers:
- url: https://api.timr.com/v1/
@@ -276,50 +276,22 @@ paths:
"422":
$ref: '#/components/responses/UnprocessableContent'
- /users/{id}/working-time-accounts/{date}:
- get:
- operationId: getUserWorkingTimeAccounts
- tags:
- - Time Account
- summary: Get a User's working time accounts
- description: Returns the User's working time account balances as of the given day.
- parameters:
- - name: id
- in: path
- description: ID of the User.
- required: true
- example: 074e7048-9097-11eb-a8b3-0242ac130003
- schema:
- type: string
- - name: date
- in: path
- description: Day to return the balances for.
- required: true
- example: 2026-07-16
- schema:
- type: string
- format: date
- description: last balancing date
- example: 2023-03-28
- responses:
- "200":
- description: The User's working time account balances on the given day.
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- "403":
- $ref: '#/components/responses/Forbidden'
- "404":
- $ref: '#/components/responses/NotFound'
-
/users/{id}/accounts/{date}:
get:
operationId: getUserAccounts
tags:
- Time Account
summary: Get a User's accounts
- description: Returns all of the User's account balances as of the given day, including overtime and surcharge accounts.
+ description: |-
+ Returns all of the User's account balances as of the specified date. The calculation starts from the **most recent balance before or on the specified date**. If the specified date is itself a balance date, the stored balance is returned unchanged.
+
+ If the specified date does not fall on a balance date, timr uses the **most recent balance before the specified date** as the starting point and recalculates the account balances up to the requested date using the recorded actual times and the applicable target working time.
+
+ **Important:** The target working time is calculated using the User's **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date.
+
+ If the User's Work Schedule Model has changed, this endpoint should therefore only be used with dates **on or after the most recent Work Schedule Model change**. Requests for earlier dates may return incorrect target working times and therefore incorrect account balances.
+
+ `last_balance_date` identifies the balance entry preceding the returned period, including when the requested date is itself a balance date. It is null for the initialization date itself.
parameters:
- name: id
in: path
@@ -4723,7 +4695,7 @@ components:
nullable: true
type: string
format: date
- description: date of last balance
+ description: The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
example: 2023-03-28
time_account:
nullable: true