Class: Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb
Instance Method Summary collapse
-
#create ⇒ LinkshorteningMessagingServiceInstance
Create the LinkshorteningMessagingServiceInstance.
-
#delete ⇒ Boolean
Delete the LinkshorteningMessagingServiceInstance.
-
#initialize(version, domain_sid, messaging_service_sid) ⇒ LinkshorteningMessagingServiceContext
constructor
Initialize the LinkshorteningMessagingServiceContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, domain_sid, messaging_service_sid) ⇒ LinkshorteningMessagingServiceContext
Initialize the LinkshorteningMessagingServiceContext
50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 50 def initialize(version, domain_sid, messaging_service_sid) super(version) # Path Solution @solution = { domain_sid: domain_sid, messaging_service_sid: messaging_service_sid, } @uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/MessagingServices/#{@solution[:messaging_service_sid]}" end |
Instance Method Details
#create ⇒ LinkshorteningMessagingServiceInstance
Create the LinkshorteningMessagingServiceInstance
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 62 def create headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, headers: headers) LinkshorteningMessagingServiceInstance.new( @version, payload, domain_sid: @solution[:domain_sid], messaging_service_sid: @solution[:messaging_service_sid], ) end |
#delete ⇒ Boolean
Delete the LinkshorteningMessagingServiceInstance
82 83 84 85 86 87 88 89 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 82 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
101 102 103 104 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 101 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
94 95 96 97 |
# File 'lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb', line 94 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.LinkshorteningMessagingServiceContext #{context}>" end |