Class: Twilio::REST::Intelligence::V2::OperatorAttachmentInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::OperatorAttachmentInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb
Instance Method Summary collapse
-
#context ⇒ OperatorAttachmentContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create ⇒ OperatorAttachmentInstance
Create the OperatorAttachmentInstance.
-
#delete ⇒ Boolean
Delete the OperatorAttachmentInstance.
-
#initialize(version, payload, service_sid: nil, operator_sid: nil) ⇒ OperatorAttachmentInstance
constructor
Initialize the OperatorAttachmentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#operator_sid ⇒ String
The unique SID identifier of the Operator.
-
#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, operator_sid: nil) ⇒ OperatorAttachmentInstance
Initialize the OperatorAttachmentInstance
137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 137 def initialize(version, payload , service_sid: nil, operator_sid: nil) super(version) # Marshaled Properties @properties = { 'service_sid' => payload['service_sid'], 'operator_sid' => payload['operator_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'service_sid' => service_sid || @properties['service_sid'] ,'operator_sid' => operator_sid || @properties['operator_sid'] , } end |
Instance Method Details
#context ⇒ OperatorAttachmentContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 156 def context unless @instance_context @instance_context = OperatorAttachmentContext.new(@version , @params['service_sid'], @params['operator_sid']) end @instance_context end |
#create ⇒ OperatorAttachmentInstance
Create the OperatorAttachmentInstance
184 185 186 187 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 184 def create context.create end |
#delete ⇒ Boolean
Delete the OperatorAttachmentInstance
192 193 194 195 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 192 def delete context.delete end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
206 207 208 209 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 206 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorAttachmentInstance #{values}>" end |
#operator_sid ⇒ String
Returns The unique SID identifier of the Operator.
171 172 173 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 171 def operator_sid @properties['operator_sid'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
165 166 167 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 165 def service_sid @properties['service_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
199 200 201 202 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 199 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.OperatorAttachmentInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
177 178 179 |
# File 'lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb', line 177 def url @properties['url'] end |