class Twilio::REST::Voice::V1::DialingPermissionsList::SettingsInstance

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 help@twilio.com.

Public Class Methods

new(version, payload) click to toggle source

Initialize the SettingsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @return [SettingsInstance] SettingsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
126 def initialize(version, payload)
127   super(version)
128 
129   # Marshaled Properties
130   @properties = {
131       'dialing_permissions_inheritance' => payload['dialing_permissions_inheritance'],
132       'url' => payload['url'],
133   }
134 
135   # Context
136   @instance_context = nil
137   @params = {}
138 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [SettingsContext] SettingsContext for this SettingsInstance

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
144 def context
145   unless @instance_context
146     @instance_context = SettingsContext.new(@version, )
147   end
148   @instance_context
149 end
dialing_permissions_inheritance() click to toggle source

@return [Boolean] `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
153 def dialing_permissions_inheritance
154   @properties['dialing_permissions_inheritance']
155 end
fetch() click to toggle source

Fetch the SettingsInstance @return [SettingsInstance] Fetched SettingsInstance

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
166 def fetch
167   context.fetch
168 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
188 def inspect
189   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
190   "<Twilio.Voice.V1.SettingsInstance #{values}>"
191 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
181 def to_s
182   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
183   "<Twilio.Voice.V1.SettingsInstance #{values}>"
184 end
update(dialing_permissions_inheritance: :unset) click to toggle source

Update the SettingsInstance @param [Boolean] dialing_permissions_inheritance `true` for the sub-account to

inherit voice dialing permissions from the Master Project; otherwise `false`.

@return [SettingsInstance] Updated SettingsInstance

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
175 def update(dialing_permissions_inheritance: :unset)
176   context.update(dialing_permissions_inheritance: dialing_permissions_inheritance, )
177 end
url() click to toggle source

@return [String] The absolute URL of this resource

    # File lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
159 def url
160   @properties['url']
161 end