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

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.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) ⇒ BundleCopyList

Initialize the BundleCopyList

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/bundle_copy.rb', line 24

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

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

Instance Method Details

#create(friendly_name: :unset) ⇒ BundleCopyInstance

Create the BundleCopyInstance

Parameters:

  • friendly_name (String) (defaults to: :unset)

    The string that you assigned to describe the copied bundle.

Returns:



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

def create(friendly_name: :unset)
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })

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

  BundleCopyInstance.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/bundle_copy.rb', line 47

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