twilio-ruby 5.12.1 → 5.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +12 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +47 -19
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +215 -0
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +215 -0
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +33 -6
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb +246 -0
- data/lib/twilio-ruby/rest/pricing.rb +9 -2
- data/lib/twilio-ruby/rest/pricing/v2.rb +35 -0
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +126 -0
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +281 -0
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -3
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb +81 -0
- data/spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb +81 -0
- data/spec/integration/preview/understand/assistant/intent/intent_actions_spec.rb +87 -0
- data/spec/integration/preview/understand/assistant/intent_spec.rb +4 -0
- data/spec/integration/preview/understand/assistant_spec.rb +12 -8
- data/spec/integration/pricing/v2/voice/country_spec.rb +181 -0
- data/spec/integration/pricing/v2/voice_spec.rb +12 -0
- metadata +19 -3
@@ -0,0 +1,181 @@
|
|
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 'Country' do
|
12
|
+
it "can read" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.pricing.v2.voice \
|
17
|
+
.countries.list()
|
18
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
+
|
20
|
+
values = {}
|
21
|
+
expect(
|
22
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
23
|
+
method: 'get',
|
24
|
+
url: 'https://pricing.twilio.com/v2/Voice/Countries',
|
25
|
+
))).to eq(true)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "receives read_full responses" do
|
29
|
+
@holodeck.mock(Twilio::Response.new(
|
30
|
+
200,
|
31
|
+
%q[
|
32
|
+
{
|
33
|
+
"countries": [
|
34
|
+
{
|
35
|
+
"country": "Andorra",
|
36
|
+
"iso_country": "AD",
|
37
|
+
"url": "https://pricing.twilio.com/v2/Voice/Countries/AD"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"meta": {
|
41
|
+
"first_page_url": "https://pricing.twilio.com/v2/Voice/Countries?PageSize=50&Page=0",
|
42
|
+
"key": "countries",
|
43
|
+
"next_page_url": null,
|
44
|
+
"page": 0,
|
45
|
+
"page_size": 50,
|
46
|
+
"previous_page_url": null,
|
47
|
+
"url": "https://pricing.twilio.com/v2/Voice/Countries?PageSize=50&Page=0"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
]
|
51
|
+
))
|
52
|
+
|
53
|
+
actual = @client.pricing.v2.voice \
|
54
|
+
.countries.list()
|
55
|
+
|
56
|
+
expect(actual).to_not eq(nil)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "receives read_empty responses" do
|
60
|
+
@holodeck.mock(Twilio::Response.new(
|
61
|
+
200,
|
62
|
+
%q[
|
63
|
+
{
|
64
|
+
"countries": [],
|
65
|
+
"meta": {
|
66
|
+
"first_page_url": "https://pricing.twilio.com/v2/Voice/Countries?PageSize=50&Page=0",
|
67
|
+
"key": "countries",
|
68
|
+
"next_page_url": null,
|
69
|
+
"page": 0,
|
70
|
+
"page_size": 50,
|
71
|
+
"previous_page_url": null,
|
72
|
+
"url": "https://pricing.twilio.com/v2/Voice/Countries?PageSize=50&Page=0"
|
73
|
+
}
|
74
|
+
}
|
75
|
+
]
|
76
|
+
))
|
77
|
+
|
78
|
+
actual = @client.pricing.v2.voice \
|
79
|
+
.countries.list()
|
80
|
+
|
81
|
+
expect(actual).to_not eq(nil)
|
82
|
+
end
|
83
|
+
|
84
|
+
it "can fetch" do
|
85
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
86
|
+
|
87
|
+
expect {
|
88
|
+
@client.pricing.v2.voice \
|
89
|
+
.countries('US').fetch()
|
90
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
91
|
+
|
92
|
+
values = {}
|
93
|
+
expect(
|
94
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
95
|
+
method: 'get',
|
96
|
+
url: 'https://pricing.twilio.com/v2/Voice/Countries/US',
|
97
|
+
))).to eq(true)
|
98
|
+
end
|
99
|
+
|
100
|
+
it "receives fetch responses" do
|
101
|
+
@holodeck.mock(Twilio::Response.new(
|
102
|
+
200,
|
103
|
+
%q[
|
104
|
+
{
|
105
|
+
"country": "United States",
|
106
|
+
"inbound_call_prices": [
|
107
|
+
{
|
108
|
+
"base_price": "0.0085",
|
109
|
+
"current_price": "0.0085",
|
110
|
+
"number_type": "local"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"base_price": "0.022",
|
114
|
+
"current_price": "0.022",
|
115
|
+
"number_type": "toll free"
|
116
|
+
}
|
117
|
+
],
|
118
|
+
"iso_country": "US",
|
119
|
+
"outbound_prefix_prices": [
|
120
|
+
{
|
121
|
+
"base_price": "0.090",
|
122
|
+
"current_price": "0.090",
|
123
|
+
"destination_prefixes": [
|
124
|
+
"1907"
|
125
|
+
],
|
126
|
+
"friendly_name": "Programmable Outbound Minute - United States - Alaska",
|
127
|
+
"origination_prefixes": [
|
128
|
+
"ALL"
|
129
|
+
]
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"base_price": "0.013",
|
133
|
+
"current_price": "0.013",
|
134
|
+
"destination_prefixes": [
|
135
|
+
"1808"
|
136
|
+
],
|
137
|
+
"friendly_name": "Programmable Outbound Minute - United States - Hawaii",
|
138
|
+
"origination_prefixes": [
|
139
|
+
"ALL"
|
140
|
+
]
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"base_price": "0.013",
|
144
|
+
"current_price": "0.013",
|
145
|
+
"destination_prefixes": [
|
146
|
+
"1800",
|
147
|
+
"1844",
|
148
|
+
"1855",
|
149
|
+
"1866",
|
150
|
+
"1877",
|
151
|
+
"1888"
|
152
|
+
],
|
153
|
+
"friendly_name": "Programmable Outbound Minute - United States & Canada - Toll Free",
|
154
|
+
"origination_prefixes": [
|
155
|
+
"ALL"
|
156
|
+
]
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"base_price": "0.013",
|
160
|
+
"current_price": "0.013",
|
161
|
+
"destination_prefixes": [
|
162
|
+
"1"
|
163
|
+
],
|
164
|
+
"friendly_name": "Programmable Outbound Minute - United States & Canada",
|
165
|
+
"origination_prefixes": [
|
166
|
+
"ALL"
|
167
|
+
]
|
168
|
+
}
|
169
|
+
],
|
170
|
+
"price_unit": "USD",
|
171
|
+
"url": "https://pricing.twilio.com/v2/Voice/Countries/US"
|
172
|
+
}
|
173
|
+
]
|
174
|
+
))
|
175
|
+
|
176
|
+
actual = @client.pricing.v2.voice \
|
177
|
+
.countries('US').fetch()
|
178
|
+
|
179
|
+
expect(actual).to_not eq(nil)
|
180
|
+
end
|
181
|
+
end
|
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.12.
|
4
|
+
version: 5.12.2
|
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: 2018-08-
|
11
|
+
date: 2018-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -342,10 +342,13 @@ files:
|
|
342
342
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
343
343
|
- lib/twilio-ruby/rest/preview/understand.rb
|
344
344
|
- lib/twilio-ruby/rest/preview/understand/assistant.rb
|
345
|
+
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
|
346
|
+
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb
|
345
347
|
- lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb
|
346
348
|
- lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
|
347
349
|
- lib/twilio-ruby/rest/preview/understand/assistant/intent.rb
|
348
350
|
- lib/twilio-ruby/rest/preview/understand/assistant/intent/field.rb
|
351
|
+
- lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb
|
349
352
|
- lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb
|
350
353
|
- lib/twilio-ruby/rest/preview/understand/assistant/intent/sample.rb
|
351
354
|
- lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb
|
@@ -364,6 +367,9 @@ files:
|
|
364
367
|
- lib/twilio-ruby/rest/pricing/v1/voice.rb
|
365
368
|
- lib/twilio-ruby/rest/pricing/v1/voice/country.rb
|
366
369
|
- lib/twilio-ruby/rest/pricing/v1/voice/number.rb
|
370
|
+
- lib/twilio-ruby/rest/pricing/v2.rb
|
371
|
+
- lib/twilio-ruby/rest/pricing/v2/voice.rb
|
372
|
+
- lib/twilio-ruby/rest/pricing/v2/voice/country.rb
|
367
373
|
- lib/twilio-ruby/rest/proxy.rb
|
368
374
|
- lib/twilio-ruby/rest/proxy/v1.rb
|
369
375
|
- lib/twilio-ruby/rest/proxy/v1/service.rb
|
@@ -619,9 +625,12 @@ files:
|
|
619
625
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
620
626
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
621
627
|
- spec/integration/preview/sync/service_spec.rb
|
628
|
+
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
629
|
+
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
622
630
|
- spec/integration/preview/understand/assistant/field_type/field_value_spec.rb
|
623
631
|
- spec/integration/preview/understand/assistant/field_type_spec.rb
|
624
632
|
- spec/integration/preview/understand/assistant/intent/field_spec.rb
|
633
|
+
- spec/integration/preview/understand/assistant/intent/intent_actions_spec.rb
|
625
634
|
- spec/integration/preview/understand/assistant/intent/intent_statistics_spec.rb
|
626
635
|
- spec/integration/preview/understand/assistant/intent/sample_spec.rb
|
627
636
|
- spec/integration/preview/understand/assistant/intent_spec.rb
|
@@ -639,6 +648,8 @@ files:
|
|
639
648
|
- spec/integration/pricing/v1/voice/country_spec.rb
|
640
649
|
- spec/integration/pricing/v1/voice/number_spec.rb
|
641
650
|
- spec/integration/pricing/v1/voice_spec.rb
|
651
|
+
- spec/integration/pricing/v2/voice/country_spec.rb
|
652
|
+
- spec/integration/pricing/v2/voice_spec.rb
|
642
653
|
- spec/integration/proxy/v1/service/phone_number_spec.rb
|
643
654
|
- spec/integration/proxy/v1/service/session/interaction_spec.rb
|
644
655
|
- spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb
|
@@ -751,7 +762,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
751
762
|
version: '0'
|
752
763
|
requirements: []
|
753
764
|
rubyforge_project:
|
754
|
-
rubygems_version: 2.
|
765
|
+
rubygems_version: 2.6.11
|
755
766
|
signing_key:
|
756
767
|
specification_version: 4
|
757
768
|
summary: The official library for communicating with the Twilio REST API, building
|
@@ -919,9 +930,12 @@ test_files:
|
|
919
930
|
- spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb
|
920
931
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
921
932
|
- spec/integration/preview/sync/service_spec.rb
|
933
|
+
- spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb
|
934
|
+
- spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb
|
922
935
|
- spec/integration/preview/understand/assistant/field_type/field_value_spec.rb
|
923
936
|
- spec/integration/preview/understand/assistant/field_type_spec.rb
|
924
937
|
- spec/integration/preview/understand/assistant/intent/field_spec.rb
|
938
|
+
- spec/integration/preview/understand/assistant/intent/intent_actions_spec.rb
|
925
939
|
- spec/integration/preview/understand/assistant/intent/intent_statistics_spec.rb
|
926
940
|
- spec/integration/preview/understand/assistant/intent/sample_spec.rb
|
927
941
|
- spec/integration/preview/understand/assistant/intent_spec.rb
|
@@ -939,6 +953,8 @@ test_files:
|
|
939
953
|
- spec/integration/pricing/v1/voice/country_spec.rb
|
940
954
|
- spec/integration/pricing/v1/voice/number_spec.rb
|
941
955
|
- spec/integration/pricing/v1/voice_spec.rb
|
956
|
+
- spec/integration/pricing/v2/voice/country_spec.rb
|
957
|
+
- spec/integration/pricing/v2/voice_spec.rb
|
942
958
|
- spec/integration/proxy/v1/service/phone_number_spec.rb
|
943
959
|
- spec/integration/proxy/v1/service/session/interaction_spec.rb
|
944
960
|
- spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb
|