Class: Twilio::REST::Voice::V1::DialingPermissionsList::SettingsInstance

Inherits:
InstanceResource
  • Object
show all
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

Constructor Details

#initialize(version, payload) ⇒ SettingsInstance

Initialize the SettingsInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio



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

#contextSettingsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



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_inheritanceBoolean

Returns ‘true` if this sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`.

Returns:

  • (Boolean)

    ‘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 dialing_permissions_inheritance
  @properties['dialing_permissions_inheritance']
end

#fetchSettingsInstance

Fetch a SettingsInstance

Returns:



176
177
178
# File 'lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb', line 176

def fetch
  context.fetch
end

#inspectObject

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_sObject

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

Parameters:

  • dialing_permissions_inheritance (Boolean) (defaults to: :unset)

    ‘true` for this sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.

Returns:



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: dialing_permissions_inheritance, )
end

#urlString

Returns The absolute URL of this resource.

Returns:

  • (String)

    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