Class: Twilio::REST::Voice::V1::DialingPermissionsList::SettingsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Voice::V1::DialingPermissionsList::SettingsInstance
- Defined in:
- lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb
Instance Method Summary collapse
-
#context ⇒ SettingsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#dialing_permissions_inheritance ⇒ Boolean
‘true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.
-
#fetch ⇒ SettingsInstance
Fetch the SettingsInstance.
-
#initialize(version, payload) ⇒ SettingsInstance
constructor
Initialize the SettingsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(dialing_permissions_inheritance: :unset) ⇒ SettingsInstance
Update the SettingsInstance.
-
#url ⇒ String
The absolute URL of this resource.
Constructor Details
#initialize(version, payload) ⇒ SettingsInstance
Initialize the SettingsInstance
156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 156 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'dialing_permissions_inheritance' => payload['dialing_permissions_inheritance'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#context ⇒ SettingsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
174 175 176 177 178 179 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 174 def context unless @instance_context @instance_context = SettingsContext.new(@version ) end @instance_context end |
#dialing_permissions_inheritance ⇒ Boolean
Returns ‘true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.
183 184 185 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 183 def @properties['dialing_permissions_inheritance'] end |
#fetch ⇒ SettingsInstance
Fetch the SettingsInstance
196 197 198 199 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 196 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
223 224 225 226 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 223 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.SettingsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
216 217 218 219 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 216 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.SettingsInstance #{values}>" end |
#update(dialing_permissions_inheritance: :unset) ⇒ SettingsInstance
Update the SettingsInstance
205 206 207 208 209 210 211 212 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 205 def update( dialing_permissions_inheritance: :unset ) context.update( dialing_permissions_inheritance: , ) end |
#url ⇒ String
Returns The absolute URL of this resource.
189 190 191 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 189 def url @properties['url'] end |