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

Instance Method Summary collapse

Constructor Details

#initialize(version, bundle_sid: nil) ⇒ ReplaceItemsList

Initialize the ReplaceItemsList

Parameters:

  • version (Version)

    Version that contains the resource



29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 29

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:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 40

def create(
    from_bundle_sid: nil
)

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

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.create('POST', @uri, data: data, headers: headers)
    ReplaceItemsInstance.new(
        @version,
        payload,
        bundle_sid: @solution[:bundle_sid],
    )
end

#to_sObject

Provide a user friendly representation



66
67
68
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb', line 66

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