lib/Braintree/AddressGateway.php
public function find($customerOrId, $addressId)
    {

        $customerId = $this->_determineCustomerId($customerOrId);
        $this->_validateId($addressId);

        try {
            $path = $this->_config->merchantPath() . '/customers/' . $customerId . '/addresses/' . $addressId;
            $response = $this->_http->get($path);
            return Address::factory($response['address']);
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound(
            'address for customer ' . $customerId .
                ' with id ' . $addressId . ' not found.'
            );
        }

    }
public function find($customerOrId, $addressId)
    {

        $customerId = $this->_determineCustomerId($customerOrId);
        $this->_validateId($addressId);

        try {
            $path = $this->_config->merchantPath() . '/customers/' . $customerId . '/addresses/' . $addressId;
            $response = $this->_http->get($path);
            return Address::factory($response['address']);
        } catch (Exception\NotFound $e) {
            throw new Exception\NotFound(
            'address for customer ' . $customerId .
                ' with id ' . $addressId . ' not found.'
            );
        }

    }
public function find ( $ customerOrId , $ addressId ) { $ customerId = $ this -> _determineCustomerId ( $ customerOrId ) ; $ this -> _validateId ( $ addressId ) ; try { $ path = $ this -> _config -> merchantPath ( ) . '/customers/' . $ customerId . '/addresses/' . $ addressId ; $ response = $ this -> _http -> get ( $ path ) ; return Address :: factory ( $ response [ 'address' ] ) ; } catch ( Exception \ NotFound $ e ) { throw new Exception \ NotFound ( 'address for customer ' . $ customerId . ' with id ' . $ addressId . ' not found.' ) ; } }
find an address by id

Finds the address with the given <b>addressId</b> that is associated
to the given <b>customerOrId</b>.
If the address cannot be found, a NotFound exception will be thrown.


@access public
@param mixed $customerOrId
@param string $addressId
@return Address
@throws Exception\NotFound
find an address by id