twilio-ruby 5.34.0 → 5.38.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +126 -0
  3. data/README.md +24 -3
  4. data/lib/twilio-ruby.rb +1 -1
  5. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
  6. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
  9. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
  12. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
  16. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  17. data/lib/twilio-ruby/rest/client.rb +35 -15
  18. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  20. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  21. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  22. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
  23. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
  24. data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  27. data/lib/twilio-ruby/rest/preview.rb +6 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  31. data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  33. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
  34. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  35. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  36. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  37. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
  38. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  39. data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
  40. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  41. data/lib/twilio-ruby/rest/verify.rb +9 -0
  42. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  43. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
  44. data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
  45. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
  46. data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
  47. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
  48. data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
  49. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  50. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
  51. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
  52. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
  53. data/lib/twilio-ruby/rest/voice.rb +36 -0
  54. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  55. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  56. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  57. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  58. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  59. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  60. data/lib/twilio-ruby/util/configuration.rb +9 -1
  61. data/lib/twilio-ruby/version.rb +1 -1
  62. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  63. data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
  64. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  65. data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
  66. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  67. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  68. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  69. data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
  70. data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
  71. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
  74. data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
  75. data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
  76. data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
  77. data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
  78. data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
  79. data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
  80. data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
  81. data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
  82. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  83. data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
  84. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  85. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  86. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  87. data/spec/integration/supersim/v1/sim_spec.rb +78 -6
  88. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  89. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  90. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  91. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  92. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  93. data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
  94. data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
  95. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
  96. data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
  97. data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
  98. data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
  99. data/spec/integration/verify/v2/service_spec.rb +32 -4
  100. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  101. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  102. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  103. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  104. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  105. data/spec/rest/client_spec.rb +168 -58
  106. data/spec/util/configuration_spec.rb +12 -0
  107. data/twilio-ruby.gemspec +1 -1
  108. metadata +63 -23
  109. data/lib/twilio-ruby/rest/authy.rb +0 -55
  110. data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
  111. data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
  112. data/spec/integration/authy/v1/service_spec.rb +0 -231
  113. data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -1,231 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- require 'spec_helper.rb'
10
-
11
- describe 'Service' do
12
- it "can create" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.authy.v1.services.create(friendly_name: 'friendly_name')
17
- }.to raise_exception(Twilio::REST::TwilioError)
18
-
19
- values = {'FriendlyName' => 'friendly_name', }
20
- expect(
21
- @holodeck.has_request?(Holodeck::Request.new(
22
- method: 'post',
23
- url: 'https://authy.twilio.com/v1/Services',
24
- data: values,
25
- ))).to eq(true)
26
- end
27
-
28
- it "receives create responses" do
29
- @holodeck.mock(Twilio::Response.new(
30
- 201,
31
- %q[
32
- {
33
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
- "friendly_name": "friendly_name",
35
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "date_created": "2015-07-30T20:00:00Z",
37
- "date_updated": "2015-07-30T20:00:00Z",
38
- "configuration": {},
39
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40
- "links": {
41
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
42
- }
43
- }
44
- ]
45
- ))
46
-
47
- actual = @client.authy.v1.services.create(friendly_name: 'friendly_name')
48
-
49
- expect(actual).to_not eq(nil)
50
- end
51
-
52
- it "can delete" do
53
- @holodeck.mock(Twilio::Response.new(500, ''))
54
-
55
- expect {
56
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
57
- }.to raise_exception(Twilio::REST::TwilioError)
58
-
59
- values = {}
60
- expect(
61
- @holodeck.has_request?(Holodeck::Request.new(
62
- method: 'delete',
63
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
64
- ))).to eq(true)
65
- end
66
-
67
- it "receives delete responses" do
68
- @holodeck.mock(Twilio::Response.new(
69
- 204,
70
- nil,
71
- ))
72
-
73
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
74
-
75
- expect(actual).to eq(true)
76
- end
77
-
78
- it "can fetch" do
79
- @holodeck.mock(Twilio::Response.new(500, ''))
80
-
81
- expect {
82
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
83
- }.to raise_exception(Twilio::REST::TwilioError)
84
-
85
- values = {}
86
- expect(
87
- @holodeck.has_request?(Holodeck::Request.new(
88
- method: 'get',
89
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
90
- ))).to eq(true)
91
- end
92
-
93
- it "receives fetch responses" do
94
- @holodeck.mock(Twilio::Response.new(
95
- 200,
96
- %q[
97
- {
98
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99
- "friendly_name": "friendly_name",
100
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101
- "date_created": "2015-07-30T20:00:00Z",
102
- "date_updated": "2015-07-30T20:00:00Z",
103
- "configuration": {},
104
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
105
- "links": {
106
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
107
- }
108
- }
109
- ]
110
- ))
111
-
112
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
113
-
114
- expect(actual).to_not eq(nil)
115
- end
116
-
117
- it "can read" do
118
- @holodeck.mock(Twilio::Response.new(500, ''))
119
-
120
- expect {
121
- @client.authy.v1.services.list()
122
- }.to raise_exception(Twilio::REST::TwilioError)
123
-
124
- values = {}
125
- expect(
126
- @holodeck.has_request?(Holodeck::Request.new(
127
- method: 'get',
128
- url: 'https://authy.twilio.com/v1/Services',
129
- ))).to eq(true)
130
- end
131
-
132
- it "receives read_empty responses" do
133
- @holodeck.mock(Twilio::Response.new(
134
- 200,
135
- %q[
136
- {
137
- "services": [],
138
- "meta": {
139
- "page": 0,
140
- "page_size": 50,
141
- "first_page_url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
142
- "previous_page_url": null,
143
- "url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
144
- "next_page_url": null,
145
- "key": "services"
146
- }
147
- }
148
- ]
149
- ))
150
-
151
- actual = @client.authy.v1.services.list()
152
-
153
- expect(actual).to_not eq(nil)
154
- end
155
-
156
- it "receives read_full responses" do
157
- @holodeck.mock(Twilio::Response.new(
158
- 200,
159
- %q[
160
- {
161
- "services": [
162
- {
163
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
164
- "friendly_name": "friendly_name",
165
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
166
- "date_created": "2015-07-30T20:00:00Z",
167
- "date_updated": "2015-07-30T20:00:00Z",
168
- "configuration": {},
169
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170
- "links": {
171
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
172
- }
173
- }
174
- ],
175
- "meta": {
176
- "page": 0,
177
- "page_size": 50,
178
- "first_page_url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
179
- "previous_page_url": null,
180
- "url": "https://authy.twilio.com/v1/Services?PageSize=50&Page=0",
181
- "next_page_url": null,
182
- "key": "services"
183
- }
184
- }
185
- ]
186
- ))
187
-
188
- actual = @client.authy.v1.services.list()
189
-
190
- expect(actual).to_not eq(nil)
191
- end
192
-
193
- it "can update" do
194
- @holodeck.mock(Twilio::Response.new(500, ''))
195
-
196
- expect {
197
- @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
198
- }.to raise_exception(Twilio::REST::TwilioError)
199
-
200
- values = {}
201
- expect(
202
- @holodeck.has_request?(Holodeck::Request.new(
203
- method: 'post',
204
- url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
205
- ))).to eq(true)
206
- end
207
-
208
- it "receives update responses" do
209
- @holodeck.mock(Twilio::Response.new(
210
- 200,
211
- %q[
212
- {
213
- "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
214
- "friendly_name": "friendly_name",
215
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
216
- "date_created": "2015-07-30T20:00:00Z",
217
- "date_updated": "2015-07-30T20:00:00Z",
218
- "configuration": {},
219
- "url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
220
- "links": {
221
- "entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
222
- }
223
- }
224
- ]
225
- ))
226
-
227
- actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
228
-
229
- expect(actual).to_not eq(nil)
230
- end
231
- end
@@ -1,49 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- require 'spec_helper.rb'
10
-
11
- describe 'ExportAssistant' do
12
- it "can fetch" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.autopilot.v1.assistants('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
- .export_assistant().fetch()
18
- }.to raise_exception(Twilio::REST::TwilioError)
19
-
20
- values = {}
21
- expect(
22
- @holodeck.has_request?(Holodeck::Request.new(
23
- method: 'get',
24
- url: 'https://autopilot.twilio.com/v1/Assistants/UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Export',
25
- ))).to eq(true)
26
- end
27
-
28
- it "receives fetch responses" do
29
- @holodeck.mock(Twilio::Response.new(
30
- 200,
31
- %q[
32
- {
33
- "url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export",
34
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "assistant_sid": "UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "date_created": "2015-07-30T20:00:00Z",
37
- "status": "building",
38
- "error_code": null,
39
- "schema": {}
40
- }
41
- ]
42
- ))
43
-
44
- actual = @client.autopilot.v1.assistants('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
45
- .export_assistant().fetch()
46
-
47
- expect(actual).to_not eq(nil)
48
- end
49
- end