Class: Twilio::REST::Verify::V2::ServiceContext::MessagingConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::ServiceContext::MessagingConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.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 SID of the Account that created the resource.
-
#context ⇒ MessagingConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#country ⇒ String
The ISO-3166-1 country code of the country or ‘all`.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT when the resource was last updated.
-
#delete ⇒ Boolean
Deletes the MessagingConfigurationInstance.
-
#fetch ⇒ MessagingConfigurationInstance
Fetch a MessagingConfigurationInstance.
-
#initialize(version, payload, service_sid: nil, country: nil) ⇒ MessagingConfigurationInstance
constructor
Initialize the MessagingConfigurationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#messaging_service_sid ⇒ String
The SID of the Messaging Service used for this configuration.
-
#service_sid ⇒ String
The SID of the Service that the resource is associated with.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(messaging_service_sid: nil) ⇒ MessagingConfigurationInstance
Update the MessagingConfigurationInstance.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil, country: nil) ⇒ MessagingConfigurationInstance
Initialize the MessagingConfigurationInstance
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 277 def initialize(version, payload, service_sid: nil, country: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'country' => payload['country'], 'messaging_service_sid' => payload['messaging_service_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'country' => country || @properties['country'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
313 314 315 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 313 def account_sid @properties['account_sid'] end |
#context ⇒ MessagingConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
300 301 302 303 304 305 306 307 308 309 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 300 def context unless @instance_context @instance_context = MessagingConfigurationContext.new( @version, @params['service_sid'], @params['country'], ) end @instance_context end |
#country ⇒ String
Returns The ISO-3166-1 country code of the country or ‘all`.
325 326 327 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 325 def country @properties['country'] end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was created.
337 338 339 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 337 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was last updated.
343 344 345 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 343 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the MessagingConfigurationInstance
373 374 375 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 373 def delete context.delete end |
#fetch ⇒ MessagingConfigurationInstance
Fetch a MessagingConfigurationInstance
366 367 368 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 366 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
386 387 388 389 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 386 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.MessagingConfigurationInstance #{values}>" end |
#messaging_service_sid ⇒ String
Returns The SID of the Messaging Service used for this configuration.
331 332 333 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 331 def messaging_service_sid @properties['messaging_service_sid'] end |
#service_sid ⇒ String
Returns The SID of the Service that the resource is associated with.
319 320 321 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 319 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
379 380 381 382 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 379 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.MessagingConfigurationInstance #{values}>" end |
#update(messaging_service_sid: nil) ⇒ MessagingConfigurationInstance
Update the MessagingConfigurationInstance
359 360 361 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 359 def update(messaging_service_sid: nil) context.update(messaging_service_sid: messaging_service_sid, ) end |
#url ⇒ String
Returns The URL of this resource.
349 350 351 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 349 def url @properties['url'] end |