Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ReplaceItemsList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ReplaceItemsList
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb
Instance Method Summary collapse
-
#create(from_bundle_sid: nil) ⇒ ReplaceItemsInstance
Create the ReplaceItemsInstance.
-
#initialize(version, bundle_sid: nil) ⇒ ReplaceItemsList
constructor
Initialize the ReplaceItemsList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, bundle_sid: nil) ⇒ ReplaceItemsList
Initialize the ReplaceItemsList
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
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_s ⇒ Object
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 |