src/Resource/Holder.php
public function setAddress($type, $street, $number, $district, $city, $state, $zip, $complement = null, $country = self::ADDRESS_COUNTRY)
    {
        $address = new stdClass();
        $address->street = $street;
        $address->streetNumber = $number;
        $address->complement = $complement;
        $address->district = $district;
        $address->city = $city;
        $address->state = $state;
        $address->country = $country;
        $address->zipCode = $zip;

        $this->data->billingAddress = $address;

        return $this;
    }
public function setAddress($type, $street, $number, $district, $city, $state, $zip, $complement = null, $country = self::ADDRESS_COUNTRY)
    {
        $address = new stdClass();
        $address->street = $street;
        $address->streetNumber = $number;
        $address->complement = $complement;
        $address->district = $district;
        $address->city = $city;
        $address->state = $state;
        $address->country = $country;
        $address->zipCode = $zip;

        $this->data->billingAddress = $address;

        return $this;
    }
public function setAddress ( $ type , $ street , $ number , $ district , $ city , $ state , $ zip , $ complement = null , $ country = self :: ADDRESS_COUNTRY ) { $ address = new stdClass ( ) ; $ address -> street = $ street ; $ address -> streetNumber = $ number ; $ address -> complement = $ complement ; $ address -> district = $ district ; $ address -> city = $ city ; $ address -> state = $ state ; $ address -> country = $ country ; $ address -> zipCode = $ zip ; $ this -> data -> billingAddress = $ address ; return $ this ; }
Add a new address to the holder.

@param string $type       Address type: BILLING.
@param string $street     Street address.
@param string $number     Number address.
@param string $district   Neighborhood address.
@param string $city       City address.
@param string $state      State address.
@param string $zip        The zip code billing address.
@param string $complement Address complement.
@param string $country    Country ISO-alpha3 format, BRA example.

@return $this
Add a new address to the holder .