Class: Twilio::REST::IpMessaging::V1::ServiceContext::UserContext::UserChannelInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::IpMessaging::V1::ServiceContext::UserContext::UserChannelInstance
- Defined in:
- lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#channel_sid ⇒ String
The SID of the Channel the resource belongs to.
-
#initialize(version, payload, service_sid: nil, user_sid: nil) ⇒ UserChannelInstance
constructor
Initialize the UserChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#last_consumed_message_index ⇒ String
The index of the last Message in the Channel the Member has read.
-
#links ⇒ String
Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel.
-
#member_sid ⇒ String
The SID of the User as a Member in the Channel.
-
#service_sid ⇒ String
The SID of the Service that the resource is associated with.
-
#status ⇒ user_channel.ChannelStatus
The status of the User on the Channel.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unread_messages_count ⇒ String
The number of unread Messages in the Channel for the User.
Constructor Details
#initialize(version, payload, service_sid: nil, user_sid: nil) ⇒ UserChannelInstance
Initialize the UserChannelInstance
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 167 def initialize(version, payload, service_sid: nil, user_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'channel_sid' => payload['channel_sid'], 'member_sid' => payload['member_sid'], 'status' => payload['status'], 'last_consumed_message_index' => payload['last_consumed_message_index'] == nil ? payload['last_consumed_message_index'] : payload['last_consumed_message_index'].to_i, 'unread_messages_count' => payload['unread_messages_count'] == nil ? payload['unread_messages_count'] : payload['unread_messages_count'].to_i, 'links' => payload['links'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
185 186 187 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 185 def account_sid @properties['account_sid'] end |
#channel_sid ⇒ String
Returns The SID of the Channel the resource belongs to.
197 198 199 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 197 def channel_sid @properties['channel_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
239 240 241 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 239 def inspect "<Twilio.IpMessaging.V1.UserChannelInstance>" end |
#last_consumed_message_index ⇒ String
Returns The index of the last Message in the Channel the Member has read.
215 216 217 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 215 def @properties['last_consumed_message_index'] end |
#links ⇒ String
Returns Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel.
227 228 229 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 227 def links @properties['links'] end |
#member_sid ⇒ String
Returns The SID of the User as a Member in the Channel.
203 204 205 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 203 def member_sid @properties['member_sid'] end |
#service_sid ⇒ String
Returns The SID of the Service that the resource is associated with.
191 192 193 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 191 def service_sid @properties['service_sid'] end |
#status ⇒ user_channel.ChannelStatus
Returns The status of the User on the Channel.
209 210 211 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 209 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
233 234 235 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 233 def to_s "<Twilio.IpMessaging.V1.UserChannelInstance>" end |
#unread_messages_count ⇒ String
Returns The number of unread Messages in the Channel for the User.
221 222 223 |
# File 'lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb', line 221 def @properties['unread_messages_count'] end |