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
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
-
#context ⇒ SettingsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#dialing_permissions_inheritance ⇒ Boolean
‘true` if this sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.
-
#fetch ⇒ SettingsInstance
Fetch a 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
136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 136 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
154 155 156 157 158 159 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 154 def context unless @instance_context @instance_context = SettingsContext.new(@version, ) end @instance_context end |
#dialing_permissions_inheritance ⇒ Boolean
Returns ‘true` if this sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.
163 164 165 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 163 def @properties['dialing_permissions_inheritance'] end |
#fetch ⇒ SettingsInstance
Fetch a SettingsInstance
176 177 178 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 176 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
198 199 200 201 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 198 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Voice.V1.SettingsInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
191 192 193 194 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 191 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
185 186 187 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 185 def update(dialing_permissions_inheritance: :unset) context.update(dialing_permissions_inheritance: , ) end |
#url ⇒ String
Returns The absolute URL of this resource.
169 170 171 |
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 169 def url @properties['url'] end |