Class: Twilio::REST::Intelligence::V2::OperatorAttachmentsContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Intelligence::V2::OperatorAttachmentsContext
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb
Instance Method Summary collapse
-
#fetch ⇒ OperatorAttachmentsInstance
Fetch the OperatorAttachmentsInstance.
-
#initialize(version, service_sid) ⇒ OperatorAttachmentsContext
constructor
Initialize the OperatorAttachmentsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid) ⇒ OperatorAttachmentsContext
Initialize the OperatorAttachmentsContext
49 50 51 52 53 54 55 56 57 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 49 def initialize(version, service_sid) super(version) # Path Solution @solution = { service_sid: service_sid, } @uri = "/Services/#{@solution[:service_sid]}/Operators" end |
Instance Method Details
#fetch ⇒ OperatorAttachmentsInstance
Fetch the OperatorAttachmentsInstance
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 61 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) OperatorAttachmentsInstance.new( @version, payload, service_sid: @solution[:service_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
87 88 89 90 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 87 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
80 81 82 83 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 80 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Intelligence.V2.OperatorAttachmentsContext #{context}>" end |