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 34 character unique sid of the Account.
-
#alpha_sender ⇒ String
An Alphanumeric Sender ID string, up to 11 characters.
-
#capabilities ⇒ Hash
An array of values that indicate whether the number can receive calls or messages.
-
#context ⇒ AlphaSenderContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this resource was created.
-
#date_updated ⇒ Time
The date that this resource was last 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 34 character unique sid of the Messaging Service.
-
#sid ⇒ String
The 34 character unique sid of the Alpha Sender ID.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL for this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ AlphaSenderInstance
Initialize the AlphaSenderInstance
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 240 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 34 character unique sid of the Account.
279 280 281 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 279 def account_sid @properties['account_sid'] end |
#alpha_sender ⇒ String
Returns An Alphanumeric Sender ID string, up to 11 characters.
303 304 305 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 303 def alpha_sender @properties['alpha_sender'] end |
#capabilities ⇒ Hash
Returns An array of values that indicate whether the number can receive calls or messages.
309 310 311 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 309 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
264 265 266 267 268 269 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 264 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 that this resource was created.
291 292 293 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 291 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated.
297 298 299 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 297 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the AlphaSenderInstance
329 330 331 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 329 def delete context.delete end |
#fetch ⇒ AlphaSenderInstance
Fetch a AlphaSenderInstance
322 323 324 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 322 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
342 343 344 345 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 342 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>" end |
#service_sid ⇒ String
Returns The 34 character unique sid of the Messaging Service.
285 286 287 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 285 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The 34 character unique sid of the Alpha Sender ID.
273 274 275 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 273 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
335 336 337 338 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 335 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL for this resource.
315 316 317 |
# File 'lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb', line 315 def url @properties['url'] end |