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
131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 131 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
150 151 152 153 154 155 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 150 def context unless @instance_context @instance_context = OperatorAttachmentsContext.new(@version , @params['service_sid']) end @instance_context end |
#fetch ⇒ OperatorAttachmentsInstance
Fetch the OperatorAttachmentsInstance
178 179 180 181 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 178 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
192 193 194 195 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 192 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.
165 166 167 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 165 def operator_sids @properties['operator_sids'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
159 160 161 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 159 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
185 186 187 188 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 185 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.
171 172 173 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb', line 171 def url @properties['url'] end |