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
@@ -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
  }
@@ -0,0 +1,44 @@
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 'BrandsInformation' do
12
+ it "can fetch" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.preview.trusted_comms.brands_information().fetch()
17
+ }.to raise_exception(Twilio::REST::TwilioError)
18
+
19
+ values = {}
20
+ expect(
21
+ @holodeck.has_request?(Holodeck::Request.new(
22
+ method: 'get',
23
+ url: 'https://preview.twilio.com/TrustedComms/BrandsInformation',
24
+ ))).to eq(true)
25
+ end
26
+
27
+ it "receives fetch_results_with_etag responses" do
28
+ @holodeck.mock(Twilio::Response.new(
29
+ 200,
30
+ %q[
31
+ {
32
+ "update_time": "2020-05-19T19:47:51Z",
33
+ "file_link": "https://www.twilio.com",
34
+ "file_link_ttl_in_seconds": "900",
35
+ "url": "https://preview.twilio.com/TrustedComms/BrandsInformation"
36
+ }
37
+ ]
38
+ ))
39
+
40
+ actual = @client.preview.trusted_comms.brands_information().fetch()
41
+
42
+ expect(actual).to_not eq(nil)
43
+ end
44
+ end
@@ -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')
20
+ }.to raise_exception(Twilio::REST::TwilioError)
21
+
22
+ values = {'PhoneNumberSid' => 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
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')
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,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",
@@ -13,14 +13,15 @@ describe 'Fleet' do
13
13
  @holodeck.mock(Twilio::Response.new(500, ''))
14
14
 
15
15
  expect {
16
- @client.supersim.v1.fleets.create()
16
+ @client.supersim.v1.fleets.create(network_access_profile: 'HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
17
17
  }.to raise_exception(Twilio::REST::TwilioError)
18
18
 
19
- values = {}
19
+ values = {'NetworkAccessProfile' => 'HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
20
20
  expect(
21
21
  @holodeck.has_request?(Holodeck::Request.new(
22
22
  method: 'post',
23
23
  url: 'https://supersim.twilio.com/v1/Fleets',
24
+ data: values,
24
25
  ))).to eq(true)
25
26
  end
26
27
 
@@ -32,19 +33,21 @@ describe 'Fleet' do
32
33
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
34
  "unique_name": "unique_name",
34
35
  "data_enabled": true,
36
+ "data_limit": 1000,
35
37
  "data_metering": "payg",
36
38
  "date_created": "2019-07-30T20:00:00Z",
37
39
  "date_updated": "2019-07-30T20:00:00Z",
38
40
  "commands_enabled": true,
39
41
  "commands_method": "GET",
40
42
  "commands_url": "https://google.com",
43
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41
44
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
42
45
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
46
  }
44
47
  ]
45
48
  ))
46
49
 
47
- actual = @client.supersim.v1.fleets.create()
50
+ actual = @client.supersim.v1.fleets.create(network_access_profile: 'HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
48
51
 
49
52
  expect(actual).to_not eq(nil)
50
53
  end
@@ -72,12 +75,14 @@ describe 'Fleet' do
72
75
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73
76
  "unique_name": "unique_name",
74
77
  "data_enabled": true,
78
+ "data_limit": 1000,
75
79
  "data_metering": "payg",
76
80
  "date_created": "2019-07-30T20:00:00Z",
77
81
  "date_updated": "2019-07-30T20:00:00Z",
78
82
  "commands_enabled": true,
79
83
  "commands_method": "POST",
80
84
  "commands_url": null,
85
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
81
86
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
82
87
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
83
88
  }
@@ -111,13 +116,13 @@ describe 'Fleet' do
111
116
  {
112
117
  "fleets": [],
113
118
  "meta": {
114
- "first_page_url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0",
119
+ "first_page_url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
115
120
  "key": "fleets",
116
121
  "next_page_url": null,
117
122
  "page": 0,
118
123
  "page_size": 50,
119
124
  "previous_page_url": null,
120
- "url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0"
125
+ "url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
121
126
  }
122
127
  }
123
128
  ]
@@ -134,25 +139,27 @@ describe 'Fleet' do
134
139
  %q[
135
140
  {
136
141
  "meta": {
137
- "first_page_url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0",
142
+ "first_page_url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
138
143
  "key": "fleets",
139
144
  "next_page_url": null,
140
145
  "page": 0,
141
146
  "page_size": 50,
142
147
  "previous_page_url": null,
143
- "url": "https://supersim.twilio.com/v1/Fleets?PageSize=50&Page=0"
148
+ "url": "https://supersim.twilio.com/v1/Fleets?NetworkAccessProfile=HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
144
149
  },
145
150
  "fleets": [
146
151
  {
147
152
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
148
153
  "unique_name": "Pilot Fleet",
149
154
  "data_enabled": true,
155
+ "data_limit": 1000,
150
156
  "data_metering": "payg",
151
157
  "date_created": "2019-10-15T20:00:00Z",
152
158
  "date_updated": "2019-10-15T20:00:00Z",
153
159
  "commands_enabled": true,
154
160
  "commands_method": "POST",
155
161
  "commands_url": null,
162
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
156
163
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
157
164
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
158
165
  }
@@ -189,12 +196,14 @@ describe 'Fleet' do
189
196
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190
197
  "unique_name": "unique_name",
191
198
  "data_enabled": true,
199
+ "data_limit": 1000,
192
200
  "data_metering": "payg",
193
201
  "date_created": "2019-10-15T20:00:00Z",
194
202
  "date_updated": "2019-10-15T20:00:00Z",
195
203
  "commands_enabled": true,
196
204
  "commands_method": "POST",
197
205
  "commands_url": null,
206
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
198
207
  "sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
199
208
  "url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
200
209
  }
@@ -0,0 +1,179 @@
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 'NetworkAccessProfileNetwork' do
12
+ it "can read" do
13
+ @holodeck.mock(Twilio::Response.new(500, ''))
14
+
15
+ expect {
16
+ @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
+ .networks.list()
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://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Networks',
25
+ ))).to eq(true)
26
+ end
27
+
28
+ it "receives read_full responses" do
29
+ @holodeck.mock(Twilio::Response.new(
30
+ 200,
31
+ %q[
32
+ {
33
+ "meta": {
34
+ "first_page_url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks?PageSize=50&Page=0",
35
+ "key": "networks",
36
+ "next_page_url": null,
37
+ "page": 0,
38
+ "page_size": 50,
39
+ "previous_page_url": null,
40
+ "url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks?PageSize=50&Page=0"
41
+ },
42
+ "networks": [
43
+ {
44
+ "sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46
+ "friendly_name": "AT&T",
47
+ "iso_country": "us",
48
+ "identifiers": [
49
+ {
50
+ "mcc": "310",
51
+ "mnc": "410"
52
+ }
53
+ ],
54
+ "url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
55
+ }
56
+ ]
57
+ }
58
+ ]
59
+ ))
60
+
61
+ actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
62
+ .networks.list()
63
+
64
+ expect(actual).to_not eq(nil)
65
+ end
66
+
67
+ it "can create" do
68
+ @holodeck.mock(Twilio::Response.new(500, ''))
69
+
70
+ expect {
71
+ @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
72
+ .networks.create(network: 'HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
73
+ }.to raise_exception(Twilio::REST::TwilioError)
74
+
75
+ values = {'Network' => 'HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
76
+ expect(
77
+ @holodeck.has_request?(Holodeck::Request.new(
78
+ method: 'post',
79
+ url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Networks',
80
+ data: values,
81
+ ))).to eq(true)
82
+ end
83
+
84
+ it "receives create responses" do
85
+ @holodeck.mock(Twilio::Response.new(
86
+ 201,
87
+ %q[
88
+ {
89
+ "sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
90
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
91
+ "friendly_name": "AT&T",
92
+ "iso_country": "us",
93
+ "identifiers": [
94
+ {
95
+ "mcc": "310",
96
+ "mnc": "410"
97
+ }
98
+ ],
99
+ "url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
100
+ }
101
+ ]
102
+ ))
103
+
104
+ actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
105
+ .networks.create(network: 'HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
106
+
107
+ expect(actual).to_not eq(nil)
108
+ end
109
+
110
+ it "can delete" do
111
+ @holodeck.mock(Twilio::Response.new(500, ''))
112
+
113
+ expect {
114
+ @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
115
+ .networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
116
+ }.to raise_exception(Twilio::REST::TwilioError)
117
+
118
+ values = {}
119
+ expect(
120
+ @holodeck.has_request?(Holodeck::Request.new(
121
+ method: 'delete',
122
+ url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Networks/HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
123
+ ))).to eq(true)
124
+ end
125
+
126
+ it "receives delete responses" do
127
+ @holodeck.mock(Twilio::Response.new(
128
+ 204,
129
+ nil,
130
+ ))
131
+
132
+ actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
133
+ .networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
134
+
135
+ expect(actual).to eq(true)
136
+ end
137
+
138
+ it "can fetch" do
139
+ @holodeck.mock(Twilio::Response.new(500, ''))
140
+
141
+ expect {
142
+ @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
143
+ .networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
144
+ }.to raise_exception(Twilio::REST::TwilioError)
145
+
146
+ values = {}
147
+ expect(
148
+ @holodeck.has_request?(Holodeck::Request.new(
149
+ method: 'get',
150
+ url: 'https://supersim.twilio.com/v1/NetworkAccessProfiles/HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Networks/HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
151
+ ))).to eq(true)
152
+ end
153
+
154
+ it "receives fetch responses" do
155
+ @holodeck.mock(Twilio::Response.new(
156
+ 200,
157
+ %q[
158
+ {
159
+ "sid": "HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160
+ "network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
161
+ "friendly_name": "AT&T",
162
+ "iso_country": "us",
163
+ "identifiers": [
164
+ {
165
+ "mcc": "310",
166
+ "mnc": "410"
167
+ }
168
+ ],
169
+ "url": "https://supersim.twilio.com/v1/NetworkAccessProfiles/HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Networks/HWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
170
+ }
171
+ ]
172
+ ))
173
+
174
+ actual = @client.supersim.v1.network_access_profiles('HAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
175
+ .networks('HWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
176
+
177
+ expect(actual).to_not eq(nil)
178
+ end
179
+ end