twilio-ruby 5.9.0 → 5.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +12 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +36 -24
  5. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +34 -25
  6. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +30 -21
  7. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +1 -1
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +10 -4
  9. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -2
  10. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +2 -4
  11. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +1 -1
  12. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -4
  13. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +6 -7
  14. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +1 -1
  15. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -1
  16. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +12 -4
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +11 -6
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +10 -8
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +10 -8
  20. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +11 -9
  21. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +0 -1
  22. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
  23. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +9 -6
  24. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +9 -3
  25. data/lib/twilio-ruby/rest/api/v2010/account.rb +13 -9
  26. data/lib/twilio-ruby/rest/chat/v1/credential.rb +42 -24
  27. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +38 -18
  28. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +60 -24
  29. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +28 -18
  30. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +33 -24
  31. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +26 -16
  32. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +4 -2
  33. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +43 -24
  34. data/lib/twilio-ruby/rest/chat/v1/service.rb +74 -44
  35. data/lib/twilio-ruby/rest/chat/v2/credential.rb +61 -27
  36. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +41 -18
  37. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +43 -25
  38. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +76 -37
  39. data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +432 -0
  40. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +90 -35
  41. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +23 -16
  42. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +4 -2
  43. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +43 -25
  44. data/lib/twilio-ruby/rest/chat/v2/service.rb +93 -53
  45. data/lib/twilio-ruby/rest/chat.rb +4 -2
  46. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +42 -24
  47. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +38 -18
  48. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +60 -24
  49. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +28 -18
  50. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +33 -24
  51. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +26 -16
  52. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +4 -2
  53. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +43 -24
  54. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +74 -44
  55. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +61 -27
  56. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +41 -18
  57. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +43 -25
  58. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +76 -37
  59. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +432 -0
  60. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +90 -35
  61. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +23 -16
  62. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +4 -2
  63. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +43 -25
  64. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +93 -53
  65. data/lib/twilio-ruby/rest/ip_messaging.rb +4 -2
  66. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +12 -11
  67. data/lib/twilio-ruby/rest/monitor/v1/event.rb +11 -11
  68. data/lib/twilio-ruby/rest/monitor.rb +1 -1
  69. data/lib/twilio-ruby/rest/notify/v1/credential.rb +47 -22
  70. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +59 -26
  71. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +104 -29
  72. data/lib/twilio-ruby/rest/notify/v1/service.rb +86 -48
  73. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +2 -2
  74. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  75. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +22 -16
  76. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +21 -15
  77. data/lib/twilio-ruby/rest/preview/understand/assistant/intent/field.rb +17 -14
  78. data/lib/twilio-ruby/rest/preview/understand/assistant/intent/sample.rb +36 -25
  79. data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +21 -15
  80. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +19 -13
  81. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +42 -28
  82. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +39 -21
  83. data/lib/twilio-ruby/rest/preview.rb +10 -9
  84. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +5 -5
  85. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -4
  86. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +3 -3
  87. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +5 -5
  88. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +12 -13
  89. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -22
  90. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +7 -5
  91. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +31 -14
  92. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +3 -3
  93. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +2 -2
  94. data/lib/twilio-ruby/rest/sync/v1/service.rb +24 -27
  95. data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
  96. data/lib/twilio-ruby/rest/video/v1/recording.rb +45 -31
  97. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +1 -1
  98. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +18 -6
  99. data/lib/twilio-ruby/rest/video/v1.rb +13 -12
  100. data/lib/twilio-ruby/rest/video.rb +9 -8
  101. data/lib/twilio-ruby/rest/wireless/v1/command.rb +43 -33
  102. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +48 -35
  103. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +21 -23
  104. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +32 -22
  105. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +121 -70
  106. data/lib/twilio-ruby/rest/wireless.rb +6 -3
  107. data/lib/twilio-ruby/version.rb +1 -1
  108. data/spec/integration/chat/v2/service/channel/webhook_spec.rb +307 -0
  109. data/spec/integration/chat/v2/service/channel_spec.rb +4 -0
  110. data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +307 -0
  111. data/spec/integration/ip_messaging/v2/service/channel_spec.rb +4 -0
  112. metadata +9 -3
@@ -11,13 +11,13 @@ module Twilio
11
11
  class Wireless < Domain
12
12
  class V1 < Version
13
13
  class SimContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
14
  class DataSessionList < ListResource
17
15
  ##
18
16
  # Initialize the DataSessionList
19
17
  # @param [Version] version Version that contains the resource
20
- # @param [String] sim_sid The sim_sid
18
+ # @param [String] sim_sid The unique id of the
19
+ # [SIM](https://www.twilio.com/docs/api/wireless/rest-api/sim) resource that this
20
+ # Data Session is for.
21
21
  # @return [DataSessionList] DataSessionList
22
22
  def initialize(version, sim_sid: nil)
23
23
  super(version)
@@ -124,8 +124,6 @@ module Twilio
124
124
  end
125
125
  end
126
126
 
127
- ##
128
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
129
127
  class DataSessionPage < Page
130
128
  ##
131
129
  # Initialize the DataSessionPage
@@ -155,14 +153,14 @@ module Twilio
155
153
  end
156
154
  end
157
155
 
158
- ##
159
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
160
156
  class DataSessionInstance < InstanceResource
161
157
  ##
162
158
  # Initialize the DataSessionInstance
163
159
  # @param [Version] version Version that contains the resource
164
160
  # @param [Hash] payload payload that contains response from Twilio
165
- # @param [String] sim_sid The sim_sid
161
+ # @param [String] sim_sid The unique id of the
162
+ # [SIM](https://www.twilio.com/docs/api/wireless/rest-api/sim) resource that this
163
+ # Data Session is for.
166
164
  # @return [DataSessionInstance] DataSessionInstance
167
165
  def initialize(version, payload, sim_sid: nil)
168
166
  super(version)
@@ -188,91 +186,91 @@ module Twilio
188
186
  end
189
187
 
190
188
  ##
191
- # @return [String] The sid
189
+ # @return [String] The unique id of the Data Session resource that this Data Record is for.
192
190
  def sid
193
191
  @properties['sid']
194
192
  end
195
193
 
196
194
  ##
197
- # @return [String] The sim_sid
195
+ # @return [String] The unique id of the SIM resource that this Data Session is for.
198
196
  def sim_sid
199
197
  @properties['sim_sid']
200
198
  end
201
199
 
202
200
  ##
203
- # @return [String] The account_sid
201
+ # @return [String] The unique id of the Account that the SIM belongs to.
204
202
  def account_sid
205
203
  @properties['account_sid']
206
204
  end
207
205
 
208
206
  ##
209
- # @return [String] The radio_link
207
+ # @return [String] The generation of wireless technology that the device was attached to the cellular tower using.
210
208
  def radio_link
211
209
  @properties['radio_link']
212
210
  end
213
211
 
214
212
  ##
215
- # @return [String] The operator_mcc
213
+ # @return [String] The 'mobile country code' is the unique id of the home country where the Data Session took place.
216
214
  def operator_mcc
217
215
  @properties['operator_mcc']
218
216
  end
219
217
 
220
218
  ##
221
- # @return [String] The operator_mnc
219
+ # @return [String] The 'mobile network code' is the unique id specific to the mobile operator network where the Data Session took place.
222
220
  def operator_mnc
223
221
  @properties['operator_mnc']
224
222
  end
225
223
 
226
224
  ##
227
- # @return [String] The operator_country
225
+ # @return [String] The three letter country code representing where the device's Data Session took place.
228
226
  def operator_country
229
227
  @properties['operator_country']
230
228
  end
231
229
 
232
230
  ##
233
- # @return [String] The operator_name
231
+ # @return [String] The friendly name of the mobile operator network that the SIM-connected device is attached to.
234
232
  def operator_name
235
233
  @properties['operator_name']
236
234
  end
237
235
 
238
236
  ##
239
- # @return [String] The cell_id
237
+ # @return [String] The unique id of the cellular tower that the device was attached to at the moment when the Data Session was last updated.
240
238
  def cell_id
241
239
  @properties['cell_id']
242
240
  end
243
241
 
244
242
  ##
245
- # @return [Hash] The cell_location_estimate
243
+ # @return [Hash] An object representing the estimated location where the device's Data Session took place.
246
244
  def cell_location_estimate
247
245
  @properties['cell_location_estimate']
248
246
  end
249
247
 
250
248
  ##
251
- # @return [String] The packets_uploaded
249
+ # @return [String] The number of packets uploaded by the device between the start time and when the Data Session was last updated.
252
250
  def packets_uploaded
253
251
  @properties['packets_uploaded']
254
252
  end
255
253
 
256
254
  ##
257
- # @return [String] The packets_downloaded
255
+ # @return [String] The number of packets downloaded by the device between the start time and when the Data Session was last updated.
258
256
  def packets_downloaded
259
257
  @properties['packets_downloaded']
260
258
  end
261
259
 
262
260
  ##
263
- # @return [Time] The last_updated
261
+ # @return [Time] The date that this resource was last updated, given as GMT in ISO 8601 format.
264
262
  def last_updated
265
263
  @properties['last_updated']
266
264
  end
267
265
 
268
266
  ##
269
- # @return [Time] The start
267
+ # @return [Time] The date that this Data Session started, given as GMT in ISO 8601 format.
270
268
  def start
271
269
  @properties['start']
272
270
  end
273
271
 
274
272
  ##
275
- # @return [Time] The end
273
+ # @return [Time] The date that this record ended, given as GMT in ISO 8601 format.
276
274
  def end_
277
275
  @properties['end_']
278
276
  end
@@ -11,13 +11,13 @@ module Twilio
11
11
  class Wireless < Domain
12
12
  class V1 < Version
13
13
  class SimContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
14
  class UsageRecordList < ListResource
17
15
  ##
18
16
  # Initialize the UsageRecordList
19
17
  # @param [Version] version Version that contains the resource
20
- # @param [String] sim_sid The sim_sid
18
+ # @param [String] sim_sid The unique id of the
19
+ # [SIM](https://www.twilio.com/docs/api/wireless/rest-api/sim) resource that this
20
+ # Usage Record is for.
21
21
  # @return [UsageRecordList] UsageRecordList
22
22
  def initialize(version, sim_sid: nil)
23
23
  super(version)
@@ -31,9 +31,13 @@ module Twilio
31
31
  # Lists UsageRecordInstance records from the API as a list.
32
32
  # Unlike stream(), this operation is eager and will load `limit` records into
33
33
  # memory before returning.
34
- # @param [Time] end_ The end
35
- # @param [Time] start The start
36
- # @param [usage_record.Granularity] granularity The granularity
34
+ # @param [Time] end_ Only include usage that has occurred on or before this date.
35
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
36
+ # @param [Time] start Only include usage that has occurred on or after this date.
37
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
38
+ # @param [usage_record.Granularity] granularity The time-based grouping that
39
+ # results are aggregated by. Valid values are `daily`, `hourly`, `all`. `all` will
40
+ # return one Usage Record for the entire period.
37
41
  # @param [Integer] limit Upper limit for the number of records to return. stream()
38
42
  # guarantees to never return more than limit. Default is no limit
39
43
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -55,9 +59,13 @@ module Twilio
55
59
  # Streams UsageRecordInstance records from the API as an Enumerable.
56
60
  # This operation lazily loads records as efficiently as possible until the limit
57
61
  # is reached.
58
- # @param [Time] end_ The end
59
- # @param [Time] start The start
60
- # @param [usage_record.Granularity] granularity The granularity
62
+ # @param [Time] end_ Only include usage that has occurred on or before this date.
63
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
64
+ # @param [Time] start Only include usage that has occurred on or after this date.
65
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
66
+ # @param [usage_record.Granularity] granularity The time-based grouping that
67
+ # results are aggregated by. Valid values are `daily`, `hourly`, `all`. `all` will
68
+ # return one Usage Record for the entire period.
61
69
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
70
  # guarantees to never return more than limit. Default is no limit.
63
71
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -90,9 +98,13 @@ module Twilio
90
98
  ##
91
99
  # Retrieve a single page of UsageRecordInstance records from the API.
92
100
  # Request is executed immediately.
93
- # @param [Time] end_ The end
94
- # @param [Time] start The start
95
- # @param [usage_record.Granularity] granularity The granularity
101
+ # @param [Time] end_ Only include usage that has occurred on or before this date.
102
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
103
+ # @param [Time] start Only include usage that has occurred on or after this date.
104
+ # Format is [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm).
105
+ # @param [usage_record.Granularity] granularity The time-based grouping that
106
+ # results are aggregated by. Valid values are `daily`, `hourly`, `all`. `all` will
107
+ # return one Usage Record for the entire period.
96
108
  # @param [String] page_token PageToken provided by the API
97
109
  # @param [Integer] page_number Page Number, this value is simply for client state
98
110
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -134,8 +146,6 @@ module Twilio
134
146
  end
135
147
  end
136
148
 
137
- ##
138
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
139
149
  class UsageRecordPage < Page
140
150
  ##
141
151
  # Initialize the UsageRecordPage
@@ -165,14 +175,14 @@ module Twilio
165
175
  end
166
176
  end
167
177
 
168
- ##
169
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
170
178
  class UsageRecordInstance < InstanceResource
171
179
  ##
172
180
  # Initialize the UsageRecordInstance
173
181
  # @param [Version] version Version that contains the resource
174
182
  # @param [Hash] payload payload that contains response from Twilio
175
- # @param [String] sim_sid The sim_sid
183
+ # @param [String] sim_sid The unique id of the
184
+ # [SIM](https://www.twilio.com/docs/api/wireless/rest-api/sim) resource that this
185
+ # Usage Record is for.
176
186
  # @return [UsageRecordInstance] UsageRecordInstance
177
187
  def initialize(version, payload, sim_sid: nil)
178
188
  super(version)
@@ -188,31 +198,31 @@ module Twilio
188
198
  end
189
199
 
190
200
  ##
191
- # @return [String] The sim_sid
201
+ # @return [String] The unique id of the SIM resource that this Usage Record is for.
192
202
  def sim_sid
193
203
  @properties['sim_sid']
194
204
  end
195
205
 
196
206
  ##
197
- # @return [String] The account_sid
207
+ # @return [String] The unique id of the Account that the SIM belongs to.
198
208
  def account_sid
199
209
  @properties['account_sid']
200
210
  end
201
211
 
202
212
  ##
203
- # @return [Hash] The period
213
+ # @return [Hash] The time period for which usage is reported.
204
214
  def period
205
215
  @properties['period']
206
216
  end
207
217
 
208
218
  ##
209
- # @return [Hash] The commands
219
+ # @return [Hash] An object representing the Commands usage for the SIM over the period.
210
220
  def commands
211
221
  @properties['commands']
212
222
  end
213
223
 
214
224
  ##
215
- # @return [Hash] The data
225
+ # @return [Hash] An object representing the Data usage for the SIM over the period.
216
226
  def data
217
227
  @properties['data']
218
228
  end
@@ -10,8 +10,6 @@ module Twilio
10
10
  module REST
11
11
  class Wireless < Domain
12
12
  class V1 < Version
13
- ##
14
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
13
  class SimList < ListResource
16
14
  ##
17
15
  # Initialize the SimList
@@ -29,9 +27,10 @@ module Twilio
29
27
  # Lists SimInstance records from the API as a list.
30
28
  # Unlike stream(), this operation is eager and will load `limit` records into
31
29
  # memory before returning.
32
- # @param [sim.Status] status The status
33
- # @param [String] iccid The iccid
34
- # @param [String] rate_plan The rate_plan
30
+ # @param [sim.Status] status Only return Sims with this status.
31
+ # @param [String] iccid Return Sims with this Iccid. Currently this should be a
32
+ # list with maximum size 1.
33
+ # @param [String] rate_plan Only return Sims with this Rate Plan.
35
34
  # @param [String] e_id The e_id
36
35
  # @param [String] sim_registration_code The sim_registration_code
37
36
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -57,9 +56,10 @@ module Twilio
57
56
  # Streams SimInstance records from the API as an Enumerable.
58
57
  # This operation lazily loads records as efficiently as possible until the limit
59
58
  # is reached.
60
- # @param [sim.Status] status The status
61
- # @param [String] iccid The iccid
62
- # @param [String] rate_plan The rate_plan
59
+ # @param [sim.Status] status Only return Sims with this status.
60
+ # @param [String] iccid Return Sims with this Iccid. Currently this should be a
61
+ # list with maximum size 1.
62
+ # @param [String] rate_plan Only return Sims with this Rate Plan.
63
63
  # @param [String] e_id The e_id
64
64
  # @param [String] sim_registration_code The sim_registration_code
65
65
  # @param [Integer] limit Upper limit for the number of records to return. stream()
@@ -101,9 +101,10 @@ module Twilio
101
101
  ##
102
102
  # Retrieve a single page of SimInstance records from the API.
103
103
  # Request is executed immediately.
104
- # @param [sim.Status] status The status
105
- # @param [String] iccid The iccid
106
- # @param [String] rate_plan The rate_plan
104
+ # @param [sim.Status] status Only return Sims with this status.
105
+ # @param [String] iccid Return Sims with this Iccid. Currently this should be a
106
+ # list with maximum size 1.
107
+ # @param [String] rate_plan Only return Sims with this Rate Plan.
107
108
  # @param [String] e_id The e_id
108
109
  # @param [String] sim_registration_code The sim_registration_code
109
110
  # @param [String] page_token PageToken provided by the API
@@ -149,8 +150,6 @@ module Twilio
149
150
  end
150
151
  end
151
152
 
152
- ##
153
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
154
153
  class SimPage < Page
155
154
  ##
156
155
  # Initialize the SimPage
@@ -180,8 +179,6 @@ module Twilio
180
179
  end
181
180
  end
182
181
 
183
- ##
184
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
185
182
  class SimContext < InstanceContext
186
183
  ##
187
184
  # Initialize the SimContext
@@ -217,22 +214,50 @@ module Twilio
217
214
 
218
215
  ##
219
216
  # Update the SimInstance
220
- # @param [String] unique_name The unique_name
221
- # @param [String] callback_method The callback_method
222
- # @param [String] callback_url The callback_url
223
- # @param [String] friendly_name The friendly_name
224
- # @param [String] rate_plan The rate_plan
225
- # @param [sim.Status] status The status
226
- # @param [String] commands_callback_method The commands_callback_method
227
- # @param [String] commands_callback_url The commands_callback_url
228
- # @param [String] sms_fallback_method The sms_fallback_method
229
- # @param [String] sms_fallback_url The sms_fallback_url
230
- # @param [String] sms_method The sms_method
231
- # @param [String] sms_url The sms_url
232
- # @param [String] voice_fallback_method The voice_fallback_method
233
- # @param [String] voice_fallback_url The voice_fallback_url
234
- # @param [String] voice_method The voice_method
235
- # @param [String] voice_url The voice_url
217
+ # @param [String] unique_name A user-provided string that uniquely identifies this
218
+ # resource as an alternative to the `Sid`.
219
+ # @param [String] callback_method The HTTP method Twilio will use when making a
220
+ # request to the callback URL (valid options are GET or POST). Defaults to POST.
221
+ # @param [String] callback_url Twilio will make a request to this URL when the Sim
222
+ # has finished updating. In the case of a transition from the Sim's `new` status
223
+ # to its `ready` status, or from any status to its `deactivated` status, you will
224
+ # receive two callbacks. One when the Sim moves to its intermediary status
225
+ # (`ready` or `deactivated`), and a second when it transitions to its final status
226
+ # (`active` or `canceled`).
227
+ # @param [String] friendly_name A user-provided string that identifies this
228
+ # resource. Non-unique.
229
+ # @param [String] rate_plan The Sid or UniqueName of the
230
+ # [RatePlan](https://www.twilio.com/docs/api/wireless/rest-api/rate-plan) that
231
+ # this Sim should use. *Note:* the RatePlan of a Sim can only be modified when the
232
+ # Sim has a `suspended` or `deactivated` status.
233
+ # @param [sim.Status] status A string representing the status of the Sim. Valid
234
+ # options depend on the current state of the Sim, but may include `ready`,
235
+ # `active`, `suspended` or `deactivated`.
236
+ # @param [String] commands_callback_method A string representing the HTTP method
237
+ # to use when making a request to `CommandsCallbackUrl`. Can be one of `POST` or
238
+ # `GET`. Defaults to `POST`.
239
+ # @param [String] commands_callback_url The URL that will receive a webhook when
240
+ # this Sim originates a
241
+ # [Command](https://www.twilio.com/docs/api/wireless/rest-api/command). Your
242
+ # server should respond with an HTTP status code in the 200 range; any response
243
+ # body will be ignored.
244
+ # @param [String] sms_fallback_method The HTTP method Twilio will use when
245
+ # requesting the sms_fallback_url. Either `GET` or `POST`.
246
+ # @param [String] sms_fallback_url The URL that Twilio will request if an error
247
+ # occurs retrieving or executing the TwiML requested by `sms_url`.
248
+ # @param [String] sms_method The HTTP method Twilio will use when requesting the
249
+ # above Url. Either `GET` or `POST`.
250
+ # @param [String] sms_url The URL Twilio will request when the SIM-connected
251
+ # device sends an SMS message that is not a
252
+ # [Command](https://www.twilio.com/docs/api/wireless/rest-api/command).
253
+ # @param [String] voice_fallback_method The HTTP method Twilio will use when
254
+ # requesting the voice_fallback_url. Either `GET` or `POST`.
255
+ # @param [String] voice_fallback_url The URL that Twilio will request if an error
256
+ # occurs retrieving or executing the TwiML requested by `voice_url`.
257
+ # @param [String] voice_method The HTTP method Twilio will use when requesting the
258
+ # above Url. Either `GET` or `POST`.
259
+ # @param [String] voice_url The URL Twilio will request when the SIM-connected
260
+ # device makes a call.
236
261
  # @return [SimInstance] Updated SimInstance
237
262
  def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset)
238
263
  data = Twilio::Values.of({
@@ -295,8 +320,6 @@ module Twilio
295
320
  end
296
321
  end
297
322
 
298
- ##
299
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
300
323
  class SimInstance < InstanceResource
301
324
  ##
302
325
  # Initialize the SimInstance
@@ -351,37 +374,37 @@ module Twilio
351
374
  end
352
375
 
353
376
  ##
354
- # @return [String] The sid
377
+ # @return [String] A 34 character string that uniquely identifies this resource.
355
378
  def sid
356
379
  @properties['sid']
357
380
  end
358
381
 
359
382
  ##
360
- # @return [String] The unique_name
383
+ # @return [String] A user-provided string that uniquely identifies this resource as an alternative to the sid.
361
384
  def unique_name
362
385
  @properties['unique_name']
363
386
  end
364
387
 
365
388
  ##
366
- # @return [String] The account_sid
389
+ # @return [String] The unique id of the Account that this Sim belongs to.
367
390
  def account_sid
368
391
  @properties['account_sid']
369
392
  end
370
393
 
371
394
  ##
372
- # @return [String] The rate_plan_sid
395
+ # @return [String] The unique ID of the Rate Plan configured for this Sim.
373
396
  def rate_plan_sid
374
397
  @properties['rate_plan_sid']
375
398
  end
376
399
 
377
400
  ##
378
- # @return [String] The friendly_name
401
+ # @return [String] A user-provided string that identifies this resource.
379
402
  def friendly_name
380
403
  @properties['friendly_name']
381
404
  end
382
405
 
383
406
  ##
384
- # @return [String] The iccid
407
+ # @return [String] The ICCID associated with the SIM.
385
408
  def iccid
386
409
  @properties['iccid']
387
410
  end
@@ -393,91 +416,91 @@ module Twilio
393
416
  end
394
417
 
395
418
  ##
396
- # @return [sim.Status] The status
419
+ # @return [sim.Status] A string representing the status of the Sim.
397
420
  def status
398
421
  @properties['status']
399
422
  end
400
423
 
401
424
  ##
402
- # @return [String] The commands_callback_url
425
+ # @return [String] The URL that will receive a webhook when this Sim originates a machine-to-machine Command.
403
426
  def commands_callback_url
404
427
  @properties['commands_callback_url']
405
428
  end
406
429
 
407
430
  ##
408
- # @return [String] The commands_callback_method
431
+ # @return [String] A string representing the HTTP method to use when making a request to commands_callback_url.
409
432
  def commands_callback_method
410
433
  @properties['commands_callback_method']
411
434
  end
412
435
 
413
436
  ##
414
- # @return [String] The sms_fallback_method
437
+ # @return [String] The HTTP method Twilio will use when requesting the sms_fallback_url.
415
438
  def sms_fallback_method
416
439
  @properties['sms_fallback_method']
417
440
  end
418
441
 
419
442
  ##
420
- # @return [String] The sms_fallback_url
443
+ # @return [String] The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by sms_url.
421
444
  def sms_fallback_url
422
445
  @properties['sms_fallback_url']
423
446
  end
424
447
 
425
448
  ##
426
- # @return [String] The sms_method
449
+ # @return [String] The HTTP method Twilio will use when requesting the above Url.
427
450
  def sms_method
428
451
  @properties['sms_method']
429
452
  end
430
453
 
431
454
  ##
432
- # @return [String] The sms_url
455
+ # @return [String] The URL Twilio will request when the SIM-connected device send an SMS that is not a Command.
433
456
  def sms_url
434
457
  @properties['sms_url']
435
458
  end
436
459
 
437
460
  ##
438
- # @return [String] The voice_fallback_method
461
+ # @return [String] The HTTP method Twilio will use when requesting the voice_fallback_url.
439
462
  def voice_fallback_method
440
463
  @properties['voice_fallback_method']
441
464
  end
442
465
 
443
466
  ##
444
- # @return [String] The voice_fallback_url
467
+ # @return [String] The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by voice_url.
445
468
  def voice_fallback_url
446
469
  @properties['voice_fallback_url']
447
470
  end
448
471
 
449
472
  ##
450
- # @return [String] The voice_method
473
+ # @return [String] The HTTP method Twilio will use when requesting the above Url.
451
474
  def voice_method
452
475
  @properties['voice_method']
453
476
  end
454
477
 
455
478
  ##
456
- # @return [String] The voice_url
479
+ # @return [String] The URL Twilio will request when the SIM-connected device makes a call.
457
480
  def voice_url
458
481
  @properties['voice_url']
459
482
  end
460
483
 
461
484
  ##
462
- # @return [Time] The date_created
485
+ # @return [Time] The date that this resource was created, given as GMT in ISO 8601 format.
463
486
  def date_created
464
487
  @properties['date_created']
465
488
  end
466
489
 
467
490
  ##
468
- # @return [Time] The date_updated
491
+ # @return [Time] The date that this resource was last updated, given as GMT in ISO 8601 format.
469
492
  def date_updated
470
493
  @properties['date_updated']
471
494
  end
472
495
 
473
496
  ##
474
- # @return [String] The url
497
+ # @return [String] The URL for this resource.
475
498
  def url
476
499
  @properties['url']
477
500
  end
478
501
 
479
502
  ##
480
- # @return [String] The links
503
+ # @return [String] Each Sim instance resource supports a few subresources, listed here for convenience.
481
504
  def links
482
505
  @properties['links']
483
506
  end
@@ -497,22 +520,50 @@ module Twilio
497
520
 
498
521
  ##
499
522
  # Update the SimInstance
500
- # @param [String] unique_name The unique_name
501
- # @param [String] callback_method The callback_method
502
- # @param [String] callback_url The callback_url
503
- # @param [String] friendly_name The friendly_name
504
- # @param [String] rate_plan The rate_plan
505
- # @param [sim.Status] status The status
506
- # @param [String] commands_callback_method The commands_callback_method
507
- # @param [String] commands_callback_url The commands_callback_url
508
- # @param [String] sms_fallback_method The sms_fallback_method
509
- # @param [String] sms_fallback_url The sms_fallback_url
510
- # @param [String] sms_method The sms_method
511
- # @param [String] sms_url The sms_url
512
- # @param [String] voice_fallback_method The voice_fallback_method
513
- # @param [String] voice_fallback_url The voice_fallback_url
514
- # @param [String] voice_method The voice_method
515
- # @param [String] voice_url The voice_url
523
+ # @param [String] unique_name A user-provided string that uniquely identifies this
524
+ # resource as an alternative to the `Sid`.
525
+ # @param [String] callback_method The HTTP method Twilio will use when making a
526
+ # request to the callback URL (valid options are GET or POST). Defaults to POST.
527
+ # @param [String] callback_url Twilio will make a request to this URL when the Sim
528
+ # has finished updating. In the case of a transition from the Sim's `new` status
529
+ # to its `ready` status, or from any status to its `deactivated` status, you will
530
+ # receive two callbacks. One when the Sim moves to its intermediary status
531
+ # (`ready` or `deactivated`), and a second when it transitions to its final status
532
+ # (`active` or `canceled`).
533
+ # @param [String] friendly_name A user-provided string that identifies this
534
+ # resource. Non-unique.
535
+ # @param [String] rate_plan The Sid or UniqueName of the
536
+ # [RatePlan](https://www.twilio.com/docs/api/wireless/rest-api/rate-plan) that
537
+ # this Sim should use. *Note:* the RatePlan of a Sim can only be modified when the
538
+ # Sim has a `suspended` or `deactivated` status.
539
+ # @param [sim.Status] status A string representing the status of the Sim. Valid
540
+ # options depend on the current state of the Sim, but may include `ready`,
541
+ # `active`, `suspended` or `deactivated`.
542
+ # @param [String] commands_callback_method A string representing the HTTP method
543
+ # to use when making a request to `CommandsCallbackUrl`. Can be one of `POST` or
544
+ # `GET`. Defaults to `POST`.
545
+ # @param [String] commands_callback_url The URL that will receive a webhook when
546
+ # this Sim originates a
547
+ # [Command](https://www.twilio.com/docs/api/wireless/rest-api/command). Your
548
+ # server should respond with an HTTP status code in the 200 range; any response
549
+ # body will be ignored.
550
+ # @param [String] sms_fallback_method The HTTP method Twilio will use when
551
+ # requesting the sms_fallback_url. Either `GET` or `POST`.
552
+ # @param [String] sms_fallback_url The URL that Twilio will request if an error
553
+ # occurs retrieving or executing the TwiML requested by `sms_url`.
554
+ # @param [String] sms_method The HTTP method Twilio will use when requesting the
555
+ # above Url. Either `GET` or `POST`.
556
+ # @param [String] sms_url The URL Twilio will request when the SIM-connected
557
+ # device sends an SMS message that is not a
558
+ # [Command](https://www.twilio.com/docs/api/wireless/rest-api/command).
559
+ # @param [String] voice_fallback_method The HTTP method Twilio will use when
560
+ # requesting the voice_fallback_url. Either `GET` or `POST`.
561
+ # @param [String] voice_fallback_url The URL that Twilio will request if an error
562
+ # occurs retrieving or executing the TwiML requested by `voice_url`.
563
+ # @param [String] voice_method The HTTP method Twilio will use when requesting the
564
+ # above Url. Either `GET` or `POST`.
565
+ # @param [String] voice_url The URL Twilio will request when the SIM-connected
566
+ # device makes a call.
516
567
  # @return [SimInstance] Updated SimInstance
517
568
  def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, friendly_name: :unset, rate_plan: :unset, status: :unset, commands_callback_method: :unset, commands_callback_url: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset)
518
569
  context.update(