twilio-ruby 5.40.4 → 5.41.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts.rb +12 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +10 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +13 -3
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +15 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +225 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -26
- data/lib/twilio-ruby/rest/verify/v2/service.rb +51 -30
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +12 -15
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +38 -18
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
- data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +1 -1
- data/spec/integration/conversations/v1/service/conversation_spec.rb +1 -1
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +52 -8
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +7 -12
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- metadata +14 -11
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +0 -48
@@ -13,9 +13,7 @@ describe 'Channel' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.preview.trusted_comms.
|
17
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
18
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
16
|
+
@client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
19
17
|
.channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
20
18
|
}.to raise_exception(Twilio::REST::TwilioError)
|
21
19
|
|
@@ -23,7 +21,7 @@ describe 'Channel' do
|
|
23
21
|
expect(
|
24
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
25
23
|
method: 'post',
|
26
|
-
url: 'https://preview.twilio.com/TrustedComms/
|
24
|
+
url: 'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels',
|
27
25
|
data: values,
|
28
26
|
))).to eq(true)
|
29
27
|
end
|
@@ -39,14 +37,12 @@ describe 'Channel' do
|
|
39
37
|
"branded_channel_sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
38
|
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
39
|
"phone_number": "+15000000000",
|
42
|
-
"url": "https://preview.twilio.com/TrustedComms/
|
40
|
+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
|
43
41
|
}
|
44
42
|
]
|
45
43
|
))
|
46
44
|
|
47
|
-
actual = @client.preview.trusted_comms.
|
48
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
49
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
45
|
+
actual = @client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
50
46
|
.channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
51
47
|
|
52
48
|
expect(actual).to_not eq(nil)
|
@@ -13,15 +13,13 @@ describe 'BrandedChannel' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.preview.trusted_comms.
|
17
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
18
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
16
|
+
@client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
19
17
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
18
|
|
21
19
|
expect(
|
22
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
21
|
method: 'get',
|
24
|
-
url: 'https://preview.twilio.com/TrustedComms/
|
22
|
+
url: 'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
25
23
|
))).to eq(true)
|
26
24
|
end
|
27
25
|
|
@@ -35,16 +33,14 @@ describe 'BrandedChannel' do
|
|
35
33
|
"brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
34
|
"sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
37
35
|
"links": {
|
38
|
-
"channels": "https://preview.twilio.com/TrustedComms/
|
36
|
+
"channels": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
|
39
37
|
},
|
40
|
-
"url": "https://preview.twilio.com/TrustedComms/
|
38
|
+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
41
39
|
}
|
42
40
|
]
|
43
41
|
))
|
44
42
|
|
45
|
-
actual = @client.preview.trusted_comms.
|
46
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
47
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
43
|
+
actual = @client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
48
44
|
|
49
45
|
expect(actual).to_not eq(nil)
|
50
46
|
end
|
@@ -32,7 +32,6 @@ describe 'Business' do
|
|
32
32
|
"sid": "BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
33
33
|
"url": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
34
|
"links": {
|
35
|
-
"brands": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Brands",
|
36
35
|
"insights": "https://preview.twilio.com/TrustedComms/Businesses/BXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Insights"
|
37
36
|
}
|
38
37
|
}
|
@@ -46,8 +46,19 @@ describe 'Challenge' do
|
|
46
46
|
"expiration_date": "2015-07-30T20:00:00Z",
|
47
47
|
"status": "pending",
|
48
48
|
"responded_reason": "none",
|
49
|
-
"details":
|
50
|
-
|
49
|
+
"details": {
|
50
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
51
|
+
"date": "2020-07-01T12:13:14Z",
|
52
|
+
"fields": [
|
53
|
+
{
|
54
|
+
"label": "Action",
|
55
|
+
"value": "Sign up in portal"
|
56
|
+
}
|
57
|
+
]
|
58
|
+
},
|
59
|
+
"hidden_details": {
|
60
|
+
"ip": "172.168.1.234"
|
61
|
+
},
|
51
62
|
"factor_type": "push",
|
52
63
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
53
64
|
}
|
@@ -96,8 +107,19 @@ describe 'Challenge' do
|
|
96
107
|
"expiration_date": "2015-07-30T20:00:00Z",
|
97
108
|
"status": "pending",
|
98
109
|
"responded_reason": "none",
|
99
|
-
"details":
|
100
|
-
|
110
|
+
"details": {
|
111
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
112
|
+
"date": "2020-07-01T12:13:14Z",
|
113
|
+
"fields": [
|
114
|
+
{
|
115
|
+
"label": "Action",
|
116
|
+
"value": "Sign up in portal"
|
117
|
+
}
|
118
|
+
]
|
119
|
+
},
|
120
|
+
"hidden_details": {
|
121
|
+
"ip": "172.168.1.234"
|
122
|
+
},
|
101
123
|
"factor_type": "push",
|
102
124
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
103
125
|
}
|
@@ -174,8 +196,19 @@ describe 'Challenge' do
|
|
174
196
|
"expiration_date": "2015-07-30T20:00:00Z",
|
175
197
|
"status": "pending",
|
176
198
|
"responded_reason": "none",
|
177
|
-
"details":
|
178
|
-
|
199
|
+
"details": {
|
200
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
201
|
+
"date": "2020-07-01T12:13:14Z",
|
202
|
+
"fields": [
|
203
|
+
{
|
204
|
+
"label": "Action",
|
205
|
+
"value": "Sign up in portal"
|
206
|
+
}
|
207
|
+
]
|
208
|
+
},
|
209
|
+
"hidden_details": {
|
210
|
+
"ip": "172.168.1.234"
|
211
|
+
},
|
179
212
|
"factor_type": "push",
|
180
213
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
181
214
|
}
|
@@ -235,8 +268,19 @@ describe 'Challenge' do
|
|
235
268
|
"expiration_date": "2015-07-30T20:00:00Z",
|
236
269
|
"status": "approved",
|
237
270
|
"responded_reason": "none",
|
238
|
-
"details":
|
239
|
-
|
271
|
+
"details": {
|
272
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
273
|
+
"date": "2020-07-01T12:13:14Z",
|
274
|
+
"fields": [
|
275
|
+
{
|
276
|
+
"label": "Action",
|
277
|
+
"value": "Sign up in portal"
|
278
|
+
}
|
279
|
+
]
|
280
|
+
},
|
281
|
+
"hidden_details": {
|
282
|
+
"ip": "172.168.1.234"
|
283
|
+
},
|
240
284
|
"factor_type": "push",
|
241
285
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
242
286
|
}
|
@@ -15,15 +15,10 @@ describe 'Factor' do
|
|
15
15
|
expect {
|
16
16
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
17
|
.entities('identity') \
|
18
|
-
.factors.create(
|
18
|
+
.factors.create(friendly_name: 'friendly_name', factor_type: 'push', twilio_sandbox_mode: 'twilio_sandbox_mode')
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
|
-
values = {
|
22
|
-
'Binding' => 'binding',
|
23
|
-
'FriendlyName' => 'friendly_name',
|
24
|
-
'FactorType' => 'push',
|
25
|
-
'Config' => 'config',
|
26
|
-
}
|
21
|
+
values = {'FriendlyName' => 'friendly_name', 'FactorType' => 'push', }
|
27
22
|
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
28
23
|
expect(
|
29
24
|
@holodeck.has_request?(Holodeck::Request.new(
|
@@ -51,7 +46,7 @@ describe 'Factor' do
|
|
51
46
|
"factor_type": "push",
|
52
47
|
"config": {
|
53
48
|
"sdk_version": "1.0",
|
54
|
-
"app_id": "com.
|
49
|
+
"app_id": "com.example.myapp",
|
55
50
|
"notification_platform": "fcm",
|
56
51
|
"notification_token": "test_token"
|
57
52
|
},
|
@@ -62,7 +57,7 @@ describe 'Factor' do
|
|
62
57
|
|
63
58
|
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
64
59
|
.entities('identity') \
|
65
|
-
.factors.create(
|
60
|
+
.factors.create(friendly_name: 'friendly_name', factor_type: 'push')
|
66
61
|
|
67
62
|
expect(actual).to_not eq(nil)
|
68
63
|
end
|
@@ -133,7 +128,7 @@ describe 'Factor' do
|
|
133
128
|
"factor_type": "push",
|
134
129
|
"config": {
|
135
130
|
"sdk_version": "1.0",
|
136
|
-
"app_id": "com.
|
131
|
+
"app_id": "com.example.myapp",
|
137
132
|
"notification_platform": "fcm",
|
138
133
|
"notification_token": "test_token"
|
139
134
|
},
|
@@ -212,7 +207,7 @@ describe 'Factor' do
|
|
212
207
|
"factor_type": "push",
|
213
208
|
"config": {
|
214
209
|
"sdk_version": "1.0",
|
215
|
-
"app_id": "com.
|
210
|
+
"app_id": "com.example.myapp",
|
216
211
|
"notification_platform": "fcm",
|
217
212
|
"notification_token": "test_token"
|
218
213
|
},
|
@@ -274,7 +269,7 @@ describe 'Factor' do
|
|
274
269
|
"factor_type": "push",
|
275
270
|
"config": {
|
276
271
|
"sdk_version": "1.0",
|
277
|
-
"app_id": "com.
|
272
|
+
"app_id": "com.example.myapp",
|
278
273
|
"notification_platform": "fcm",
|
279
274
|
"notification_token": "test_token"
|
280
275
|
},
|
@@ -44,7 +44,8 @@ describe 'Service' do
|
|
44
44
|
"custom_code_enabled": true,
|
45
45
|
"push": {
|
46
46
|
"include_date": true,
|
47
|
-
"
|
47
|
+
"apn_credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
48
|
+
"fcm_credential_sid": null
|
48
49
|
},
|
49
50
|
"date_created": "2015-07-30T20:00:00Z",
|
50
51
|
"date_updated": "2015-07-30T20:00:00Z",
|
@@ -100,7 +101,8 @@ describe 'Service' do
|
|
100
101
|
"custom_code_enabled": true,
|
101
102
|
"push": {
|
102
103
|
"include_date": true,
|
103
|
-
"
|
104
|
+
"apn_credential_sid": null,
|
105
|
+
"fcm_credential_sid": null
|
104
106
|
},
|
105
107
|
"date_created": "2015-07-30T20:00:00Z",
|
106
108
|
"date_updated": "2015-07-30T20:00:00Z",
|
@@ -192,7 +194,8 @@ describe 'Service' do
|
|
192
194
|
"custom_code_enabled": true,
|
193
195
|
"push": {
|
194
196
|
"include_date": true,
|
195
|
-
"
|
197
|
+
"apn_credential_sid": null,
|
198
|
+
"fcm_credential_sid": null
|
196
199
|
},
|
197
200
|
"date_created": "2015-07-30T20:00:00Z",
|
198
201
|
"date_updated": "2015-07-30T20:00:00Z",
|
@@ -250,7 +253,8 @@ describe 'Service' do
|
|
250
253
|
"custom_code_enabled": true,
|
251
254
|
"push": {
|
252
255
|
"include_date": true,
|
253
|
-
"
|
256
|
+
"apn_credential_sid": null,
|
257
|
+
"fcm_credential_sid": "CRbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
254
258
|
},
|
255
259
|
"date_created": "2015-07-30T20:00:00Z",
|
256
260
|
"date_updated": "2015-07-30T20:00:00Z",
|
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.41.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: 2020-
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -241,9 +241,11 @@ files:
|
|
241
241
|
- lib/twilio-ruby/jwt/task_router.rb
|
242
242
|
- lib/twilio-ruby/rest/accounts.rb
|
243
243
|
- lib/twilio-ruby/rest/accounts/v1.rb
|
244
|
+
- lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb
|
244
245
|
- lib/twilio-ruby/rest/accounts/v1/credential.rb
|
245
246
|
- lib/twilio-ruby/rest/accounts/v1/credential/aws.rb
|
246
247
|
- lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb
|
248
|
+
- lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb
|
247
249
|
- lib/twilio-ruby/rest/api.rb
|
248
250
|
- lib/twilio-ruby/rest/api/v2010.rb
|
249
251
|
- lib/twilio-ruby/rest/api/v2010/account.rb
|
@@ -507,11 +509,10 @@ files:
|
|
507
509
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
508
510
|
- lib/twilio-ruby/rest/preview/trusted_comms.rb
|
509
511
|
- lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb
|
512
|
+
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb
|
513
|
+
- lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb
|
510
514
|
- lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb
|
511
515
|
- lib/twilio-ruby/rest/preview/trusted_comms/business.rb
|
512
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb
|
513
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb
|
514
|
-
- lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb
|
515
516
|
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb
|
516
517
|
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb
|
517
518
|
- lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
|
@@ -711,9 +712,11 @@ files:
|
|
711
712
|
- spec/holodeck/holodeck.rb
|
712
713
|
- spec/holodeck/hologram.rb
|
713
714
|
- spec/http/http_client_spec.rb
|
715
|
+
- spec/integration/accounts/v1/auth_token_promotion_spec.rb
|
714
716
|
- spec/integration/accounts/v1/credential/aws_spec.rb
|
715
717
|
- spec/integration/accounts/v1/credential/public_key_spec.rb
|
716
718
|
- spec/integration/accounts/v1/credential_spec.rb
|
719
|
+
- spec/integration/accounts/v1/secondary_auth_token_spec.rb
|
717
720
|
- spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb
|
718
721
|
- spec/integration/api/v2010/account/address_spec.rb
|
719
722
|
- spec/integration/api/v2010/account/application_spec.rb
|
@@ -937,10 +940,9 @@ files:
|
|
937
940
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
938
941
|
- spec/integration/preview/sync/service_spec.rb
|
939
942
|
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
943
|
+
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
944
|
+
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
940
945
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
941
|
-
- spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb
|
942
|
-
- spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb
|
943
|
-
- spec/integration/preview/trusted_comms/business/brand_spec.rb
|
944
946
|
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
945
947
|
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
946
948
|
- spec/integration/preview/trusted_comms/business_spec.rb
|
@@ -1151,9 +1153,11 @@ test_files:
|
|
1151
1153
|
- spec/holodeck/holodeck.rb
|
1152
1154
|
- spec/holodeck/hologram.rb
|
1153
1155
|
- spec/http/http_client_spec.rb
|
1156
|
+
- spec/integration/accounts/v1/auth_token_promotion_spec.rb
|
1154
1157
|
- spec/integration/accounts/v1/credential/aws_spec.rb
|
1155
1158
|
- spec/integration/accounts/v1/credential/public_key_spec.rb
|
1156
1159
|
- spec/integration/accounts/v1/credential_spec.rb
|
1160
|
+
- spec/integration/accounts/v1/secondary_auth_token_spec.rb
|
1157
1161
|
- spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb
|
1158
1162
|
- spec/integration/api/v2010/account/address_spec.rb
|
1159
1163
|
- spec/integration/api/v2010/account/application_spec.rb
|
@@ -1377,10 +1381,9 @@ test_files:
|
|
1377
1381
|
- spec/integration/preview/sync/service/sync_map_spec.rb
|
1378
1382
|
- spec/integration/preview/sync/service_spec.rb
|
1379
1383
|
- spec/integration/preview/trusted_comms/branded_call_spec.rb
|
1384
|
+
- spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb
|
1385
|
+
- spec/integration/preview/trusted_comms/branded_channel_spec.rb
|
1380
1386
|
- spec/integration/preview/trusted_comms/brands_information_spec.rb
|
1381
|
-
- spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb
|
1382
|
-
- spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb
|
1383
|
-
- spec/integration/preview/trusted_comms/business/brand_spec.rb
|
1384
1387
|
- spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb
|
1385
1388
|
- spec/integration/preview/trusted_comms/business/insights_spec.rb
|
1386
1389
|
- spec/integration/preview/trusted_comms/business_spec.rb
|
@@ -1,233 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
class BusinessContext < InstanceContext
|
14
|
-
##
|
15
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
16
|
-
class BrandList < ListResource
|
17
|
-
##
|
18
|
-
# Initialize the BrandList
|
19
|
-
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] business_sid The unique SID identifier of the Business.
|
21
|
-
# @return [BrandList] BrandList
|
22
|
-
def initialize(version, business_sid: nil)
|
23
|
-
super(version)
|
24
|
-
|
25
|
-
# Path Solution
|
26
|
-
@solution = {business_sid: business_sid}
|
27
|
-
end
|
28
|
-
|
29
|
-
##
|
30
|
-
# Provide a user friendly representation
|
31
|
-
def to_s
|
32
|
-
'#<Twilio.Preview.TrustedComms.BrandList>'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
##
|
37
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
38
|
-
class BrandPage < Page
|
39
|
-
##
|
40
|
-
# Initialize the BrandPage
|
41
|
-
# @param [Version] version Version that contains the resource
|
42
|
-
# @param [Response] response Response from the API
|
43
|
-
# @param [Hash] solution Path solution for the resource
|
44
|
-
# @return [BrandPage] BrandPage
|
45
|
-
def initialize(version, response, solution)
|
46
|
-
super(version, response)
|
47
|
-
|
48
|
-
# Path Solution
|
49
|
-
@solution = solution
|
50
|
-
end
|
51
|
-
|
52
|
-
##
|
53
|
-
# Build an instance of BrandInstance
|
54
|
-
# @param [Hash] payload Payload response from the API
|
55
|
-
# @return [BrandInstance] BrandInstance
|
56
|
-
def get_instance(payload)
|
57
|
-
BrandInstance.new(@version, payload, business_sid: @solution[:business_sid], )
|
58
|
-
end
|
59
|
-
|
60
|
-
##
|
61
|
-
# Provide a user friendly representation
|
62
|
-
def to_s
|
63
|
-
'<Twilio.Preview.TrustedComms.BrandPage>'
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
##
|
68
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
69
|
-
class BrandContext < InstanceContext
|
70
|
-
##
|
71
|
-
# Initialize the BrandContext
|
72
|
-
# @param [Version] version Version that contains the resource
|
73
|
-
# @param [String] business_sid The unique SID identifier of the Business.
|
74
|
-
# @param [String] sid The unique SID identifier of the Brand.
|
75
|
-
# @return [BrandContext] BrandContext
|
76
|
-
def initialize(version, business_sid, sid)
|
77
|
-
super(version)
|
78
|
-
|
79
|
-
# Path Solution
|
80
|
-
@solution = {business_sid: business_sid, sid: sid, }
|
81
|
-
@uri = "/Businesses/#{@solution[:business_sid]}/Brands/#{@solution[:sid]}"
|
82
|
-
|
83
|
-
# Dependents
|
84
|
-
@branded_channels = nil
|
85
|
-
end
|
86
|
-
|
87
|
-
##
|
88
|
-
# Fetch the BrandInstance
|
89
|
-
# @return [BrandInstance] Fetched BrandInstance
|
90
|
-
def fetch
|
91
|
-
payload = @version.fetch('GET', @uri)
|
92
|
-
|
93
|
-
BrandInstance.new(@version, payload, business_sid: @solution[:business_sid], sid: @solution[:sid], )
|
94
|
-
end
|
95
|
-
|
96
|
-
##
|
97
|
-
# Access the branded_channels
|
98
|
-
# @return [BrandedChannelList]
|
99
|
-
# @return [BrandedChannelContext] if sid was passed.
|
100
|
-
def branded_channels(sid=:unset)
|
101
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
102
|
-
|
103
|
-
if sid != :unset
|
104
|
-
return BrandedChannelContext.new(@version, @solution[:business_sid], @solution[:sid], sid, )
|
105
|
-
end
|
106
|
-
|
107
|
-
unless @branded_channels
|
108
|
-
@branded_channels = BrandedChannelList.new(
|
109
|
-
@version,
|
110
|
-
business_sid: @solution[:business_sid],
|
111
|
-
brand_sid: @solution[:sid],
|
112
|
-
)
|
113
|
-
end
|
114
|
-
|
115
|
-
@branded_channels
|
116
|
-
end
|
117
|
-
|
118
|
-
##
|
119
|
-
# Provide a user friendly representation
|
120
|
-
def to_s
|
121
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
122
|
-
"#<Twilio.Preview.TrustedComms.BrandContext #{context}>"
|
123
|
-
end
|
124
|
-
|
125
|
-
##
|
126
|
-
# Provide a detailed, user friendly representation
|
127
|
-
def inspect
|
128
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
129
|
-
"#<Twilio.Preview.TrustedComms.BrandContext #{context}>"
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
##
|
134
|
-
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
135
|
-
class BrandInstance < InstanceResource
|
136
|
-
##
|
137
|
-
# Initialize the BrandInstance
|
138
|
-
# @param [Version] version Version that contains the resource
|
139
|
-
# @param [Hash] payload payload that contains response from Twilio
|
140
|
-
# @param [String] business_sid The unique SID identifier of the Business.
|
141
|
-
# @param [String] sid The unique SID identifier of the Brand.
|
142
|
-
# @return [BrandInstance] BrandInstance
|
143
|
-
def initialize(version, payload, business_sid: nil, sid: nil)
|
144
|
-
super(version)
|
145
|
-
|
146
|
-
# Marshaled Properties
|
147
|
-
@properties = {
|
148
|
-
'account_sid' => payload['account_sid'],
|
149
|
-
'business_sid' => payload['business_sid'],
|
150
|
-
'sid' => payload['sid'],
|
151
|
-
'links' => payload['links'],
|
152
|
-
'url' => payload['url'],
|
153
|
-
}
|
154
|
-
|
155
|
-
# Context
|
156
|
-
@instance_context = nil
|
157
|
-
@params = {'business_sid' => business_sid, 'sid' => sid || @properties['sid'], }
|
158
|
-
end
|
159
|
-
|
160
|
-
##
|
161
|
-
# Generate an instance context for the instance, the context is capable of
|
162
|
-
# performing various actions. All instance actions are proxied to the context
|
163
|
-
# @return [BrandContext] BrandContext for this BrandInstance
|
164
|
-
def context
|
165
|
-
unless @instance_context
|
166
|
-
@instance_context = BrandContext.new(@version, @params['business_sid'], @params['sid'], )
|
167
|
-
end
|
168
|
-
@instance_context
|
169
|
-
end
|
170
|
-
|
171
|
-
##
|
172
|
-
# @return [String] Account Sid.
|
173
|
-
def account_sid
|
174
|
-
@properties['account_sid']
|
175
|
-
end
|
176
|
-
|
177
|
-
##
|
178
|
-
# @return [String] Business Sid.
|
179
|
-
def business_sid
|
180
|
-
@properties['business_sid']
|
181
|
-
end
|
182
|
-
|
183
|
-
##
|
184
|
-
# @return [String] Brand Sid.
|
185
|
-
def sid
|
186
|
-
@properties['sid']
|
187
|
-
end
|
188
|
-
|
189
|
-
##
|
190
|
-
# @return [String] Nested resource URLs.
|
191
|
-
def links
|
192
|
-
@properties['links']
|
193
|
-
end
|
194
|
-
|
195
|
-
##
|
196
|
-
# @return [String] The URL of this resource.
|
197
|
-
def url
|
198
|
-
@properties['url']
|
199
|
-
end
|
200
|
-
|
201
|
-
##
|
202
|
-
# Fetch the BrandInstance
|
203
|
-
# @return [BrandInstance] Fetched BrandInstance
|
204
|
-
def fetch
|
205
|
-
context.fetch
|
206
|
-
end
|
207
|
-
|
208
|
-
##
|
209
|
-
# Access the branded_channels
|
210
|
-
# @return [branded_channels] branded_channels
|
211
|
-
def branded_channels
|
212
|
-
context.branded_channels
|
213
|
-
end
|
214
|
-
|
215
|
-
##
|
216
|
-
# Provide a user friendly representation
|
217
|
-
def to_s
|
218
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
219
|
-
"<Twilio.Preview.TrustedComms.BrandInstance #{values}>"
|
220
|
-
end
|
221
|
-
|
222
|
-
##
|
223
|
-
# Provide a detailed, user friendly representation
|
224
|
-
def inspect
|
225
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
226
|
-
"<Twilio.Preview.TrustedComms.BrandInstance #{values}>"
|
227
|
-
end
|
228
|
-
end
|
229
|
-
end
|
230
|
-
end
|
231
|
-
end
|
232
|
-
end
|
233
|
-
end
|