twilio-ruby 7.0.0 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,12 +36,14 @@ module Twilio
36
36
  # @param [String] chat_friendly_name The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example.
37
37
  # @param [String] customer_friendly_name The Conversation participant's friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example.
38
38
  # @param [String] pre_engagement_data The pre-engagement data.
39
+ # @param [String] ui_version The Ui-Version HTTP request header
39
40
  # @return [WebChannelsInstance] Created WebChannelsInstance
40
41
  def create(
41
42
  address_sid: nil,
42
43
  chat_friendly_name: :unset,
43
44
  customer_friendly_name: :unset,
44
- pre_engagement_data: :unset
45
+ pre_engagement_data: :unset,
46
+ ui_version: :unset
45
47
  )
46
48
 
47
49
  data = Twilio::Values.of({
@@ -52,7 +54,8 @@ module Twilio
52
54
  })
53
55
 
54
56
 
55
- payload = @version.create('POST', @uri, data: data)
57
+ headers = Twilio::Values.of({ 'Ui-Version' => ui_version, })
58
+ payload = @version.create('POST', @uri, data: data, headers: headers)
56
59
  WebChannelsInstance.new(
57
60
  @version,
58
61
  payload,
@@ -21,9 +21,46 @@ module Twilio
21
21
  def initialize(domain)
22
22
  super
23
23
  @version = 'v2'
24
+ @flex_user = nil
24
25
  @web_channels = nil
25
26
  end
26
27
 
28
+ ##
29
+ # @param [String] instance_sid The unique ID created by Twilio to identify a Flex instance.
30
+ # @param [String] flex_user_sid The unique id for the flex user to be retrieved.
31
+ # @return [Twilio::REST::FlexApi::V2::FlexUserContext] if instanceSid was passed.
32
+ # @return [Twilio::REST::FlexApi::V2::FlexUserList]
33
+ def flex_user(instance_sid=:unset, flex_user_sid=:unset)
34
+ if instance_sid.nil?
35
+ raise ArgumentError, 'instance_sid cannot be nil'
36
+ end
37
+ if flex_user_sid.nil?
38
+ raise ArgumentError, 'flex_user_sid cannot be nil'
39
+ end
40
+ if instance_sid == :unset && flex_user_sid == :unset
41
+ @flex_user ||= FlexUserList.new self
42
+ else
43
+ FlexUserContext.new(self, instance_sid, flex_user_sid)
44
+ end
45
+ end
46
+ ##
47
+ # @param [String] instance_sid The unique ID created by Twilio to identify a Flex instance.
48
+ # @param [String] flex_user_sid The unique id for the flex user to be retrieved.
49
+ # @return [Twilio::REST::FlexApi::V2::FlexUserContext] if flexUserSid was passed.
50
+ # @return [Twilio::REST::FlexApi::V2::FlexUserList]
51
+ def flex_user(instance_sid=:unset, flex_user_sid=:unset)
52
+ if instance_sid.nil?
53
+ raise ArgumentError, 'instance_sid cannot be nil'
54
+ end
55
+ if flex_user_sid.nil?
56
+ raise ArgumentError, 'flex_user_sid cannot be nil'
57
+ end
58
+ if instance_sid == :unset && flex_user_sid == :unset
59
+ @flex_user ||= FlexUserList.new self
60
+ else
61
+ FlexUserContext.new(self, instance_sid, flex_user_sid)
62
+ end
63
+ end
27
64
  ##
28
65
  # @return [Twilio::REST::FlexApi::V2::WebChannelsList]
29
66
  def web_channels
@@ -57,7 +57,7 @@ module Twilio
57
57
  end
58
58
  ##
59
59
  # Fetch the PhoneNumberInstance
60
- # @param [String] fields A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score.
60
+ # @param [String] fields A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
61
61
  # @param [String] country_code The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
62
62
  # @param [String] first_name User’s first name. This query parameter is only used (optionally) for identity_match package requests.
63
63
  # @param [String] last_name User’s last name. This query parameter is only used (optionally) for identity_match package requests.
@@ -70,6 +70,7 @@ module Twilio
70
70
  # @param [String] national_id User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
71
71
  # @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
72
72
  # @param [String] last_verified_date The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
73
+ # @param [String] verification_sid The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
73
74
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
74
75
  def fetch(
75
76
  fields: :unset,
@@ -84,7 +85,8 @@ module Twilio
84
85
  address_country_code: :unset,
85
86
  national_id: :unset,
86
87
  date_of_birth: :unset,
87
- last_verified_date: :unset
88
+ last_verified_date: :unset,
89
+ verification_sid: :unset
88
90
  )
89
91
 
90
92
  params = Twilio::Values.of({
@@ -101,6 +103,7 @@ module Twilio
101
103
  'NationalId' => national_id,
102
104
  'DateOfBirth' => date_of_birth,
103
105
  'LastVerifiedDate' => last_verified_date,
106
+ 'VerificationSid' => verification_sid,
104
107
  })
105
108
 
106
109
  payload = @version.fetch('GET', @uri, params: params)
@@ -185,6 +188,7 @@ module Twilio
185
188
  'reassigned_number' => payload['reassigned_number'],
186
189
  'sms_pumping_risk' => payload['sms_pumping_risk'],
187
190
  'phone_number_quality_score' => payload['phone_number_quality_score'],
191
+ 'pre_fill' => payload['pre_fill'],
188
192
  'url' => payload['url'],
189
193
  }
190
194
 
@@ -294,6 +298,12 @@ module Twilio
294
298
  @properties['phone_number_quality_score']
295
299
  end
296
300
 
301
+ ##
302
+ # @return [Hash] An object that contains pre fill information. pre_fill will return PII information associated with the phone number like first name, last name, address line, country code, state and postal code.
303
+ def pre_fill
304
+ @properties['pre_fill']
305
+ end
306
+
297
307
  ##
298
308
  # @return [String] The absolute URL of the resource.
299
309
  def url
@@ -302,7 +312,7 @@ module Twilio
302
312
 
303
313
  ##
304
314
  # Fetch the PhoneNumberInstance
305
- # @param [String] fields A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score.
315
+ # @param [String] fields A comma-separated list of fields to return. Possible values are validation, caller_name, sim_swap, call_forwarding, line_status, line_type_intelligence, identity_match, reassigned_number, sms_pumping_risk, phone_number_quality_score, pre_fill.
306
316
  # @param [String] country_code The [country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) used if the phone number provided is in national format.
307
317
  # @param [String] first_name User’s first name. This query parameter is only used (optionally) for identity_match package requests.
308
318
  # @param [String] last_name User’s last name. This query parameter is only used (optionally) for identity_match package requests.
@@ -315,6 +325,7 @@ module Twilio
315
325
  # @param [String] national_id User’s national ID, such as SSN or Passport ID. This query parameter is only used (optionally) for identity_match package requests.
316
326
  # @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This query parameter is only used (optionally) for identity_match package requests.
317
327
  # @param [String] last_verified_date The date you obtained consent to call or text the end-user of the phone number or a date on which you are reasonably certain that the end-user could still be reached at that number. This query parameter is only used (optionally) for reassigned_number package requests.
328
+ # @param [String] verification_sid The unique identifier associated with a verification process through verify API. This query parameter is only used (optionally) for pre_fill package requests.
318
329
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
319
330
  def fetch(
320
331
  fields: :unset,
@@ -329,7 +340,8 @@ module Twilio
329
340
  address_country_code: :unset,
330
341
  national_id: :unset,
331
342
  date_of_birth: :unset,
332
- last_verified_date: :unset
343
+ last_verified_date: :unset,
344
+ verification_sid: :unset
333
345
  )
334
346
 
335
347
  context.fetch(
@@ -346,6 +358,7 @@ module Twilio
346
358
  national_id: national_id,
347
359
  date_of_birth: date_of_birth,
348
360
  last_verified_date: last_verified_date,
361
+ verification_sid: verification_sid,
349
362
  )
350
363
  end
351
364
 
@@ -487,6 +487,7 @@ module Twilio
487
487
  'usecase' => payload['usecase'],
488
488
  'us_app_to_person_registered' => payload['us_app_to_person_registered'],
489
489
  'use_inbound_webhook_on_number' => payload['use_inbound_webhook_on_number'],
490
+ 'sending_windows' => payload['sending_windows'],
490
491
  }
491
492
 
492
493
  # Context
@@ -643,6 +644,12 @@ module Twilio
643
644
  @properties['use_inbound_webhook_on_number']
644
645
  end
645
646
 
647
+ ##
648
+ # @return [Hash] A list of Sending Windows, which indicate defined time ranges in which a message can be sent, in the UTC time zone. Each window is defined by two strings, labeled \"start_time\" and \"end_time\".
649
+ def sending_windows
650
+ @properties['sending_windows']
651
+ end
652
+
646
653
  ##
647
654
  # Delete the ServiceInstance
648
655
  # @return [Boolean] True if delete succeeds, false otherwise
@@ -54,6 +54,47 @@ module Twilio
54
54
  end
55
55
  end
56
56
 
57
+
58
+ class PortingPortInContext < InstanceContext
59
+ ##
60
+ # Initialize the PortingPortInContext
61
+ # @param [Version] version Version that contains the resource
62
+ # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
63
+ # @return [PortingPortInContext] PortingPortInContext
64
+ def initialize(version, port_in_request_sid)
65
+ super(version)
66
+
67
+ # Path Solution
68
+ @solution = { port_in_request_sid: port_in_request_sid, }
69
+ @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}"
70
+
71
+
72
+ end
73
+ ##
74
+ # Delete the PortingPortInInstance
75
+ # @return [Boolean] True if delete succeeds, false otherwise
76
+ def delete
77
+
78
+
79
+ @version.delete('DELETE', @uri)
80
+ end
81
+
82
+
83
+ ##
84
+ # Provide a user friendly representation
85
+ def to_s
86
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
87
+ "#<Twilio.Numbers.V1.PortingPortInContext #{context}>"
88
+ end
89
+
90
+ ##
91
+ # Provide a detailed, user friendly representation
92
+ def inspect
93
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
94
+ "#<Twilio.Numbers.V1.PortingPortInContext #{context}>"
95
+ end
96
+ end
97
+
57
98
  class PortingPortInPage < Page
58
99
  ##
59
100
  # Initialize the PortingPortInPage
@@ -92,7 +133,7 @@ module Twilio
92
133
  # resource.
93
134
  # @param [String] sid The SID of the Call resource to fetch.
94
135
  # @return [PortingPortInInstance] PortingPortInInstance
95
- def initialize(version, payload )
136
+ def initialize(version, payload , port_in_request_sid: nil)
96
137
  super(version)
97
138
 
98
139
  # Marshaled Properties
@@ -100,8 +141,22 @@ module Twilio
100
141
  'port_in_request_sid' => payload['port_in_request_sid'],
101
142
  'url' => payload['url'],
102
143
  }
144
+
145
+ # Context
146
+ @instance_context = nil
147
+ @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] , }
103
148
  end
104
149
 
150
+ ##
151
+ # Generate an instance context for the instance, the context is capable of
152
+ # performing various actions. All instance actions are proxied to the context
153
+ # @return [PortingPortInContext] CallContext for this CallInstance
154
+ def context
155
+ unless @instance_context
156
+ @instance_context = PortingPortInContext.new(@version , @params['port_in_request_sid'])
157
+ end
158
+ @instance_context
159
+ end
105
160
 
106
161
  ##
107
162
  # @return [String] The SID of the Port In request. This is a unique identifier of the port in request.
@@ -115,16 +170,26 @@ module Twilio
115
170
  @properties['url']
116
171
  end
117
172
 
173
+ ##
174
+ # Delete the PortingPortInInstance
175
+ # @return [Boolean] True if delete succeeds, false otherwise
176
+ def delete
177
+
178
+ context.delete
179
+ end
180
+
118
181
  ##
119
182
  # Provide a user friendly representation
120
183
  def to_s
121
- "<Twilio.Numbers.V1.PortingPortInInstance>"
184
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
185
+ "<Twilio.Numbers.V1.PortingPortInInstance #{values}>"
122
186
  end
123
187
 
124
188
  ##
125
189
  # Provide a detailed, user friendly representation
126
190
  def inspect
127
- "<Twilio.Numbers.V1.PortingPortInInstance>"
191
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
192
+ "<Twilio.Numbers.V1.PortingPortInInstance #{values}>"
128
193
  end
129
194
  end
130
195
 
@@ -0,0 +1,168 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Numbers
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Numbers < NumbersBase
19
+ class V1 < Version
20
+ class PortingPortInPhoneNumberList < ListResource
21
+
22
+ ##
23
+ # Initialize the PortingPortInPhoneNumberList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [PortingPortInPhoneNumberList] PortingPortInPhoneNumberList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+
31
+
32
+ end
33
+
34
+
35
+
36
+ # Provide a user friendly representation
37
+ def to_s
38
+ '#<Twilio.Numbers.V1.PortingPortInPhoneNumberList>'
39
+ end
40
+ end
41
+
42
+
43
+ class PortingPortInPhoneNumberContext < InstanceContext
44
+ ##
45
+ # Initialize the PortingPortInPhoneNumberContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
48
+ # @param [String] phone_number_sid The SID of the Port In request phone number. This is a unique identifier of the phone number.
49
+ # @return [PortingPortInPhoneNumberContext] PortingPortInPhoneNumberContext
50
+ def initialize(version, port_in_request_sid, phone_number_sid)
51
+ super(version)
52
+
53
+ # Path Solution
54
+ @solution = { port_in_request_sid: port_in_request_sid, phone_number_sid: phone_number_sid, }
55
+ @uri = "/Porting/PortIn/#{@solution[:port_in_request_sid]}/PhoneNumber/#{@solution[:phone_number_sid]}"
56
+
57
+
58
+ end
59
+ ##
60
+ # Delete the PortingPortInPhoneNumberInstance
61
+ # @return [Boolean] True if delete succeeds, false otherwise
62
+ def delete
63
+
64
+
65
+ @version.delete('DELETE', @uri)
66
+ end
67
+
68
+
69
+ ##
70
+ # Provide a user friendly representation
71
+ def to_s
72
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
73
+ "#<Twilio.Numbers.V1.PortingPortInPhoneNumberContext #{context}>"
74
+ end
75
+
76
+ ##
77
+ # Provide a detailed, user friendly representation
78
+ def inspect
79
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
80
+ "#<Twilio.Numbers.V1.PortingPortInPhoneNumberContext #{context}>"
81
+ end
82
+ end
83
+
84
+ class PortingPortInPhoneNumberPage < Page
85
+ ##
86
+ # Initialize the PortingPortInPhoneNumberPage
87
+ # @param [Version] version Version that contains the resource
88
+ # @param [Response] response Response from the API
89
+ # @param [Hash] solution Path solution for the resource
90
+ # @return [PortingPortInPhoneNumberPage] PortingPortInPhoneNumberPage
91
+ def initialize(version, response, solution)
92
+ super(version, response)
93
+
94
+ # Path Solution
95
+ @solution = solution
96
+ end
97
+
98
+ ##
99
+ # Build an instance of PortingPortInPhoneNumberInstance
100
+ # @param [Hash] payload Payload response from the API
101
+ # @return [PortingPortInPhoneNumberInstance] PortingPortInPhoneNumberInstance
102
+ def get_instance(payload)
103
+ PortingPortInPhoneNumberInstance.new(@version, payload)
104
+ end
105
+
106
+ ##
107
+ # Provide a user friendly representation
108
+ def to_s
109
+ '<Twilio.Numbers.V1.PortingPortInPhoneNumberPage>'
110
+ end
111
+ end
112
+ class PortingPortInPhoneNumberInstance < InstanceResource
113
+ ##
114
+ # Initialize the PortingPortInPhoneNumberInstance
115
+ # @param [Version] version Version that contains the resource
116
+ # @param [Hash] payload payload that contains response from Twilio
117
+ # @param [String] account_sid The SID of the
118
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this PortingPortInPhoneNumber
119
+ # resource.
120
+ # @param [String] sid The SID of the Call resource to fetch.
121
+ # @return [PortingPortInPhoneNumberInstance] PortingPortInPhoneNumberInstance
122
+ def initialize(version , port_in_request_sid: nil, phone_number_sid: nil)
123
+ super(version)
124
+
125
+
126
+ # Context
127
+ @instance_context = nil
128
+ @params = { 'port_in_request_sid' => port_in_request_sid || @properties['port_in_request_sid'] ,'phone_number_sid' => phone_number_sid || @properties['phone_number_sid'] , }
129
+ end
130
+
131
+ ##
132
+ # Generate an instance context for the instance, the context is capable of
133
+ # performing various actions. All instance actions are proxied to the context
134
+ # @return [PortingPortInPhoneNumberContext] CallContext for this CallInstance
135
+ def context
136
+ unless @instance_context
137
+ @instance_context = PortingPortInPhoneNumberContext.new(@version , @params['port_in_request_sid'], @params['phone_number_sid'])
138
+ end
139
+ @instance_context
140
+ end
141
+
142
+ ##
143
+ # Delete the PortingPortInPhoneNumberInstance
144
+ # @return [Boolean] True if delete succeeds, false otherwise
145
+ def delete
146
+
147
+ context.delete
148
+ end
149
+
150
+ ##
151
+ # Provide a user friendly representation
152
+ def to_s
153
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
154
+ "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>"
155
+ end
156
+
157
+ ##
158
+ # Provide a detailed, user friendly representation
159
+ def inspect
160
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
161
+ "<Twilio.Numbers.V1.PortingPortInPhoneNumberInstance #{values}>"
162
+ end
163
+ end
164
+
165
+ end
166
+ end
167
+ end
168
+ end
@@ -26,6 +26,7 @@ module Twilio
26
26
  @porting_bulk_portabilities = nil
27
27
  @porting_port_ins = nil
28
28
  @porting_port_ins_fetch = nil
29
+ @porting_port_in_phone_number = nil
29
30
  @porting_portabilities = nil
30
31
  end
31
32
 
@@ -63,9 +64,18 @@ module Twilio
63
64
  end
64
65
  end
65
66
  ##
67
+ # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
68
+ # @return [Twilio::REST::Numbers::V1::PortingPortInContext] if portInRequestSid was passed.
66
69
  # @return [Twilio::REST::Numbers::V1::PortingPortInList]
67
- def porting_port_ins
68
- @porting_port_ins ||= PortingPortInList.new self
70
+ def porting_port_ins(port_in_request_sid=:unset)
71
+ if port_in_request_sid.nil?
72
+ raise ArgumentError, 'port_in_request_sid cannot be nil'
73
+ end
74
+ if port_in_request_sid == :unset
75
+ @porting_port_ins ||= PortingPortInList.new self
76
+ else
77
+ PortingPortInContext.new(self, port_in_request_sid)
78
+ end
69
79
  end
70
80
  ##
71
81
  # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
@@ -82,6 +92,42 @@ module Twilio
82
92
  end
83
93
  end
84
94
  ##
95
+ # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
96
+ # @param [String] phone_number_sid The SID of the Port In request phone number. This is a unique identifier of the phone number.
97
+ # @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if portInRequestSid was passed.
98
+ # @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
99
+ def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
100
+ if port_in_request_sid.nil?
101
+ raise ArgumentError, 'port_in_request_sid cannot be nil'
102
+ end
103
+ if phone_number_sid.nil?
104
+ raise ArgumentError, 'phone_number_sid cannot be nil'
105
+ end
106
+ if port_in_request_sid == :unset && phone_number_sid == :unset
107
+ @porting_port_in_phone_number ||= PortingPortInPhoneNumberList.new self
108
+ else
109
+ PortingPortInPhoneNumberContext.new(self, port_in_request_sid, phone_number_sid)
110
+ end
111
+ end
112
+ ##
113
+ # @param [String] port_in_request_sid The SID of the Port In request. This is a unique identifier of the port in request.
114
+ # @param [String] phone_number_sid The SID of the Port In request phone number. This is a unique identifier of the phone number.
115
+ # @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberContext] if phoneNumberSid was passed.
116
+ # @return [Twilio::REST::Numbers::V1::PortingPortInPhoneNumberList]
117
+ def porting_port_in_phone_number(port_in_request_sid=:unset, phone_number_sid=:unset)
118
+ if port_in_request_sid.nil?
119
+ raise ArgumentError, 'port_in_request_sid cannot be nil'
120
+ end
121
+ if phone_number_sid.nil?
122
+ raise ArgumentError, 'phone_number_sid cannot be nil'
123
+ end
124
+ if port_in_request_sid == :unset && phone_number_sid == :unset
125
+ @porting_port_in_phone_number ||= PortingPortInPhoneNumberList.new self
126
+ else
127
+ PortingPortInPhoneNumberContext.new(self, port_in_request_sid, phone_number_sid)
128
+ end
129
+ end
130
+ ##
85
131
  # @param [String] phone_number The phone number which portability is to be checked. Phone numbers are in E.164 format (e.g. +16175551212).
86
132
  # @return [Twilio::REST::Numbers::V1::PortingPortabilityContext] if phoneNumber was passed.
87
133
  # @return [Twilio::REST::Numbers::V1::PortingPortabilityList]
@@ -49,6 +49,8 @@ module Twilio
49
49
  # @param [String] totp_code_length Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
50
50
  # @param [String] totp_skew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
51
51
  # @param [String] default_template_sid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
52
+ # @param [String] whatsapp_msg_service_sid The SID of the Messaging Service containing WhatsApp Sender(s) that Verify will use to send WhatsApp messages to your users.
53
+ # @param [String] whatsapp_from The number to use as the WhatsApp Sender that Verify will use to send WhatsApp messages to your users.This WhatsApp Sender must be associated with a Messaging Service SID.
52
54
  # @param [Boolean] verify_event_subscription_enabled Whether to allow verifications from the service to reach the stream-events sinks if configured
53
55
  # @return [ServiceInstance] Created ServiceInstance
54
56
  def create(
@@ -69,6 +71,8 @@ module Twilio
69
71
  totp_code_length: :unset,
70
72
  totp_skew: :unset,
71
73
  default_template_sid: :unset,
74
+ whatsapp_msg_service_sid: :unset,
75
+ whatsapp_from: :unset,
72
76
  verify_event_subscription_enabled: :unset
73
77
  )
74
78
 
@@ -90,6 +94,8 @@ module Twilio
90
94
  'Totp.CodeLength' => totp_code_length,
91
95
  'Totp.Skew' => totp_skew,
92
96
  'DefaultTemplateSid' => default_template_sid,
97
+ 'Whatsapp.MsgServiceSid' => whatsapp_msg_service_sid,
98
+ 'Whatsapp.From' => whatsapp_from,
93
99
  'VerifyEventSubscriptionEnabled' => verify_event_subscription_enabled,
94
100
  })
95
101
 
@@ -259,6 +265,8 @@ module Twilio
259
265
  # @param [String] totp_code_length Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
260
266
  # @param [String] totp_skew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
261
267
  # @param [String] default_template_sid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
268
+ # @param [String] whatsapp_msg_service_sid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) to associate with the Verification Service.
269
+ # @param [String] whatsapp_from The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
262
270
  # @param [Boolean] verify_event_subscription_enabled Whether to allow verifications from the service to reach the stream-events sinks if configured
263
271
  # @return [ServiceInstance] Updated ServiceInstance
264
272
  def update(
@@ -279,6 +287,8 @@ module Twilio
279
287
  totp_code_length: :unset,
280
288
  totp_skew: :unset,
281
289
  default_template_sid: :unset,
290
+ whatsapp_msg_service_sid: :unset,
291
+ whatsapp_from: :unset,
282
292
  verify_event_subscription_enabled: :unset
283
293
  )
284
294
 
@@ -300,6 +310,8 @@ module Twilio
300
310
  'Totp.CodeLength' => totp_code_length,
301
311
  'Totp.Skew' => totp_skew,
302
312
  'DefaultTemplateSid' => default_template_sid,
313
+ 'Whatsapp.MsgServiceSid' => whatsapp_msg_service_sid,
314
+ 'Whatsapp.From' => whatsapp_from,
303
315
  'VerifyEventSubscriptionEnabled' => verify_event_subscription_enabled,
304
316
  })
305
317
 
@@ -510,6 +522,7 @@ module Twilio
510
522
  'push' => payload['push'],
511
523
  'totp' => payload['totp'],
512
524
  'default_template_sid' => payload['default_template_sid'],
525
+ 'whatsapp' => payload['whatsapp'],
513
526
  'verify_event_subscription_enabled' => payload['verify_event_subscription_enabled'],
514
527
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
515
528
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
@@ -617,6 +630,12 @@ module Twilio
617
630
  @properties['default_template_sid']
618
631
  end
619
632
 
633
+ ##
634
+ # @return [Hash]
635
+ def whatsapp
636
+ @properties['whatsapp']
637
+ end
638
+
620
639
  ##
621
640
  # @return [Boolean] Whether to allow verifications from the service to reach the stream-events sinks if configured
622
641
  def verify_event_subscription_enabled
@@ -682,6 +701,8 @@ module Twilio
682
701
  # @param [String] totp_code_length Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
683
702
  # @param [String] totp_skew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
684
703
  # @param [String] default_template_sid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
704
+ # @param [String] whatsapp_msg_service_sid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) to associate with the Verification Service.
705
+ # @param [String] whatsapp_from The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
685
706
  # @param [Boolean] verify_event_subscription_enabled Whether to allow verifications from the service to reach the stream-events sinks if configured
686
707
  # @return [ServiceInstance] Updated ServiceInstance
687
708
  def update(
@@ -702,6 +723,8 @@ module Twilio
702
723
  totp_code_length: :unset,
703
724
  totp_skew: :unset,
704
725
  default_template_sid: :unset,
726
+ whatsapp_msg_service_sid: :unset,
727
+ whatsapp_from: :unset,
705
728
  verify_event_subscription_enabled: :unset
706
729
  )
707
730
 
@@ -723,6 +746,8 @@ module Twilio
723
746
  totp_code_length: totp_code_length,
724
747
  totp_skew: totp_skew,
725
748
  default_template_sid: default_template_sid,
749
+ whatsapp_msg_service_sid: whatsapp_msg_service_sid,
750
+ whatsapp_from: whatsapp_from,
726
751
  verify_event_subscription_enabled: verify_event_subscription_enabled,
727
752
  )
728
753
  end
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '7.0.0'
2
+ VERSION = '7.0.2'
3
3
  end