lib/twilio-ruby/rest/messaging/v1/service.rb in twilio-ruby-5.0.0.rc24 vs lib/twilio-ruby/rest/messaging/v1/service.rb in twilio-ruby-5.0.0.rc25
- old
+ new
@@ -36,12 +36,13 @@
# @param [service.ScanMessageContent] scan_message_content The
# scan_message_content
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
# @param [Boolean] area_code_geomatch The area_code_geomatch
# @param [String] validity_period The validity_period
+ # @param [Boolean] synchronous_validation The synchronous_validation
# @return [ServiceInstance] Newly created ServiceInstance
- def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset)
+ def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'InboundRequestUrl' => inbound_request_url,
'InboundMethod' => inbound_method,
'FallbackUrl' => fallback_url,
@@ -52,10 +53,11 @@
'SmartEncoding' => smart_encoding,
'ScanMessageContent' => scan_message_content,
'FallbackToLongCode' => fallback_to_long_code,
'AreaCodeGeomatch' => area_code_geomatch,
'ValidityPeriod' => validity_period,
+ 'SynchronousValidation' => synchronous_validation,
})
payload = @version.create(
'POST',
@uri,
@@ -237,12 +239,13 @@
# @param [service.ScanMessageContent] scan_message_content The
# scan_message_content
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
# @param [Boolean] area_code_geomatch The area_code_geomatch
# @param [String] validity_period The validity_period
+ # @param [Boolean] synchronous_validation The synchronous_validation
# @return [ServiceInstance] Updated ServiceInstance
- def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset)
+ def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'InboundRequestUrl' => inbound_request_url,
'InboundMethod' => inbound_method,
'FallbackUrl' => fallback_url,
@@ -253,10 +256,11 @@
'SmartEncoding' => smart_encoding,
'ScanMessageContent' => scan_message_content,
'FallbackToLongCode' => fallback_to_long_code,
'AreaCodeGeomatch' => area_code_geomatch,
'ValidityPeriod' => validity_period,
+ 'SynchronousValidation' => synchronous_validation,
})
payload = @version.update(
'POST',
@uri,
@@ -296,12 +300,15 @@
@version.delete('delete', @uri)
end
##
# Access the phone_numbers
- # @return [PhoneNumberList] PhoneNumberList
+ # @return [PhoneNumberList] if a(n) PhoneNumberList object was created.
+ # @return [PhoneNumberContext] if a(n) PhoneNumberContext object was created.
def phone_numbers(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return PhoneNumberContext.new(
@version,
@solution[:sid],
sid,
@@ -318,12 +325,15 @@
@phone_numbers
end
##
# Access the short_codes
- # @return [ShortCodeList] ShortCodeList
+ # @return [ShortCodeList] if a(n) ShortCodeList object was created.
+ # @return [ShortCodeContext] if a(n) ShortCodeContext object was created.
def short_codes(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return ShortCodeContext.new(
@version,
@solution[:sid],
sid,
@@ -340,12 +350,15 @@
@short_codes
end
##
# Access the alpha_senders
- # @return [AlphaSenderList] AlphaSenderList
+ # @return [AlphaSenderList] if a(n) AlphaSenderList object was created.
+ # @return [AlphaSenderContext] if a(n) AlphaSenderContext object was created.
def alpha_senders(sid=:unset)
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
+
if sid != :unset
return AlphaSenderContext.new(
@version,
@solution[:sid],
sid,
@@ -396,10 +409,11 @@
'mms_converter' => payload['mms_converter'],
'smart_encoding' => payload['smart_encoding'],
'scan_message_content' => payload['scan_message_content'],
'fallback_to_long_code' => payload['fallback_to_long_code'],
'area_code_geomatch' => payload['area_code_geomatch'],
+ 'synchronous_validation' => payload['synchronous_validation'],
'validity_period' => payload['validity_period'].to_i,
'url' => payload['url'],
'links' => payload['links'],
}
@@ -487,10 +501,14 @@
def area_code_geomatch
@properties['area_code_geomatch']
end
+ def synchronous_validation
+ @properties['synchronous_validation']
+ end
+
def validity_period
@properties['validity_period']
end
def url
@@ -515,12 +533,13 @@
# @param [service.ScanMessageContent] scan_message_content The
# scan_message_content
# @param [Boolean] fallback_to_long_code The fallback_to_long_code
# @param [Boolean] area_code_geomatch The area_code_geomatch
# @param [String] validity_period The validity_period
+ # @param [Boolean] synchronous_validation The synchronous_validation
# @return [ServiceInstance] Updated ServiceInstance
- def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset)
+ def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset)
context.update(
friendly_name: friendly_name,
inbound_request_url: inbound_request_url,
inbound_method: inbound_method,
fallback_url: fallback_url,
@@ -531,9 +550,10 @@
smart_encoding: smart_encoding,
scan_message_content: scan_message_content,
fallback_to_long_code: fallback_to_long_code,
area_code_geomatch: area_code_geomatch,
validity_period: validity_period,
+ synchronous_validation: synchronous_validation,
)
end
##
# Fetch a ServiceInstance
\ No newline at end of file