twilio-ruby 5.33.0 → 5.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +8 -0
  3. data/.rubocop_todo.yml +5 -26
  4. data/.travis.yml +9 -1
  5. data/CHANGES.md +110 -0
  6. data/README.md +17 -2
  7. data/lib/twilio-ruby.rb +4 -12
  8. data/lib/twilio-ruby/framework/error.rb +3 -3
  9. data/lib/twilio-ruby/jwt/jwt.rb +6 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +90 -90
  11. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
  12. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +75 -72
  13. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
  14. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
  15. data/lib/twilio-ruby/rest/autopilot.rb +6 -0
  16. data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
  17. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
  18. data/lib/twilio-ruby/rest/client.rb +35 -8
  19. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +19 -3
  20. data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
  21. data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  23. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +20 -11
  24. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
  26. data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
  27. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +239 -0
  28. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +197 -0
  30. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
  31. data/lib/twilio-ruby/rest/studio.rb +2 -2
  32. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +26 -0
  33. data/lib/twilio-ruby/rest/studio/v2.rb +3 -3
  34. data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
  35. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +71 -24
  36. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +12 -11
  37. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +21 -20
  38. data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +18 -15
  39. data/lib/twilio-ruby/rest/supersim.rb +18 -0
  40. data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
  41. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +53 -10
  42. data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
  43. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +378 -0
  44. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
  45. data/lib/twilio-ruby/rest/verify.rb +9 -0
  46. data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
  47. data/lib/twilio-ruby/rest/verify/v2/form.rb +197 -0
  48. data/lib/twilio-ruby/rest/verify/v2/service.rb +48 -3
  49. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +379 -0
  50. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +500 -0
  51. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor/challenge.rb +494 -0
  52. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  53. data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -12
  54. data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -12
  55. data/lib/twilio-ruby/rest/voice.rb +36 -0
  56. data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
  57. data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
  58. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
  59. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
  60. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
  61. data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
  62. data/lib/twilio-ruby/twiml/twiml.rb +4 -0
  63. data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
  64. data/lib/twilio-ruby/util/configuration.rb +9 -1
  65. data/lib/twilio-ruby/version.rb +1 -1
  66. data/spec/integration/api/v2010/account/call_spec.rb +5 -5
  67. data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
  68. data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
  69. data/spec/integration/api/v2010/account/token_spec.rb +23 -11
  70. data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
  71. data/spec/integration/bulkexports/v1/export/day_spec.rb +1 -1
  72. data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
  73. data/spec/integration/conversations/v1/conversation_spec.rb +4 -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/bulk_exports/export/day_spec.rb +1 -1
  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/asset/asset_version_spec.rb +1 -1
  83. data/spec/integration/serverless/v1/service/build_spec.rb +4 -4
  84. data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
  85. data/spec/integration/serverless/v1/service/function/function_version_spec.rb +1 -1
  86. data/spec/integration/studio/v1/flow/execution_spec.rb +46 -0
  87. data/spec/integration/studio/v2/flow/execution_spec.rb +45 -0
  88. data/spec/integration/studio/v2/flow_spec.rb +4 -0
  89. data/spec/integration/studio/v2/flow_validate_spec.rb +2 -2
  90. data/spec/integration/supersim/v1/fleet_spec.rb +12 -4
  91. data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
  92. data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
  93. data/spec/integration/supersim/v1/network_spec.rb +139 -0
  94. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
  95. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
  96. data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
  97. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
  98. data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
  99. data/spec/integration/verify/v2/form_spec.rb +48 -0
  100. data/spec/integration/verify/v2/service/entity/factor/challenge_spec.rb +353 -0
  101. data/spec/integration/verify/v2/service/entity/factor_spec.rb +298 -0
  102. data/spec/integration/verify/v2/service/entity_spec.rb +201 -0
  103. data/spec/integration/verify/v2/service_spec.rb +28 -4
  104. data/spec/integration/video/v1/composition_settings_spec.rb +2 -2
  105. data/spec/integration/video/v1/recording_settings_spec.rb +2 -2
  106. data/spec/integration/video/v1/recording_spec.rb +2 -2
  107. data/spec/integration/video/v1/room/recording_spec.rb +2 -2
  108. data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
  109. data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
  110. data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
  111. data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
  112. data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
  113. data/spec/rest/client_spec.rb +173 -23
  114. data/spec/util/configuration_spec.rb +12 -0
  115. data/twilio-ruby.gemspec +4 -4
  116. metadata +67 -10
@@ -42,6 +42,7 @@ describe 'Bundle' do
42
42
  "date_updated": "2019-07-31T01:09:00Z",
43
43
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
44
44
  "links": {
45
+ "evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
45
46
  "item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments"
46
47
  }
47
48
  }
@@ -113,6 +114,7 @@ describe 'Bundle' do
113
114
  "date_updated": "2019-07-31T01:09:00Z",
114
115
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
115
116
  "links": {
117
+ "evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
116
118
  "item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments"
117
119
  }
118
120
  }
@@ -168,6 +170,7 @@ describe 'Bundle' do
168
170
  "date_updated": "2019-07-31T01:09:00Z",
169
171
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170
172
  "links": {
173
+ "evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
171
174
  "item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments"
172
175
  }
173
176
  }
@@ -212,6 +215,7 @@ describe 'Bundle' do
212
215
  "date_updated": "2019-07-31T01:09:00Z",
213
216
  "url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
214
217
  "links": {
218
+ "evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
215
219
  "item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments"
216
220
  }
217
221
  }
@@ -30,7 +30,7 @@ describe 'Day' do
30
30
  200,
31
31
  %q[
32
32
  {
33
- "redirect_to": "https://api.bulkexports.twilio.s3.amazonaws.com/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
33
+ "redirect_to": "https://www.twilio.com"
34
34
  }
35
35
  ]
36
36
  ))
@@ -0,0 +1,54 @@
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 'Channel' do
12
+ it "can create" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
18
+ .branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
19
+ .channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', phone_number: 'phone_number')
20
+ }.to raise_exception(Twilio::REST::TwilioError)
21
+
22
+ values = {'PhoneNumberSid' => 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'PhoneNumber' => 'phone_number', }
23
+ expect(
24
+ @holodeck.has_request?(Holodeck::Request.new(
25
+ method: 'post',
26
+ url: 'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Brands/BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels',
27
+ data: values,
28
+ ))).to eq(true)
29
+ end
30
+
31
+ it "receives create responses" do
32
+ @holodeck.mock(Twilio::Response.new(
33
+ 201,
34
+ %q[
35
+ {
36
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
+ "business_sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38
+ "brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39
+ "branded_channel_sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40
+ "phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41
+ "phone_number": "+15000000000",
42
+ "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
43
+ }
44
+ ]
45
+ ))
46
+
47
+ actual = @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
49
+ .branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
50
+ .channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', phone_number: 'phone_number')
51
+
52
+ expect(actual).to_not eq(nil)
53
+ end
54
+ end
@@ -0,0 +1,52 @@
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 'BrandedChannel' do
12
+ it "can fetch" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
18
+ .branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
19
+ }.to raise_exception(Twilio::REST::TwilioError)
20
+
21
+ values = {}
22
+ expect(
23
+ @holodeck.has_request?(Holodeck::Request.new(
24
+ method: 'get',
25
+ url: 'https://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Brands/BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
26
+ ))).to eq(true)
27
+ end
28
+
29
+ it "receives fetch responses" do
30
+ @holodeck.mock(Twilio::Response.new(
31
+ 200,
32
+ %q[
33
+ {
34
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
+ "business_sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
+ "sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38
+ "links": {
39
+ "channels": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
40
+ },
41
+ "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
42
+ }
43
+ ]
44
+ ))
45
+
46
+ actual = @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
47
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
+ .branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
49
+
50
+ expect(actual).to_not eq(nil)
51
+ end
52
+ end
@@ -0,0 +1,49 @@
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 'Brand' do
12
+ it "can fetch" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').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://preview.twilio.com/TrustedComms/Businesses/BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Brands/BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
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
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "business_sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
+ "sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "links": {
37
+ "branded_channels": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BrandedChannels"
38
+ },
39
+ "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands/BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
40
+ }
41
+ ]
42
+ ))
43
+
44
+ actual = @client.preview.trusted_comms.businesses('BXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
45
+ .brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
46
+
47
+ expect(actual).to_not eq(nil)
48
+ end
49
+ end
@@ -33,6 +33,7 @@ describe 'Business' do
33
33
  "sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
34
  "url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
35
  "links": {
36
+ "brands": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands",
36
37
  "insights": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Insights"
37
38
  }
38
39
  }
@@ -78,7 +78,7 @@ describe 'AssetVersion' do
78
78
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
79
79
  "service_sid": "ZS00000000000000000000000000000000",
80
80
  "asset_sid": "ZH00000000000000000000000000000000",
81
- "path": "test-path",
81
+ "path": "/test-path",
82
82
  "visibility": "public",
83
83
  "date_created": "2018-11-10T20:00:00Z",
84
84
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Assets/ZH00000000000000000000000000000000/Versions/ZN00000000000000000000000000000000"
@@ -81,7 +81,7 @@ describe 'Build' do
81
81
  "service_sid": "ZS00000000000000000000000000000000",
82
82
  "asset_sid": "ZH00000000000000000000000000000000",
83
83
  "date_created": "2018-11-10T20:00:00Z",
84
- "path": "asset-path",
84
+ "path": "/asset-path",
85
85
  "visibility": "PUBLIC"
86
86
  }
87
87
  ],
@@ -92,7 +92,7 @@ describe 'Build' do
92
92
  "service_sid": "ZS00000000000000000000000000000000",
93
93
  "function_sid": "ZH00000000000000000000000000000001",
94
94
  "date_created": "2018-11-10T20:00:00Z",
95
- "path": "function-path",
95
+ "path": "/function-path",
96
96
  "visibility": "PUBLIC"
97
97
  }
98
98
  ],
@@ -175,7 +175,7 @@ describe 'Build' do
175
175
  "service_sid": "ZS00000000000000000000000000000000",
176
176
  "asset_sid": "ZH00000000000000000000000000000000",
177
177
  "date_created": "2018-11-10T20:00:00Z",
178
- "path": "asset-path",
178
+ "path": "/asset-path",
179
179
  "visibility": "PUBLIC"
180
180
  }
181
181
  ],
@@ -186,7 +186,7 @@ describe 'Build' do
186
186
  "service_sid": "ZS00000000000000000000000000000000",
187
187
  "function_sid": "ZH00000000000000000000000000000001",
188
188
  "date_created": "2018-11-10T20:00:00Z",
189
- "path": "function-path",
189
+ "path": "/function-path",
190
190
  "visibility": "PUBLIC"
191
191
  }
192
192
  ],
@@ -78,6 +78,7 @@ describe 'Log' do
78
78
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
79
79
  "service_sid": "ZS00000000000000000000000000000000",
80
80
  "environment_sid": "ZE00000000000000000000000000000000",
81
+ "build_sid": "ZB00000000000000000000000000000000",
81
82
  "deployment_sid": "ZD00000000000000000000000000000000",
82
83
  "function_sid": "ZH00000000000000000000000000000000",
83
84
  "request_sid": "RQ00000000000000000000000000000000",
@@ -78,7 +78,7 @@ describe 'FunctionVersion' do
78
78
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
79
79
  "service_sid": "ZS00000000000000000000000000000000",
80
80
  "function_sid": "ZH00000000000000000000000000000000",
81
- "path": "test-path",
81
+ "path": "/test-path",
82
82
  "visibility": "public",
83
83
  "date_created": "2018-11-10T20:00:00Z",
84
84
  "url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Functions/ZH00000000000000000000000000000000/Versions/ZN00000000000000000000000000000000",
@@ -168,4 +168,50 @@ describe 'Execution' do
168
168
 
169
169
  expect(actual).to eq(true)
170
170
  end
171
+
172
+ it "can update" do
173
+ @holodeck.mock(Twilio::Response.new(500, ''))
174
+
175
+ expect {
176
+ @client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
177
+ .executions('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(status: 'active')
178
+ }.to raise_exception(Twilio::REST::TwilioError)
179
+
180
+ values = {'Status' => 'active', }
181
+ expect(
182
+ @holodeck.has_request?(Holodeck::Request.new(
183
+ method: 'post',
184
+ url: 'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
185
+ data: values,
186
+ ))).to eq(true)
187
+ end
188
+
189
+ it "receives update responses" do
190
+ @holodeck.mock(Twilio::Response.new(
191
+ 200,
192
+ %q[
193
+ {
194
+ "url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
195
+ "sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
196
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
197
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
198
+ "context": {},
199
+ "contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
200
+ "contact_channel_address": "+14155555555",
201
+ "status": "ended",
202
+ "date_created": "2017-11-06T12:00:00Z",
203
+ "date_updated": "2017-11-06T12:00:00Z",
204
+ "links": {
205
+ "steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
206
+ "execution_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
207
+ }
208
+ }
209
+ ]
210
+ ))
211
+
212
+ actual = @client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
213
+ .executions('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(status: 'active')
214
+
215
+ expect(actual).to_not eq(nil)
216
+ end
171
217
  end
@@ -166,4 +166,49 @@ describe 'Execution' do
166
166
 
167
167
  expect(actual).to eq(true)
168
168
  end
169
+
170
+ it "can update" do
171
+ @holodeck.mock(Twilio::Response.new(500, ''))
172
+
173
+ expect {
174
+ @client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
175
+ .executions('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(status: 'active')
176
+ }.to raise_exception(Twilio::REST::TwilioError)
177
+
178
+ values = {'Status' => 'active', }
179
+ expect(
180
+ @holodeck.has_request?(Holodeck::Request.new(
181
+ method: 'post',
182
+ url: 'https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
183
+ data: values,
184
+ ))).to eq(true)
185
+ end
186
+
187
+ it "receives update responses" do
188
+ @holodeck.mock(Twilio::Response.new(
189
+ 200,
190
+ %q[
191
+ {
192
+ "url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193
+ "sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
195
+ "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
196
+ "context": {},
197
+ "contact_channel_address": "+14155555555",
198
+ "status": "ended",
199
+ "date_created": "2017-11-06T12:00:00Z",
200
+ "date_updated": "2017-11-06T12:00:00Z",
201
+ "links": {
202
+ "steps": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
203
+ "execution_context": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
204
+ }
205
+ }
206
+ ]
207
+ ))
208
+
209
+ actual = @client.studio.v2.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
210
+ .executions('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(status: 'active')
211
+
212
+ expect(actual).to_not eq(nil)
213
+ end
169
214
  end
@@ -45,6 +45,7 @@ describe 'Flow' do
45
45
  "commit_message": null,
46
46
  "valid": true,
47
47
  "errors": [],
48
+ "warnings": [],
48
49
  "webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
49
50
  "date_created": "2017-11-06T12:00:00Z",
50
51
  "date_updated": null,
@@ -95,6 +96,7 @@ describe 'Flow' do
95
96
  "commit_message": null,
96
97
  "valid": true,
97
98
  "errors": [],
99
+ "warnings": [],
98
100
  "webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99
101
  "date_created": "2017-11-06T12:00:00Z",
100
102
  "date_updated": "2017-11-06T12:00:00Z",
@@ -153,6 +155,7 @@ describe 'Flow' do
153
155
  "commit_message": null,
154
156
  "valid": null,
155
157
  "errors": null,
158
+ "warnings": null,
156
159
  "webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
157
160
  "date_created": "2017-11-06T12:00:00Z",
158
161
  "date_updated": "2017-11-06T12:00:00Z",
@@ -204,6 +207,7 @@ describe 'Flow' do
204
207
  "commit_message": "commit",
205
208
  "valid": true,
206
209
  "errors": [],
210
+ "warnings": [],
207
211
  "webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
208
212
  "date_created": "2017-11-06T12:00:00Z",
209
213
  "date_updated": null,
@@ -13,7 +13,7 @@ describe 'FlowValidate' do
13
13
  @holodeck.mock(Twilio::Response.new(500, ''))
14
14
 
15
15
  expect {
16
- @client.studio.v2.flow_valid.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
16
+ @client.studio.v2.flow_validate.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
17
17
  }.to raise_exception(Twilio::REST::TwilioError)
18
18
 
19
19
  values = {
@@ -39,7 +39,7 @@ describe 'FlowValidate' do
39
39
  ]
40
40
  ))
41
41
 
42
- actual = @client.studio.v2.flow_valid.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
42
+ actual = @client.studio.v2.flow_validate.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
43
43
 
44
44
  expect(actual).to_not eq(nil)
45
45
  end
@@ -32,12 +32,14 @@ describe 'Fleet' do
32
32
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
33
  "unique_name": "unique_name",
34
34
  "data_enabled": true,
35
+ "data_limit": 1000,
35
36
  "data_metering": "payg",
36
37
  "date_created": "2019-07-30T20:00:00Z",
37
38
  "date_updated": "2019-07-30T20:00:00Z",
38
39
  "commands_enabled": true,
39
40
  "commands_method": "GET",
40
41
  "commands_url": "https://google.com",
42
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41
43
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
42
44
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
45
  }
@@ -72,12 +74,14 @@ describe 'Fleet' do
72
74
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73
75
  "unique_name": "unique_name",
74
76
  "data_enabled": true,
77
+ "data_limit": 1000,
75
78
  "data_metering": "payg",
76
79
  "date_created": "2019-07-30T20:00:00Z",
77
80
  "date_updated": "2019-07-30T20:00:00Z",
78
81
  "commands_enabled": true,
79
82
  "commands_method": "POST",
80
83
  "commands_url": null,
84
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
81
85
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
82
86
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
83
87
  }
@@ -111,13 +115,13 @@ describe 'Fleet' do
111
115
  {
112
116
  "fleets": [],
113
117
  "meta": {
114
- "first_page_url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0",
118
+ "first_page_url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
115
119
  "key": "fleets",
116
120
  "next_page_url": null,
117
121
  "page": 0,
118
122
  "page_size": 50,
119
123
  "previous_page_url": null,
120
- "url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0"
124
+ "url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
121
125
  }
122
126
  }
123
127
  ]
@@ -134,25 +138,27 @@ describe 'Fleet' do
134
138
  %q[
135
139
  {
136
140
  "meta": {
137
- "first_page_url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0",
141
+ "first_page_url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
138
142
  "key": "fleets",
139
143
  "next_page_url": null,
140
144
  "page": 0,
141
145
  "page_size": 50,
142
146
  "previous_page_url": null,
143
- "url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0"
147
+ "url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
144
148
  },
145
149
  "fleets": [
146
150
  {
147
151
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
148
152
  "unique_name": "Pilot Fleet",
149
153
  "data_enabled": true,
154
+ "data_limit": 1000,
150
155
  "data_metering": "payg",
151
156
  "date_created": "2019-10-15T20:00:00Z",
152
157
  "date_updated": "2019-10-15T20:00:00Z",
153
158
  "commands_enabled": true,
154
159
  "commands_method": "POST",
155
160
  "commands_url": null,
161
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
156
162
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
157
163
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
158
164
  }
@@ -189,12 +195,14 @@ describe 'Fleet' do
189
195
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190
196
  "unique_name": "unique_name",
191
197
  "data_enabled": true,
198
+ "data_limit": 1000,
192
199
  "data_metering": "payg",
193
200
  "date_created": "2019-10-15T20:00:00Z",
194
201
  "date_updated": "2019-10-15T20:00:00Z",
195
202
  "commands_enabled": true,
196
203
  "commands_method": "POST",
197
204
  "commands_url": null,
205
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
198
206
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
199
207
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
200
208
  }