twilio-ruby 5.31.2 → 5.31.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGES.md +31 -0
  4. data/CODE_OF_CONDUCT.md +73 -0
  5. data/ISSUE_TEMPLATE.md +13 -13
  6. data/LICENSE.md +1 -1
  7. data/PULL_REQUEST_TEMPLATE.md +31 -0
  8. data/README.md +3 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +35 -1
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -14
  11. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +359 -0
  12. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +12 -6
  13. data/lib/twilio-ruby/rest/preview.rb +2 -9
  14. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +2 -2
  15. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +5 -5
  16. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -5
  17. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +21 -0
  18. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +21 -13
  19. data/lib/twilio-ruby/rest/studio/v2/flow.rb +5 -5
  20. data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +2 -2
  21. data/lib/twilio-ruby/rest/verify/v2/service.rb +19 -3
  22. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
  23. data/lib/twilio-ruby/twiml/voice_response.rb +9 -6
  24. data/lib/twilio-ruby/version.rb +1 -1
  25. data/spec/integration/api/v2010/account/call/notification_spec.rb +8 -44
  26. data/spec/integration/api/v2010/account/call/payment_spec.rb +135 -0
  27. data/spec/integration/api/v2010/account/call_spec.rb +20 -10
  28. data/spec/integration/preview/bulk_exports/export/job_spec.rb +3 -0
  29. data/spec/integration/studio/v2/flow_spec.rb +7 -3
  30. data/spec/integration/studio/v2/flow_validate_spec.rb +7 -3
  31. data/spec/integration/verify/v2/service/verification_check_spec.rb +26 -0
  32. data/spec/integration/verify/v2/service_spec.rb +4 -0
  33. metadata +7 -12
  34. data/lib/twilio-ruby/rest/preview/acc_security.rb +0 -43
  35. data/lib/twilio-ruby/rest/preview/acc_security/service.rb +0 -395
  36. data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +0 -185
  37. data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +0 -182
  38. data/spec/integration/preview/acc_security/service/verification_check_spec.rb +0 -52
  39. data/spec/integration/preview/acc_security/service/verification_spec.rb +0 -52
  40. data/spec/integration/preview/acc_security/service_spec.rb +0 -185
@@ -1,185 +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 AccSecurity < Version
13
- class ServiceContext < InstanceContext
14
- ##
15
- # 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.
16
- class VerificationList < ListResource
17
- ##
18
- # Initialize the VerificationList
19
- # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique SID identifier of the Service.
21
- # @return [VerificationList] VerificationList
22
- def initialize(version, service_sid: nil)
23
- super(version)
24
-
25
- # Path Solution
26
- @solution = {service_sid: service_sid}
27
- @uri = "/Services/#{@solution[:service_sid]}/Verifications"
28
- end
29
-
30
- ##
31
- # Retrieve a single page of VerificationInstance records from the API.
32
- # Request is executed immediately.
33
- # @param [String] to The To phonenumber of the phone being verified
34
- # @param [String] channel The method in which the phone will be verified. Either
35
- # sms or call
36
- # @param [String] custom_message A character string containing a custom message
37
- # for this verification
38
- # @return [VerificationInstance] Newly created VerificationInstance
39
- def create(to: nil, channel: nil, custom_message: :unset)
40
- data = Twilio::Values.of({'To' => to, 'Channel' => channel, 'CustomMessage' => custom_message, })
41
-
42
- payload = @version.create(
43
- 'POST',
44
- @uri,
45
- data: data
46
- )
47
-
48
- VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid], )
49
- end
50
-
51
- ##
52
- # Provide a user friendly representation
53
- def to_s
54
- '#<Twilio.Preview.AccSecurity.VerificationList>'
55
- end
56
- end
57
-
58
- ##
59
- # 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.
60
- class VerificationPage < Page
61
- ##
62
- # Initialize the VerificationPage
63
- # @param [Version] version Version that contains the resource
64
- # @param [Response] response Response from the API
65
- # @param [Hash] solution Path solution for the resource
66
- # @return [VerificationPage] VerificationPage
67
- def initialize(version, response, solution)
68
- super(version, response)
69
-
70
- # Path Solution
71
- @solution = solution
72
- end
73
-
74
- ##
75
- # Build an instance of VerificationInstance
76
- # @param [Hash] payload Payload response from the API
77
- # @return [VerificationInstance] VerificationInstance
78
- def get_instance(payload)
79
- VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid], )
80
- end
81
-
82
- ##
83
- # Provide a user friendly representation
84
- def to_s
85
- '<Twilio.Preview.AccSecurity.VerificationPage>'
86
- end
87
- end
88
-
89
- ##
90
- # 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.
91
- class VerificationInstance < InstanceResource
92
- ##
93
- # Initialize the VerificationInstance
94
- # @param [Version] version Version that contains the resource
95
- # @param [Hash] payload payload that contains response from Twilio
96
- # @param [String] service_sid The unique SID identifier of the Service.
97
- # @return [VerificationInstance] VerificationInstance
98
- def initialize(version, payload, service_sid: nil)
99
- super(version)
100
-
101
- # Marshaled Properties
102
- @properties = {
103
- 'sid' => payload['sid'],
104
- 'service_sid' => payload['service_sid'],
105
- 'account_sid' => payload['account_sid'],
106
- 'to' => payload['to'],
107
- 'channel' => payload['channel'],
108
- 'status' => payload['status'],
109
- 'valid' => payload['valid'],
110
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
111
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
112
- }
113
- end
114
-
115
- ##
116
- # @return [String] A string that uniquely identifies this Verification.
117
- def sid
118
- @properties['sid']
119
- end
120
-
121
- ##
122
- # @return [String] Service Sid.
123
- def service_sid
124
- @properties['service_sid']
125
- end
126
-
127
- ##
128
- # @return [String] Account Sid.
129
- def account_sid
130
- @properties['account_sid']
131
- end
132
-
133
- ##
134
- # @return [String] To phonenumber
135
- def to
136
- @properties['to']
137
- end
138
-
139
- ##
140
- # @return [verification.Channel] sms or call
141
- def channel
142
- @properties['channel']
143
- end
144
-
145
- ##
146
- # @return [String] pending, approved, denied or expired
147
- def status
148
- @properties['status']
149
- end
150
-
151
- ##
152
- # @return [Boolean] successful verification
153
- def valid
154
- @properties['valid']
155
- end
156
-
157
- ##
158
- # @return [Time] The date this Verification was created
159
- def date_created
160
- @properties['date_created']
161
- end
162
-
163
- ##
164
- # @return [Time] The date this Verification was updated
165
- def date_updated
166
- @properties['date_updated']
167
- end
168
-
169
- ##
170
- # Provide a user friendly representation
171
- def to_s
172
- "<Twilio.Preview.AccSecurity.VerificationInstance>"
173
- end
174
-
175
- ##
176
- # Provide a detailed, user friendly representation
177
- def inspect
178
- "<Twilio.Preview.AccSecurity.VerificationInstance>"
179
- end
180
- end
181
- end
182
- end
183
- end
184
- end
185
- end
@@ -1,182 +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 AccSecurity < Version
13
- class ServiceContext < InstanceContext
14
- ##
15
- # 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.
16
- class VerificationCheckList < ListResource
17
- ##
18
- # Initialize the VerificationCheckList
19
- # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique SID identifier of the Service.
21
- # @return [VerificationCheckList] VerificationCheckList
22
- def initialize(version, service_sid: nil)
23
- super(version)
24
-
25
- # Path Solution
26
- @solution = {service_sid: service_sid}
27
- @uri = "/Services/#{@solution[:service_sid]}/VerificationCheck"
28
- end
29
-
30
- ##
31
- # Retrieve a single page of VerificationCheckInstance records from the API.
32
- # Request is executed immediately.
33
- # @param [String] code The 4-10 character string being verified
34
- # @param [String] to The To phonenumber of the phone being verified
35
- # @return [VerificationCheckInstance] Newly created VerificationCheckInstance
36
- def create(code: nil, to: :unset)
37
- data = Twilio::Values.of({'Code' => code, 'To' => to, })
38
-
39
- payload = @version.create(
40
- 'POST',
41
- @uri,
42
- data: data
43
- )
44
-
45
- VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid], )
46
- end
47
-
48
- ##
49
- # Provide a user friendly representation
50
- def to_s
51
- '#<Twilio.Preview.AccSecurity.VerificationCheckList>'
52
- end
53
- end
54
-
55
- ##
56
- # 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.
57
- class VerificationCheckPage < Page
58
- ##
59
- # Initialize the VerificationCheckPage
60
- # @param [Version] version Version that contains the resource
61
- # @param [Response] response Response from the API
62
- # @param [Hash] solution Path solution for the resource
63
- # @return [VerificationCheckPage] VerificationCheckPage
64
- def initialize(version, response, solution)
65
- super(version, response)
66
-
67
- # Path Solution
68
- @solution = solution
69
- end
70
-
71
- ##
72
- # Build an instance of VerificationCheckInstance
73
- # @param [Hash] payload Payload response from the API
74
- # @return [VerificationCheckInstance] VerificationCheckInstance
75
- def get_instance(payload)
76
- VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid], )
77
- end
78
-
79
- ##
80
- # Provide a user friendly representation
81
- def to_s
82
- '<Twilio.Preview.AccSecurity.VerificationCheckPage>'
83
- end
84
- end
85
-
86
- ##
87
- # 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.
88
- class VerificationCheckInstance < InstanceResource
89
- ##
90
- # Initialize the VerificationCheckInstance
91
- # @param [Version] version Version that contains the resource
92
- # @param [Hash] payload payload that contains response from Twilio
93
- # @param [String] service_sid The unique SID identifier of the Service.
94
- # @return [VerificationCheckInstance] VerificationCheckInstance
95
- def initialize(version, payload, service_sid: nil)
96
- super(version)
97
-
98
- # Marshaled Properties
99
- @properties = {
100
- 'sid' => payload['sid'],
101
- 'service_sid' => payload['service_sid'],
102
- 'account_sid' => payload['account_sid'],
103
- 'to' => payload['to'],
104
- 'channel' => payload['channel'],
105
- 'status' => payload['status'],
106
- 'valid' => payload['valid'],
107
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
108
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
109
- }
110
- end
111
-
112
- ##
113
- # @return [String] A string that uniquely identifies this Verification Check.
114
- def sid
115
- @properties['sid']
116
- end
117
-
118
- ##
119
- # @return [String] Service Sid.
120
- def service_sid
121
- @properties['service_sid']
122
- end
123
-
124
- ##
125
- # @return [String] Account Sid.
126
- def account_sid
127
- @properties['account_sid']
128
- end
129
-
130
- ##
131
- # @return [String] To phonenumber
132
- def to
133
- @properties['to']
134
- end
135
-
136
- ##
137
- # @return [verification_check.Channel] sms or call
138
- def channel
139
- @properties['channel']
140
- end
141
-
142
- ##
143
- # @return [String] pending, approved, denied or expired
144
- def status
145
- @properties['status']
146
- end
147
-
148
- ##
149
- # @return [Boolean] successful verification
150
- def valid
151
- @properties['valid']
152
- end
153
-
154
- ##
155
- # @return [Time] The date this Verification Check was created
156
- def date_created
157
- @properties['date_created']
158
- end
159
-
160
- ##
161
- # @return [Time] The date this Verification Check was updated
162
- def date_updated
163
- @properties['date_updated']
164
- end
165
-
166
- ##
167
- # Provide a user friendly representation
168
- def to_s
169
- "<Twilio.Preview.AccSecurity.VerificationCheckInstance>"
170
- end
171
-
172
- ##
173
- # Provide a detailed, user friendly representation
174
- def inspect
175
- "<Twilio.Preview.AccSecurity.VerificationCheckInstance>"
176
- end
177
- end
178
- end
179
- end
180
- end
181
- end
182
- end
@@ -1,52 +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 'VerificationCheck' do
12
- it "can create" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
- .verification_checks.create(code: 'code')
18
- }.to raise_exception(Twilio::REST::TwilioError)
19
-
20
- values = {'Code' => 'code', }
21
- expect(
22
- @holodeck.has_request?(Holodeck::Request.new(
23
- method: 'post',
24
- url: 'https://preview.twilio.com/Verification/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VerificationCheck',
25
- data: values,
26
- ))).to eq(true)
27
- end
28
-
29
- it "receives verification_checks responses" do
30
- @holodeck.mock(Twilio::Response.new(
31
- 201,
32
- %q[
33
- {
34
- "sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
- "to": "+15017122661",
38
- "channel": "sms",
39
- "status": "approved",
40
- "valid": false,
41
- "date_created": "2015-07-30T20:00:00Z",
42
- "date_updated": "2015-07-30T20:00:00Z"
43
- }
44
- ]
45
- ))
46
-
47
- actual = @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
- .verification_checks.create(code: 'code')
49
-
50
- expect(actual).to_not eq(nil)
51
- end
52
- end
@@ -1,52 +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 'Verification' do
12
- it "can create" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
17
- .verifications.create(to: 'to', channel: 'channel')
18
- }.to raise_exception(Twilio::REST::TwilioError)
19
-
20
- values = {'To' => 'to', 'Channel' => 'channel', }
21
- expect(
22
- @holodeck.has_request?(Holodeck::Request.new(
23
- method: 'post',
24
- url: 'https://preview.twilio.com/Verification/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications',
25
- data: values,
26
- ))).to eq(true)
27
- end
28
-
29
- it "receives create_verification responses" do
30
- @holodeck.mock(Twilio::Response.new(
31
- 201,
32
- %q[
33
- {
34
- "sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
- "service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37
- "to": "+15017122661",
38
- "channel": "sms",
39
- "status": "pending",
40
- "valid": null,
41
- "date_created": "2015-07-30T20:00:00Z",
42
- "date_updated": "2015-07-30T20:00:00Z"
43
- }
44
- ]
45
- ))
46
-
47
- actual = @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
48
- .verifications.create(to: 'to', channel: 'channel')
49
-
50
- expect(actual).to_not eq(nil)
51
- end
52
- end