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.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +31 -0
- data/CODE_OF_CONDUCT.md +73 -0
- data/ISSUE_TEMPLATE.md +13 -13
- data/LICENSE.md +1 -1
- data/PULL_REQUEST_TEMPLATE.md +31 -0
- data/README.md +3 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +35 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +359 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +12 -6
- data/lib/twilio-ruby/rest/preview.rb +2 -9
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +2 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +5 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +21 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +21 -13
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +5 -5
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +9 -6
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/notification_spec.rb +8 -44
- data/spec/integration/api/v2010/account/call/payment_spec.rb +135 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/preview/bulk_exports/export/job_spec.rb +3 -0
- data/spec/integration/studio/v2/flow_spec.rb +7 -3
- data/spec/integration/studio/v2/flow_validate_spec.rb +7 -3
- data/spec/integration/verify/v2/service/verification_check_spec.rb +26 -0
- data/spec/integration/verify/v2/service_spec.rb +4 -0
- metadata +7 -12
- data/lib/twilio-ruby/rest/preview/acc_security.rb +0 -43
- data/lib/twilio-ruby/rest/preview/acc_security/service.rb +0 -395
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +0 -185
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +0 -182
- data/spec/integration/preview/acc_security/service/verification_check_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service/verification_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service_spec.rb +0 -185
@@ -346,9 +346,10 @@ module Twilio
|
|
346
346
|
# Create a new <Siprec> element
|
347
347
|
# name:: Friendly name given to SIPREC
|
348
348
|
# connector_name:: Unique name for Connector
|
349
|
+
# track:: Track to be streamed to remote service
|
349
350
|
# keyword_args:: additional attributes
|
350
|
-
def siprec(name: nil, connector_name: nil, **keyword_args)
|
351
|
-
siprec = Siprec.new(name: name, connector_name: connector_name, **keyword_args)
|
351
|
+
def siprec(name: nil, connector_name: nil, track: nil, **keyword_args)
|
352
|
+
siprec = Siprec.new(name: name, connector_name: connector_name, track: track, **keyword_args)
|
352
353
|
|
353
354
|
yield(siprec) if block_given?
|
354
355
|
append(siprec)
|
@@ -434,9 +435,10 @@ module Twilio
|
|
434
435
|
# Create a new <Siprec> element
|
435
436
|
# name:: Friendly name given to SIPREC
|
436
437
|
# connector_name:: Unique name for Connector
|
438
|
+
# track:: Track to be streamed to remote service
|
437
439
|
# keyword_args:: additional attributes
|
438
|
-
def siprec(name: nil, connector_name: nil, **keyword_args)
|
439
|
-
siprec = Siprec.new(name: name, connector_name: connector_name, **keyword_args)
|
440
|
+
def siprec(name: nil, connector_name: nil, track: nil, **keyword_args)
|
441
|
+
siprec = Siprec.new(name: name, connector_name: connector_name, track: track, **keyword_args)
|
440
442
|
|
441
443
|
yield(siprec) if block_given?
|
442
444
|
append(siprec)
|
@@ -979,9 +981,10 @@ module Twilio
|
|
979
981
|
# status_callback_event:: Events to call status callback
|
980
982
|
# status_callback:: Status callback URL
|
981
983
|
# status_callback_method:: Status callback URL method
|
984
|
+
# byoc:: BYOC trunk SID (Beta)
|
982
985
|
# keyword_args:: additional attributes
|
983
|
-
def number(phone_number, send_digits: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
|
984
|
-
append(Number.new(phone_number, send_digits: send_digits, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args))
|
986
|
+
def number(phone_number, send_digits: nil, url: nil, method: nil, status_callback_event: nil, status_callback: nil, status_callback_method: nil, byoc: nil, **keyword_args)
|
987
|
+
append(Number.new(phone_number, send_digits: send_digits, url: url, method: method, status_callback_event: status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, byoc: byoc, **keyword_args))
|
985
988
|
end
|
986
989
|
|
987
990
|
##
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -47,7 +47,7 @@ describe 'Notification' do
|
|
47
47
|
"response_body": "",
|
48
48
|
"response_headers": "",
|
49
49
|
"sid": "NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
50
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
50
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
51
51
|
}
|
52
52
|
]
|
53
53
|
))
|
@@ -59,36 +59,6 @@ describe 'Notification' do
|
|
59
59
|
expect(actual).to_not eq(nil)
|
60
60
|
end
|
61
61
|
|
62
|
-
it "can delete" do
|
63
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
64
|
-
|
65
|
-
expect {
|
66
|
-
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
67
|
-
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
68
|
-
.notifications('NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
69
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
70
|
-
|
71
|
-
values = {}
|
72
|
-
expect(
|
73
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
74
|
-
method: 'delete',
|
75
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Notifications/NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
|
76
|
-
))).to eq(true)
|
77
|
-
end
|
78
|
-
|
79
|
-
it "receives delete responses" do
|
80
|
-
@holodeck.mock(Twilio::Response.new(
|
81
|
-
204,
|
82
|
-
nil,
|
83
|
-
))
|
84
|
-
|
85
|
-
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
86
|
-
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
87
|
-
.notifications('NOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
88
|
-
|
89
|
-
expect(actual).to eq(true)
|
90
|
-
end
|
91
|
-
|
92
62
|
it "can read" do
|
93
63
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
94
64
|
|
@@ -111,10 +81,6 @@ describe 'Notification' do
|
|
111
81
|
200,
|
112
82
|
%q[
|
113
83
|
{
|
114
|
-
"end": 0,
|
115
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=50&Page=0",
|
116
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=50&Page=0",
|
117
|
-
"next_page_uri": null,
|
118
84
|
"notifications": [
|
119
85
|
{
|
120
86
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -130,15 +96,16 @@ describe 'Notification' do
|
|
130
96
|
"request_method": null,
|
131
97
|
"request_url": "",
|
132
98
|
"sid": "NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
133
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
99
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
134
100
|
}
|
135
101
|
],
|
136
|
-
"num_pages": 1,
|
137
102
|
"page": 0,
|
138
103
|
"page_size": 50,
|
139
104
|
"previous_page_uri": null,
|
105
|
+
"end": 0,
|
106
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=1&Page=0",
|
107
|
+
"next_page_uri": null,
|
140
108
|
"start": 0,
|
141
|
-
"total": 1,
|
142
109
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json"
|
143
110
|
}
|
144
111
|
]
|
@@ -156,17 +123,14 @@ describe 'Notification' do
|
|
156
123
|
200,
|
157
124
|
%q[
|
158
125
|
{
|
159
|
-
"end": 0,
|
160
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=50&Page=0",
|
161
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=50&Page=0",
|
162
|
-
"next_page_uri": null,
|
163
126
|
"notifications": [],
|
164
|
-
"num_pages": 1,
|
165
127
|
"page": 0,
|
166
128
|
"page_size": 50,
|
167
129
|
"previous_page_uri": null,
|
130
|
+
"end": 0,
|
131
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json?PageSize=1&Page=0",
|
132
|
+
"next_page_uri": null,
|
168
133
|
"start": 0,
|
169
|
-
"total": 1,
|
170
134
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json"
|
171
135
|
}
|
172
136
|
]
|
@@ -0,0 +1,135 @@
|
|
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 'Payment' do
|
12
|
+
it "can create" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
18
|
+
.payments.create(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
19
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
20
|
+
|
21
|
+
values = {'IdempotencyKey' => 'idempotency_key', 'StatusCallback' => 'https://example.com', }
|
22
|
+
expect(
|
23
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
24
|
+
method: 'post',
|
25
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payments.json',
|
26
|
+
data: values,
|
27
|
+
))).to eq(true)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "receives start_payment_session_success responses" do
|
31
|
+
@holodeck.mock(Twilio::Response.new(
|
32
|
+
201,
|
33
|
+
%q[
|
34
|
+
{
|
35
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
|
+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
37
|
+
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000",
|
38
|
+
"date_updated": "Wed, 18 Dec 2019 20:02:01 +0000",
|
39
|
+
"sid": "PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
46
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
47
|
+
.payments.create(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
48
|
+
|
49
|
+
expect(actual).to_not eq(nil)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "can update" do
|
53
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
54
|
+
|
55
|
+
expect {
|
56
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
57
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
58
|
+
.payments('PKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
59
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
60
|
+
|
61
|
+
values = {'IdempotencyKey' => 'idempotency_key', 'StatusCallback' => 'https://example.com', }
|
62
|
+
expect(
|
63
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
64
|
+
method: 'post',
|
65
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Payments/PKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
|
66
|
+
data: values,
|
67
|
+
))).to eq(true)
|
68
|
+
end
|
69
|
+
|
70
|
+
it "receives collect_credit_card_number responses" do
|
71
|
+
@holodeck.mock(Twilio::Response.new(
|
72
|
+
202,
|
73
|
+
%q[
|
74
|
+
{
|
75
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
76
|
+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
77
|
+
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000",
|
78
|
+
"date_updated": "Wed, 18 Dec 2019 20:02:01 +0000",
|
79
|
+
"sid": "PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
80
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
81
|
+
}
|
82
|
+
]
|
83
|
+
))
|
84
|
+
|
85
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
86
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
87
|
+
.payments('PKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
88
|
+
|
89
|
+
expect(actual).to_not eq(nil)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "receives collect_credit_card_expiry_date responses" do
|
93
|
+
@holodeck.mock(Twilio::Response.new(
|
94
|
+
202,
|
95
|
+
%q[
|
96
|
+
{
|
97
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
98
|
+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
99
|
+
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000",
|
100
|
+
"date_updated": "Wed, 18 Dec 2019 20:02:01 +0000",
|
101
|
+
"sid": "PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
102
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
103
|
+
}
|
104
|
+
]
|
105
|
+
))
|
106
|
+
|
107
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
108
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
109
|
+
.payments('PKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
110
|
+
|
111
|
+
expect(actual).to_not eq(nil)
|
112
|
+
end
|
113
|
+
|
114
|
+
it "receives complete_payment responses" do
|
115
|
+
@holodeck.mock(Twilio::Response.new(
|
116
|
+
202,
|
117
|
+
%q[
|
118
|
+
{
|
119
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
120
|
+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
121
|
+
"date_created": "Wed, 18 Dec 2019 20:02:01 +0000",
|
122
|
+
"date_updated": "Wed, 18 Dec 2019 20:02:01 +0000",
|
123
|
+
"sid": "PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
124
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
125
|
+
}
|
126
|
+
]
|
127
|
+
))
|
128
|
+
|
129
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
130
|
+
.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
131
|
+
.payments('PKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(idempotency_key: 'idempotency_key', status_callback: 'https://example.com')
|
132
|
+
|
133
|
+
expect(actual).to_not eq(nil)
|
134
|
+
end
|
135
|
+
end
|
@@ -56,7 +56,8 @@ describe 'Call' do
|
|
56
56
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
57
57
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
58
58
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
59
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
59
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
60
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
60
61
|
},
|
61
62
|
"to": "+14158675309",
|
62
63
|
"to_formatted": "(415) 867-5309",
|
@@ -101,7 +102,8 @@ describe 'Call' do
|
|
101
102
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
102
103
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
103
104
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
104
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
105
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
106
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
105
107
|
},
|
106
108
|
"to": "+14158675309",
|
107
109
|
"to_formatted": "(415) 867-5309",
|
@@ -190,7 +192,8 @@ describe 'Call' do
|
|
190
192
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
191
193
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
192
194
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
193
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
195
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
196
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
194
197
|
},
|
195
198
|
"to": "+13051913581",
|
196
199
|
"to_formatted": "(305) 191-3581",
|
@@ -253,7 +256,8 @@ describe 'Call' do
|
|
253
256
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
254
257
|
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
255
258
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
256
|
-
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
259
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
260
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
257
261
|
},
|
258
262
|
"to": "+13051913581",
|
259
263
|
"to_formatted": "(305) 191-3581",
|
@@ -285,7 +289,8 @@ describe 'Call' do
|
|
285
289
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Feedback.json",
|
286
290
|
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
287
291
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Notifications.json",
|
288
|
-
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Recordings.json"
|
292
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Recordings.json",
|
293
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Payments.json"
|
289
294
|
},
|
290
295
|
"to": "+13051913580",
|
291
296
|
"to_formatted": "(305) 191-3580",
|
@@ -342,7 +347,8 @@ describe 'Call' do
|
|
342
347
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
343
348
|
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
344
349
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
345
|
-
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
|
350
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
351
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
346
352
|
},
|
347
353
|
"to": "+13051913581",
|
348
354
|
"to_formatted": "(305) 191-3581",
|
@@ -374,7 +380,8 @@ describe 'Call' do
|
|
374
380
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Feedback.json",
|
375
381
|
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
376
382
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Notifications.json",
|
377
|
-
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Recordings.json"
|
383
|
+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Recordings.json",
|
384
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0/Payments.json"
|
378
385
|
},
|
379
386
|
"to": "+13051913580",
|
380
387
|
"to_formatted": "(305) 191-3580",
|
@@ -517,7 +524,8 @@ describe 'Call' do
|
|
517
524
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
518
525
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
519
526
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
520
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
527
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
528
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
521
529
|
},
|
522
530
|
"to": "+14158675309",
|
523
531
|
"to_formatted": "(415) 867-5309",
|
@@ -562,7 +570,8 @@ describe 'Call' do
|
|
562
570
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
563
571
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
564
572
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
565
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
573
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
574
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
566
575
|
},
|
567
576
|
"to": "+14158675309",
|
568
577
|
"to_formatted": "(415) 867-5309",
|
@@ -607,7 +616,8 @@ describe 'Call' do
|
|
607
616
|
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
|
608
617
|
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
|
609
618
|
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
|
610
|
-
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
|
619
|
+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json",
|
620
|
+
"payments": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments.json"
|
611
621
|
},
|
612
622
|
"to": "+14158675309",
|
613
623
|
"to_formatted": "(415) 867-5309",
|
@@ -13,10 +13,14 @@ describe 'Flow' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.studio.v2.flows.create(friendly_name: 'friendly_name', status: 'draft', definition:
|
16
|
+
@client.studio.v2.flows.create(friendly_name: 'friendly_name', status: 'draft', definition: {})
|
17
17
|
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
|
-
values = {
|
19
|
+
values = {
|
20
|
+
'FriendlyName' => 'friendly_name',
|
21
|
+
'Status' => 'draft',
|
22
|
+
'Definition' => Twilio.serialize_object({}),
|
23
|
+
}
|
20
24
|
expect(
|
21
25
|
@holodeck.has_request?(Holodeck::Request.new(
|
22
26
|
method: 'post',
|
@@ -51,7 +55,7 @@ describe 'Flow' do
|
|
51
55
|
]
|
52
56
|
))
|
53
57
|
|
54
|
-
actual = @client.studio.v2.flows.create(friendly_name: 'friendly_name', status: 'draft', definition:
|
58
|
+
actual = @client.studio.v2.flows.create(friendly_name: 'friendly_name', status: 'draft', definition: {})
|
55
59
|
|
56
60
|
expect(actual).to_not eq(nil)
|
57
61
|
end
|
@@ -13,10 +13,14 @@ 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_valid.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
|
17
17
|
}.to raise_exception(Twilio::REST::TwilioError)
|
18
18
|
|
19
|
-
values = {
|
19
|
+
values = {
|
20
|
+
'FriendlyName' => 'friendly_name',
|
21
|
+
'Status' => 'draft',
|
22
|
+
'Definition' => Twilio.serialize_object({}),
|
23
|
+
}
|
20
24
|
expect(
|
21
25
|
@holodeck.has_request?(Holodeck::Request.new(
|
22
26
|
method: 'post',
|
@@ -35,7 +39,7 @@ describe 'FlowValidate' do
|
|
35
39
|
]
|
36
40
|
))
|
37
41
|
|
38
|
-
actual = @client.studio.v2.flow_valid.update(friendly_name: 'friendly_name', status: 'draft', definition:
|
42
|
+
actual = @client.studio.v2.flow_valid.update(friendly_name: 'friendly_name', status: 'draft', definition: {})
|
39
43
|
|
40
44
|
expect(actual).to_not eq(nil)
|
41
45
|
end
|
@@ -51,4 +51,30 @@ describe 'VerificationCheck' do
|
|
51
51
|
|
52
52
|
expect(actual).to_not eq(nil)
|
53
53
|
end
|
54
|
+
|
55
|
+
it "receives email_verification_checks responses" do
|
56
|
+
@holodeck.mock(Twilio::Response.new(
|
57
|
+
201,
|
58
|
+
%q[
|
59
|
+
{
|
60
|
+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
61
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
62
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
63
|
+
"to": "recipient@foo.com",
|
64
|
+
"channel": "email",
|
65
|
+
"status": "approved",
|
66
|
+
"valid": true,
|
67
|
+
"amount": null,
|
68
|
+
"payee": null,
|
69
|
+
"date_created": "2020-01-30T20:00:00Z",
|
70
|
+
"date_updated": "2020-01-30T20:00:00Z"
|
71
|
+
}
|
72
|
+
]
|
73
|
+
))
|
74
|
+
|
75
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
76
|
+
.verification_checks.create(code: 'code')
|
77
|
+
|
78
|
+
expect(actual).to_not eq(nil)
|
79
|
+
end
|
54
80
|
end
|