Class: Twilio::REST::Intelligence::V2::OperatorAttachmentsInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::OperatorAttachmentsInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb
Instance Method Summary collapse
-
#context ⇒ OperatorAttachmentsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ OperatorAttachmentsInstance
Fetch the OperatorAttachmentsInstance.
-
#initialize(version, payload, service_sid: nil) ⇒ OperatorAttachmentsInstance
constructor
Initialize the OperatorAttachmentsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#operator_sids ⇒ Array<String>
List of Operator SIDs attached to the service.
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, service_sid: nil) ⇒ OperatorAttachmentsInstance
Initialize the OperatorAttachmentsInstance
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 207 def initialize(version, payload , service_sid: nil) super(version) # Marshaled Properties @properties = { 'service_sid' => payload['service_sid'], 'operator_sids' => payload['operator_sids'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid || @properties['service_sid'] , } end |
Instance Method Details
#context ⇒ OperatorAttachmentsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
227 228 229 230 231 232 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 227 def context unless @instance_context @instance_context = OperatorAttachmentsContext.new(@version , @params['service_sid']) end @instance_context end |
#fetch ⇒ OperatorAttachmentsInstance
Fetch the OperatorAttachmentsInstance
255 256 257 258 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 255 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
269 270 271 272 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 269 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorAttachmentsInstance #{values}>" end |
#operator_sids ⇒ Array<String>
Returns List of Operator SIDs attached to the service. Includes both Custom and Pre-built Operators.
242 243 244 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 242 def operator_sids @properties['operator_sids'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
236 237 238 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 236 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
262 263 264 265 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 262 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorAttachmentsInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
248 249 250 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 248 def url @properties['url'] end |