public function create($friendlyName, $type, $permission) {
        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'Type' => $type,
            'Permission' => Serialize::map($permission, function($e) { return $e; }),
        ));

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

        return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
    }
public function create($friendlyName, $type, $permission) {
        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'Type' => $type,
            'Permission' => Serialize::map($permission, function($e) { return $e; }),
        ));

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

        return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
    }
public function create ( $ friendlyName , $ type , $ permission ) { $ data = Values :: of ( array ( 'FriendlyName' => $ friendlyName , 'Type' => $ type , 'Permission' => Serialize :: map ( $ permission , function ( $ e ) { return $ e ; } ) , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new RoleInstance ( $ this -> version , $ payload , $ this -> solution [ 'serviceSid' ] ) ; }
Create a new RoleInstance

@param string $friendlyName The human-readable name of this role.
@param string $type What kind of role this is.
@param string $permission A permission this role should have.
@return RoleInstance Newly created RoleInstance
@throws TwilioException When an HTTP error occurs.
Create a new RoleInstance