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.
-
#friendly_name ⇒ String
Optional display label for the sender in the Twilio Console.
-
#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
889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 889 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'status' => payload['status'], 'sender_id' => payload['sender_id'], 'friendly_name' => payload['friendly_name'], '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
980 981 982 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 980 def compliance @properties['compliance'] end |
#configuration ⇒ MessagingV2ChannelsSenderConfiguration
950 951 952 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 950 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
917 918 919 920 921 922 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 917 def context unless @instance_context @instance_context = ChannelsSenderContext.new(@version , @params['sid']) end @instance_context end |
#delete ⇒ Boolean
Delete the ChannelsSenderInstance
993 994 995 996 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 993 def delete context.delete end |
#fetch ⇒ ChannelsSenderInstance
Fetch the ChannelsSenderInstance
1001 1002 1003 1004 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 1001 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Optional display label for the sender in the Twilio Console.
944 945 946 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 944 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1027 1028 1029 1030 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 1027 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.
974 975 976 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 974 def offline_reasons @properties['offline_reasons'] end |
#profile ⇒ MessagingV2ChannelsSenderProfileGenericResponse
962 963 964 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 962 def profile @properties['profile'] end |
#properties ⇒ MessagingV2ChannelsSenderProperties
968 969 970 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 968 def properties @properties['properties'] end |
#sender_id ⇒ String
Returns The ID of the sender in whatsapp:<E.164_PHONE_NUMBER> format.
938 939 940 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 938 def sender_id @properties['sender_id'] end |
#sid ⇒ String
Returns The SID of the sender.
926 927 928 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 926 def sid @properties['sid'] end |
#status ⇒ Status
932 933 934 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 932 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
1020 1021 1022 1023 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 1020 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
1010 1011 1012 1013 1014 1015 1016 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 1010 def update(messaging_v2_channels_sender_requests_update: :unset ) context.update( messaging_v2_channels_sender_requests_update: messaging_v2_channels_sender_requests_update, ) end |
#url ⇒ String
Returns The URL of the resource.
986 987 988 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 986 def url @properties['url'] end |
#webhook ⇒ MessagingV2ChannelsSenderWebhook
956 957 958 |
# File 'lib/twilio-ruby/rest/messaging/v2/channels_sender.rb', line 956 def webhook @properties['webhook'] end |