twilio-ruby 5.44.0 → 5.47.0
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 +97 -0
- data/LICENSE +1 -1
- data/README.md +16 -2
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -9
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +13 -13
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +10 -5
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +17 -12
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +4 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
- data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -2
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -2
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +18 -4
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
- data/lib/twilio-ruby/rest/insights/v1/room.rb +7 -7
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
- data/lib/twilio-ruby/rest/messaging.rb +22 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +37 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
- data/lib/twilio-ruby/rest/messaging/v1/campaign.rb +387 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/use_case.rb +198 -0
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +4 -23
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +4 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +17 -7
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +2 -10
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +33 -12
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +5 -5
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +6 -6
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +5 -5
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +16 -36
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -25
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +24 -43
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -25
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +25 -44
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +5 -23
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +17 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
- data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
- data/lib/twilio-ruby/twiml/voice_response.rb +18 -8
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
- data/spec/integration/conversations/v1/user_spec.rb +9 -4
- data/spec/integration/events/v1/sink_spec.rb +14 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
- data/spec/integration/messaging/v1/campaign_spec.rb +194 -0
- data/spec/integration/messaging/v1/use_case_spec.rb +55 -0
- data/spec/integration/preview/sync/service/document_spec.rb +1 -3
- data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +8 -0
- data/spec/integration/sync/v1/service/document_spec.rb +1 -3
- data/spec/integration/video/v1/room_spec.rb +5 -0
- data/spec/twiml/voice_response_spec.rb +1 -1
- metadata +11 -17
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -0,0 +1,194 @@
|
|
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 'Campaign' do
|
12
|
+
it "can fetch" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.messaging.v1.campaigns('CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://messaging.twilio.com/v1/a2p/Campaigns/CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives fetch responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"sid": "CMdeadbeef66043a43b62be6d67c635c85",
|
32
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
33
|
+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
+
"date_created": "2021-01-27T14:47:52Z",
|
35
|
+
"date_updated": "2021-01-27T14:47:52Z",
|
36
|
+
"description": "Test description for test campaing",
|
37
|
+
"message_samples": [
|
38
|
+
"Test_Sample_1",
|
39
|
+
"Another_test_sample_2"
|
40
|
+
],
|
41
|
+
"status": "pending",
|
42
|
+
"failure_reason": null,
|
43
|
+
"use_case": "PUBLIC_SERVICE_ANNOUNCEMENT",
|
44
|
+
"has_embedded_links": true,
|
45
|
+
"has_embedded_phone": false,
|
46
|
+
"brand_registration_sid": "BN0044409f7e067e279523808d267e2d85",
|
47
|
+
"url": "https://messaging.twilio.com/v1/a2p/Campaigns/CMdeadbeef66043a43b62be6d67c635c85"
|
48
|
+
}
|
49
|
+
]
|
50
|
+
))
|
51
|
+
|
52
|
+
actual = @client.messaging.v1.campaigns('CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
53
|
+
|
54
|
+
expect(actual).to_not eq(nil)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "can read" do
|
58
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
59
|
+
|
60
|
+
expect {
|
61
|
+
@client.messaging.v1.campaigns.list()
|
62
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
63
|
+
|
64
|
+
expect(
|
65
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
66
|
+
method: 'get',
|
67
|
+
url: 'https://messaging.twilio.com/v1/a2p/Campaigns',
|
68
|
+
))).to eq(true)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "receives read_full responses" do
|
72
|
+
@holodeck.mock(Twilio::Response.new(
|
73
|
+
200,
|
74
|
+
%q[
|
75
|
+
{
|
76
|
+
"meta": {
|
77
|
+
"page": 0,
|
78
|
+
"page_size": 50,
|
79
|
+
"first_page_url": "https://messaging.twilio.com/v1/a2p/Campaigns?PageSize=50&Page=0",
|
80
|
+
"previous_page_url": null,
|
81
|
+
"next_page_url": null,
|
82
|
+
"key": "data",
|
83
|
+
"url": "https://messaging.twilio.com/v1/a2p/Campaigns?PageSize=50&Page=0"
|
84
|
+
},
|
85
|
+
"data": [
|
86
|
+
{
|
87
|
+
"sid": "CMdeadbeef66043a43b62be6d67c635c85",
|
88
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
89
|
+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
90
|
+
"date_created": "2021-01-27T14:47:52Z",
|
91
|
+
"date_updated": "2021-01-27T14:47:53Z",
|
92
|
+
"description": "Test description for test campaing",
|
93
|
+
"message_samples": [
|
94
|
+
"Test_Sample_1",
|
95
|
+
"Another_test_sample_2"
|
96
|
+
],
|
97
|
+
"status": "pending",
|
98
|
+
"failure_reason": null,
|
99
|
+
"use_case": "GAMBLING_SWEEPSTAKE",
|
100
|
+
"has_embedded_links": true,
|
101
|
+
"has_embedded_phone": false,
|
102
|
+
"brand_registration_sid": "BN0044409f7e067e279523808d267e2d85",
|
103
|
+
"url": "https://messaging.twilio.com/v1/a2p/Campaigns/CMdeadbeef66043a43b62be6d67c635c85"
|
104
|
+
}
|
105
|
+
]
|
106
|
+
}
|
107
|
+
]
|
108
|
+
))
|
109
|
+
|
110
|
+
actual = @client.messaging.v1.campaigns.list()
|
111
|
+
|
112
|
+
expect(actual).to_not eq(nil)
|
113
|
+
end
|
114
|
+
|
115
|
+
it "can create" do
|
116
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
117
|
+
|
118
|
+
expect {
|
119
|
+
@client.messaging.v1.campaigns.create(brand_registration_sid: 'BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', use_case: 'use_case', description: 'description', message_samples: ['message_samples'], has_embedded_links: true, has_embedded_phone: true, messaging_service_sid: 'MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
120
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
121
|
+
|
122
|
+
values = {
|
123
|
+
'BrandRegistrationSid' => 'BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
124
|
+
'UseCase' => 'use_case',
|
125
|
+
'Description' => 'description',
|
126
|
+
'MessageSamples' => Twilio.serialize_list(['message_samples']) { |e| e },
|
127
|
+
'HasEmbeddedLinks' => true,
|
128
|
+
'HasEmbeddedPhone' => true,
|
129
|
+
'MessagingServiceSid' => 'MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
130
|
+
}
|
131
|
+
expect(
|
132
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
133
|
+
method: 'post',
|
134
|
+
url: 'https://messaging.twilio.com/v1/a2p/Campaigns',
|
135
|
+
data: values,
|
136
|
+
))).to eq(true)
|
137
|
+
end
|
138
|
+
|
139
|
+
it "receives create responses" do
|
140
|
+
@holodeck.mock(Twilio::Response.new(
|
141
|
+
201,
|
142
|
+
%q[
|
143
|
+
{
|
144
|
+
"sid": "CMdeadbeef66043a43b62be6d67c635c85",
|
145
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
146
|
+
"messaging_service_sid": "MG3u3kcgofdljponkatswl3ad3ev0c123u",
|
147
|
+
"brand_registration_sid": "BN0044409f7e067e279523808d267e2d85",
|
148
|
+
"date_created": "2021-01-27T14:47:52Z",
|
149
|
+
"date_updated": "2021-01-27T14:47:52Z",
|
150
|
+
"description": "Send marketing messages about sales and offers to opted in customers.",
|
151
|
+
"message_samples": [
|
152
|
+
"EXPRESS: Denim Days Event is ON",
|
153
|
+
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
|
154
|
+
],
|
155
|
+
"status": "pending",
|
156
|
+
"failure_reason": null,
|
157
|
+
"use_case": "2FA",
|
158
|
+
"has_embedded_links": true,
|
159
|
+
"has_embedded_phone": false,
|
160
|
+
"url": "https://messaging.twilio.com/v1/a2p/Campaigns/CMdeadbeef66043a43b62be6d67c635c85"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
))
|
164
|
+
|
165
|
+
actual = @client.messaging.v1.campaigns.create(brand_registration_sid: 'BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', use_case: 'use_case', description: 'description', message_samples: ['message_samples'], has_embedded_links: true, has_embedded_phone: true, messaging_service_sid: 'MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
166
|
+
|
167
|
+
expect(actual).to_not eq(nil)
|
168
|
+
end
|
169
|
+
|
170
|
+
it "can delete" do
|
171
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
172
|
+
|
173
|
+
expect {
|
174
|
+
@client.messaging.v1.campaigns('CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
175
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
176
|
+
|
177
|
+
expect(
|
178
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
179
|
+
method: 'delete',
|
180
|
+
url: 'https://messaging.twilio.com/v1/a2p/Campaigns/CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
181
|
+
))).to eq(true)
|
182
|
+
end
|
183
|
+
|
184
|
+
it "receives delete responses" do
|
185
|
+
@holodeck.mock(Twilio::Response.new(
|
186
|
+
204,
|
187
|
+
nil,
|
188
|
+
))
|
189
|
+
|
190
|
+
actual = @client.messaging.v1.campaigns('CMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
191
|
+
|
192
|
+
expect(actual).to eq(true)
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,55 @@
|
|
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 'UseCase' do
|
12
|
+
it "can read" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.messaging.v1.use_cases.list()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://messaging.twilio.com/v1/a2p/UseCases',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives read responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"meta": {
|
32
|
+
"page": 0,
|
33
|
+
"page_size": 50,
|
34
|
+
"first_page_url": "https://messaging.twilio.com/v1/a2p/UseCases?PageSize=50&Page=0",
|
35
|
+
"previous_page_url": null,
|
36
|
+
"next_page_url": null,
|
37
|
+
"key": "data",
|
38
|
+
"url": "https://messaging.twilio.com/v1/a2p/UseCases?PageSize=50&Page=0"
|
39
|
+
},
|
40
|
+
"data": [
|
41
|
+
{
|
42
|
+
"code": "HIGHER_EDUCATION",
|
43
|
+
"name": "Higher Education",
|
44
|
+
"description": "Higher Education: For campaigns created on behalf of Colleges or Universities"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
]
|
49
|
+
))
|
50
|
+
|
51
|
+
actual = @client.messaging.v1.use_cases.list()
|
52
|
+
|
53
|
+
expect(actual).to_not eq(nil)
|
54
|
+
end
|
55
|
+
end
|
@@ -57,15 +57,13 @@ describe 'Document' do
|
|
57
57
|
|
58
58
|
expect {
|
59
59
|
@client.preview.sync.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
60
|
-
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
60
|
+
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
61
61
|
}.to raise_exception(Twilio::REST::TwilioError)
|
62
62
|
|
63
|
-
headers = {'If-Match' => 'if_match', }
|
64
63
|
expect(
|
65
64
|
@holodeck.has_request?(Holodeck::Request.new(
|
66
65
|
method: 'delete',
|
67
66
|
url: 'https://preview.twilio.com/Sync/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Documents/ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
68
|
-
headers: headers,
|
69
67
|
))).to eq(true)
|
70
68
|
end
|
71
69
|
|
@@ -97,9 +97,14 @@ describe 'Build' do
|
|
97
97
|
"dependencies": [
|
98
98
|
{
|
99
99
|
"name": "twilio",
|
100
|
-
"version": "3.
|
100
|
+
"version": "3.29.2"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "@twilio/runtime-handler",
|
104
|
+
"version": "1.0.1"
|
101
105
|
}
|
102
106
|
],
|
107
|
+
"runtime": "node10",
|
103
108
|
"status": "deploying",
|
104
109
|
"date_created": "2018-11-10T20:00:00Z",
|
105
110
|
"date_updated": "2018-11-10T20:00:00Z",
|
@@ -192,9 +197,14 @@ describe 'Build' do
|
|
192
197
|
"dependencies": [
|
193
198
|
{
|
194
199
|
"name": "twilio",
|
195
|
-
"version": "3.
|
200
|
+
"version": "3.29.2"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"name": "@twilio/runtime-handler",
|
204
|
+
"version": "1.0.1"
|
196
205
|
}
|
197
206
|
],
|
207
|
+
"runtime": "node10",
|
198
208
|
"status": "building",
|
199
209
|
"date_created": "2018-11-10T20:00:00Z",
|
200
210
|
"date_updated": "2018-11-10T20:00:00Z",
|
@@ -40,6 +40,8 @@ describe 'Fleet' do
|
|
40
40
|
"commands_enabled": true,
|
41
41
|
"commands_method": "GET",
|
42
42
|
"commands_url": "https://google.com",
|
43
|
+
"ip_commands_method": "GET",
|
44
|
+
"ip_commands_url": "https://google.com",
|
43
45
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
44
46
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
47
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -81,6 +83,8 @@ describe 'Fleet' do
|
|
81
83
|
"commands_enabled": true,
|
82
84
|
"commands_method": "POST",
|
83
85
|
"commands_url": null,
|
86
|
+
"ip_commands_method": "POST",
|
87
|
+
"ip_commands_url": null,
|
84
88
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
85
89
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
86
90
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -157,6 +161,8 @@ describe 'Fleet' do
|
|
157
161
|
"commands_enabled": true,
|
158
162
|
"commands_method": "POST",
|
159
163
|
"commands_url": null,
|
164
|
+
"ip_commands_method": "POST",
|
165
|
+
"ip_commands_url": null,
|
160
166
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
161
167
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
168
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -200,6 +206,8 @@ describe 'Fleet' do
|
|
200
206
|
"commands_enabled": true,
|
201
207
|
"commands_method": "POST",
|
202
208
|
"commands_url": null,
|
209
|
+
"ip_commands_method": "POST",
|
210
|
+
"ip_commands_url": null,
|
203
211
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
204
212
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
205
213
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -58,15 +58,13 @@ describe 'Document' do
|
|
58
58
|
|
59
59
|
expect {
|
60
60
|
@client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
61
|
-
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
61
|
+
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
62
62
|
}.to raise_exception(Twilio::REST::TwilioError)
|
63
63
|
|
64
|
-
headers = {'If-Match' => 'if_match', }
|
65
64
|
expect(
|
66
65
|
@holodeck.has_request?(Holodeck::Request.new(
|
67
66
|
method: 'delete',
|
68
67
|
url: 'https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Documents/ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
69
|
-
headers: headers,
|
70
68
|
))).to eq(true)
|
71
69
|
end
|
72
70
|
|
@@ -37,6 +37,7 @@ describe 'Room' do
|
|
37
37
|
"enable_turn": true,
|
38
38
|
"unique_name": "unique_name",
|
39
39
|
"max_participants": 10,
|
40
|
+
"max_concurrent_published_tracks": 10,
|
40
41
|
"duration": 0,
|
41
42
|
"status_callback_method": "POST",
|
42
43
|
"status_callback": "",
|
@@ -88,6 +89,7 @@ describe 'Room' do
|
|
88
89
|
"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
89
90
|
"enable_turn": true,
|
90
91
|
"unique_name": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
92
|
+
"max_concurrent_published_tracks": 10,
|
91
93
|
"max_participants": 10,
|
92
94
|
"duration": 0,
|
93
95
|
"status_callback_method": "POST",
|
@@ -127,6 +129,7 @@ describe 'Room' do
|
|
127
129
|
"enable_turn": true,
|
128
130
|
"unique_name": "room1",
|
129
131
|
"max_participants": 10,
|
132
|
+
"max_concurrent_published_tracks": 10,
|
130
133
|
"duration": 0,
|
131
134
|
"status_callback_method": "POST",
|
132
135
|
"status_callback": "",
|
@@ -209,6 +212,7 @@ describe 'Room' do
|
|
209
212
|
"end_time": "2017-04-03T22:21:51Z",
|
210
213
|
"duration": 2,
|
211
214
|
"max_participants": 10,
|
215
|
+
"max_concurrent_published_tracks": 10,
|
212
216
|
"record_participants_on_connect": false,
|
213
217
|
"video_codecs": [
|
214
218
|
"VP8"
|
@@ -270,6 +274,7 @@ describe 'Room' do
|
|
270
274
|
"enable_turn": true,
|
271
275
|
"unique_name": "unique_name",
|
272
276
|
"max_participants": 10,
|
277
|
+
"max_concurrent_published_tracks": 10,
|
273
278
|
"status_callback_method": "POST",
|
274
279
|
"status_callback": "",
|
275
280
|
"record_participants_on_connect": false,
|
@@ -575,7 +575,7 @@ describe Twilio::TwiML::VoiceResponse do
|
|
575
575
|
</Response>
|
576
576
|
XML
|
577
577
|
enqueue_elem = Twilio::TwiML::Enqueue.new(name: nil, workflow_sid: '123123123')
|
578
|
-
enqueue_elem.task(account_sid: 'AC123123123')
|
578
|
+
enqueue_elem.task({ account_sid: 'AC123123123' })
|
579
579
|
|
580
580
|
response = Twilio::TwiML::VoiceResponse.new
|
581
581
|
response.append(enqueue_elem)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.47.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -466,11 +466,14 @@ files:
|
|
466
466
|
- lib/twilio-ruby/rest/lookups/v1/phone_number.rb
|
467
467
|
- lib/twilio-ruby/rest/messaging.rb
|
468
468
|
- lib/twilio-ruby/rest/messaging/v1.rb
|
469
|
+
- lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
|
470
|
+
- lib/twilio-ruby/rest/messaging/v1/campaign.rb
|
469
471
|
- lib/twilio-ruby/rest/messaging/v1/deactivation.rb
|
470
472
|
- lib/twilio-ruby/rest/messaging/v1/service.rb
|
471
473
|
- lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
|
472
474
|
- lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb
|
473
475
|
- lib/twilio-ruby/rest/messaging/v1/service/short_code.rb
|
476
|
+
- lib/twilio-ruby/rest/messaging/v1/use_case.rb
|
474
477
|
- lib/twilio-ruby/rest/monitor.rb
|
475
478
|
- lib/twilio-ruby/rest/monitor/v1.rb
|
476
479
|
- lib/twilio-ruby/rest/monitor/v1/alert.rb
|
@@ -525,16 +528,11 @@ files:
|
|
525
528
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb
|
526
529
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
527
530
|
- lib/twilio-ruby/rest/preview/trusted_comms.rb
|
528
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb
|
529
531
|
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
|
530
532
|
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb
|
531
533
|
- lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb
|
532
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business.rb
|
533
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb
|
534
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb
|
535
534
|
- lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
|
536
535
|
- lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb
|
537
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb
|
538
536
|
- lib/twilio-ruby/rest/preview/understand.rb
|
539
537
|
- lib/twilio-ruby/rest/preview/understand/assistant.rb
|
540
538
|
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
|
@@ -914,11 +912,14 @@ files:
|
|
914
912
|
- spec/integration/ip_messaging/v2/service/user_spec.rb
|
915
913
|
- spec/integration/ip_messaging/v2/service_spec.rb
|
916
914
|
- spec/integration/lookups/v1/phone_number_spec.rb
|
915
|
+
- spec/integration/messaging/v1/brand_registration_spec.rb
|
916
|
+
- spec/integration/messaging/v1/campaign_spec.rb
|
917
917
|
- spec/integration/messaging/v1/deactivation_spec.rb
|
918
918
|
- spec/integration/messaging/v1/service/alpha_sender_spec.rb
|
919
919
|
- spec/integration/messaging/v1/service/phone_number_spec.rb
|
920
920
|
- spec/integration/messaging/v1/service/short_code_spec.rb
|
921
921
|
- spec/integration/messaging/v1/service_spec.rb
|
922
|
+
- spec/integration/messaging/v1/use_case_spec.rb
|
922
923
|
- spec/integration/monitor/v1/alert_spec.rb
|
923
924
|
- spec/integration/monitor/v1/event_spec.rb
|
924
925
|
- spec/integration/notify/v1/credential_spec.rb
|
@@ -960,16 +961,11 @@ files:
|
|
960
961
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
961
962
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
962
963
|
- spec/integration/preview/sync/service_spec.rb
|
963
|
-
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
964
964
|
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
965
965
|
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
966
966
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
967
|
-
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
968
|
-
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
969
|
-
- spec/integration/preview/trusted_comms/business_spec.rb
|
970
967
|
- spec/integration/preview/trusted_comms/cps_spec.rb
|
971
968
|
- spec/integration/preview/trusted_comms/current_call_spec.rb
|
972
|
-
- spec/integration/preview/trusted_comms/phone_call_spec.rb
|
973
969
|
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
974
970
|
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
975
971
|
- spec/integration/preview/understand/assistant/dialogue_spec.rb
|
@@ -1359,11 +1355,14 @@ test_files:
|
|
1359
1355
|
- spec/integration/ip_messaging/v2/service/user_spec.rb
|
1360
1356
|
- spec/integration/ip_messaging/v2/service_spec.rb
|
1361
1357
|
- spec/integration/lookups/v1/phone_number_spec.rb
|
1358
|
+
- spec/integration/messaging/v1/brand_registration_spec.rb
|
1359
|
+
- spec/integration/messaging/v1/campaign_spec.rb
|
1362
1360
|
- spec/integration/messaging/v1/deactivation_spec.rb
|
1363
1361
|
- spec/integration/messaging/v1/service/alpha_sender_spec.rb
|
1364
1362
|
- spec/integration/messaging/v1/service/phone_number_spec.rb
|
1365
1363
|
- spec/integration/messaging/v1/service/short_code_spec.rb
|
1366
1364
|
- spec/integration/messaging/v1/service_spec.rb
|
1365
|
+
- spec/integration/messaging/v1/use_case_spec.rb
|
1367
1366
|
- spec/integration/monitor/v1/alert_spec.rb
|
1368
1367
|
- spec/integration/monitor/v1/event_spec.rb
|
1369
1368
|
- spec/integration/notify/v1/credential_spec.rb
|
@@ -1405,16 +1404,11 @@ test_files:
|
|
1405
1404
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
1406
1405
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
1407
1406
|
- spec/integration/preview/sync/service_spec.rb
|
1408
|
-
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
1409
1407
|
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
1410
1408
|
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
1411
1409
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
1412
|
-
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
1413
|
-
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
1414
|
-
- spec/integration/preview/trusted_comms/business_spec.rb
|
1415
1410
|
- spec/integration/preview/trusted_comms/cps_spec.rb
|
1416
1411
|
- spec/integration/preview/trusted_comms/current_call_spec.rb
|
1417
|
-
- spec/integration/preview/trusted_comms/phone_call_spec.rb
|
1418
1412
|
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
1419
1413
|
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
1420
1414
|
- spec/integration/preview/understand/assistant/dialogue_spec.rb
|