public function create($messagingServiceSid, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'MessagingServiceSid' => $messagingServiceSid,
            'FriendlyName' => $options['friendlyName'],
            'Attributes' => $options['attributes'],
            'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
            'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
            'CreatedBy' => $options['createdBy'],
        ));

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

        return new SessionInstance($this->version, $payload);
    }
public function create($messagingServiceSid, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'MessagingServiceSid' => $messagingServiceSid,
            'FriendlyName' => $options['friendlyName'],
            'Attributes' => $options['attributes'],
            'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
            'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
            'CreatedBy' => $options['createdBy'],
        ));

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

        return new SessionInstance($this->version, $payload);
    }
public function create ( $ messagingServiceSid , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'MessagingServiceSid' => $ messagingServiceSid , 'FriendlyName' => $ options [ 'friendlyName' ] , 'Attributes' => $ options [ 'attributes' ] , 'DateCreated' => Serialize :: iso8601DateTime ( $ options [ 'dateCreated' ] ) , 'DateUpdated' => Serialize :: iso8601DateTime ( $ options [ 'dateUpdated' ] ) , 'CreatedBy' => $ options [ 'createdBy' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new SessionInstance ( $ this -> version , $ payload ) ; }
Create a new SessionInstance

@param string $messagingServiceSid The unique id of the SMS Service this
session belongs to.
@param array|Options $options Optional Arguments
@return SessionInstance Newly created SessionInstance
@throws TwilioException When an HTTP error occurs.
Create a new SessionInstance