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 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 62 def create headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, headers: headers) OperatorAttachmentInstance.new( @version, payload, service_sid: @solution[:service_sid], operator_sid: @solution[:operator_sid], ) end |
#delete ⇒ Boolean
Delete the OperatorAttachmentInstance
82 83 84 85 86 87 88 89 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.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/intelligence/v2/operator_attachment.rb', line 101 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
94 95 96 97 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 94 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentContext #{context}>" end |