lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-5.0.0.rc9 vs lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-5.0.0.rc10
- old
+ new
@@ -14,11 +14,10 @@
##
# Initialize the DomainList
# @param [Version] version Version that contains the resource
# @param [String] account_sid A 34 character string that uniquely identifies this
# resource.
-
# @return [DomainList] DomainList
def initialize(version, account_sid: nil)
super(version)
# Path Solution
@@ -36,11 +35,10 @@
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when not set will use
# the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the
# limit with the most efficient page size, i.e. min(limit, 1000)
-
# @return [Array] Array of up to limit results
def list(limit: nil, page_size: nil)
self.stream(
limit: limit,
page_size: page_size
@@ -55,11 +53,10 @@
# guarantees to never return more than limit. Default is no limit
# @param [Integer] page_size Number of records to fetch per request, when not set will use
# the default value of 50 records. If no page_size is defined
# but a limit is defined, stream() will attempt to read the
# limit with the most efficient page size, i.e. min(limit, 1000)
-
# @return [Enumerable] Enumerable that will yield up to limit results
def stream(limit: nil, page_size: nil)
limits = @version.read_limits(limit, page_size)
page = self.page(
@@ -95,11 +92,10 @@
# Retrieve a single page of DomainInstance records from the API.
# Request is executed immediately.
# @param [String] page_token PageToken provided by the API
# @param [Integer] page_number Page Number, this value is simply for client state
# @param [Integer] page_size Number of records to return, defaults to 50
-
# @return [Page] Page of DomainInstance
def page(page_token: nil, page_number: nil, page_size: nil)
params = {
'PageToken' => page_token,
'Page' => page_number,
@@ -118,26 +114,28 @@
# Request is executed immediately.
# @param [String] domain_name The unique address you reserve on Twilio to which
# you route your SIP traffic
# @param [String] friendly_name A user-specified, human-readable name for the
# trigger.
+ # @param [String] auth_type The types of authentication you have mapped to your
+ # domain
# @param [String] voice_url The URL Twilio will request when this domain receives
# a call
# @param [String] voice_method The HTTP method to use with the voice_url
# @param [String] voice_fallback_url The URL that Twilio will use if an error
# occurs retrieving or executing the TwiML requested by VoiceUrl
# @param [String] voice_fallback_method The HTTP method Twilio will use when
# requesting the VoiceFallbackUrl
# @param [String] voice_status_callback_url The URL that Twilio will request to
# pass status parameters
# @param [String] voice_status_callback_method The voice_status_callback_method
-
# @return [DomainInstance] Newly created DomainInstance
- def create(domain_name: nil, friendly_name: nil, voice_url: nil, voice_method: nil, voice_fallback_url: nil, voice_fallback_method: nil, voice_status_callback_url: nil, voice_status_callback_method: nil)
+ def create(domain_name: nil, friendly_name: nil, auth_type: nil, voice_url: nil, voice_method: nil, voice_fallback_url: nil, voice_fallback_method: nil, voice_status_callback_url: nil, voice_status_callback_method: nil)
data = {
'DomainName' => domain_name,
'FriendlyName' => friendly_name,
+ 'AuthType' => auth_type,
'VoiceUrl' => voice_url,
'VoiceMethod' => voice_method,
'VoiceFallbackUrl' => voice_fallback_url,
'VoiceFallbackMethod' => voice_fallback_method,
'VoiceStatusCallbackUrl' => voice_status_callback_url,
@@ -151,11 +149,11 @@
)
return DomainInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
+ account_sid: @solution[:account_sid],
)
end
##
# Provide a user friendly representation
@@ -170,11 +168,10 @@
# @param [Version] version Version that contains the resource
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
# @param [String] account_sid A 34 character string that uniquely identifies this
# resource.
-
# @return [DomainPage] DomainPage
def initialize(version, response, solution)
super(version, response)
# Path Solution
@@ -182,17 +179,16 @@
end
##
# Build an instance of DomainInstance
# @param [Hash] payload Payload response from the API
-
# @return [DomainInstance] DomainInstance
def get_instance(payload)
return DomainInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
+ account_sid: @solution[:account_sid],
)
end
##
# Provide a user friendly representation
@@ -205,11 +201,10 @@
##
# Initialize the DomainContext
# @param [Version] version Version that contains the resource
# @param [String] account_sid The account_sid
# @param [String] sid The domain sid that uniquely identifies the resource
-
# @return [DomainContext] DomainContext
def initialize(version, account_sid, sid)
super(version)
# Path Solution
@@ -237,31 +232,30 @@
)
return DomainInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- sid: @solution['sid'],
+ account_sid: @solution[:account_sid],
+ sid: @solution[:sid],
)
end
##
# Update the DomainInstance
- # @param [String] api_version The api_version
+ # @param [String] auth_type The auth_type
# @param [String] friendly_name A user-specified, human-readable name for the
# trigger.
# @param [String] voice_fallback_method The voice_fallback_method
# @param [String] voice_fallback_url The voice_fallback_url
# @param [String] voice_method The HTTP method to use with the voice_url
# @param [String] voice_status_callback_method The voice_status_callback_method
# @param [String] voice_status_callback_url The voice_status_callback_url
# @param [String] voice_url The voice_url
-
# @return [DomainInstance] Updated DomainInstance
- def update(api_version: nil, friendly_name: nil, voice_fallback_method: nil, voice_fallback_url: nil, voice_method: nil, voice_status_callback_method: nil, voice_status_callback_url: nil, voice_url: nil)
+ def update(auth_type: nil, friendly_name: nil, voice_fallback_method: nil, voice_fallback_url: nil, voice_method: nil, voice_status_callback_method: nil, voice_status_callback_url: nil, voice_url: nil)
data = {
- 'ApiVersion' => api_version,
+ 'AuthType' => auth_type,
'FriendlyName' => friendly_name,
'VoiceFallbackMethod' => voice_fallback_method,
'VoiceFallbackUrl' => voice_fallback_url,
'VoiceMethod' => voice_method,
'VoiceStatusCallbackMethod' => voice_status_callback_method,
@@ -276,12 +270,12 @@
)
return DomainInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- sid: @solution['sid'],
+ account_sid: @solution[:account_sid],
+ sid: @solution[:sid],
)
end
##
# Deletes the DomainInstance
@@ -352,11 +346,10 @@
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] account_sid A 34 character string that uniquely identifies this
# resource.
# @param [String] sid The domain sid that uniquely identifies the resource
-
# @return [DomainInstance] DomainInstance
def initialize(version, payload, account_sid: nil, sid: nil)
super(version)
# Marshaled Properties
@@ -388,11 +381,10 @@
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
# @param [Version] version Version that contains the resource
-
# @return [DomainContext] DomainContext for this DomainInstance
def context
unless @instance_context
@instance_context = DomainContext.new(
@version,
@@ -465,28 +457,28 @@
##
# Fetch a DomainInstance
# @return [DomainInstance] Fetched DomainInstance
def fetch
- @context.fetch()
+ context.fetch
end
##
# Update the DomainInstance
- # @param [String] api_version The api_version
+ # @param [String] auth_type The auth_type
# @param [String] friendly_name A user-specified, human-readable name for the
# trigger.
# @param [String] voice_fallback_method The voice_fallback_method
# @param [String] voice_fallback_url The voice_fallback_url
# @param [String] voice_method The HTTP method to use with the voice_url
# @param [String] voice_status_callback_method The voice_status_callback_method
# @param [String] voice_status_callback_url The voice_status_callback_url
# @param [String] voice_url The voice_url
-
# @return [DomainInstance] Updated DomainInstance
- def update(api_version: nil, friendly_name: nil, voice_fallback_method: nil, voice_fallback_url: nil, voice_method: nil, voice_status_callback_method: nil, voice_status_callback_url: nil, voice_url: nil)
- @context.update(
+ def update(auth_type: nil, friendly_name: nil, voice_fallback_method: nil, voice_fallback_url: nil, voice_method: nil, voice_status_callback_method: nil, voice_status_callback_url: nil, voice_url: nil)
+ context.update(
+ auth_type: auth_type,
friendly_name: friendly_name,
voice_fallback_method: voice_fallback_method,
voice_fallback_url: voice_fallback_url,
voice_method: voice_method,
voice_status_callback_method: voice_status_callback_method,
@@ -497,31 +489,31 @@
##
# Deletes the DomainInstance
# @return [Boolean] true if delete succeeds, true otherwise
def delete
- @context.delete()
+ context.delete
end
##
# Access the ip_access_control_list_mappings
# @return [ip_access_control_list_mappings] ip_access_control_list_mappings
def ip_access_control_list_mappings
- @context.ip_access_control_list_mappings
+ context.ip_access_control_list_mappings
end
##
# Access the credential_list_mappings
# @return [credential_list_mappings] credential_list_mappings
def credential_list_mappings
- @context.credential_list_mappings
+ context.credential_list_mappings
end
##
# Provide a user friendly representation
def to_s
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Api.V2010.DomainInstance #{context}>"
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Api.V2010.DomainInstance #{values}>"
end
end
end
end
end
\ No newline at end of file