Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb,
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb
Defined Under Namespace
Classes: BundleCopyInstance, BundleCopyList, BundleCopyPage, EvaluationContext, EvaluationInstance, EvaluationList, EvaluationPage, ItemAssignmentContext, ItemAssignmentInstance, ItemAssignmentList, ItemAssignmentPage, ReplaceItemsInstance, ReplaceItemsList, ReplaceItemsPage
Instance Method Summary collapse
-
#bundle_copies ⇒ BundleCopyList, BundleCopyContext
Access the bundle_copies.
-
#delete ⇒ Boolean
Delete the BundleInstance.
-
#evaluations(sid = :unset) ⇒ EvaluationList, EvaluationContext
Access the evaluations.
-
#fetch ⇒ BundleInstance
Fetch the BundleInstance.
-
#initialize(version, sid) ⇒ BundleContext
constructor
Initialize the BundleContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#item_assignments(sid = :unset) ⇒ ItemAssignmentList, ItemAssignmentContext
Access the item_assignments.
-
#replace_items ⇒ ReplaceItemsList, ReplaceItemsContext
Access the replace_items.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ BundleInstance
Update the BundleInstance.
Constructor Details
#initialize(version, sid) ⇒ BundleContext
Initialize the BundleContext
249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 249 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/RegulatoryCompliance/Bundles/#{@solution[:sid]}" # Dependents @bundle_copies = nil @replace_items = nil @item_assignments = nil @evaluations = nil end |
Instance Method Details
#bundle_copies ⇒ BundleCopyList, BundleCopyContext
Access the bundle_copies
316 317 318 319 320 321 322 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 316 def bundle_copies unless @bundle_copies @bundle_copies = BundleCopyList.new( @version, bundle_sid: @solution[:sid], ) end @bundle_copies end |
#delete ⇒ Boolean
Delete the BundleInstance
265 266 267 268 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 265 def delete @version.delete('DELETE', @uri) end |
#evaluations(sid = :unset) ⇒ EvaluationList, EvaluationContext
Access the evaluations
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 357 def evaluations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return EvaluationContext.new(@version, @solution[:sid],sid ) end unless @evaluations @evaluations = EvaluationList.new( @version, bundle_sid: @solution[:sid], ) end @evaluations end |
#fetch ⇒ BundleInstance
Fetch the BundleInstance
273 274 275 276 277 278 279 280 281 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 273 def fetch payload = @version.fetch('GET', @uri) BundleInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
382 383 384 385 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 382 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.BundleContext #{context}>" end |
#item_assignments(sid = :unset) ⇒ ItemAssignmentList, ItemAssignmentContext
Access the item_assignments
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 338 def item_assignments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset return ItemAssignmentContext.new(@version, @solution[:sid],sid ) end unless @item_assignments @item_assignments = ItemAssignmentList.new( @version, bundle_sid: @solution[:sid], ) end @item_assignments end |
#replace_items ⇒ ReplaceItemsList, ReplaceItemsContext
Access the replace_items
327 328 329 330 331 332 333 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 327 def replace_items unless @replace_items @replace_items = ReplaceItemsList.new( @version, bundle_sid: @solution[:sid], ) end @replace_items end |
#to_s ⇒ Object
Provide a user friendly representation
375 376 377 378 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 375 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.BundleContext #{context}>" end |
#update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset) ⇒ BundleInstance
Update the BundleInstance
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb', line 290 def update( status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset ) data = Twilio::Values.of({ 'Status' => status, 'StatusCallback' => status_callback, 'FriendlyName' => friendly_name, 'Email' => email, }) payload = @version.update('POST', @uri, data: data) BundleInstance.new( @version, payload, sid: @solution[:sid], ) end |