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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Service resource.
-
#context ⇒ MessagingConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#country ⇒ String
The [ISO-3166-1](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#delete ⇒ Boolean
Delete the MessagingConfigurationInstance.
-
#fetch ⇒ MessagingConfigurationInstance
Fetch the 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](www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
-
#service_sid ⇒ String
The SID of the [Service](www.twilio.com/docs/verify/api/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
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 544 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 || @properties['service_sid'] ,'country' => country || @properties['country'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Service resource.
577 578 579 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 577 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
568 569 570 571 572 573 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 568 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](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value ‘all`.
589 590 591 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 589 def country @properties['country'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
601 602 603 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 601 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
607 608 609 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 607 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the MessagingConfigurationInstance
620 621 622 623 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 620 def delete context.delete end |
#fetch ⇒ MessagingConfigurationInstance
Fetch the MessagingConfigurationInstance
628 629 630 631 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 628 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
655 656 657 658 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 655 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](www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
595 596 597 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 595 def messaging_service_sid @properties['messaging_service_sid'] end |
#service_sid ⇒ String
Returns The SID of the [Service](www.twilio.com/docs/verify/api/service) that the resource is associated with.
583 584 585 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 583 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
648 649 650 651 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 648 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
637 638 639 640 641 642 643 644 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 637 def update( messaging_service_sid: nil ) context.update( messaging_service_sid: messaging_service_sid, ) end |
#url ⇒ String
Returns The URL of this resource.
613 614 615 |
# File 'lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb', line 613 def url @properties['url'] end |