Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the ItemAssignmentInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the ItemAssignmentInstanceMetadata.
-
#fetch ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstance.
-
#fetch_with_metadata ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstanceMetadata.
-
#initialize(version, bundle_sid, sid) ⇒ ItemAssignmentContext
constructor
Initialize the ItemAssignmentContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, bundle_sid, sid) ⇒ ItemAssignmentContext
Initialize the ItemAssignmentContext
229 230 231 232 233 234 235 236 237 238 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 229 def initialize(version, bundle_sid, sid) super(version) # Path Solution @solution = { bundle_sid: bundle_sid, sid: sid, } @uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/ItemAssignments/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the ItemAssignmentInstance
242 243 244 245 246 247 248 249 250 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 242 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the ItemAssignmentInstanceMetadata
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 255 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) itemAssignment_instance = ItemAssignmentInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) ItemAssignmentInstanceMetadata.new(@version, itemAssignment_instance, response.headers, response.status_code) end |
#fetch ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstance
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 274 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ItemAssignmentInstance.new( @version, payload, bundle_sid: @solution[:bundle_sid], sid: @solution[:sid], ) end |
#fetch_with_metadata ⇒ ItemAssignmentInstance
Fetch the ItemAssignmentInstanceMetadata
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 294 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) item_assignment_instance = ItemAssignmentInstance.new( @version, response.body, bundle_sid: @solution[:bundle_sid], sid: @solution[:sid], ) ItemAssignmentInstanceMetadata.new( @version, item_assignment_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
327 328 329 330 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 327 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.ItemAssignmentContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
320 321 322 323 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb', line 320 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.ItemAssignmentContext #{context}>" end |