Class: Twilio::REST::Voice::V1::DialingPermissionsList::BulkCountryUpdateList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/voice/v1/dialing_permissions/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/voice/v1/dialing_permissions/bulk_country_update.rb', line 21

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/DialingPermissions/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)

    URL encoded JSON array of update objects. example : ‘[ { “iso_code”: “GB”, “low_risk_numbers_enabled”: “true”, “high_risk_special_numbers_enabled”:“true”, “high_risk_tollfraud_numbers_enabled”: “false” } ]`

Returns:



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 37

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



51
52
53
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 51

def to_s
  '#<Twilio.Voice.V1.BulkCountryUpdateList>'
end