src/main/java/com/squareup/connect/api/CustomersApi.java
public UpdateCustomerResponse updateCustomer(String customerId, UpdateCustomerRequest body) throws ApiException {
    Object localVarPostBody = body;
    
    // verify the required parameter 'customerId' is set
    if (customerId == null) {
      throw new ApiException(400, "Missing the required parameter 'customerId' when calling updateCustomer");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling updateCustomer");
    }
    
    // create path and map variables
    String localVarPath = "/v2/customers/{customer_id}"
      .replaceAll("\\{" + "customer_id" + "\\}", apiClient.escapeString(customerId.toString()));

    // 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<UpdateCustomerResponse> localVarReturnType = new GenericType<UpdateCustomerResponse>() {};
    CompleteResponse<UpdateCustomerResponse> completeResponse = (CompleteResponse<UpdateCustomerResponse>)apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * UpdateCustomer
   * Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new &#x60;customer_id&#x60;. You must use the new &#x60;customer_id&#x60; to update merged profiles.  You cannot edit a customer&#39;s cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint.
   * @param customerId The ID of the customer to update. (required)
   * @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
   * @return UpdateCustomerResponse
   * @throws ApiException if fails to make API call
   */
UpdateCustomer
Updates the details of an existing customer. When two profiles are merged into a single profile, that profile is assigned a new `customer_id`. You must use the new `customer_id` to update merged profiles.  You cannot edit a customer's cards on file with this endpoint. To make changes to a card on file, you must delete the existing card on file with the [DeleteCustomerCard](#endpoint-deletecustomercard) endpoint, then create a new one with the [CreateCustomerCard](#endpoint-createcustomercard) endpoint.
@param customerId The ID of the customer to update. (required)
@param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
@return UpdateCustomerResponse
@throws ApiException if fails to make API call
UpdateCustomer Updates the details of an existing customer . When two profiles are merged into a single profile that profile is assigned a new ` customer_id ` . You must use the new ` customer_id ` to update merged profiles . You cannot edit a customer ' s cards on file with this endpoint . To make changes to a card on file you must delete the existing card on file with the [ DeleteCustomerCard ] ( #endpoint - deletecustomercard ) endpoint then create a new one with the [ CreateCustomerCard ] ( #endpoint - createcustomercard ) endpoint . @param customerId The ID of the customer to update . ( required ) @param body An object containing the fields to POST for the request . See the corresponding object definition for field details . ( required ) @return UpdateCustomerResponse @throws ApiException if fails to make API call
public UpdateCustomerResponse updateCustomer(String customerId, UpdateCustomerRequest body) throws ApiException {
    Object localVarPostBody = body;
    if (customerId == null) {
      throw new ApiException(400, "Missing the required parameter 'customerId' when calling updateCustomer");
    }
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling updateCustomer");
    }
    String localVarPath = "/v2/customers/{customer_id}"
      .replaceAll("\\{" + "customer_id" + "\\}", apiClient.escapeString(customerId.toString()));
    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<UpdateCustomerResponse> localVarReturnType = new GenericType<UpdateCustomerResponse>() {};
    CompleteResponse<UpdateCustomerResponse> completeResponse = (CompleteResponse<UpdateCustomerResponse>)apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
public UpdateCustomerResponse updateCustomer ( String customerId , UpdateCustomerRequest body ) throws ApiException { Object localVarPostBody = body ; if ( customerId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'customerId' when calling updateCustomer" ) ; } if ( body == null ) { throw new ApiException ( 400 , "Missing the required parameter 'body' when calling updateCustomer" ) ; } String localVarPath = "/v2/customers/{customer_id}" . replaceAll ( "\\{" + "customer_id" + "\\}" , apiClient . escapeString ( customerId . toString ( ) ) ) ; 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 < UpdateCustomerResponse > localVarReturnType = new GenericType < UpdateCustomerResponse > ( ) { } ; CompleteResponse < UpdateCustomerResponse > completeResponse = ( CompleteResponse < UpdateCustomerResponse > ) apiClient . invokeAPI ( localVarPath , "PUT" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
UpdateCustomer
 Updates the details of an existing customer.
UpdateCustomer Updates the details of an existing customer .
// verify the required parameter 'customerId' is set // verify the required parameter 'body' is set // create path and map variables // query params