protected function addAddress(array $params, array $options)
    {
        if ($address = Arr::get($options, 'address') ?: Arr::get($options, 'billing_address')) {
            $params['address']['street1'] = Arr::get($address, 'address1');
            if ($address2 = Arr::get($address, 'address2')) {
                $params['address']['street2'] = $address2;
            }
            if ($address3 = Arr::get($address, 'address3')) {
                $params['address']['street3'] = $address3;
            }
            if ($externalNumber = Arr::get($address, 'external_number')) {
                $params['address']['external_number'] = $externalNumber;
            }
            $params['address']['city'] = Arr::get($address, 'city');
            $params['address']['country'] = Arr::get($address, 'country');
            $params['address']['state'] = Arr::get($address, 'state');
            $params['address']['postal_code'] = Arr::get($address, 'zip');

            return $params;
        }
    }
protected function addAddress(array $params, array $options)
    {
        if ($address = Arr::get($options, 'address') ?: Arr::get($options, 'billing_address')) {
            $params['address']['street1'] = Arr::get($address, 'address1');
            if ($address2 = Arr::get($address, 'address2')) {
                $params['address']['street2'] = $address2;
            }
            if ($address3 = Arr::get($address, 'address3')) {
                $params['address']['street3'] = $address3;
            }
            if ($externalNumber = Arr::get($address, 'external_number')) {
                $params['address']['external_number'] = $externalNumber;
            }
            $params['address']['city'] = Arr::get($address, 'city');
            $params['address']['country'] = Arr::get($address, 'country');
            $params['address']['state'] = Arr::get($address, 'state');
            $params['address']['postal_code'] = Arr::get($address, 'zip');

            return $params;
        }
    }
protected function addAddress ( array $ params , array $ options ) { if ( $ address = Arr :: get ( $ options , 'address' ) ? : Arr :: get ( $ options , 'billing_address' ) ) { $ params [ 'address' ] [ 'street1' ] = Arr :: get ( $ address , 'address1' ) ; if ( $ address2 = Arr :: get ( $ address , 'address2' ) ) { $ params [ 'address' ] [ 'street2' ] = $ address2 ; } if ( $ address3 = Arr :: get ( $ address , 'address3' ) ) { $ params [ 'address' ] [ 'street3' ] = $ address3 ; } if ( $ externalNumber = Arr :: get ( $ address , 'external_number' ) ) { $ params [ 'address' ] [ 'external_number' ] = $ externalNumber ; } $ params [ 'address' ] [ 'city' ] = Arr :: get ( $ address , 'city' ) ; $ params [ 'address' ] [ 'country' ] = Arr :: get ( $ address , 'country' ) ; $ params [ 'address' ] [ 'state' ] = Arr :: get ( $ address , 'state' ) ; $ params [ 'address' ] [ 'postal_code' ] = Arr :: get ( $ address , 'zip' ) ; return $ params ; } }
Add address to request.

@param string[] $params
@param string[] $options

@return array|null
Add address to request .