twilio-ruby 5.31.5 → 5.31.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/CHANGES.md +31 -0
  4. data/Gemfile +0 -9
  5. data/Makefile +5 -14
  6. data/README.md +2 -2
  7. data/Rakefile +0 -54
  8. data/githooks/pre-commit +0 -0
  9. data/lib/twilio-ruby/rest/authy/v1/service.rb +12 -2
  10. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +0 -7
  11. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +0 -7
  12. data/lib/twilio-ruby/rest/client.rb +7 -0
  13. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
  14. data/lib/twilio-ruby/rest/preview.rb +0 -6
  15. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +8 -2
  16. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +113 -8
  17. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -7
  18. data/lib/twilio-ruby/rest/serverless/v1/service.rb +23 -4
  19. data/lib/twilio-ruby/rest/supersim.rb +70 -0
  20. data/lib/twilio-ruby/rest/supersim/v1.rb +80 -0
  21. data/lib/twilio-ruby/rest/supersim/v1/command.rb +381 -0
  22. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +390 -0
  23. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +380 -0
  24. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +274 -0
  25. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +4 -3
  26. data/lib/twilio-ruby/version.rb +1 -1
  27. data/spec/integration/api/v2010/account/call/payment_spec.rb +3 -3
  28. data/spec/integration/api/v2010/account/message_spec.rb +1 -1
  29. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +0 -5
  30. data/spec/integration/authy/v1/service/entity/factor_spec.rb +0 -4
  31. data/spec/integration/authy/v1/service_spec.rb +4 -0
  32. data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +9 -3
  33. data/spec/integration/preview/bulk_exports/export/day_spec.rb +67 -8
  34. data/spec/integration/serverless/v1/service_spec.rb +3 -0
  35. data/spec/integration/supersim/v1/command_spec.rb +186 -0
  36. data/spec/integration/supersim/v1/fleet_spec.rb +208 -0
  37. data/spec/integration/supersim/v1/sim_spec.rb +231 -0
  38. data/spec/integration/supersim/v1/usage_record_spec.rb +203 -0
  39. data/spec/integration/verify/v2/service/verification_spec.rb +42 -30
  40. data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +1 -1
  41. data/spec/integration/voice/v1/dialing_permissions/settings_spec.rb +1 -1
  42. data/twilio-ruby.gemspec +5 -0
  43. metadata +86 -5
  44. data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +0 -146
  45. data/spec/integration/preview/trusted_comms/device_spec.rb +0 -45
@@ -75,7 +75,7 @@ describe 'SubscribeRules' do
75
75
 
76
76
  it "receives update_filters responses" do
77
77
  @holodeck.mock(Twilio::Response.new(
78
- 202,
78
+ 200,
79
79
  %q[
80
80
  {
81
81
  "participant_sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -60,7 +60,7 @@ describe 'Settings' do
60
60
 
61
61
  it "receives update responses" do
62
62
  @holodeck.mock(Twilio::Response.new(
63
- 202,
63
+ 200,
64
64
  %q[
65
65
  {
66
66
  "dialing_permissions_inheritance": true,
@@ -31,6 +31,11 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
32
32
 
33
33
  spec.add_development_dependency 'bundler', '>= 1.5', '< 3.0'
34
+ spec.add_development_dependency 'equivalent-xml', '~> 0.6'
35
+ spec.add_development_dependency 'fakeweb', '~> 1.3'
36
+ spec.add_development_dependency 'rack', '~> 2.0'
37
+ spec.add_development_dependency 'rake', '~> 13.0'
38
+ spec.add_development_dependency 'rspec', '~> 3.0'
34
39
  spec.add_development_dependency 'rubocop', '~> 0.80.0'
35
40
  spec.add_development_dependency 'yard', '~> 0.9.9'
36
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.31.5
4
+ version: 5.31.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -84,6 +84,76 @@ dependencies:
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '3.0'
87
+ - !ruby/object:Gem::Dependency
88
+ name: equivalent-xml
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '0.6'
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '0.6'
101
+ - !ruby/object:Gem::Dependency
102
+ name: fakeweb
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '1.3'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - "~>"
113
+ - !ruby/object:Gem::Version
114
+ version: '1.3'
115
+ - !ruby/object:Gem::Dependency
116
+ name: rack
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - "~>"
120
+ - !ruby/object:Gem::Version
121
+ version: '2.0'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '2.0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: rake
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '13.0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: '13.0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: rspec
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '3.0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '3.0'
87
157
  - !ruby/object:Gem::Dependency
88
158
  name: rubocop
89
159
  requirement: !ruby/object:Gem::Requirement
@@ -408,7 +478,6 @@ files:
408
478
  - lib/twilio-ruby/rest/preview/trusted_comms/business/insights/success_rate.rb
409
479
  - lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
410
480
  - lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb
411
- - lib/twilio-ruby/rest/preview/trusted_comms/device.rb
412
481
  - lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb
413
482
  - lib/twilio-ruby/rest/preview/understand.rb
414
483
  - lib/twilio-ruby/rest/preview/understand/assistant.rb
@@ -484,6 +553,12 @@ files:
484
553
  - lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
485
554
  - lib/twilio-ruby/rest/studio/v2/flow/test_user.rb
486
555
  - lib/twilio-ruby/rest/studio/v2/flow_validate.rb
556
+ - lib/twilio-ruby/rest/supersim.rb
557
+ - lib/twilio-ruby/rest/supersim/v1.rb
558
+ - lib/twilio-ruby/rest/supersim/v1/command.rb
559
+ - lib/twilio-ruby/rest/supersim/v1/fleet.rb
560
+ - lib/twilio-ruby/rest/supersim/v1/sim.rb
561
+ - lib/twilio-ruby/rest/supersim/v1/usage_record.rb
487
562
  - lib/twilio-ruby/rest/sync.rb
488
563
  - lib/twilio-ruby/rest/sync/v1.rb
489
564
  - lib/twilio-ruby/rest/sync/v1/service.rb
@@ -786,7 +861,6 @@ files:
786
861
  - spec/integration/preview/trusted_comms/business_spec.rb
787
862
  - spec/integration/preview/trusted_comms/cps_spec.rb
788
863
  - spec/integration/preview/trusted_comms/current_call_spec.rb
789
- - spec/integration/preview/trusted_comms/device_spec.rb
790
864
  - spec/integration/preview/trusted_comms/phone_call_spec.rb
791
865
  - spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
792
866
  - spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
@@ -850,6 +924,10 @@ files:
850
924
  - spec/integration/studio/v2/flow/test_user_spec.rb
851
925
  - spec/integration/studio/v2/flow_spec.rb
852
926
  - spec/integration/studio/v2/flow_validate_spec.rb
927
+ - spec/integration/supersim/v1/command_spec.rb
928
+ - spec/integration/supersim/v1/fleet_spec.rb
929
+ - spec/integration/supersim/v1/sim_spec.rb
930
+ - spec/integration/supersim/v1/usage_record_spec.rb
853
931
  - spec/integration/sync/v1/service/document/document_permission_spec.rb
854
932
  - spec/integration/sync/v1/service/document_spec.rb
855
933
  - spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb
@@ -1176,7 +1254,6 @@ test_files:
1176
1254
  - spec/integration/preview/trusted_comms/business_spec.rb
1177
1255
  - spec/integration/preview/trusted_comms/cps_spec.rb
1178
1256
  - spec/integration/preview/trusted_comms/current_call_spec.rb
1179
- - spec/integration/preview/trusted_comms/device_spec.rb
1180
1257
  - spec/integration/preview/trusted_comms/phone_call_spec.rb
1181
1258
  - spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
1182
1259
  - spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
@@ -1240,6 +1317,10 @@ test_files:
1240
1317
  - spec/integration/studio/v2/flow/test_user_spec.rb
1241
1318
  - spec/integration/studio/v2/flow_spec.rb
1242
1319
  - spec/integration/studio/v2/flow_validate_spec.rb
1320
+ - spec/integration/supersim/v1/command_spec.rb
1321
+ - spec/integration/supersim/v1/fleet_spec.rb
1322
+ - spec/integration/supersim/v1/sim_spec.rb
1323
+ - spec/integration/supersim/v1/usage_record_spec.rb
1243
1324
  - spec/integration/sync/v1/service/document/document_permission_spec.rb
1244
1325
  - spec/integration/sync/v1/service/document_spec.rb
1245
1326
  - spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb
@@ -1,146 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- module Twilio
10
- module REST
11
- class Preview < Domain
12
- class TrustedComms < Version
13
- ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
- class DeviceList < ListResource
16
- ##
17
- # Initialize the DeviceList
18
- # @param [Version] version Version that contains the resource
19
- # @return [DeviceList] DeviceList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- @uri = "/Devices"
26
- end
27
-
28
- ##
29
- # Retrieve a single page of DeviceInstance records from the API.
30
- # Request is executed immediately.
31
- # @param [String] phone_number The end user Phone Number linked to the device,
32
- # given in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). The SDK
33
- # or partner app is responsible of verifying this phone number veracity.
34
- # @param [String] push_token The Push Token for this Phone Number, linked to the
35
- # correct SDK's application, certificate and keys.
36
- # @return [DeviceInstance] Newly created DeviceInstance
37
- def create(phone_number: nil, push_token: nil)
38
- data = Twilio::Values.of({'PhoneNumber' => phone_number, 'PushToken' => push_token, })
39
-
40
- payload = @version.create(
41
- 'POST',
42
- @uri,
43
- data: data
44
- )
45
-
46
- DeviceInstance.new(@version, payload, )
47
- end
48
-
49
- ##
50
- # Provide a user friendly representation
51
- def to_s
52
- '#<Twilio.Preview.TrustedComms.DeviceList>'
53
- end
54
- end
55
-
56
- ##
57
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
58
- class DevicePage < Page
59
- ##
60
- # Initialize the DevicePage
61
- # @param [Version] version Version that contains the resource
62
- # @param [Response] response Response from the API
63
- # @param [Hash] solution Path solution for the resource
64
- # @return [DevicePage] DevicePage
65
- def initialize(version, response, solution)
66
- super(version, response)
67
-
68
- # Path Solution
69
- @solution = solution
70
- end
71
-
72
- ##
73
- # Build an instance of DeviceInstance
74
- # @param [Hash] payload Payload response from the API
75
- # @return [DeviceInstance] DeviceInstance
76
- def get_instance(payload)
77
- DeviceInstance.new(@version, payload, )
78
- end
79
-
80
- ##
81
- # Provide a user friendly representation
82
- def to_s
83
- '<Twilio.Preview.TrustedComms.DevicePage>'
84
- end
85
- end
86
-
87
- ##
88
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
89
- class DeviceInstance < InstanceResource
90
- ##
91
- # Initialize the DeviceInstance
92
- # @param [Version] version Version that contains the resource
93
- # @param [Hash] payload payload that contains response from Twilio
94
- # @return [DeviceInstance] DeviceInstance
95
- def initialize(version, payload)
96
- super(version)
97
-
98
- # Marshaled Properties
99
- @properties = {
100
- 'binding_sid' => payload['binding_sid'],
101
- 'phone_number' => payload['phone_number'],
102
- 'sid' => payload['sid'],
103
- 'url' => payload['url'],
104
- }
105
- end
106
-
107
- ##
108
- # @return [String] Binding Sid.
109
- def binding_sid
110
- @properties['binding_sid']
111
- end
112
-
113
- ##
114
- # @return [String] The end user Phone Number
115
- def phone_number
116
- @properties['phone_number']
117
- end
118
-
119
- ##
120
- # @return [String] A string that uniquely identifies this Device.
121
- def sid
122
- @properties['sid']
123
- end
124
-
125
- ##
126
- # @return [String] The URL of this resource.
127
- def url
128
- @properties['url']
129
- end
130
-
131
- ##
132
- # Provide a user friendly representation
133
- def to_s
134
- "<Twilio.Preview.TrustedComms.DeviceInstance>"
135
- end
136
-
137
- ##
138
- # Provide a detailed, user friendly representation
139
- def inspect
140
- "<Twilio.Preview.TrustedComms.DeviceInstance>"
141
- end
142
- end
143
- end
144
- end
145
- end
146
- end
@@ -1,45 +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 'Device' do
12
- it "can create" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.preview.trusted_comms.devices.create(phone_number: 'phone_number', push_token: 'push_token')
17
- }.to raise_exception(Twilio::REST::TwilioError)
18
-
19
- values = {'PhoneNumber' => 'phone_number', 'PushToken' => 'push_token', }
20
- expect(
21
- @holodeck.has_request?(Holodeck::Request.new(
22
- method: 'post',
23
- url: 'https://preview.twilio.com/TrustedComms/Devices',
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
- "binding_sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
- "phone_number": "+573000000000",
35
- "sid": "DDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "url": "https://preview.twilio.com/TrustedComms/Devices"
37
- }
38
- ]
39
- ))
40
-
41
- actual = @client.preview.trusted_comms.devices.create(phone_number: 'phone_number', push_token: 'push_token')
42
-
43
- expect(actual).to_not eq(nil)
44
- end
45
- end