github.com/grokify/go-ringcentral-client@v0.3.31/engagedigital/v1/client/docs/TimeSheetsApi.md (about) 1 # \TimeSheetsApi 2 3 All URIs are relative to *https://DOMAIN.api.engagement.dimelo.com/1.0* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateTimeSheet**](TimeSheetsApi.md#CreateTimeSheet) | **Post** /time_sheets | Creating a time sheet 8 [**DeleteTimeSheet**](TimeSheetsApi.md#DeleteTimeSheet) | **Delete** /time_sheets/{timeSheetId} | Deleting a time sheet 9 [**GetAllTimeSheets**](TimeSheetsApi.md#GetAllTimeSheets) | **Get** /time_sheets | Getting all time sheets 10 [**GetTimeSheet**](TimeSheetsApi.md#GetTimeSheet) | **Get** /time_sheets/{timeSheetId} | Getting a time sheet from its id 11 [**UpdateTimeSheet**](TimeSheetsApi.md#UpdateTimeSheet) | **Put** /time_sheets/{timeSheetId} | Updating a time sheet 12 13 14 15 ## CreateTimeSheet 16 17 > TimeSheet CreateTimeSheet(ctx, label, optional) 18 Creating a time sheet 19 20 This method creates a time sheet. In case of success it renders the time sheet, otherwise, it renders an error (422 HTTP code). Authorization: only users that can create time sheet. 21 22 ### Required Parameters 23 24 25 Name | Type | Description | Notes 26 ------------- | ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **label** | **string**| The label of the time sheet. | 29 **optional** | ***CreateTimeSheetOpts** | optional parameters | nil if no parameters 30 31 ### Optional Parameters 32 33 Optional parameters are passed through a pointer to a CreateTimeSheetOpts struct 34 35 36 Name | Type | Description | Notes 37 ------------- | ------------- | ------------- | ------------- 38 39 **active** | **optional.Bool**| true or false, this field is used to enable/disable a time sheet. | 40 **sourceIds** | [**optional.Interface of []string**](string.md)| An array containing id of each source using your time sheet. | 41 **holidaysRegion** | **optional.String**| A string containing the first two letters of your country (example: \"fr\"/\"en\"/\"es\"), useful to bootstrap default holidays following to a country. | 42 **holidays** | **optional.String**| An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale). | 43 **mondayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day | 44 **tuesdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 45 **wednesdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 46 **thursdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 47 **fridayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 48 **saturdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 49 **sundayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 50 51 ### Return type 52 53 [**TimeSheet**](TimeSheet.md) 54 55 ### Authorization 56 57 No authorization required 58 59 ### HTTP request headers 60 61 - **Content-Type**: Not defined 62 - **Accept**: application/json 63 64 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 65 [[Back to Model list]](../README.md#documentation-for-models) 66 [[Back to README]](../README.md) 67 68 69 ## DeleteTimeSheet 70 71 > TimeSheet DeleteTimeSheet(ctx, timeSheetId) 72 Deleting a time sheet 73 74 This method destroys an existing time sheet. It renders time sheet itself. It renders a 404 if id is invalid. 75 76 ### Required Parameters 77 78 79 Name | Type | Description | Notes 80 ------------- | ------------- | ------------- | ------------- 81 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 82 **timeSheetId** | **string**| | 83 84 ### Return type 85 86 [**TimeSheet**](TimeSheet.md) 87 88 ### Authorization 89 90 No authorization required 91 92 ### HTTP request headers 93 94 - **Content-Type**: Not defined 95 - **Accept**: application/json 96 97 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 98 [[Back to Model list]](../README.md#documentation-for-models) 99 [[Back to README]](../README.md) 100 101 102 ## GetAllTimeSheets 103 104 > GetAllTimeSheetsResponse GetAllTimeSheets(ctx, optional) 105 Getting all time sheets 106 107 This method renders time sheets ordered by active and label. 108 109 ### Required Parameters 110 111 112 Name | Type | Description | Notes 113 ------------- | ------------- | ------------- | ------------- 114 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 115 **optional** | ***GetAllTimeSheetsOpts** | optional parameters | nil if no parameters 116 117 ### Optional Parameters 118 119 Optional parameters are passed through a pointer to a GetAllTimeSheetsOpts struct 120 121 122 Name | Type | Description | Notes 123 ------------- | ------------- | ------------- | ------------- 124 **offset** | **optional.Int32**| The record index to start. Default value is 0. | 125 **limit** | **optional.Int32**| The max number of records to return. Default value is 30, max value is 150. | 126 127 ### Return type 128 129 [**GetAllTimeSheetsResponse**](GetAllTimeSheetsResponse.md) 130 131 ### Authorization 132 133 No authorization required 134 135 ### HTTP request headers 136 137 - **Content-Type**: Not defined 138 - **Accept**: application/json 139 140 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 141 [[Back to Model list]](../README.md#documentation-for-models) 142 [[Back to README]](../README.md) 143 144 145 ## GetTimeSheet 146 147 > TimeSheet GetTimeSheet(ctx, timeSheetId) 148 Getting a time sheet from its id 149 150 This method renders a time sheet from given id. Authorization: only users that can see time sheets in administration section. 151 152 ### Required Parameters 153 154 155 Name | Type | Description | Notes 156 ------------- | ------------- | ------------- | ------------- 157 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 158 **timeSheetId** | **string**| | 159 160 ### Return type 161 162 [**TimeSheet**](TimeSheet.md) 163 164 ### Authorization 165 166 No authorization required 167 168 ### HTTP request headers 169 170 - **Content-Type**: Not defined 171 - **Accept**: application/json 172 173 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 174 [[Back to Model list]](../README.md#documentation-for-models) 175 [[Back to README]](../README.md) 176 177 178 ## UpdateTimeSheet 179 180 > TimeSheet UpdateTimeSheet(ctx, timeSheetId, optional) 181 Updating a time sheet 182 183 This method updates an existing team from given attributes and renders it in case of success. 184 185 ### Required Parameters 186 187 188 Name | Type | Description | Notes 189 ------------- | ------------- | ------------- | ------------- 190 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 191 **timeSheetId** | **string**| | 192 **optional** | ***UpdateTimeSheetOpts** | optional parameters | nil if no parameters 193 194 ### Optional Parameters 195 196 Optional parameters are passed through a pointer to a UpdateTimeSheetOpts struct 197 198 199 Name | Type | Description | Notes 200 ------------- | ------------- | ------------- | ------------- 201 202 **active** | **optional.Bool**| true or false, this field is used to enable/disable a time sheet. | 203 **label** | **optional.String**| The label of the time sheet. | 204 **sourceIds** | [**optional.Interface of []string**](string.md)| An array containing id of each source using your time sheet. | 205 **holidays** | **optional.String**| An array containing one or more hash of holidays, a holiday must contain a name (string) and a date (string), the date must be in a valid format, a valid format is a format corresponding to your domain’s locale). | 206 **mondayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. For example: “a-b,c-d”: “a” is the beginning of the first interval of the day, “b” is the ending of the first interval of the day, “c” is the beginning of the second interval of the day, “d” is the ending of the second interval of the day | 207 **tuesdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 208 **wednesdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 209 **thursdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 210 **fridayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 211 **saturdayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 212 **sundayHours** | **optional.String**| this field define the time intervals of the day (in secs). An empty string means that there are no business hours on this day. See `monday_hours` for the format. | 213 214 ### Return type 215 216 [**TimeSheet**](TimeSheet.md) 217 218 ### Authorization 219 220 No authorization required 221 222 ### HTTP request headers 223 224 - **Content-Type**: Not defined 225 - **Accept**: application/json 226 227 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 228 [[Back to Model list]](../README.md#documentation-for-models) 229 [[Back to README]](../README.md) 230