Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
455 changes: 4 additions & 451 deletions sdk/dotnet/Timr.Api/Endpoints/TimeAccountApi.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/dotnet/Timr.Api/Model/Accounts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public partial class Accounts : IValidatableObject
/// <summary>
/// Initializes a new instance of the <see cref="Accounts" /> class.
/// </summary>
/// <param name="lastBalanceDate">date of last balance</param>
/// <param name="lastBalanceDate">The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.</param>
/// <param name="timeAccount">timeAccount</param>
/// <param name="overtimeSurchargeAccounts">overtimeSurchargeAccounts</param>
/// <param name="vacationAccount">vacationAccount</param>
Expand All @@ -50,9 +50,9 @@ public Accounts(DateOnly? lastBalanceDate = default, Option<TimeAccount?> timeAc
partial void OnCreated();

/// <summary>
/// date of last balance
/// The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.
/// </summary>
/// <value>date of last balance</value>
/// <value>The balance entry the figures continue from, always before the requested day. Null only for the initialization date itself.</value>
[JsonPropertyName("last_balance_date")]
public DateOnly? LastBalanceDate { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void setApiClient(ApiClient apiClient) {

/**
* Get a User&#39;s accounts
* Returns all of the User&#39;s account balances as of the given day, including overtime and surcharge accounts.
* Returns all of the User&#39;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&#39;s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User&#39;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. &#x60;last_balance_date&#x60; 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.
* <p><b>200</b> - The User&#39;s account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - Not Found
Expand Down Expand Up @@ -93,7 +93,7 @@ private ResponseSpec getUserAccountsRequestCreation(String id, LocalDate date) t

/**
* Get a User&#39;s accounts
* Returns all of the User&#39;s account balances as of the given day, including overtime and surcharge accounts.
* Returns all of the User&#39;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&#39;s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User&#39;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. &#x60;last_balance_date&#x60; 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.
* <p><b>200</b> - The User&#39;s account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - Not Found
Expand All @@ -109,7 +109,7 @@ public Accounts getUserAccounts(String id, LocalDate date) throws RestClientResp

/**
* Get a User&#39;s accounts
* Returns all of the User&#39;s account balances as of the given day, including overtime and surcharge accounts.
* Returns all of the User&#39;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&#39;s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User&#39;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. &#x60;last_balance_date&#x60; 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.
* <p><b>200</b> - The User&#39;s account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - Not Found
Expand All @@ -125,7 +125,7 @@ public ResponseEntity<Accounts> getUserAccountsWithHttpInfo(String id, LocalDate

/**
* Get a User&#39;s accounts
* Returns all of the User&#39;s account balances as of the given day, including overtime and surcharge accounts.
* Returns all of the User&#39;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&#39;s **currently assigned Work Schedule Model**, not necessarily the model that was assigned on the requested historical date. If the User&#39;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. &#x60;last_balance_date&#x60; 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.
* <p><b>200</b> - The User&#39;s account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - Not Found
Expand All @@ -137,96 +137,4 @@ public ResponseEntity<Accounts> getUserAccountsWithHttpInfo(String id, LocalDate
public ResponseSpec getUserAccountsWithResponseSpec(String id, LocalDate date) throws RestClientResponseException {
return getUserAccountsRequestCreation(id, date);
}

/**
* Get a User&#39;s working time accounts
* Returns the User&#39;s working time account balances as of the given day.
* <p><b>200</b> - The User&#39;s working time account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - 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<String, Object> pathParams = new HashMap<>();

pathParams.put("id", id);
pathParams.put("date", date);

final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();

final String[] localVarAccepts = {
"application/json", "application/problem+json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

String[] localVarAuthNames = new String[] { "OAuth2", "OAuth2" };

ParameterizedTypeReference<Accounts> 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&#39;s working time accounts
* Returns the User&#39;s working time account balances as of the given day.
* <p><b>200</b> - The User&#39;s working time account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - 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<Accounts> localVarReturnType = new ParameterizedTypeReference<>() {};
return getUserWorkingTimeAccountsRequestCreation(id, date).body(localVarReturnType);
}

/**
* Get a User&#39;s working time accounts
* Returns the User&#39;s working time account balances as of the given day.
* <p><b>200</b> - The User&#39;s working time account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - Not Found
* @param id ID of the User.
* @param date Day to return the balances for.
* @return ResponseEntity&lt;Accounts&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Accounts> getUserWorkingTimeAccountsWithHttpInfo(String id, LocalDate date) throws RestClientResponseException {
ParameterizedTypeReference<Accounts> localVarReturnType = new ParameterizedTypeReference<>() {};
return getUserWorkingTimeAccountsRequestCreation(id, date).toEntity(localVarReturnType);
}

/**
* Get a User&#39;s working time accounts
* Returns the User&#39;s working time account balances as of the given day.
* <p><b>200</b> - The User&#39;s working time account balances on the given day.
* <p><b>403</b> - Forbidden
* <p><b>404</b> - 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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,33 @@
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0")
public class Accounts {
public static final String JSON_PROPERTY_LAST_BALANCE_DATE = "last_balance_date";

Check warning on line 51 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment

private @Nullable LocalDate lastBalanceDate;

public static final String JSON_PROPERTY_TIME_ACCOUNT = "time_account";

Check warning on line 55 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment

private JsonNullable<@Nullable TimeAccount> timeAccount = JsonNullable.<TimeAccount>undefined();

public static final String JSON_PROPERTY_OVERTIME_SURCHARGE_ACCOUNTS = "overtime_surcharge_accounts";

Check warning on line 59 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment

private JsonNullable<@Nullable List<OvertimeSurchargeAccounts>> overtimeSurchargeAccounts = JsonNullable.<List<OvertimeSurchargeAccounts>>undefined();

public static final String JSON_PROPERTY_VACATION_ACCOUNT = "vacation_account";

Check warning on line 63 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment

private JsonNullable<@Nullable VacationAccount> vacationAccount = JsonNullable.<VacationAccount>undefined();

public Accounts() {

Check warning on line 67 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment
}

public Accounts lastBalanceDate(@Nullable LocalDate lastBalanceDate) {

Check warning on line 70 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment

this.lastBalanceDate = lastBalanceDate;
return this;
}

/**
* 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
*/

Expand Down Expand Up @@ -123,7 +123,7 @@
return this;
}

public Accounts addOvertimeSurchargeAccountsItem(OvertimeSurchargeAccounts overtimeSurchargeAccountsItem) {

Check warning on line 126 in sdk/java-restclient/src/main/java/com/timr/api/models/Accounts.java

View workflow job for this annotation

GitHub Actions / Java RestClient

no comment
if (this.overtimeSurchargeAccounts == null || !this.overtimeSurchargeAccounts.isPresent() || this.overtimeSurchargeAccounts.get() == null) {
this.overtimeSurchargeAccounts = JsonNullable.<List<OvertimeSurchargeAccounts>>of(new ArrayList<>());
}
Expand Down
Loading
Loading