Class: Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionInstance
- Defined in:
- lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the MessageInteraction resource.
-
#context ⇒ MessageInteractionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#data ⇒ String
A JSON string that includes the message body sent to the participant.
-
#date_created ⇒ Time
The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
-
#fetch ⇒ MessageInteractionInstance
Fetch the MessageInteractionInstance.
-
#inbound_participant_sid ⇒ String
Always empty for created Message Interactions.
-
#inbound_resource_sid ⇒ String
Always empty for created Message Interactions.
- #inbound_resource_status ⇒ ResourceStatus
-
#inbound_resource_type ⇒ String
Always empty for created Message Interactions.
-
#inbound_resource_url ⇒ String
Always empty for created Message Interactions.
-
#initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) ⇒ MessageInteractionInstance
constructor
Initialize the MessageInteractionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#outbound_participant_sid ⇒ String
The SID of the outbound [Participant](www.twilio.com/docs/proxy/api/participant) resource.
-
#outbound_resource_sid ⇒ String
The SID of the outbound [Message](www.twilio.com/docs/sms/api/message-resource) resource.
- #outbound_resource_status ⇒ ResourceStatus
-
#outbound_resource_type ⇒ String
The outbound resource type.
-
#outbound_resource_url ⇒ String
The URL of the Twilio message resource.
-
#participant_sid ⇒ String
The SID of the [Participant](www.twilio.com/docs/proxy/api/participant) resource.
-
#service_sid ⇒ String
The SID of the parent [Service](www.twilio.com/docs/proxy/api/service) resource.
-
#session_sid ⇒ String
The SID of the parent [Session](www.twilio.com/docs/proxy/api/session) resource.
-
#sid ⇒ String
The unique string that we created to identify the MessageInteraction resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #type ⇒ Type
-
#url ⇒ String
The absolute URL of the MessageInteraction resource.
Constructor Details
#initialize(version, payload, service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) ⇒ MessageInteractionInstance
Initialize the MessageInteractionInstance
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 464 def initialize(version, payload , service_sid: nil, session_sid: nil, participant_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'session_sid' => payload['session_sid'], 'service_sid' => payload['service_sid'], 'account_sid' => payload['account_sid'], 'data' => payload['data'], 'type' => payload['type'], 'participant_sid' => payload['participant_sid'], 'inbound_participant_sid' => payload['inbound_participant_sid'], 'inbound_resource_sid' => payload['inbound_resource_sid'], 'inbound_resource_status' => payload['inbound_resource_status'], 'inbound_resource_type' => payload['inbound_resource_type'], 'inbound_resource_url' => payload['inbound_resource_url'], 'outbound_participant_sid' => payload['outbound_participant_sid'], 'outbound_resource_sid' => payload['outbound_resource_sid'], 'outbound_resource_status' => payload['outbound_resource_status'], 'outbound_resource_type' => payload['outbound_resource_type'], 'outbound_resource_url' => payload['outbound_resource_url'], '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'] ,'session_sid' => session_sid || @properties['session_sid'] ,'participant_sid' => participant_sid || @properties['participant_sid'] ,'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 MessageInteraction resource.
528 529 530 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 528 def account_sid @properties['account_sid'] end |
#context ⇒ MessageInteractionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
501 502 503 504 505 506 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 501 def context unless @instance_context @instance_context = MessageInteractionContext.new(@version , @params['service_sid'], @params['session_sid'], @params['participant_sid'], @params['sid']) end @instance_context end |
#data ⇒ String
Returns A JSON string that includes the message body sent to the participant. (e.g. ‘"hello"`).
534 535 536 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 534 def data @properties['data'] end |
#date_created ⇒ Time
Returns The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was created.
612 613 614 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 612 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The [ISO 8601](en.wikipedia.org/wiki/ISO_8601) date and time in GMT when the resource was last updated.
618 619 620 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 618 def date_updated @properties['date_updated'] end |
#fetch ⇒ MessageInteractionInstance
Fetch the MessageInteractionInstance
631 632 633 634 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 631 def fetch context.fetch end |
#inbound_participant_sid ⇒ String
Returns Always empty for created Message Interactions.
552 553 554 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 552 def inbound_participant_sid @properties['inbound_participant_sid'] end |
#inbound_resource_sid ⇒ String
Returns Always empty for created Message Interactions.
558 559 560 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 558 def inbound_resource_sid @properties['inbound_resource_sid'] end |
#inbound_resource_status ⇒ ResourceStatus
564 565 566 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 564 def inbound_resource_status @properties['inbound_resource_status'] end |
#inbound_resource_type ⇒ String
Returns Always empty for created Message Interactions.
570 571 572 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 570 def inbound_resource_type @properties['inbound_resource_type'] end |
#inbound_resource_url ⇒ String
Returns Always empty for created Message Interactions.
576 577 578 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 576 def inbound_resource_url @properties['inbound_resource_url'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
645 646 647 648 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 645 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>" end |
#outbound_participant_sid ⇒ String
Returns The SID of the outbound [Participant](www.twilio.com/docs/proxy/api/participant) resource.
582 583 584 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 582 def outbound_participant_sid @properties['outbound_participant_sid'] end |
#outbound_resource_sid ⇒ String
Returns The SID of the outbound [Message](www.twilio.com/docs/sms/api/message-resource) resource.
588 589 590 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 588 def outbound_resource_sid @properties['outbound_resource_sid'] end |
#outbound_resource_status ⇒ ResourceStatus
594 595 596 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 594 def outbound_resource_status @properties['outbound_resource_status'] end |
#outbound_resource_type ⇒ String
Returns The outbound resource type. This value is always ‘Message`.
600 601 602 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 600 def outbound_resource_type @properties['outbound_resource_type'] end |
#outbound_resource_url ⇒ String
Returns The URL of the Twilio message resource.
606 607 608 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 606 def outbound_resource_url @properties['outbound_resource_url'] end |
#participant_sid ⇒ String
Returns The SID of the [Participant](www.twilio.com/docs/proxy/api/participant) resource.
546 547 548 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 546 def participant_sid @properties['participant_sid'] end |
#service_sid ⇒ String
Returns The SID of the parent [Service](www.twilio.com/docs/proxy/api/service) resource.
522 523 524 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 522 def service_sid @properties['service_sid'] end |
#session_sid ⇒ String
Returns The SID of the parent [Session](www.twilio.com/docs/proxy/api/session) resource.
516 517 518 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 516 def session_sid @properties['session_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the MessageInteraction resource.
510 511 512 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 510 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
638 639 640 641 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 638 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Proxy.V1.MessageInteractionInstance #{values}>" end |
#type ⇒ Type
540 541 542 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 540 def type @properties['type'] end |
#url ⇒ String
Returns The absolute URL of the MessageInteraction resource.
624 625 626 |
# File 'lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb', line 624 def url @properties['url'] end |