Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ReplaceItemsList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, bundle_sid: nil) ⇒ ReplaceItemsList

Initialize the ReplaceItemsList

Parameters:

  • version (Version)

    Version that contains the resource

  • bundle_sid (String) (defaults to: nil)

    The unique string that we created to identify the Bundle resource.


24
25
26
27
28
29
30
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 24

def initialize(version, bundle_sid: nil)
  super(version)

  # Path Solution
  @solution = {bundle_sid: bundle_sid}
  @uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/ReplaceItems"
end

Instance Method Details

#create(from_bundle_sid: nil) ⇒ ReplaceItemsInstance

Create the ReplaceItemsInstance

Parameters:

  • from_bundle_sid (String) (defaults to: nil)

    The source bundle sid to copy the item assignments from.

Returns:


37
38
39
40
41
42
43
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 37

def create(from_bundle_sid: nil)
  data = Twilio::Values.of({'FromBundleSid' => from_bundle_sid, })

  payload = @version.create('POST', @uri, data: data)

  ReplaceItemsInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
end

#to_sObject

Provide a user friendly representation


47
48
49
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 47

def to_s
  '#<Twilio.Numbers.V2.ReplaceItemsList>'
end