Class: Twilio::REST::Messaging::V1::ServiceContext::AlphaSenderInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::ServiceContext::AlphaSenderInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#alpha_sender ⇒ String
The alpha_sender.
-
#capabilities ⇒ Hash
The capabilities.
-
#context ⇒ AlphaSenderContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the AlphaSenderInstance.
-
#fetch ⇒ AlphaSenderInstance
Fetch a AlphaSenderInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ AlphaSenderInstance
constructor
Initialize the AlphaSenderInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
The service_sid.
-
#sid ⇒ String
The sid.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ AlphaSenderInstance
Initialize the AlphaSenderInstance
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 249 def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'alpha_sender' => payload['alpha_sender'], 'capabilities' => payload['capabilities'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
295 296 297 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 295 def account_sid @properties['account_sid'] end |
#alpha_sender ⇒ String
Returns The alpha_sender.
319 320 321 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 319 def alpha_sender @properties['alpha_sender'] end |
#capabilities ⇒ Hash
Returns The capabilities.
325 326 327 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 325 def capabilities @properties['capabilities'] end |
#context ⇒ AlphaSenderContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 276 def context unless @instance_context @instance_context = AlphaSenderContext.new( @version, @params['service_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
307 308 309 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 307 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
313 314 315 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 313 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the AlphaSenderInstance
345 346 347 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 345 def delete context.delete end |
#fetch ⇒ AlphaSenderInstance
Fetch a AlphaSenderInstance
338 339 340 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 338 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
358 359 360 361 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 358 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>" end |
#service_sid ⇒ String
Returns The service_sid.
301 302 303 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 301 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
289 290 291 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 289 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
351 352 353 354 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 351 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>" end |
#url ⇒ String
Returns The url.
331 332 333 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 331 def url @properties['url'] end |