twilio-ruby 5.58.0 → 5.59.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +90 -0
  4. data/README.md +3 -3
  5. data/lib/twilio-ruby/http/http_client.rb +1 -1
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -4
  10. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
  12. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  13. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  14. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  15. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  16. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +44 -38
  17. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
  18. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +9 -2
  19. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  20. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
  21. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  22. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +59 -14
  23. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  24. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  25. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  26. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  27. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  28. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  29. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  30. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  31. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  32. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +30 -20
  33. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  34. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +6 -2
  35. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +36 -11
  36. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +11 -9
  37. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +8 -8
  38. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  39. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -8
  40. data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
  41. data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
  42. data/lib/twilio-ruby/rest/verify.rb +6 -0
  43. data/lib/twilio-ruby/version.rb +1 -1
  44. metadata +9 -3
@@ -160,7 +160,7 @@ module Twilio
160
160
  # section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
161
161
  # @param [String] twiml TwiML instructions for the call Twilio will use without
162
162
  # fetching Twiml from url parameter. If both `twiml` and `url` are provided then
163
- # `twiml` parameter will be ignored.
163
+ # `twiml` parameter will be ignored. Max 4000 characters.
164
164
  # @param [String] application_sid The SID of the Application resource that will
165
165
  # handle the call, if the call will be handled by an application.
166
166
  # @return [CallInstance] Created CallInstance
@@ -442,6 +442,7 @@ module Twilio
442
442
  @feedback = nil
443
443
  @events = nil
444
444
  @payments = nil
445
+ @siprec = nil
445
446
  end
446
447
 
447
448
  ##
@@ -598,6 +599,24 @@ module Twilio
598
599
  @payments
599
600
  end
600
601
 
602
+ ##
603
+ # Access the siprec
604
+ # @return [SiprecList]
605
+ # @return [SiprecContext] if sid was passed.
606
+ def siprec(sid=:unset)
607
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
608
+
609
+ if sid != :unset
610
+ return SiprecContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
611
+ end
612
+
613
+ unless @siprec
614
+ @siprec = SiprecList.new(@version, account_sid: @solution[:account_sid], call_sid: @solution[:sid], )
615
+ end
616
+
617
+ @siprec
618
+ end
619
+
601
620
  ##
602
621
  # Provide a user friendly representation
603
622
  def to_s
@@ -932,6 +951,13 @@ module Twilio
932
951
  context.payments
933
952
  end
934
953
 
954
+ ##
955
+ # Access the siprec
956
+ # @return [siprec] siprec
957
+ def siprec
958
+ context.siprec
959
+ end
960
+
935
961
  ##
936
962
  # Provide a user friendly representation
937
963
  def to_s
@@ -202,9 +202,9 @@ module Twilio
202
202
  # @param [String] address_sid The SID of the Address resource we should associate
203
203
  # with the new phone number. Some regions require addresses to meet local
204
204
  # regulations.
205
- # @param [local.EmergencyStatus] emergency_status The configuration status
206
- # parameter that determines whether the new phone number is enabled for emergency
207
- # calling.
205
+ # @param [local.EmergencyStatus] emergency_status The parameter displays if
206
+ # emergency calling is enabled for this number. Active numbers may place emergency
207
+ # calls by dialing valid emergency numbers for the country.
208
208
  # @param [String] emergency_address_sid The SID of the emergency address
209
209
  # configuration to use for emergency calling from the new phone number.
210
210
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -511,7 +511,7 @@ module Twilio
511
511
  end
512
512
 
513
513
  ##
514
- # @return [local.EmergencyStatus] Whether the phone number is enabled for emergency calling
514
+ # @return [local.EmergencyStatus] Displays if emergency calling is enabled for this number.
515
515
  def emergency_status
516
516
  @properties['emergency_status']
517
517
  end
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [mobile.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [mobile.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -510,7 +510,7 @@ module Twilio
510
510
  end
511
511
 
512
512
  ##
513
- # @return [mobile.EmergencyStatus] Whether the phone number is enabled for emergency calling
513
+ # @return [mobile.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
514
  def emergency_status
515
515
  @properties['emergency_status']
516
516
  end
@@ -201,9 +201,9 @@ module Twilio
201
201
  # @param [String] address_sid The SID of the Address resource we should associate
202
202
  # with the new phone number. Some regions require addresses to meet local
203
203
  # regulations.
204
- # @param [toll_free.EmergencyStatus] emergency_status The configuration status
205
- # parameter that determines whether the new phone number is enabled for emergency
206
- # calling.
204
+ # @param [toll_free.EmergencyStatus] emergency_status The parameter displays if
205
+ # emergency calling is enabled for this number. Active numbers may place emergency
206
+ # calls by dialing valid emergency numbers for the country.
207
207
  # @param [String] emergency_address_sid The SID of the emergency address
208
208
  # configuration to use for emergency calling from the new phone number.
209
209
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -510,7 +510,7 @@ module Twilio
510
510
  end
511
511
 
512
512
  ##
513
- # @return [toll_free.EmergencyStatus] Whether the phone number is enabled for emergency calling
513
+ # @return [toll_free.EmergencyStatus] Displays if emergency calling is enabled for this number.
514
514
  def emergency_status
515
515
  @properties['emergency_status']
516
516
  end
@@ -199,9 +199,9 @@ module Twilio
199
199
  # @param [String] voice_url The URL that we should call to answer a call to the
200
200
  # new phone number. The `voice_url` will not be called if a
201
201
  # `voice_application_sid` or a `trunk_sid` is set.
202
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
203
- # configuration status parameter that determines whether the new phone number is
204
- # enabled for emergency calling.
202
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
203
+ # displays if emergency calling is enabled for this number. Active numbers may
204
+ # place emergency calls by dialing valid emergency numbers for the country.
205
205
  # @param [String] emergency_address_sid The SID of the emergency address
206
206
  # configuration to use for emergency calling from the new phone number.
207
207
  # @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
@@ -387,9 +387,9 @@ module Twilio
387
387
  # @param [String] voice_url The URL that we should call to answer a call to the
388
388
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
389
389
  # a `trunk_sid` is set.
390
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
391
- # configuration status parameter that determines whether the phone number is
392
- # enabled for emergency calling.
390
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
391
+ # displays if emergency calling is enabled for this number. Active numbers may
392
+ # place emergency calls by dialing valid emergency numbers for the country.
393
393
  # @param [String] emergency_address_sid The SID of the emergency address
394
394
  # configuration to use for emergency calling from this phone number.
395
395
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -745,7 +745,7 @@ module Twilio
745
745
  end
746
746
 
747
747
  ##
748
- # @return [incoming_phone_number.EmergencyStatus] Whether the phone number is enabled for emergency calling
748
+ # @return [incoming_phone_number.EmergencyStatus] Displays if emergency calling is enabled for this number.
749
749
  def emergency_status
750
750
  @properties['emergency_status']
751
751
  end
@@ -812,9 +812,9 @@ module Twilio
812
812
  # @param [String] voice_url The URL that we should call to answer a call to the
813
813
  # phone number. The `voice_url` will not be called if a `voice_application_sid` or
814
814
  # a `trunk_sid` is set.
815
- # @param [incoming_phone_number.EmergencyStatus] emergency_status The
816
- # configuration status parameter that determines whether the phone number is
817
- # enabled for emergency calling.
815
+ # @param [incoming_phone_number.EmergencyStatus] emergency_status The parameter
816
+ # displays if emergency calling is enabled for this number. Active numbers may
817
+ # place emergency calls by dialing valid emergency numbers for the country.
818
818
  # @param [String] emergency_address_sid The SID of the emergency address
819
819
  # configuration to use for emergency calling from this phone number.
820
820
  # @param [String] trunk_sid The SID of the Trunk we should use to handle phone
@@ -63,6 +63,8 @@ module Twilio
63
63
  # Lists MessageInstance records from the API as a list.
64
64
  # Unlike stream(), this operation is eager and will load `limit` records into
65
65
  # memory before returning.
66
+ # @param [message.OrderType] order The sort order of the returned messages. Can
67
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
66
68
  # @param [Integer] limit Upper limit for the number of records to return. stream()
67
69
  # guarantees to never return more than limit. Default is no limit
68
70
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -70,14 +72,16 @@ module Twilio
70
72
  # but a limit is defined, stream() will attempt to read the limit with the most
71
73
  # efficient page size, i.e. min(limit, 1000)
72
74
  # @return [Array] Array of up to limit results
73
- def list(limit: nil, page_size: nil)
74
- self.stream(limit: limit, page_size: page_size).entries
75
+ def list(order: :unset, limit: nil, page_size: nil)
76
+ self.stream(order: order, limit: limit, page_size: page_size).entries
75
77
  end
76
78
 
77
79
  ##
78
80
  # Streams MessageInstance records from the API as an Enumerable.
79
81
  # This operation lazily loads records as efficiently as possible until the limit
80
82
  # is reached.
83
+ # @param [message.OrderType] order The sort order of the returned messages. Can
84
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
81
85
  # @param [Integer] limit Upper limit for the number of records to return. stream()
82
86
  # guarantees to never return more than limit. Default is no limit.
83
87
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -85,10 +89,10 @@ module Twilio
85
89
  # but a limit is defined, stream() will attempt to read the limit with the most
86
90
  # efficient page size, i.e. min(limit, 1000)
87
91
  # @return [Enumerable] Enumerable that will yield up to limit results
88
- def stream(limit: nil, page_size: nil)
92
+ def stream(order: :unset, limit: nil, page_size: nil)
89
93
  limits = @version.read_limits(limit, page_size)
90
94
 
91
- page = self.page(page_size: limits[:page_size], )
95
+ page = self.page(order: order, page_size: limits[:page_size], )
92
96
 
93
97
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
94
98
  end
@@ -110,12 +114,15 @@ module Twilio
110
114
  ##
111
115
  # Retrieve a single page of MessageInstance records from the API.
112
116
  # Request is executed immediately.
117
+ # @param [message.OrderType] order The sort order of the returned messages. Can
118
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
113
119
  # @param [String] page_token PageToken provided by the API
114
120
  # @param [Integer] page_number Page Number, this value is simply for client state
115
121
  # @param [Integer] page_size Number of records to return, defaults to 50
116
122
  # @return [Page] Page of MessageInstance
117
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
123
+ def page(order: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
118
124
  params = Twilio::Values.of({
125
+ 'Order' => order,
119
126
  'PageToken' => page_token,
120
127
  'Page' => page_number,
121
128
  'PageSize' => page_size,
@@ -107,8 +107,14 @@ module Twilio
107
107
  # @param [String] removed_from_conversation_sound The name of the sound to play to
108
108
  # a user when they are removed from a conversation and
109
109
  # `removed_from_conversation.enabled` is `true`.
110
+ # @param [Boolean] new_message_with_media_enabled Whether to send a notification
111
+ # when a new message with media/file attachments is added to a conversation. The
112
+ # default is `false`.
113
+ # @param [String] new_message_with_media_template The template to use to create
114
+ # the notification text displayed when a new message with media/file attachments
115
+ # is added to a conversation and `new_message.attachments.enabled` is `true`.
110
116
  # @return [NotificationInstance] Updated NotificationInstance
111
- def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
117
+ def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset, new_message_with_media_enabled: :unset, new_message_with_media_template: :unset)
112
118
  data = Twilio::Values.of({
113
119
  'LogEnabled' => log_enabled,
114
120
  'NewMessage.Enabled' => new_message_enabled,
@@ -121,6 +127,8 @@ module Twilio
121
127
  'RemovedFromConversation.Enabled' => removed_from_conversation_enabled,
122
128
  'RemovedFromConversation.Template' => removed_from_conversation_template,
123
129
  'RemovedFromConversation.Sound' => removed_from_conversation_sound,
130
+ 'NewMessage.WithMedia.Enabled' => new_message_with_media_enabled,
131
+ 'NewMessage.WithMedia.Template' => new_message_with_media_template,
124
132
  })
125
133
 
126
134
  payload = @version.update('POST', @uri, data: data)
@@ -261,8 +269,14 @@ module Twilio
261
269
  # @param [String] removed_from_conversation_sound The name of the sound to play to
262
270
  # a user when they are removed from a conversation and
263
271
  # `removed_from_conversation.enabled` is `true`.
272
+ # @param [Boolean] new_message_with_media_enabled Whether to send a notification
273
+ # when a new message with media/file attachments is added to a conversation. The
274
+ # default is `false`.
275
+ # @param [String] new_message_with_media_template The template to use to create
276
+ # the notification text displayed when a new message with media/file attachments
277
+ # is added to a conversation and `new_message.attachments.enabled` is `true`.
264
278
  # @return [NotificationInstance] Updated NotificationInstance
265
- def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset)
279
+ def update(log_enabled: :unset, new_message_enabled: :unset, new_message_template: :unset, new_message_sound: :unset, new_message_badge_count_enabled: :unset, added_to_conversation_enabled: :unset, added_to_conversation_template: :unset, added_to_conversation_sound: :unset, removed_from_conversation_enabled: :unset, removed_from_conversation_template: :unset, removed_from_conversation_sound: :unset, new_message_with_media_enabled: :unset, new_message_with_media_template: :unset)
266
280
  context.update(
267
281
  log_enabled: log_enabled,
268
282
  new_message_enabled: new_message_enabled,
@@ -275,6 +289,8 @@ module Twilio
275
289
  removed_from_conversation_enabled: removed_from_conversation_enabled,
276
290
  removed_from_conversation_template: removed_from_conversation_template,
277
291
  removed_from_conversation_sound: removed_from_conversation_sound,
292
+ new_message_with_media_enabled: new_message_with_media_enabled,
293
+ new_message_with_media_template: new_message_with_media_template,
278
294
  )
279
295
  end
280
296
 
@@ -72,6 +72,8 @@ module Twilio
72
72
  # Lists MessageInstance records from the API as a list.
73
73
  # Unlike stream(), this operation is eager and will load `limit` records into
74
74
  # memory before returning.
75
+ # @param [message.OrderType] order The sort order of the returned messages. Can
76
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
75
77
  # @param [Integer] limit Upper limit for the number of records to return. stream()
76
78
  # guarantees to never return more than limit. Default is no limit
77
79
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -79,14 +81,16 @@ module Twilio
79
81
  # but a limit is defined, stream() will attempt to read the limit with the most
80
82
  # efficient page size, i.e. min(limit, 1000)
81
83
  # @return [Array] Array of up to limit results
82
- def list(limit: nil, page_size: nil)
83
- self.stream(limit: limit, page_size: page_size).entries
84
+ def list(order: :unset, limit: nil, page_size: nil)
85
+ self.stream(order: order, limit: limit, page_size: page_size).entries
84
86
  end
85
87
 
86
88
  ##
87
89
  # Streams MessageInstance records from the API as an Enumerable.
88
90
  # This operation lazily loads records as efficiently as possible until the limit
89
91
  # is reached.
92
+ # @param [message.OrderType] order The sort order of the returned messages. Can
93
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
90
94
  # @param [Integer] limit Upper limit for the number of records to return. stream()
91
95
  # guarantees to never return more than limit. Default is no limit.
92
96
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -94,10 +98,10 @@ module Twilio
94
98
  # but a limit is defined, stream() will attempt to read the limit with the most
95
99
  # efficient page size, i.e. min(limit, 1000)
96
100
  # @return [Enumerable] Enumerable that will yield up to limit results
97
- def stream(limit: nil, page_size: nil)
101
+ def stream(order: :unset, limit: nil, page_size: nil)
98
102
  limits = @version.read_limits(limit, page_size)
99
103
 
100
- page = self.page(page_size: limits[:page_size], )
104
+ page = self.page(order: order, page_size: limits[:page_size], )
101
105
 
102
106
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
103
107
  end
@@ -119,12 +123,15 @@ module Twilio
119
123
  ##
120
124
  # Retrieve a single page of MessageInstance records from the API.
121
125
  # Request is executed immediately.
126
+ # @param [message.OrderType] order The sort order of the returned messages. Can
127
+ # be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
122
128
  # @param [String] page_token PageToken provided by the API
123
129
  # @param [Integer] page_number Page Number, this value is simply for client state
124
130
  # @param [Integer] page_size Number of records to return, defaults to 50
125
131
  # @return [Page] Page of MessageInstance
126
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
132
+ def page(order: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
127
133
  params = Twilio::Values.of({
134
+ 'Order' => order,
128
135
  'PageToken' => page_token,
129
136
  'Page' => page_number,
130
137
  'PageSize' => page_size,
@@ -167,6 +167,7 @@ module Twilio
167
167
  'notifications' => payload['notifications'],
168
168
  'markdown' => payload['markdown'],
169
169
  'url' => payload['url'],
170
+ 'flex_insights_hr' => payload['flex_insights_hr'],
170
171
  }
171
172
 
172
173
  # Context
@@ -419,6 +420,12 @@ module Twilio
419
420
  @properties['url']
420
421
  end
421
422
 
423
+ ##
424
+ # @return [Hash] Object that controls workspace reporting
425
+ def flex_insights_hr
426
+ @properties['flex_insights_hr']
427
+ end
428
+
422
429
  ##
423
430
  # Fetch the ConfigurationInstance
424
431
  # @param [String] ui_version The Pinned UI version of the Configuration resource
@@ -27,24 +27,25 @@ module Twilio
27
27
  # Lists CallSummariesInstance records from the API as a list.
28
28
  # Unlike stream(), this operation is eager and will load `limit` records into
29
29
  # memory before returning.
30
- # @param [Array[String]] from The from
31
- # @param [Array[String]] to The to
32
- # @param [Array[String]] from_carrier The from_carrier
33
- # @param [Array[String]] to_carrier The to_carrier
34
- # @param [Array[String]] from_country_code The from_country_code
35
- # @param [Array[String]] to_country_code The to_country_code
30
+ # @param [String] from The from
31
+ # @param [String] to The to
32
+ # @param [String] from_carrier The from_carrier
33
+ # @param [String] to_carrier The to_carrier
34
+ # @param [String] from_country_code The from_country_code
35
+ # @param [String] to_country_code The to_country_code
36
36
  # @param [Boolean] branded The branded
37
37
  # @param [Boolean] verified_caller The verified_caller
38
38
  # @param [Boolean] has_tag The has_tag
39
39
  # @param [String] start_time The start_time
40
40
  # @param [String] end_time The end_time
41
- # @param [Array[String]] call_type The call_type
42
- # @param [Array[String]] call_state The call_state
43
- # @param [call_summaries.CallDirection] direction The direction
41
+ # @param [String] call_type The call_type
42
+ # @param [String] call_state The call_state
43
+ # @param [String] direction The direction
44
44
  # @param [call_summaries.ProcessingStateRequest] processing_state The
45
45
  # processing_state
46
46
  # @param [call_summaries.SortBy] sort_by The sort_by
47
47
  # @param [String] subaccount The subaccount
48
+ # @param [Boolean] abnormal_session The abnormal_session
48
49
  # @param [Integer] limit Upper limit for the number of records to return. stream()
49
50
  # guarantees to never return more than limit. Default is no limit
50
51
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -52,7 +53,7 @@ module Twilio
52
53
  # but a limit is defined, stream() will attempt to read the limit with the most
53
54
  # efficient page size, i.e. min(limit, 1000)
54
55
  # @return [Array] Array of up to limit results
55
- def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, limit: nil, page_size: nil)
56
+ def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
56
57
  self.stream(
57
58
  from: from,
58
59
  to: to,
@@ -71,6 +72,7 @@ module Twilio
71
72
  processing_state: processing_state,
72
73
  sort_by: sort_by,
73
74
  subaccount: subaccount,
75
+ abnormal_session: abnormal_session,
74
76
  limit: limit,
75
77
  page_size: page_size
76
78
  ).entries
@@ -80,24 +82,25 @@ module Twilio
80
82
  # Streams CallSummariesInstance records from the API as an Enumerable.
81
83
  # This operation lazily loads records as efficiently as possible until the limit
82
84
  # is reached.
83
- # @param [Array[String]] from The from
84
- # @param [Array[String]] to The to
85
- # @param [Array[String]] from_carrier The from_carrier
86
- # @param [Array[String]] to_carrier The to_carrier
87
- # @param [Array[String]] from_country_code The from_country_code
88
- # @param [Array[String]] to_country_code The to_country_code
85
+ # @param [String] from The from
86
+ # @param [String] to The to
87
+ # @param [String] from_carrier The from_carrier
88
+ # @param [String] to_carrier The to_carrier
89
+ # @param [String] from_country_code The from_country_code
90
+ # @param [String] to_country_code The to_country_code
89
91
  # @param [Boolean] branded The branded
90
92
  # @param [Boolean] verified_caller The verified_caller
91
93
  # @param [Boolean] has_tag The has_tag
92
94
  # @param [String] start_time The start_time
93
95
  # @param [String] end_time The end_time
94
- # @param [Array[String]] call_type The call_type
95
- # @param [Array[String]] call_state The call_state
96
- # @param [call_summaries.CallDirection] direction The direction
96
+ # @param [String] call_type The call_type
97
+ # @param [String] call_state The call_state
98
+ # @param [String] direction The direction
97
99
  # @param [call_summaries.ProcessingStateRequest] processing_state The
98
100
  # processing_state
99
101
  # @param [call_summaries.SortBy] sort_by The sort_by
100
102
  # @param [String] subaccount The subaccount
103
+ # @param [Boolean] abnormal_session The abnormal_session
101
104
  # @param [Integer] limit Upper limit for the number of records to return. stream()
102
105
  # guarantees to never return more than limit. Default is no limit.
103
106
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -105,7 +108,7 @@ module Twilio
105
108
  # but a limit is defined, stream() will attempt to read the limit with the most
106
109
  # efficient page size, i.e. min(limit, 1000)
107
110
  # @return [Enumerable] Enumerable that will yield up to limit results
108
- def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, limit: nil, page_size: nil)
111
+ def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
109
112
  limits = @version.read_limits(limit, page_size)
110
113
 
111
114
  page = self.page(
@@ -126,6 +129,7 @@ module Twilio
126
129
  processing_state: processing_state,
127
130
  sort_by: sort_by,
128
131
  subaccount: subaccount,
132
+ abnormal_session: abnormal_session,
129
133
  page_size: limits[:page_size],
130
134
  )
131
135
 
@@ -149,47 +153,49 @@ module Twilio
149
153
  ##
150
154
  # Retrieve a single page of CallSummariesInstance records from the API.
151
155
  # Request is executed immediately.
152
- # @param [Array[String]] from The from
153
- # @param [Array[String]] to The to
154
- # @param [Array[String]] from_carrier The from_carrier
155
- # @param [Array[String]] to_carrier The to_carrier
156
- # @param [Array[String]] from_country_code The from_country_code
157
- # @param [Array[String]] to_country_code The to_country_code
156
+ # @param [String] from The from
157
+ # @param [String] to The to
158
+ # @param [String] from_carrier The from_carrier
159
+ # @param [String] to_carrier The to_carrier
160
+ # @param [String] from_country_code The from_country_code
161
+ # @param [String] to_country_code The to_country_code
158
162
  # @param [Boolean] branded The branded
159
163
  # @param [Boolean] verified_caller The verified_caller
160
164
  # @param [Boolean] has_tag The has_tag
161
165
  # @param [String] start_time The start_time
162
166
  # @param [String] end_time The end_time
163
- # @param [Array[String]] call_type The call_type
164
- # @param [Array[String]] call_state The call_state
165
- # @param [call_summaries.CallDirection] direction The direction
167
+ # @param [String] call_type The call_type
168
+ # @param [String] call_state The call_state
169
+ # @param [String] direction The direction
166
170
  # @param [call_summaries.ProcessingStateRequest] processing_state The
167
171
  # processing_state
168
172
  # @param [call_summaries.SortBy] sort_by The sort_by
169
173
  # @param [String] subaccount The subaccount
174
+ # @param [Boolean] abnormal_session The abnormal_session
170
175
  # @param [String] page_token PageToken provided by the API
171
176
  # @param [Integer] page_number Page Number, this value is simply for client state
172
177
  # @param [Integer] page_size Number of records to return, defaults to 50
173
178
  # @return [Page] Page of CallSummariesInstance
174
- def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
179
+ def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
175
180
  params = Twilio::Values.of({
176
- 'From' => Twilio.serialize_list(from) { |e| e },
177
- 'To' => Twilio.serialize_list(to) { |e| e },
178
- 'FromCarrier' => Twilio.serialize_list(from_carrier) { |e| e },
179
- 'ToCarrier' => Twilio.serialize_list(to_carrier) { |e| e },
180
- 'FromCountryCode' => Twilio.serialize_list(from_country_code) { |e| e },
181
- 'ToCountryCode' => Twilio.serialize_list(to_country_code) { |e| e },
181
+ 'From' => from,
182
+ 'To' => to,
183
+ 'FromCarrier' => from_carrier,
184
+ 'ToCarrier' => to_carrier,
185
+ 'FromCountryCode' => from_country_code,
186
+ 'ToCountryCode' => to_country_code,
182
187
  'Branded' => branded,
183
188
  'VerifiedCaller' => verified_caller,
184
189
  'HasTag' => has_tag,
185
190
  'StartTime' => start_time,
186
191
  'EndTime' => end_time,
187
- 'CallType' => Twilio.serialize_list(call_type) { |e| e },
188
- 'CallState' => Twilio.serialize_list(call_state) { |e| e },
192
+ 'CallType' => call_type,
193
+ 'CallState' => call_state,
189
194
  'Direction' => direction,
190
195
  'ProcessingState' => processing_state,
191
196
  'SortBy' => sort_by,
192
197
  'Subaccount' => subaccount,
198
+ 'AbnormalSession' => abnormal_session,
193
199
  'PageToken' => page_token,
194
200
  'Page' => page_number,
195
201
  'PageSize' => page_size,
@@ -112,12 +112,19 @@ module Twilio
112
112
  # @param [String] brand_type Type of brand being created. One of: "STANDARD",
113
113
  # "STARTER". STARTER is for low volume, starter use cases. STANDARD is for all
114
114
  # other use cases.
115
+ # @param [Boolean] mock A boolean that specifies whether brand should be a mock or
116
+ # not. If true, brand will be registered as a mock brand. Defaults to false if no
117
+ # value is provided.
118
+ # @param [Boolean] skip_automatic_sec_vet A flag to disable automatic secondary
119
+ # vetting for brands which it would otherwise be done.
115
120
  # @return [BrandRegistrationInstance] Created BrandRegistrationInstance
116
- def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset)
121
+ def create(customer_profile_bundle_sid: nil, a2p_profile_bundle_sid: nil, brand_type: :unset, mock: :unset, skip_automatic_sec_vet: :unset)
117
122
  data = Twilio::Values.of({
118
123
  'CustomerProfileBundleSid' => customer_profile_bundle_sid,
119
124
  'A2PProfileBundleSid' => a2p_profile_bundle_sid,
120
125
  'BrandType' => brand_type,
126
+ 'Mock' => mock,
127
+ 'SkipAutomaticSecVet' => skip_automatic_sec_vet,
121
128
  })
122
129
 
123
130
  payload = @version.create('POST', @uri, data: data)
@@ -229,6 +236,11 @@ module Twilio
229
236
  'failure_reason' => payload['failure_reason'],
230
237
  'url' => payload['url'],
231
238
  'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
239
+ 'identity_status' => payload['identity_status'],
240
+ 'russell_3000' => payload['russell_3000'],
241
+ 'tax_exempt_status' => payload['tax_exempt_status'],
242
+ 'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
243
+ 'mock' => payload['mock'],
232
244
  }
233
245
 
234
246
  # Context
@@ -319,6 +331,36 @@ module Twilio
319
331
  @properties['brand_score']
320
332
  end
321
333
 
334
+ ##
335
+ # @return [brand_registration.IdentityStatus] Identity Status
336
+ def identity_status
337
+ @properties['identity_status']
338
+ end
339
+
340
+ ##
341
+ # @return [Boolean] Russell 3000
342
+ def russell_3000
343
+ @properties['russell_3000']
344
+ end
345
+
346
+ ##
347
+ # @return [String] Tax Exempt Status
348
+ def tax_exempt_status
349
+ @properties['tax_exempt_status']
350
+ end
351
+
352
+ ##
353
+ # @return [Boolean] Skip Automatic Secondary Vetting
354
+ def skip_automatic_sec_vet
355
+ @properties['skip_automatic_sec_vet']
356
+ end
357
+
358
+ ##
359
+ # @return [Boolean] A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.
360
+ def mock
361
+ @properties['mock']
362
+ end
363
+
322
364
  ##
323
365
  # Fetch the BrandRegistrationInstance
324
366
  # @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
@@ -33,8 +33,8 @@ module Twilio
33
33
  # Create the UsAppToPersonInstance
34
34
  # @param [String] brand_registration_sid A2P Brand Registration SID
35
35
  # @param [String] description A short description of what this SMS campaign does.
36
- # @param [Array[String]] message_samples Message samples, up to 5 sample messages,
37
- # <=1024 chars each.
36
+ # @param [Array[String]] message_samples Message samples, at least 2 and up to 5
37
+ # sample messages, <=1024 chars each.
38
38
  # @param [String] us_app_to_person_usecase A2P Campaign Use Case. Examples: [ 2FA,
39
39
  # EMERGENCY, MARKETING..]
40
40
  # @param [Boolean] has_embedded_links Indicates that this SMS campaign will send
@@ -273,6 +273,7 @@ module Twilio
273
273
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
274
274
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
275
275
  'url' => payload['url'],
276
+ 'mock' => payload['mock'],
276
277
  }
277
278
 
278
279
  # Context
@@ -391,6 +392,12 @@ module Twilio
391
392
  @properties['url']
392
393
  end
393
394
 
395
+ ##
396
+ # @return [Boolean] A boolean that specifies whether campaign is a mock or not.
397
+ def mock
398
+ @properties['mock']
399
+ end
400
+
394
401
  ##
395
402
  # Delete the UsAppToPersonInstance
396
403
  # @return [Boolean] true if delete succeeds, false otherwise