Class: Twilio::REST::Api::V2010::AccountContext::SipList::DomainContext::IpAccessControlListMappingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::SipList::DomainContext::IpAccessControlListMappingContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the IpAccessControlListMappingInstance.
-
#fetch ⇒ IpAccessControlListMappingInstance
Fetch the IpAccessControlListMappingInstance.
-
#initialize(version, account_sid, domain_sid, sid) ⇒ IpAccessControlListMappingContext
constructor
Initialize the IpAccessControlListMappingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid, domain_sid, sid) ⇒ IpAccessControlListMappingContext
Initialize the IpAccessControlListMappingContext
169 170 171 172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb', line 169 def initialize(version, account_sid, domain_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, domain_sid: domain_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/IpAccessControlListMappings/#{@solution[:sid]}.json" end |
Instance Method Details
#delete ⇒ Boolean
Delete the IpAccessControlListMappingInstance
181 182 183 184 185 186 187 188 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb', line 181 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ IpAccessControlListMappingInstance
Fetch the IpAccessControlListMappingInstance
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb', line 193 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) IpAccessControlListMappingInstance.new( @version, payload, account_sid: @solution[:account_sid], domain_sid: @solution[:domain_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
221 222 223 224 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb', line 221 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.IpAccessControlListMappingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb', line 214 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.IpAccessControlListMappingContext #{context}>" end |