Class: Twilio::REST::Messaging::V2::ChannelsSenderInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V2::ChannelsSenderInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v2/channels_sender.rb
Instance Method Summary collapse
- #compliance ⇒ MessagingV2RcsComplianceResponse
- #configuration ⇒ MessagingV2ChannelsSenderConfiguration
-
#context ⇒ ChannelsSenderContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the ChannelsSenderInstance.
-
#fetch ⇒ ChannelsSenderInstance
Fetch the ChannelsSenderInstance.
-
#initialize(version, payload, sid: nil) ⇒ ChannelsSenderInstance
constructor
Initialize the ChannelsSenderInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#offline_reasons ⇒ Array<MessagingV2ChannelsSenderOfflineReasonsItems>
The reasons why the sender is offline.
- #profile ⇒ MessagingV2ChannelsSenderProfileGenericResponse
- #properties ⇒ MessagingV2ChannelsSenderProperties
-
#sender_id ⇒ String
The ID of the sender in ‘whatsapp:<E.164_PHONE_NUMBER>` format.
-
#sid ⇒ String
The SID of the sender.
- #status ⇒ Status
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(messaging_v2_channels_sender_requests_update: :unset) ⇒ ChannelsSenderInstance
Update the ChannelsSenderInstance.
-
#url ⇒ String
The URL of the resource.
- #webhook ⇒ MessagingV2ChannelsSenderWebhook
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ChannelsSenderInstance
Initialize the ChannelsSenderInstance
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 631 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'status' => payload['status'], 'sender_id' => payload['sender_id'], 'configuration' => payload['configuration'], 'webhook' => payload['webhook'], 'profile' => payload['profile'], 'properties' => payload['properties'], 'offline_reasons' => payload['offline_reasons'], 'compliance' => payload['compliance'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#compliance ⇒ MessagingV2RcsComplianceResponse
714 715 716 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 714 def compliance @properties['compliance'] end |
#configuration ⇒ MessagingV2ChannelsSenderConfiguration
684 685 686 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 684 def configuration @properties['configuration'] end |
#context ⇒ ChannelsSenderContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
657 658 659 660 661 662 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 657 def context unless @instance_context @instance_context = ChannelsSenderContext.new(@version , @params['sid']) end @instance_context end |
#delete ⇒ Boolean
Delete the ChannelsSenderInstance
727 728 729 730 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 727 def delete context.delete end |
#fetch ⇒ ChannelsSenderInstance
Fetch the ChannelsSenderInstance
735 736 737 738 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 735 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
760 761 762 763 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 760 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>" end |
#offline_reasons ⇒ Array<MessagingV2ChannelsSenderOfflineReasonsItems>
Returns The reasons why the sender is offline.
708 709 710 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 708 def offline_reasons @properties['offline_reasons'] end |
#profile ⇒ MessagingV2ChannelsSenderProfileGenericResponse
696 697 698 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 696 def profile @properties['profile'] end |
#properties ⇒ MessagingV2ChannelsSenderProperties
702 703 704 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 702 def properties @properties['properties'] end |
#sender_id ⇒ String
Returns The ID of the sender in ‘whatsapp:<E.164_PHONE_NUMBER>` format.
678 679 680 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 678 def sender_id @properties['sender_id'] end |
#sid ⇒ String
Returns The SID of the sender.
666 667 668 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 666 def sid @properties['sid'] end |
#status ⇒ Status
672 673 674 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 672 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
753 754 755 756 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 753 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>" end |
#update(messaging_v2_channels_sender_requests_update: :unset) ⇒ ChannelsSenderInstance
Update the ChannelsSenderInstance
744 745 746 747 748 749 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 744 def update(messaging_v2_channels_sender_requests_update: :unset ) context.update( ) end |
#url ⇒ String
Returns The URL of the resource.
720 721 722 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 720 def url @properties['url'] end |
#webhook ⇒ MessagingV2ChannelsSenderWebhook
690 691 692 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 690 def webhook @properties['webhook'] end |