Class: Twilio::REST::Preview::Permissions::VoicePermissionList::BulkCountryUpdateList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/permissions/voice_permission/bulk_country_update.rb

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ BulkCountryUpdateList

Initialize the BulkCountryUpdateList

Parameters:

  • version (Version)

    Version that contains the resource



21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/preview/permissions/voice_permission/bulk_country_update.rb', line 21

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/VoicePermissions/BulkCountryUpdates"
end

Instance Method Details

#create(update_request: nil) ⇒ BulkCountryUpdateInstance

Retrieve a single page of BulkCountryUpdateInstance records from the API. Request is executed immediately.

Parameters:

  • update_request (String) (defaults to: nil)

    Json list of update objects. eg : [ { “iso_code”: “GB”, “low_risk_numbers”: “Enabled”, “high_risk_special_numbers”:“Enabled”, “high_risk_irsf_numbers”: “Enabled” } ]

Returns:



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/twilio-ruby/rest/preview/permissions/voice_permission/bulk_country_update.rb', line 36

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

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

  BulkCountryUpdateInstance.new(@version, payload, )
end

#to_sObject

Provide a user friendly representation



50
51
52
# File 'lib/twilio-ruby/rest/preview/permissions/voice_permission/bulk_country_update.rb', line 50

def to_s
  '#<Twilio.Preview.Permissions.BulkCountryUpdateList>'
end