public function createAddress( CustomerVault\Address $address )
    {
        $address->setRequiredFields(array('profileID'));
        $address->checkRequiredFields();
        $address->setRequiredFields(array('country'));
        $address->setOptionalFields(array(
            'nickName',
            'street',
            'street2',
            'city',
            'state',
            'zip',
            'recipientName',
            'phone',
            'defaultShippingAddressIndicator',
        ));

        $request = new Request(array(
            'method' => Request::POST,
            'uri' => $this->prepareURI("/profiles/" . $address->profileID . "/addresses"),
            'body' => $address
        ));
        $response = $this->client->processRequest($request);
        $response['profileID'] = $address->profileID;
        return new CustomerVault\Address($response);
    }
public function createAddress( CustomerVault\Address $address )
    {
        $address->setRequiredFields(array('profileID'));
        $address->checkRequiredFields();
        $address->setRequiredFields(array('country'));
        $address->setOptionalFields(array(
            'nickName',
            'street',
            'street2',
            'city',
            'state',
            'zip',
            'recipientName',
            'phone',
            'defaultShippingAddressIndicator',
        ));

        $request = new Request(array(
            'method' => Request::POST,
            'uri' => $this->prepareURI("/profiles/" . $address->profileID . "/addresses"),
            'body' => $address
        ));
        $response = $this->client->processRequest($request);
        $response['profileID'] = $address->profileID;
        return new CustomerVault\Address($response);
    }
public function createAddress ( CustomerVault \ Address $ address ) { $ address -> setRequiredFields ( array ( 'profileID' ) ) ; $ address -> checkRequiredFields ( ) ; $ address -> setRequiredFields ( array ( 'country' ) ) ; $ address -> setOptionalFields ( array ( 'nickName' , 'street' , 'street2' , 'city' , 'state' , 'zip' , 'recipientName' , 'phone' , 'defaultShippingAddressIndicator' , ) ) ; $ request = new Request ( array ( 'method' => Request :: POST , 'uri' => $ this -> prepareURI ( "/profiles/" . $ address -> profileID . "/addresses" ) , 'body' => $ address ) ) ; $ response = $ this -> client -> processRequest ( $ request ) ; $ response [ 'profileID' ] = $ address -> profileID ; return new CustomerVault \ Address ( $ response ) ; }
Create address.

@param \Paysafe\CustomerVault\Address $address
@return \Paysafe\CustomerVault\Address
@throws PaysafeException
Create address .