Class: Twilio::REST::Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeCallsList::AuthCallsIpAccessControlListMappingContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, account_sid, domain_sid, sid) ⇒ AuthCallsIpAccessControlListMappingContext

Initialize the AuthCallsIpAccessControlListMappingContext

Parameters:

  • version (Version)

    Version that contains the resource

  • account_sid (String)

    The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the IpAccessControlListMapping resource to fetch.

  • domain_sid (String)

    The SID of the SIP domain that contains the resource to fetch.

  • sid (String)

    The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch.



161
162
163
164
165
166
167
168
169
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb', line 161

def initialize(version, , domain_sid, sid)
    super(version)

    # Path Solution
    @solution = { account_sid: , domain_sid: domain_sid, sid: sid,  }
    @uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/Auth/Calls/IpAccessControlListMappings/#{@solution[:sid]}.json"

    
end

Instance Method Details

#deleteBoolean

Delete the AuthCallsIpAccessControlListMappingInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



173
174
175
176
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb', line 173

def delete

    @version.delete('DELETE', @uri)
end

#fetchAuthCallsIpAccessControlListMappingInstance

Fetch the AuthCallsIpAccessControlListMappingInstance

Returns:



181
182
183
184
185
186
187
188
189
190
191
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb', line 181

def fetch

    payload = @version.fetch('GET', @uri)
    AuthCallsIpAccessControlListMappingInstance.new(
        @version,
        payload,
        account_sid: @solution[:account_sid],
        domain_sid: @solution[:domain_sid],
        sid: @solution[:sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



203
204
205
206
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb', line 203

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Api.V2010.AuthCallsIpAccessControlListMappingContext #{context}>"
end

#to_sObject

Provide a user friendly representation



196
197
198
199
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb', line 196

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Api.V2010.AuthCallsIpAccessControlListMappingContext #{context}>"
end