public function create($identity, $bindingType, $address, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Identity' => $identity,
            'BindingType' => $bindingType,
            'Address' => $address,
            'Tag' => Serialize::map($options['tag'], function($e) { return $e; }),
            'NotificationProtocolVersion' => $options['notificationProtocolVersion'],
            'CredentialSid' => $options['credentialSid'],
            'Endpoint' => $options['endpoint'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
    }
public function create($identity, $bindingType, $address, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Identity' => $identity,
            'BindingType' => $bindingType,
            'Address' => $address,
            'Tag' => Serialize::map($options['tag'], function($e) { return $e; }),
            'NotificationProtocolVersion' => $options['notificationProtocolVersion'],
            'CredentialSid' => $options['credentialSid'],
            'Endpoint' => $options['endpoint'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
    }
public function create ( $ identity , $ bindingType , $ address , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'Identity' => $ identity , 'BindingType' => $ bindingType , 'Address' => $ address , 'Tag' => Serialize :: map ( $ options [ 'tag' ] , function ( $ e ) { return $ e ; } ) , 'NotificationProtocolVersion' => $ options [ 'notificationProtocolVersion' ] , 'CredentialSid' => $ options [ 'credentialSid' ] , 'Endpoint' => $ options [ 'endpoint' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new BindingInstance ( $ this -> version , $ payload , $ this -> solution [ 'serviceSid' ] ) ; }
Create a new BindingInstance

@param string $identity The `identity` value that identifies the new
resource's User
@param string $bindingType The type of the Binding
@param string $address The channel-specific address
@param array|Options $options Optional Arguments
@return BindingInstance Newly created BindingInstance
@throws TwilioException When an HTTP error occurs.
Create a new BindingInstance