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

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ BulkCountryUpdateList

Initialize the BulkCountryUpdateList

Parameters:

  • version (Version)

    Version that contains the resource



28
29
30
31
32
33
34
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 28

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/DialingPermissions/BulkCountryUpdates"
    
end

Instance Method Details

#create(update_request: nil) ⇒ BulkCountryUpdateInstance

Create the BulkCountryUpdateInstance

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:



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 39

def create(
    update_request: nil
)

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

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

#to_sObject

Provide a user friendly representation



64
65
66
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb', line 64

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