Class: Twilio::REST::FlexApi::V1::WebChannelInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::WebChannelInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the WebChannel resource and owns this Workflow.
-
#context ⇒ WebChannelContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#delete ⇒ Boolean
Delete the WebChannelInstance.
-
#fetch ⇒ WebChannelInstance
Fetch the WebChannelInstance.
-
#flex_flow_sid ⇒ String
The SID of the Flex Flow.
-
#initialize(version, payload, sid: nil) ⇒ WebChannelInstance
constructor
Initialize the WebChannelInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
The unique string that we created to identify the WebChannel resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(chat_status: :unset, post_engagement_data: :unset) ⇒ WebChannelInstance
Update the WebChannelInstance.
-
#url ⇒ String
The absolute URL of the WebChannel resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ WebChannelInstance
Initialize the WebChannelInstance
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 565 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'flex_flow_sid' => payload['flex_flow_sid'], 'sid' => payload['sid'], 'url' => payload['url'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the WebChannel resource and owns this Workflow.
597 598 599 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 597 def account_sid @properties['account_sid'] end |
#context ⇒ WebChannelContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
588 589 590 591 592 593 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 588 def context unless @instance_context @instance_context = WebChannelContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
621 622 623 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 621 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 [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
627 628 629 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 627 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the WebChannelInstance
634 635 636 637 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 634 def delete context.delete end |
#fetch ⇒ WebChannelInstance
Fetch the WebChannelInstance
642 643 644 645 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 642 def fetch context.fetch end |
#flex_flow_sid ⇒ String
Returns The SID of the Flex Flow.
603 604 605 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 603 def flex_flow_sid @properties['flex_flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
672 673 674 675 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 672 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" end |
#sid ⇒ String
Returns The unique string that we created to identify the WebChannel resource.
609 610 611 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 609 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
665 666 667 668 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 665 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.WebChannelInstance #{values}>" end |
#update(chat_status: :unset, post_engagement_data: :unset) ⇒ WebChannelInstance
Update the WebChannelInstance
652 653 654 655 656 657 658 659 660 661 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 652 def update( chat_status: :unset, post_engagement_data: :unset ) context.update( chat_status: chat_status, post_engagement_data: post_engagement_data, ) end |
#url ⇒ String
Returns The absolute URL of the WebChannel resource.
615 616 617 |
# File 'lib/twilio-ruby/rest/flex_api/v1/web_channel.rb', line 615 def url @properties['url'] end |