## # This code was generated by # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # # Twilio - Voice # This is the public Twilio REST API. # # NOTE: This class is auto generated by OpenAPI Generator. # https://openapi-generator.tech # Do not edit the class manually. # module Twilio module REST class Voice < VoiceBase class V1 < Version class DialingPermissionsList < ListResource class BulkCountryUpdateList < ListResource ## # Initialize the BulkCountryUpdateList # @param [Version] version Version that contains the resource # @return [BulkCountryUpdateList] BulkCountryUpdateList def initialize(version) super(version) # Path Solution @solution = { } @uri = "/DialingPermissions/BulkCountryUpdates" end ## # Create the BulkCountryUpdateInstance # @param [String] update_request 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\\\" } ]` # @return [BulkCountryUpdateInstance] Created BulkCountryUpdateInstance def create( update_request: nil ) data = Twilio::Values.of({ 'UpdateRequest' => update_request, }) payload = @version.create('POST', @uri, data: data) BulkCountryUpdateInstance.new( @version, payload, ) end # Provide a user friendly representation def to_s '#' end end class BulkCountryUpdatePage < Page ## # Initialize the BulkCountryUpdatePage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [BulkCountryUpdatePage] BulkCountryUpdatePage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of BulkCountryUpdateInstance # @param [Hash] payload Payload response from the API # @return [BulkCountryUpdateInstance] BulkCountryUpdateInstance def get_instance(payload) BulkCountryUpdateInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s '' end end class BulkCountryUpdateInstance < InstanceResource ## # Initialize the BulkCountryUpdateInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The SID of the # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BulkCountryUpdate # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [BulkCountryUpdateInstance] BulkCountryUpdateInstance def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'update_count' => payload['update_count'] == nil ? payload['update_count'] : payload['update_count'].to_i, 'update_request' => payload['update_request'], } end ## # @return [String] The number of countries updated def update_count @properties['update_count'] end ## # @return [String] A bulk update request to change voice dialing country permissions stored as a URL-encoded, JSON array of update objects. For example : `[ { \"iso_code\": \"GB\", \"low_risk_numbers_enabled\": \"true\", \"high_risk_special_numbers_enabled\":\"true\", \"high_risk_tollfraud_numbers_enabled\": \"false\" } ]` def update_request @properties['update_request'] end ## # Provide a user friendly representation def to_s "" end ## # Provide a detailed, user friendly representation def inspect "" end end end end end end end