src/main/java/com/squareup/connect/api/V1EmployeesApi.java
public CompleteResponse<V1Timecard>createTimecardWithHttpInfo(V1Timecard body) throws ApiException {
    Object localVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling createTimecard");
    }
    
    // create path and map variables
    String localVarPath = "/v1/me/timecards";

    // query params
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    localVarHeaderParams.put("Square-Version", "2019-11-20");

    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      "application/json"
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] { "oauth2" };

    GenericType<V1Timecard> localVarReturnType = new GenericType<V1Timecard>() {};
    return (CompleteResponse<V1Timecard>)apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * CreateTimecard
   * Creates a timecard for an employee and clocks them in with an &#x60;API_CREATE&#x60; event and a &#x60;clockin_time&#x60; set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the &#x60;clockin_time&#x60; and* &#x60;clockout_time&#x60; in the request.  Timecards correspond to exactly one shift for a given employee, bounded by the &#x60;clockin_time&#x60; and &#x60;clockout_time&#x60; fields. An employee is considered clocked in if they have a timecard that doesn&#39;t have a &#x60;clockout_time&#x60; set. An employee that is currently clocked in cannot be clocked in a second time.
   * @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
   * @return CompleteResponse<V1Timecard>
   * @throws ApiException if fails to make API call
   */
CreateTimecard
Creates a timecard for an employee and clocks them in with an `API_CREATE` event and a `clockin_time` set to the current time unless the request provides a different value. To import timecards from another system (rather than clocking someone in). Specify the `clockin_time` and* `clockout_time` in the request.  Timecards correspond to exactly one shift for a given employee, bounded by the `clockin_time` and `clockout_time` fields. An employee is considered clocked in if they have a timecard that doesn't have a `clockout_time` set. An employee that is currently clocked in cannot be clocked in a second time.
@param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
@return CompleteResponse
@throws ApiException if fails to make API call
CreateTimecard Creates a timecard for an employee and clocks them in with an ` API_CREATE ` event and a ` clockin_time ` set to the current time unless the request provides a different value . To import timecards from another system ( rather than clocking someone in ) . Specify the ` clockin_time ` and * ` clockout_time ` in the request . Timecards correspond to exactly one shift for a given employee bounded by the ` clockin_time ` and ` clockout_time ` fields . An employee is considered clocked in if they have a timecard that doesn ' t have a ` clockout_time ` set . An employee that is currently clocked in cannot be clocked in a second time . @param body An object containing the fields to POST for the request . See the corresponding object definition for field details . ( required ) @return CompleteResponse @throws ApiException if fails to make API call
public CompleteResponse<V1Timecard>createTimecardWithHttpInfo(V1Timecard body) throws ApiException {
    Object localVarPostBody = body;
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling createTimecard");
    }
    String localVarPath = "/v1/me/timecards";
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    localVarHeaderParams.put("Square-Version", "2019-11-20");
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    final String[] localVarContentTypes = {
      "application/json"
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    String[] localVarAuthNames = new String[] { "oauth2" };
    GenericType<V1Timecard> localVarReturnType = new GenericType<V1Timecard>() {};
    return (CompleteResponse<V1Timecard>)apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < V1Timecard > createTimecardWithHttpInfo ( V1Timecard body ) throws ApiException { Object localVarPostBody = body ; if ( body == null ) { throw new ApiException ( 400 , "Missing the required parameter 'body' when calling createTimecard" ) ; } String localVarPath = "/v1/me/timecards" ; List < Pair > localVarQueryParams = new ArrayList < Pair > ( ) ; Map < String , String > localVarHeaderParams = new HashMap < String , String > ( ) ; Map < String , Object > localVarFormParams = new HashMap < String , Object > ( ) ; localVarHeaderParams . put ( "Square-Version" , "2019-11-20" ) ; final String [ ] localVarAccepts = { "application/json" } ; final String localVarAccept = apiClient . selectHeaderAccept ( localVarAccepts ) ; final String [ ] localVarContentTypes = { "application/json" } ; final String localVarContentType = apiClient . selectHeaderContentType ( localVarContentTypes ) ; String [ ] localVarAuthNames = new String [ ] { "oauth2" } ; GenericType < V1Timecard > localVarReturnType = new GenericType < V1Timecard > ( ) { } ; return ( CompleteResponse < V1Timecard > ) apiClient . invokeAPI ( localVarPath , "POST" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
CreateTimecard
 Creates a timecard for an employee and clocks them in with an &#x60;API_CREATE&#x60; event and a &#x60;clockin_time&#x60; set to the current time unless the request provides a different value.
CreateTimecard Creates a timecard for an employee and clocks them in with an &#x60 ; API_CREATE&#x60 ; event and a &#x60 ; clockin_time&#x60 ; set to the current time unless the request provides a different value .
// verify the required parameter 'body' is set // create path and map variables // query params