twilio-ruby 5.39.1 → 5.40.2
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 -1
- data/CHANGES.md +101 -1
- data/CONTRIBUTING.md +2 -2
- data/ISSUE_TEMPLATE.md +5 -1
- data/Makefile +1 -1
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +4 -3
- data/lib/twilio-ruby/framework/version.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations.rb +52 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +88 -1
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +258 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +15 -4
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +19 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +12 -2
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
- data/lib/twilio-ruby/rest/conversations/v1/notification.rb +310 -0
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +372 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +385 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +259 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +546 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +388 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +513 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +454 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +393 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
- data/lib/twilio-ruby/rest/events.rb +63 -0
- data/lib/twilio-ruby/rest/events/v1.rb +74 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +363 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +322 -0
- data/lib/twilio-ruby/rest/messaging.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +39 -9
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +25 -3
- data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +42 -0
- data/spec/holodeck/holodeck.rb +3 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
- data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
- data/spec/integration/conversations/v1/configuration_spec.rb +85 -0
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
- data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
- data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
- data/spec/integration/conversations/v1/credential_spec.rb +219 -0
- data/spec/integration/conversations/v1/notification_spec.rb +107 -0
- data/spec/integration/conversations/v1/role_spec.rb +249 -0
- data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
- data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
- data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
- data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
- data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
- data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
- data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
- data/spec/integration/conversations/v1/service_spec.rb +174 -0
- data/spec/integration/conversations/v1/user_spec.rb +220 -0
- data/spec/integration/events/v1/event_type_spec.rb +133 -0
- data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
- data/spec/integration/events/v1/sink_spec.rb +217 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +212 -0
- data/spec/integration/events/v1/subscription_spec.rb +205 -0
- data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/supersim/v1/sim_spec.rb +23 -0
- data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +70 -2
@@ -31,7 +31,7 @@ describe 'Mobile' do
|
|
31
31
|
%q[
|
32
32
|
{
|
33
33
|
"end": 0,
|
34
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?
|
34
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
35
35
|
"incoming_phone_numbers": [
|
36
36
|
{
|
37
37
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -40,16 +40,18 @@ describe 'Mobile' do
|
|
40
40
|
"api_version": "2010-04-01",
|
41
41
|
"beta": null,
|
42
42
|
"capabilities": {
|
43
|
-
"mms":
|
44
|
-
"sms":
|
45
|
-
"voice":
|
43
|
+
"mms": true,
|
44
|
+
"sms": false,
|
45
|
+
"voice": true
|
46
46
|
},
|
47
|
-
"date_created": "
|
48
|
-
"date_updated": "
|
49
|
-
"
|
47
|
+
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
48
|
+
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
49
|
+
"emergency_status": "Active",
|
50
|
+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
51
|
+
"friendly_name": "(808) 925-5327",
|
50
52
|
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
51
|
-
"phone_number": "+61429099450",
|
52
53
|
"origin": "origin",
|
54
|
+
"phone_number": "+18089255327",
|
53
55
|
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
54
56
|
"sms_application_sid": "",
|
55
57
|
"sms_fallback_method": "POST",
|
@@ -66,20 +68,17 @@ describe 'Mobile' do
|
|
66
68
|
"voice_fallback_url": null,
|
67
69
|
"voice_method": "POST",
|
68
70
|
"voice_url": null,
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
71
|
+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"voice_receive_mode": "voice",
|
73
|
+
"status": "in-use"
|
72
74
|
}
|
73
75
|
],
|
74
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?Page=0&PageSize=50",
|
75
76
|
"next_page_uri": null,
|
76
|
-
"num_pages": 1,
|
77
77
|
"page": 0,
|
78
78
|
"page_size": 50,
|
79
79
|
"previous_page_uri": null,
|
80
80
|
"start": 0,
|
81
|
-
"
|
82
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json"
|
81
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
83
82
|
}
|
84
83
|
]
|
85
84
|
))
|
@@ -97,17 +96,14 @@ describe 'Mobile' do
|
|
97
96
|
%q[
|
98
97
|
{
|
99
98
|
"end": 0,
|
100
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?
|
99
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
101
100
|
"incoming_phone_numbers": [],
|
102
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?Page=0&PageSize=50",
|
103
101
|
"next_page_uri": null,
|
104
|
-
"num_pages": 1,
|
105
102
|
"page": 0,
|
106
103
|
"page_size": 50,
|
107
104
|
"previous_page_uri": null,
|
108
105
|
"start": 0,
|
109
|
-
"
|
110
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json"
|
106
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
111
107
|
}
|
112
108
|
]
|
113
109
|
))
|
@@ -148,35 +144,38 @@ describe 'Mobile' do
|
|
148
144
|
"api_version": "2010-04-01",
|
149
145
|
"beta": false,
|
150
146
|
"capabilities": {
|
151
|
-
"
|
147
|
+
"voice": true,
|
152
148
|
"sms": false,
|
153
|
-
"
|
149
|
+
"mms": true,
|
150
|
+
"fax": false
|
154
151
|
},
|
155
152
|
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
156
153
|
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
154
|
+
"emergency_status": "Active",
|
155
|
+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
156
|
+
"friendly_name": "friendly_name",
|
157
157
|
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
158
|
-
"friendly_name": "(808) 925-5327",
|
159
|
-
"phone_number": "+18089255327",
|
160
158
|
"origin": "origin",
|
159
|
+
"phone_number": "+18089255327",
|
161
160
|
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
|
-
"sms_application_sid": "",
|
163
|
-
"sms_fallback_method": "
|
164
|
-
"sms_fallback_url": "",
|
165
|
-
"sms_method": "
|
166
|
-
"sms_url": "",
|
167
|
-
"status_callback": "",
|
168
|
-
"status_callback_method": "
|
161
|
+
"sms_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
|
+
"sms_fallback_method": "GET",
|
163
|
+
"sms_fallback_url": "https://example.com",
|
164
|
+
"sms_method": "GET",
|
165
|
+
"sms_url": "https://example.com",
|
166
|
+
"status_callback": "https://example.com",
|
167
|
+
"status_callback_method": "GET",
|
169
168
|
"trunk_sid": null,
|
170
169
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
171
|
-
"voice_application_sid": "",
|
172
|
-
"voice_caller_id_lookup":
|
173
|
-
"voice_fallback_method": "
|
174
|
-
"voice_fallback_url":
|
175
|
-
"voice_method": "
|
176
|
-
"voice_url":
|
177
|
-
"
|
178
|
-
"
|
179
|
-
"
|
170
|
+
"voice_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
171
|
+
"voice_caller_id_lookup": true,
|
172
|
+
"voice_fallback_method": "GET",
|
173
|
+
"voice_fallback_url": "https://example.com",
|
174
|
+
"voice_method": "GET",
|
175
|
+
"voice_url": "https://example.com",
|
176
|
+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
177
|
+
"voice_receive_mode": "voice",
|
178
|
+
"status": "in-use"
|
180
179
|
}
|
181
180
|
]
|
182
181
|
))
|
@@ -31,7 +31,7 @@ describe 'TollFree' do
|
|
31
31
|
%q[
|
32
32
|
{
|
33
33
|
"end": 0,
|
34
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=
|
34
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
35
35
|
"incoming_phone_numbers": [
|
36
36
|
{
|
37
37
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -46,10 +46,12 @@ describe 'TollFree' do
|
|
46
46
|
},
|
47
47
|
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
48
48
|
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
49
|
+
"emergency_status": "Active",
|
50
|
+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
49
51
|
"friendly_name": "(808) 925-5327",
|
50
52
|
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
51
|
-
"phone_number": "+18089255327",
|
52
53
|
"origin": "origin",
|
54
|
+
"phone_number": "+18089255327",
|
53
55
|
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
54
56
|
"sms_application_sid": "",
|
55
57
|
"sms_fallback_method": "POST",
|
@@ -66,20 +68,17 @@ describe 'TollFree' do
|
|
66
68
|
"voice_fallback_url": null,
|
67
69
|
"voice_method": "POST",
|
68
70
|
"voice_url": null,
|
69
|
-
"
|
70
|
-
"
|
71
|
-
"
|
71
|
+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"voice_receive_mode": "voice",
|
73
|
+
"status": "in-use"
|
72
74
|
}
|
73
75
|
],
|
74
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=1&Page=2",
|
75
76
|
"next_page_uri": null,
|
76
|
-
"num_pages": 3,
|
77
77
|
"page": 0,
|
78
|
-
"page_size":
|
78
|
+
"page_size": 50,
|
79
79
|
"previous_page_uri": null,
|
80
80
|
"start": 0,
|
81
|
-
"
|
82
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=1"
|
81
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
83
82
|
}
|
84
83
|
]
|
85
84
|
))
|
@@ -97,17 +96,14 @@ describe 'TollFree' do
|
|
97
96
|
%q[
|
98
97
|
{
|
99
98
|
"end": 0,
|
100
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=
|
99
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
101
100
|
"incoming_phone_numbers": [],
|
102
|
-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=1&Page=2",
|
103
101
|
"next_page_uri": null,
|
104
|
-
"num_pages": 3,
|
105
102
|
"page": 0,
|
106
|
-
"page_size":
|
103
|
+
"page_size": 50,
|
107
104
|
"previous_page_uri": null,
|
108
105
|
"start": 0,
|
109
|
-
"
|
110
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=1"
|
106
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
111
107
|
}
|
112
108
|
]
|
113
109
|
))
|
@@ -148,35 +144,38 @@ describe 'TollFree' do
|
|
148
144
|
"api_version": "2010-04-01",
|
149
145
|
"beta": false,
|
150
146
|
"capabilities": {
|
151
|
-
"
|
147
|
+
"voice": true,
|
152
148
|
"sms": false,
|
153
|
-
"
|
149
|
+
"mms": true,
|
150
|
+
"fax": false
|
154
151
|
},
|
155
152
|
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
156
153
|
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
157
|
-
"
|
154
|
+
"emergency_status": "Active",
|
155
|
+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
156
|
+
"friendly_name": "friendly_name",
|
158
157
|
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
159
|
-
"phone_number": "+18089255327",
|
160
158
|
"origin": "origin",
|
159
|
+
"phone_number": "+18089255327",
|
161
160
|
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
|
-
"sms_application_sid": "",
|
163
|
-
"sms_fallback_method": "
|
164
|
-
"sms_fallback_url": "",
|
165
|
-
"sms_method": "
|
166
|
-
"sms_url": "",
|
167
|
-
"status_callback": "",
|
168
|
-
"status_callback_method": "
|
161
|
+
"sms_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
|
+
"sms_fallback_method": "GET",
|
163
|
+
"sms_fallback_url": "https://example.com",
|
164
|
+
"sms_method": "GET",
|
165
|
+
"sms_url": "https://example.com",
|
166
|
+
"status_callback": "https://example.com",
|
167
|
+
"status_callback_method": "GET",
|
169
168
|
"trunk_sid": null,
|
170
169
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
171
|
-
"voice_application_sid": "",
|
172
|
-
"voice_caller_id_lookup":
|
173
|
-
"voice_fallback_method": "
|
174
|
-
"voice_fallback_url":
|
175
|
-
"voice_method": "
|
176
|
-
"voice_url":
|
177
|
-
"
|
178
|
-
"
|
179
|
-
"
|
170
|
+
"voice_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
171
|
+
"voice_caller_id_lookup": true,
|
172
|
+
"voice_fallback_method": "GET",
|
173
|
+
"voice_fallback_url": "https://example.com",
|
174
|
+
"voice_method": "GET",
|
175
|
+
"voice_url": "https://example.com",
|
176
|
+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
177
|
+
"voice_receive_mode": "voice",
|
178
|
+
"status": "in-use"
|
180
179
|
}
|
181
180
|
]
|
182
181
|
))
|
@@ -205,7 +205,7 @@ describe 'IncomingPhoneNumber' do
|
|
205
205
|
%q[
|
206
206
|
{
|
207
207
|
"end": 0,
|
208
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=
|
208
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
209
209
|
"incoming_phone_numbers": [
|
210
210
|
{
|
211
211
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
@@ -214,9 +214,10 @@ describe 'IncomingPhoneNumber' do
|
|
214
214
|
"api_version": "2010-04-01",
|
215
215
|
"beta": null,
|
216
216
|
"capabilities": {
|
217
|
-
"
|
217
|
+
"voice": true,
|
218
218
|
"sms": false,
|
219
|
-
"
|
219
|
+
"mms": true,
|
220
|
+
"fax": false
|
220
221
|
},
|
221
222
|
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
222
223
|
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
@@ -255,10 +256,10 @@ describe 'IncomingPhoneNumber' do
|
|
255
256
|
],
|
256
257
|
"next_page_uri": null,
|
257
258
|
"page": 0,
|
258
|
-
"page_size":
|
259
|
+
"page_size": 50,
|
259
260
|
"previous_page_uri": null,
|
260
261
|
"start": 0,
|
261
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=
|
262
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
262
263
|
}
|
263
264
|
]
|
264
265
|
))
|
@@ -275,14 +276,14 @@ describe 'IncomingPhoneNumber' do
|
|
275
276
|
%q[
|
276
277
|
{
|
277
278
|
"end": 0,
|
278
|
-
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=
|
279
|
+
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0",
|
279
280
|
"incoming_phone_numbers": [],
|
280
281
|
"next_page_uri": null,
|
281
282
|
"page": 0,
|
282
|
-
"page_size":
|
283
|
+
"page_size": 50,
|
283
284
|
"previous_page_uri": null,
|
284
285
|
"start": 0,
|
285
|
-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=
|
286
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?FriendlyName=friendly_name&Beta=true&PhoneNumber=%2B19876543210&PageSize=50&Page=0"
|
286
287
|
}
|
287
288
|
]
|
288
289
|
))
|
@@ -319,34 +320,35 @@ describe 'IncomingPhoneNumber' do
|
|
319
320
|
"api_version": "2010-04-01",
|
320
321
|
"beta": false,
|
321
322
|
"capabilities": {
|
322
|
-
"
|
323
|
+
"voice": true,
|
323
324
|
"sms": false,
|
324
|
-
"
|
325
|
+
"mms": true,
|
326
|
+
"fax": false
|
325
327
|
},
|
326
328
|
"date_created": "Thu, 30 Jul 2015 23:19:04 +0000",
|
327
329
|
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
|
328
330
|
"emergency_status": "Active",
|
329
331
|
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
330
|
-
"friendly_name": "
|
332
|
+
"friendly_name": "friendly_name",
|
331
333
|
"identity_sid": "RIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
332
334
|
"origin": "origin",
|
333
335
|
"phone_number": "+18089255327",
|
334
336
|
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
335
|
-
"sms_application_sid": "",
|
336
|
-
"sms_fallback_method": "
|
337
|
-
"sms_fallback_url": "",
|
338
|
-
"sms_method": "
|
339
|
-
"sms_url": "",
|
340
|
-
"status_callback": "",
|
341
|
-
"status_callback_method": "
|
337
|
+
"sms_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
338
|
+
"sms_fallback_method": "GET",
|
339
|
+
"sms_fallback_url": "https://example.com",
|
340
|
+
"sms_method": "GET",
|
341
|
+
"sms_url": "https://example.com",
|
342
|
+
"status_callback": "https://example.com",
|
343
|
+
"status_callback_method": "GET",
|
342
344
|
"trunk_sid": null,
|
343
345
|
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
|
344
|
-
"voice_application_sid": "",
|
346
|
+
"voice_application_sid": "APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
345
347
|
"voice_caller_id_lookup": false,
|
346
|
-
"voice_fallback_method": "
|
347
|
-
"voice_fallback_url":
|
348
|
-
"voice_method": "
|
349
|
-
"voice_url":
|
348
|
+
"voice_fallback_method": "GET",
|
349
|
+
"voice_fallback_url": "https://example.com",
|
350
|
+
"voice_method": "GET",
|
351
|
+
"voice_url": "https://example.com",
|
350
352
|
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
351
353
|
"voice_receive_mode": "voice",
|
352
354
|
"status": "in-use",
|
@@ -100,6 +100,43 @@ describe 'Message' do
|
|
100
100
|
expect(actual).to_not eq(nil)
|
101
101
|
end
|
102
102
|
|
103
|
+
it "receives create_with_messaging_service responses" do
|
104
|
+
@holodeck.mock(Twilio::Response.new(
|
105
|
+
201,
|
106
|
+
%q[
|
107
|
+
{
|
108
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
109
|
+
"api_version": "2010-04-01",
|
110
|
+
"body": "Hello! \ud83d\udc4d",
|
111
|
+
"date_created": "Thu, 30 Jul 2015 20:12:31 +0000",
|
112
|
+
"date_sent": "Thu, 30 Jul 2015 20:12:33 +0000",
|
113
|
+
"date_updated": "Thu, 30 Jul 2015 20:12:33 +0000",
|
114
|
+
"direction": "outbound-api",
|
115
|
+
"error_code": null,
|
116
|
+
"error_message": null,
|
117
|
+
"from": null,
|
118
|
+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
119
|
+
"num_media": "0",
|
120
|
+
"num_segments": "1",
|
121
|
+
"price": null,
|
122
|
+
"price_unit": null,
|
123
|
+
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
124
|
+
"status": "sent",
|
125
|
+
"subresource_uris": {
|
126
|
+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
|
127
|
+
},
|
128
|
+
"to": "+14155552345",
|
129
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
))
|
133
|
+
|
134
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
135
|
+
.messages.create(to: '+15558675310')
|
136
|
+
|
137
|
+
expect(actual).to_not eq(nil)
|
138
|
+
end
|
139
|
+
|
103
140
|
it "can delete" do
|
104
141
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
105
142
|
|
@@ -64,9 +64,9 @@ describe 'Day' do
|
|
64
64
|
"meta": {
|
65
65
|
"page": 0,
|
66
66
|
"page_size": 50,
|
67
|
-
"first_page_url": "https://bulkexports.twilio.com/v1/Exports/
|
67
|
+
"first_page_url": "https://bulkexports.twilio.com/v1/Exports/Messages/Days?PageSize=50&Page=0",
|
68
68
|
"previous_page_url": null,
|
69
|
-
"url": "https://bulkexports.twilio.com/v1/Exports/
|
69
|
+
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Days?PageSize=50&Page=0",
|
70
70
|
"next_page_url": null,
|
71
71
|
"key": "days"
|
72
72
|
}
|
@@ -89,7 +89,7 @@ describe 'Day' do
|
|
89
89
|
{
|
90
90
|
"day": "2017-04-01",
|
91
91
|
"size": 100,
|
92
|
-
"resource_type": "
|
92
|
+
"resource_type": "Messages",
|
93
93
|
"create_date": "2017-04-02",
|
94
94
|
"friendly_name": "friendly_name"
|
95
95
|
}
|
@@ -97,9 +97,9 @@ describe 'Day' do
|
|
97
97
|
"meta": {
|
98
98
|
"page": 0,
|
99
99
|
"page_size": 50,
|
100
|
-
"first_page_url": "https://bulkexports.twilio.com/v1/Exports/
|
100
|
+
"first_page_url": "https://bulkexports.twilio.com/v1/Exports/Messages/Days?PageSize=50&Page=0",
|
101
101
|
"previous_page_url": null,
|
102
|
-
"url": "https://bulkexports.twilio.com/v1/Exports/
|
102
|
+
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Days?PageSize=50&Page=0",
|
103
103
|
"next_page_url": null,
|
104
104
|
"key": "days"
|
105
105
|
}
|
@@ -28,11 +28,11 @@ describe 'ExportConfiguration' do
|
|
28
28
|
200,
|
29
29
|
%q[
|
30
30
|
{
|
31
|
-
"url": "https://bulkexports.twilio.com/v1/Exports/
|
31
|
+
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
|
32
32
|
"enabled": true,
|
33
33
|
"webhook_url": "",
|
34
34
|
"webhook_method": "",
|
35
|
-
"resource_type": "
|
35
|
+
"resource_type": "Messages"
|
36
36
|
}
|
37
37
|
]
|
38
38
|
))
|
@@ -61,10 +61,10 @@ describe 'ExportConfiguration' do
|
|
61
61
|
200,
|
62
62
|
%q[
|
63
63
|
{
|
64
|
-
"url": "https://bulkexports.twilio.com/v1/Exports/
|
64
|
+
"url": "https://bulkexports.twilio.com/v1/Exports/Messages/Configuration",
|
65
65
|
"enabled": true,
|
66
66
|
"webhook_url": "",
|
67
|
-
"resource_type": "
|
67
|
+
"resource_type": "Messages",
|
68
68
|
"webhook_method": ""
|
69
69
|
}
|
70
70
|
]
|