twilio-ruby 5.0.0.rc4 → 5.0.0.rc5
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.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -1
- data/Makefile +3 -0
- data/lib/twilio-ruby.rb +0 -1
- data/lib/twilio-ruby/framework/version.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -11
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +0 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +0 -13
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +0 -13
- data/lib/twilio-ruby/rest/client.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +0 -12
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +0 -12
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +0 -13
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +0 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +0 -14
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +0 -13
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +0 -18
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -12
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +0 -12
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +0 -12
- data/lib/twilio-ruby/rest/notifications.rb +4 -0
- data/lib/twilio-ruby/rest/notifications/v1.rb +9 -0
- data/lib/twilio-ruby/rest/notifications/v1/credential.rb +390 -0
- data/lib/twilio-ruby/rest/notifications/v1/service.rb +0 -12
- data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +0 -13
- data/lib/twilio-ruby/rest/preview.rb +47 -0
- data/lib/twilio-ruby/rest/preview/wireless.rb +53 -0
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +345 -0
- data/lib/twilio-ruby/rest/preview/wireless/device.rb +456 -0
- data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +227 -0
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +325 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +0 -12
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +0 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +0 -14
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +0 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -10
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +0 -12
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +0 -13
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +0 -13
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +3 -3
- data/spec/integration/ip_messaging/v1/credential_spec.rb +1 -1
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +1 -1
- data/spec/integration/notifications/v1/credential_spec.rb +228 -0
- data/spec/integration/notifications/v1/service/binding_spec.rb +2 -2
- data/spec/integration/preview/wireless/command_spec.rb +58 -0
- data/spec/integration/preview/wireless/device/usage_spec.rb +25 -0
- data/spec/integration/preview/wireless/device_spec.rb +72 -0
- data/spec/integration/preview/wireless/rate_plan_spec.rb +39 -0
- metadata +19 -16
- data/lib/twilio-ruby/rest/conversations.rb +0 -40
- data/lib/twilio-ruby/rest/conversations/v1.rb +0 -35
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +0 -270
- data/lib/twilio-ruby/rest/conversations/v1/conversation/completed.rb +0 -217
- data/lib/twilio-ruby/rest/conversations/v1/conversation/in_progress.rb +0 -217
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +0 -352
- data/spec/integration/conversations/v1/conversation/completed_spec.rb +0 -89
- data/spec/integration/conversations/v1/conversation/in_progress_spec.rb +0 -89
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +0 -174
- data/spec/integration/conversations/v1/conversation_spec.rb +0 -49
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
require 'spec_helper.rb'
|
|
8
|
-
|
|
9
|
-
describe 'Completed' do
|
|
10
|
-
it "can read" do
|
|
11
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
-
|
|
13
|
-
expect {
|
|
14
|
-
@client.conversations.v1.conversations \
|
|
15
|
-
.completed.list()
|
|
16
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
17
|
-
|
|
18
|
-
values = {}
|
|
19
|
-
expect(
|
|
20
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
-
method: 'get',
|
|
22
|
-
url: 'https://conversations.twilio.com/v1/Conversations/Completed',
|
|
23
|
-
))).to eq(true)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it "receives read_full responses" do
|
|
27
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
28
|
-
200,
|
|
29
|
-
%q[
|
|
30
|
-
{
|
|
31
|
-
"conversations": [
|
|
32
|
-
{
|
|
33
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
34
|
-
"date_created": "2015-05-12T21:08:50Z",
|
|
35
|
-
"duration": 60,
|
|
36
|
-
"end_time": "2015-05-12T21:09:50Z",
|
|
37
|
-
"links": {
|
|
38
|
-
"participants": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
|
|
39
|
-
},
|
|
40
|
-
"sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
41
|
-
"start_time": "2015-05-12T21:08:50Z",
|
|
42
|
-
"status": "completed",
|
|
43
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"meta": {
|
|
47
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/Completed?PageSize=50&Page=0",
|
|
48
|
-
"key": "conversations",
|
|
49
|
-
"next_page_url": null,
|
|
50
|
-
"page": 0,
|
|
51
|
-
"page_size": 50,
|
|
52
|
-
"previous_page_url": null,
|
|
53
|
-
"url": "https://conversations.twilio.com/v1/Conversations/Completed?PageSize=50&Page=0"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
))
|
|
58
|
-
|
|
59
|
-
actual = @client.conversations.v1.conversations \
|
|
60
|
-
.completed.list()
|
|
61
|
-
|
|
62
|
-
expect(actual).to_not eq(nil)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
it "receives read_empty responses" do
|
|
66
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
67
|
-
200,
|
|
68
|
-
%q[
|
|
69
|
-
{
|
|
70
|
-
"conversations": [],
|
|
71
|
-
"meta": {
|
|
72
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/Completed?PageSize=50&Page=0",
|
|
73
|
-
"key": "conversations",
|
|
74
|
-
"next_page_url": null,
|
|
75
|
-
"page": 0,
|
|
76
|
-
"page_size": 50,
|
|
77
|
-
"previous_page_url": null,
|
|
78
|
-
"url": "https://conversations.twilio.com/v1/Conversations/Completed?PageSize=50&Page=0"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
))
|
|
83
|
-
|
|
84
|
-
actual = @client.conversations.v1.conversations \
|
|
85
|
-
.completed.list()
|
|
86
|
-
|
|
87
|
-
expect(actual).to_not eq(nil)
|
|
88
|
-
end
|
|
89
|
-
end
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
require 'spec_helper.rb'
|
|
8
|
-
|
|
9
|
-
describe 'InProgress' do
|
|
10
|
-
it "can read" do
|
|
11
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
-
|
|
13
|
-
expect {
|
|
14
|
-
@client.conversations.v1.conversations \
|
|
15
|
-
.in_progress.list()
|
|
16
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
17
|
-
|
|
18
|
-
values = {}
|
|
19
|
-
expect(
|
|
20
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
-
method: 'get',
|
|
22
|
-
url: 'https://conversations.twilio.com/v1/Conversations/InProgress',
|
|
23
|
-
))).to eq(true)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it "receives read_full responses" do
|
|
27
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
28
|
-
200,
|
|
29
|
-
%q[
|
|
30
|
-
{
|
|
31
|
-
"conversations": [
|
|
32
|
-
{
|
|
33
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
34
|
-
"date_created": "2015-05-12T21:08:50Z",
|
|
35
|
-
"duration": 60,
|
|
36
|
-
"end_time": "2015-05-12T21:09:50Z",
|
|
37
|
-
"links": {
|
|
38
|
-
"participants": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
|
|
39
|
-
},
|
|
40
|
-
"sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
41
|
-
"start_time": "2015-05-12T21:08:50Z",
|
|
42
|
-
"status": "completed",
|
|
43
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"meta": {
|
|
47
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0",
|
|
48
|
-
"key": "conversations",
|
|
49
|
-
"next_page_url": null,
|
|
50
|
-
"page": 0,
|
|
51
|
-
"page_size": 50,
|
|
52
|
-
"previous_page_url": null,
|
|
53
|
-
"url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
))
|
|
58
|
-
|
|
59
|
-
actual = @client.conversations.v1.conversations \
|
|
60
|
-
.in_progress.list()
|
|
61
|
-
|
|
62
|
-
expect(actual).to_not eq(nil)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
it "receives read_empty responses" do
|
|
66
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
67
|
-
200,
|
|
68
|
-
%q[
|
|
69
|
-
{
|
|
70
|
-
"conversations": [],
|
|
71
|
-
"meta": {
|
|
72
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0",
|
|
73
|
-
"key": "conversations",
|
|
74
|
-
"next_page_url": null,
|
|
75
|
-
"page": 0,
|
|
76
|
-
"page_size": 50,
|
|
77
|
-
"previous_page_url": null,
|
|
78
|
-
"url": "https://conversations.twilio.com/v1/Conversations/InProgress?PageSize=50&Page=0"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
))
|
|
83
|
-
|
|
84
|
-
actual = @client.conversations.v1.conversations \
|
|
85
|
-
.in_progress.list()
|
|
86
|
-
|
|
87
|
-
expect(actual).to_not eq(nil)
|
|
88
|
-
end
|
|
89
|
-
end
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
require 'spec_helper.rb'
|
|
8
|
-
|
|
9
|
-
describe 'Participant' do
|
|
10
|
-
it "can read" do
|
|
11
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
-
|
|
13
|
-
expect {
|
|
14
|
-
@client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
15
|
-
.participants.list()
|
|
16
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
17
|
-
|
|
18
|
-
values = {}
|
|
19
|
-
expect(
|
|
20
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
21
|
-
method: 'get',
|
|
22
|
-
url: 'https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants',
|
|
23
|
-
))).to eq(true)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
it "receives read_full responses" do
|
|
27
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
28
|
-
200,
|
|
29
|
-
%q[
|
|
30
|
-
{
|
|
31
|
-
"meta": {
|
|
32
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
|
|
33
|
-
"key": "participants",
|
|
34
|
-
"next_page_url": null,
|
|
35
|
-
"page": 0,
|
|
36
|
-
"page_size": 50,
|
|
37
|
-
"previous_page_url": null,
|
|
38
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0"
|
|
39
|
-
},
|
|
40
|
-
"participants": [
|
|
41
|
-
{
|
|
42
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
43
|
-
"address": "torkel2@ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.endpoint.twilio.com",
|
|
44
|
-
"conversation_sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
45
|
-
"date_created": "2015-05-13T23:03:12Z",
|
|
46
|
-
"duration": 685,
|
|
47
|
-
"end_time": "2015-05-13T23:14:40Z",
|
|
48
|
-
"sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
49
|
-
"start_time": "2015-05-13T23:03:15Z",
|
|
50
|
-
"status": "disconnected",
|
|
51
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
))
|
|
57
|
-
|
|
58
|
-
actual = @client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
59
|
-
.participants.list()
|
|
60
|
-
|
|
61
|
-
expect(actual).to_not eq(nil)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
it "receives read_empty responses" do
|
|
65
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
66
|
-
200,
|
|
67
|
-
%q[
|
|
68
|
-
{
|
|
69
|
-
"meta": {
|
|
70
|
-
"first_page_url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
|
|
71
|
-
"key": "participants",
|
|
72
|
-
"next_page_url": null,
|
|
73
|
-
"page": 0,
|
|
74
|
-
"page_size": 50,
|
|
75
|
-
"previous_page_url": null,
|
|
76
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0"
|
|
77
|
-
},
|
|
78
|
-
"participants": []
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
))
|
|
82
|
-
|
|
83
|
-
actual = @client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
84
|
-
.participants.list()
|
|
85
|
-
|
|
86
|
-
expect(actual).to_not eq(nil)
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
it "can create" do
|
|
90
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
91
|
-
|
|
92
|
-
expect {
|
|
93
|
-
@client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
94
|
-
.participants.create(to: "+123456789", from: "+987654321")
|
|
95
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
96
|
-
|
|
97
|
-
values = {
|
|
98
|
-
'To' => "+123456789",
|
|
99
|
-
'From' => "+987654321",
|
|
100
|
-
}
|
|
101
|
-
expect(
|
|
102
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
103
|
-
method: 'post',
|
|
104
|
-
url: 'https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants',
|
|
105
|
-
data: values,
|
|
106
|
-
))).to eq(true)
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
it "receives create responses" do
|
|
110
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
111
|
-
200,
|
|
112
|
-
%q[
|
|
113
|
-
{
|
|
114
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
115
|
-
"address": "torkel2@ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.endpoint.twilio.com",
|
|
116
|
-
"conversation_sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
117
|
-
"date_created": "2015-05-13T23:03:12Z",
|
|
118
|
-
"duration": 685,
|
|
119
|
-
"end_time": "2015-05-13T23:14:40Z",
|
|
120
|
-
"sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
121
|
-
"start_time": "2015-05-13T23:03:15Z",
|
|
122
|
-
"status": "disconnected",
|
|
123
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
))
|
|
127
|
-
|
|
128
|
-
actual = @client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
129
|
-
.participants.create(to: "+123456789", from: "+987654321")
|
|
130
|
-
|
|
131
|
-
expect(actual).to_not eq(nil)
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
it "can fetch" do
|
|
135
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
136
|
-
|
|
137
|
-
expect {
|
|
138
|
-
@client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
139
|
-
.participants("PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
140
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
141
|
-
|
|
142
|
-
values = {}
|
|
143
|
-
expect(
|
|
144
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
145
|
-
method: 'get',
|
|
146
|
-
url: 'https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
147
|
-
))).to eq(true)
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
it "receives fetch responses" do
|
|
151
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
152
|
-
200,
|
|
153
|
-
%q[
|
|
154
|
-
{
|
|
155
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
156
|
-
"address": "torkel2@ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.endpoint.twilio.com",
|
|
157
|
-
"conversation_sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
158
|
-
"date_created": "2015-05-13T23:03:12Z",
|
|
159
|
-
"duration": 685,
|
|
160
|
-
"end_time": "2015-05-13T23:14:40Z",
|
|
161
|
-
"sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
162
|
-
"start_time": "2015-05-13T23:03:15Z",
|
|
163
|
-
"status": "disconnected",
|
|
164
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
))
|
|
168
|
-
|
|
169
|
-
actual = @client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
|
170
|
-
.participants("PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
171
|
-
|
|
172
|
-
expect(actual).to_not eq(nil)
|
|
173
|
-
end
|
|
174
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# \ / _ _ _| _ _
|
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
-
# / /
|
|
6
|
-
|
|
7
|
-
require 'spec_helper.rb'
|
|
8
|
-
|
|
9
|
-
describe 'Conversation' do
|
|
10
|
-
it "can fetch" do
|
|
11
|
-
@holodeck.mock(Twilio::TwilioResponse.new(500, ''))
|
|
12
|
-
|
|
13
|
-
expect {
|
|
14
|
-
@client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
15
|
-
}.to raise_exception(Twilio::REST::TwilioException)
|
|
16
|
-
|
|
17
|
-
values = {}
|
|
18
|
-
expect(
|
|
19
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
|
20
|
-
method: 'get',
|
|
21
|
-
url: 'https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
|
22
|
-
))).to eq(true)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "receives fetch responses" do
|
|
26
|
-
@holodeck.mock(Twilio::TwilioResponse.new(
|
|
27
|
-
200,
|
|
28
|
-
%q[
|
|
29
|
-
{
|
|
30
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
31
|
-
"date_created": "2015-05-12T21:13:15Z",
|
|
32
|
-
"duration": 60,
|
|
33
|
-
"end_time": "2015-05-12T21:14:15Z",
|
|
34
|
-
"links": {
|
|
35
|
-
"participants": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
|
|
36
|
-
},
|
|
37
|
-
"sid": "CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
38
|
-
"start_time": "2015-05-12T21:13:15Z",
|
|
39
|
-
"status": "created",
|
|
40
|
-
"url": "https://conversations.twilio.com/v1/Conversations/CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
))
|
|
44
|
-
|
|
45
|
-
actual = @client.conversations.v1.conversations("CVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
|
46
|
-
|
|
47
|
-
expect(actual).to_not eq(nil)
|
|
48
|
-
end
|
|
49
|
-
end
|