twilio-ruby 5.58.3 → 5.59.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +36 -0
  4. data/README.md +3 -3
  5. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +667 -0
  6. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
  7. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +4 -4
  8. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +4 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +4 -4
  10. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
  11. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  12. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  13. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +36 -36
  14. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +188 -0
  15. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  16. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +40 -0
  17. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  18. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  19. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  20. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  21. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  22. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  23. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -5
  24. data/lib/twilio-ruby/rest/verify/v2/{verification_template.rb → template.rb} +25 -25
  25. data/lib/twilio-ruby/rest/verify/v2.rb +4 -4
  26. data/lib/twilio-ruby/rest/verify.rb +3 -3
  27. data/lib/twilio-ruby/version.rb +1 -1
  28. metadata +7 -4
@@ -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
@@ -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
 
@@ -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,20 +27,20 @@ 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[call_summaries.CallType]] call_type The call_type
42
- # @param [Array[call_summaries.CallState]] call_state The call_state
43
- # @param [Array[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
@@ -82,20 +82,20 @@ module Twilio
82
82
  # Streams CallSummariesInstance records from the API as an Enumerable.
83
83
  # This operation lazily loads records as efficiently as possible until the limit
84
84
  # is reached.
85
- # @param [Array[String]] from The from
86
- # @param [Array[String]] to The to
87
- # @param [Array[String]] from_carrier The from_carrier
88
- # @param [Array[String]] to_carrier The to_carrier
89
- # @param [Array[String]] from_country_code The from_country_code
90
- # @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
91
91
  # @param [Boolean] branded The branded
92
92
  # @param [Boolean] verified_caller The verified_caller
93
93
  # @param [Boolean] has_tag The has_tag
94
94
  # @param [String] start_time The start_time
95
95
  # @param [String] end_time The end_time
96
- # @param [Array[call_summaries.CallType]] call_type The call_type
97
- # @param [Array[call_summaries.CallState]] call_state The call_state
98
- # @param [Array[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
99
99
  # @param [call_summaries.ProcessingStateRequest] processing_state The
100
100
  # processing_state
101
101
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -153,20 +153,20 @@ module Twilio
153
153
  ##
154
154
  # Retrieve a single page of CallSummariesInstance records from the API.
155
155
  # Request is executed immediately.
156
- # @param [Array[String]] from The from
157
- # @param [Array[String]] to The to
158
- # @param [Array[String]] from_carrier The from_carrier
159
- # @param [Array[String]] to_carrier The to_carrier
160
- # @param [Array[String]] from_country_code The from_country_code
161
- # @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
162
162
  # @param [Boolean] branded The branded
163
163
  # @param [Boolean] verified_caller The verified_caller
164
164
  # @param [Boolean] has_tag The has_tag
165
165
  # @param [String] start_time The start_time
166
166
  # @param [String] end_time The end_time
167
- # @param [Array[call_summaries.CallType]] call_type The call_type
168
- # @param [Array[call_summaries.CallState]] call_state The call_state
169
- # @param [Array[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
170
170
  # @param [call_summaries.ProcessingStateRequest] processing_state The
171
171
  # processing_state
172
172
  # @param [call_summaries.SortBy] sort_by The sort_by
@@ -178,20 +178,20 @@ module Twilio
178
178
  # @return [Page] Page of CallSummariesInstance
179
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)
180
180
  params = Twilio::Values.of({
181
- 'From' => Twilio.serialize_list(from) { |e| e },
182
- 'To' => Twilio.serialize_list(to) { |e| e },
183
- 'FromCarrier' => Twilio.serialize_list(from_carrier) { |e| e },
184
- 'ToCarrier' => Twilio.serialize_list(to_carrier) { |e| e },
185
- 'FromCountryCode' => Twilio.serialize_list(from_country_code) { |e| e },
186
- '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,
187
187
  'Branded' => branded,
188
188
  'VerifiedCaller' => verified_caller,
189
189
  'HasTag' => has_tag,
190
190
  'StartTime' => start_time,
191
191
  'EndTime' => end_time,
192
- 'CallType' => Twilio.serialize_list(call_type) { |e| e },
193
- 'CallState' => Twilio.serialize_list(call_state) { |e| e },
194
- 'Direction' => Twilio.serialize_list(direction) { |e| e },
192
+ 'CallType' => call_type,
193
+ 'CallState' => call_state,
194
+ 'Direction' => direction,
195
195
  'ProcessingState' => processing_state,
196
196
  'SortBy' => sort_by,
197
197
  'Subaccount' => subaccount,
@@ -0,0 +1,188 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Numbers < Domain
12
+ class V2 < Version
13
+ class RegulatoryComplianceList < ListResource
14
+ class BundleContext < InstanceContext
15
+ ##
16
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
17
+ class BundleCopyList < ListResource
18
+ ##
19
+ # Initialize the BundleCopyList
20
+ # @param [Version] version Version that contains the resource
21
+ # @param [String] bundle_sid The unique string that we created to identify the
22
+ # Bundle resource.
23
+ # @return [BundleCopyList] BundleCopyList
24
+ def initialize(version, bundle_sid: nil)
25
+ super(version)
26
+
27
+ # Path Solution
28
+ @solution = {bundle_sid: bundle_sid}
29
+ @uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/Copies"
30
+ end
31
+
32
+ ##
33
+ # Create the BundleCopyInstance
34
+ # @param [String] friendly_name The string that you assigned to describe the
35
+ # copied bundle.
36
+ # @return [BundleCopyInstance] Created BundleCopyInstance
37
+ def create(friendly_name: :unset)
38
+ data = Twilio::Values.of({'FriendlyName' => friendly_name, })
39
+
40
+ payload = @version.create('POST', @uri, data: data)
41
+
42
+ BundleCopyInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
43
+ end
44
+
45
+ ##
46
+ # Provide a user friendly representation
47
+ def to_s
48
+ '#<Twilio.Numbers.V2.BundleCopyList>'
49
+ end
50
+ end
51
+
52
+ ##
53
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
54
+ class BundleCopyPage < Page
55
+ ##
56
+ # Initialize the BundleCopyPage
57
+ # @param [Version] version Version that contains the resource
58
+ # @param [Response] response Response from the API
59
+ # @param [Hash] solution Path solution for the resource
60
+ # @return [BundleCopyPage] BundleCopyPage
61
+ def initialize(version, response, solution)
62
+ super(version, response)
63
+
64
+ # Path Solution
65
+ @solution = solution
66
+ end
67
+
68
+ ##
69
+ # Build an instance of BundleCopyInstance
70
+ # @param [Hash] payload Payload response from the API
71
+ # @return [BundleCopyInstance] BundleCopyInstance
72
+ def get_instance(payload)
73
+ BundleCopyInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid], )
74
+ end
75
+
76
+ ##
77
+ # Provide a user friendly representation
78
+ def to_s
79
+ '<Twilio.Numbers.V2.BundleCopyPage>'
80
+ end
81
+ end
82
+
83
+ ##
84
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
85
+ class BundleCopyInstance < InstanceResource
86
+ ##
87
+ # Initialize the BundleCopyInstance
88
+ # @param [Version] version Version that contains the resource
89
+ # @param [Hash] payload payload that contains response from Twilio
90
+ # @param [String] bundle_sid The unique string that we created to identify the
91
+ # Bundle resource.
92
+ # @return [BundleCopyInstance] BundleCopyInstance
93
+ def initialize(version, payload, bundle_sid: nil)
94
+ super(version)
95
+
96
+ # Marshaled Properties
97
+ @properties = {
98
+ 'sid' => payload['sid'],
99
+ 'account_sid' => payload['account_sid'],
100
+ 'regulation_sid' => payload['regulation_sid'],
101
+ 'friendly_name' => payload['friendly_name'],
102
+ 'status' => payload['status'],
103
+ 'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
104
+ 'email' => payload['email'],
105
+ 'status_callback' => payload['status_callback'],
106
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
107
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
108
+ }
109
+ end
110
+
111
+ ##
112
+ # @return [String] The unique string that identifies the resource
113
+ def sid
114
+ @properties['sid']
115
+ end
116
+
117
+ ##
118
+ # @return [String] The SID of the Account that created the resource
119
+ def account_sid
120
+ @properties['account_sid']
121
+ end
122
+
123
+ ##
124
+ # @return [String] The unique string of a regulation
125
+ def regulation_sid
126
+ @properties['regulation_sid']
127
+ end
128
+
129
+ ##
130
+ # @return [String] The string that you assigned to describe the resource
131
+ def friendly_name
132
+ @properties['friendly_name']
133
+ end
134
+
135
+ ##
136
+ # @return [bundle_copy.Status] The verification status of the Bundle resource
137
+ def status
138
+ @properties['status']
139
+ end
140
+
141
+ ##
142
+ # @return [Time] The ISO 8601 date and time in GMT when the resource will be valid until
143
+ def valid_until
144
+ @properties['valid_until']
145
+ end
146
+
147
+ ##
148
+ # @return [String] The email address
149
+ def email
150
+ @properties['email']
151
+ end
152
+
153
+ ##
154
+ # @return [String] The URL we call to inform your application of status changes
155
+ def status_callback
156
+ @properties['status_callback']
157
+ end
158
+
159
+ ##
160
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
161
+ def date_created
162
+ @properties['date_created']
163
+ end
164
+
165
+ ##
166
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
167
+ def date_updated
168
+ @properties['date_updated']
169
+ end
170
+
171
+ ##
172
+ # Provide a user friendly representation
173
+ def to_s
174
+ "<Twilio.Numbers.V2.BundleCopyInstance>"
175
+ end
176
+
177
+ ##
178
+ # Provide a detailed, user friendly representation
179
+ def inspect
180
+ "<Twilio.Numbers.V2.BundleCopyInstance>"
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
186
+ end
187
+ end
188
+ end