Class: Twilio::REST::Intelligence::V2::OperatorAttachmentContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Intelligence::V2::OperatorAttachmentContext
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb
Instance Method Summary collapse
-
#create ⇒ OperatorAttachmentInstance
Create the OperatorAttachmentInstance.
-
#delete ⇒ Boolean
Delete the OperatorAttachmentInstance.
-
#initialize(version, service_sid, operator_sid) ⇒ OperatorAttachmentContext
constructor
Initialize the OperatorAttachmentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid, operator_sid) ⇒ OperatorAttachmentContext
Initialize the OperatorAttachmentContext
50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 50 def initialize(version, service_sid, operator_sid) super(version) # Path Solution @solution = { service_sid: service_sid, operator_sid: operator_sid, } @uri = "/Services/#{@solution[:service_sid]}/Operators/#{@solution[:operator_sid]}" end |
Instance Method Details
#create ⇒ OperatorAttachmentInstance
Create the OperatorAttachmentInstance
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 62 def create payload = @version.create('POST', @uri) OperatorAttachmentInstance.new( @version, payload, service_sid: @solution[:service_sid], operator_sid: @solution[:operator_sid], ) end |
#delete ⇒ Boolean
Delete the OperatorAttachmentInstance
77 78 79 80 81 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 77 def delete @version.delete('DELETE', @uri) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
93 94 95 96 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 93 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
86 87 88 89 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 86 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>" end |