src/test/java/com/squareup/connect/api/CustomersApiTest.java
@Test
    public void updateCustomerTest() throws ApiException {
        Customer customer = api.createCustomer(new CreateCustomerRequest()
            .givenName("Amelia")
            .familyName("Earhart")
            .emailAddress("Amelia.Earhart@example.com")).getCustomer();

        UpdateCustomerRequest body = new UpdateCustomerRequest()
            .phoneNumber("1-555-555-0123")
            .emailAddress("New.Amelia.Earhart@example.com")
            .note("updated customer note");
        UpdateCustomerResponse response = api.updateCustomer(customer.getId(), body);

        assertTrue(response.getErrors().isEmpty());
        assertEquals("New.Amelia.Earhart@example.com", response.getCustomer().getEmailAddress());
    }
/**
     * UpdateCustomer
     *
     * Updates the details of an existing customer.  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.
     *
     * @throws ApiException
     *          if the Api call fails
     */
UpdateCustomer
Updates the details of an existing customer.  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.

@throws ApiException
if the Api call fails
UpdateCustomer Updates the details of an existing customer . 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 . @throws ApiException if the Api call fails
@Test
    public void updateCustomerTest() throws ApiException {
        Customer customer = api.createCustomer(new CreateCustomerRequest()
            .givenName("Amelia")
            .familyName("Earhart")
            .emailAddress("Amelia.Earhart@example.com")).getCustomer();
        UpdateCustomerRequest body = new UpdateCustomerRequest()
            .phoneNumber("1-555-555-0123")
            .emailAddress("New.Amelia.Earhart@example.com")
            .note("updated customer note");
        UpdateCustomerResponse response = api.updateCustomer(customer.getId(), body);
        assertTrue(response.getErrors().isEmpty());
        assertEquals("New.Amelia.Earhart@example.com", response.getCustomer().getEmailAddress());
    }
@ Test public void updateCustomerTest ( ) throws ApiException { Customer customer = api . createCustomer ( new CreateCustomerRequest ( ) . givenName ( "Amelia" ) . familyName ( "Earhart" ) . emailAddress ( "Amelia.Earhart@example.com" ) ) . getCustomer ( ) ; UpdateCustomerRequest body = new UpdateCustomerRequest ( ) . phoneNumber ( "1-555-555-0123" ) . emailAddress ( "New.Amelia.Earhart@example.com" ) . note ( "updated customer note" ) ; UpdateCustomerResponse response = api . updateCustomer ( customer . getId ( ) , body ) ; assertTrue ( response . getErrors ( ) . isEmpty ( ) ) ; assertEquals ( "New.Amelia.Earhart@example.com" , response . getCustomer ( ) . getEmailAddress ( ) ) ; }
UpdateCustomer
 Updates the details of an existing customer.
UpdateCustomer Updates the details of an existing customer .