twilio-ruby 5.73.1 → 5.73.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +28 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +6 -6
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +11 -11
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +337 -0
- data/lib/twilio-ruby/rest/content/v1.rb +45 -0
- data/lib/twilio-ruby/rest/content.rb +47 -0
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +190 -0
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +166 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api.rb +12 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +71 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 896d8d0d0dfce7ae4974eef4b0310cf88235ba69
|
4
|
+
data.tar.gz: 92cb92bae7b8400bfed7273ef93b2bea4af690b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb4fd38d013d19504a3be0ad3675f2606027bda0f928183bf96dc186f82cfdbf4f8ea3e6bfff493157823526d2f58a8d5c32bbb6928af1dc9d14d104fd1ed32c
|
7
|
+
data.tar.gz: 89ea1e3fa976d22a46948144fe5fe56834faa75aabcf7ea0b0fd0466fabcb4a57b611dbb8b45ee70591c460a8e1211b68035ca5406b605fa7131c717b9ade3dc
|
@@ -8,8 +8,14 @@ jobs:
|
|
8
8
|
name: Validate title
|
9
9
|
runs-on: ubuntu-latest
|
10
10
|
steps:
|
11
|
-
- uses: amannn/action-semantic-pull-request@
|
11
|
+
- uses: amannn/action-semantic-pull-request@v5
|
12
12
|
with:
|
13
|
-
types:
|
13
|
+
types: |
|
14
|
+
chore
|
15
|
+
docs
|
16
|
+
fix
|
17
|
+
feat
|
18
|
+
misc
|
19
|
+
test
|
14
20
|
env:
|
15
21
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -20,7 +20,7 @@ jobs:
|
|
20
20
|
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'jruby-9.2' ]
|
21
21
|
steps:
|
22
22
|
- name: Checkout twilio-ruby
|
23
|
-
uses: actions/checkout@
|
23
|
+
uses: actions/checkout@v3
|
24
24
|
with:
|
25
25
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
26
26
|
|
@@ -65,7 +65,7 @@ jobs:
|
|
65
65
|
runs-on: ubuntu-latest
|
66
66
|
steps:
|
67
67
|
- name: Checkout twilio-ruby
|
68
|
-
uses: actions/checkout@
|
68
|
+
uses: actions/checkout@v3
|
69
69
|
with:
|
70
70
|
fetch-depth: 0
|
71
71
|
|
@@ -78,7 +78,7 @@ jobs:
|
|
78
78
|
- run: bundle install
|
79
79
|
|
80
80
|
- name: Login to Docker Hub
|
81
|
-
uses: docker/login-action@
|
81
|
+
uses: docker/login-action@v2
|
82
82
|
with:
|
83
83
|
username: ${{ secrets.DOCKER_USERNAME }}
|
84
84
|
password: ${{ secrets.DOCKER_AUTH_TOKEN }}
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,34 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-11-16] Version 5.73.3
|
5
|
+
---------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #621](https://github.com/twilio/twilio-ruby/pull/621): upgrade GitHub Actions dependencies. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
|
8
|
+
|
9
|
+
**Api**
|
10
|
+
- Set the Content resource to have public visibility as Preview
|
11
|
+
|
12
|
+
**Flex**
|
13
|
+
- Adding new parameter `base_url` to 'gooddata' response in version `v1`
|
14
|
+
|
15
|
+
**Insights**
|
16
|
+
- Added `answered_by` field in List Call Summary
|
17
|
+
- Added `answered_by` field in call summary
|
18
|
+
|
19
|
+
|
20
|
+
[2022-11-10] Version 5.73.2
|
21
|
+
---------------------------
|
22
|
+
**Flex**
|
23
|
+
- Adding two new authorization API 'user_roles' and 'gooddata' in version `v1`
|
24
|
+
|
25
|
+
**Messaging**
|
26
|
+
- Add new Campaign properties (MessageFlow, OptInMessage, OptInKeywords, OptOutMessage, OptOutKeywords, HelpMessage, HelpKeywords)
|
27
|
+
|
28
|
+
**Twiml**
|
29
|
+
- Add new speech models to `Gather`.
|
30
|
+
|
31
|
+
|
4
32
|
[2022-10-31] Version 5.73.1
|
5
33
|
---------------------------
|
6
34
|
**Api**
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (C)
|
3
|
+
Copyright (C) 2022, Twilio, Inc. <help@twilio.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.md
CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
|
|
34
34
|
To install using [Bundler][bundler] grab the latest stable version:
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
gem 'twilio-ruby', '~> 5.73.
|
37
|
+
gem 'twilio-ruby', '~> 5.73.3'
|
38
38
|
```
|
39
39
|
|
40
40
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
41
41
|
|
42
42
|
```bash
|
43
|
-
gem install twilio-ruby -v 5.73.
|
43
|
+
gem install twilio-ruby -v 5.73.3
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -33,8 +33,8 @@ module Twilio
|
|
33
33
|
|
34
34
|
##
|
35
35
|
# Create the UserDefinedMessageInstance
|
36
|
-
# @param [String] content
|
37
|
-
#
|
36
|
+
# @param [String] content The User Defined Message in the form of URL-encoded JSON
|
37
|
+
# string.
|
38
38
|
# @param [String] idempotency_key A unique string value to identify API call. This
|
39
39
|
# should be a unique string value per API call and can be a randomly generated.
|
40
40
|
# @return [UserDefinedMessageInstance] Created UserDefinedMessageInstance
|
@@ -117,25 +117,25 @@ module Twilio
|
|
117
117
|
end
|
118
118
|
|
119
119
|
##
|
120
|
-
# @return [String] Account
|
120
|
+
# @return [String] Account SID.
|
121
121
|
def account_sid
|
122
122
|
@properties['account_sid']
|
123
123
|
end
|
124
124
|
|
125
125
|
##
|
126
|
-
# @return [String] Call
|
126
|
+
# @return [String] Call SID.
|
127
127
|
def call_sid
|
128
128
|
@properties['call_sid']
|
129
129
|
end
|
130
130
|
|
131
131
|
##
|
132
|
-
# @return [String]
|
132
|
+
# @return [String] User Defined Message SID.
|
133
133
|
def sid
|
134
134
|
@properties['sid']
|
135
135
|
end
|
136
136
|
|
137
137
|
##
|
138
|
-
# @return [Time] The date this User Defined Message was created
|
138
|
+
# @return [Time] The date this User Defined Message was created.
|
139
139
|
def date_created
|
140
140
|
@properties['date_created']
|
141
141
|
end
|
@@ -21,8 +21,8 @@ module Twilio
|
|
21
21
|
# User Defined Messages.
|
22
22
|
# @param [String] call_sid The SID of the
|
23
23
|
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
24
|
-
#
|
25
|
-
# producing the
|
24
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
25
|
+
# producing the User Defined Messages.
|
26
26
|
# @return [UserDefinedMessageSubscriptionList] UserDefinedMessageSubscriptionList
|
27
27
|
def initialize(version, account_sid: nil, call_sid: nil)
|
28
28
|
super(version)
|
@@ -109,8 +109,8 @@ module Twilio
|
|
109
109
|
# User Defined Messages.
|
110
110
|
# @param [String] call_sid The SID of the
|
111
111
|
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
112
|
-
#
|
113
|
-
# producing the
|
112
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
113
|
+
# producing the User Defined Messages.
|
114
114
|
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
115
115
|
# Subscription.
|
116
116
|
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext
|
@@ -154,8 +154,8 @@ module Twilio
|
|
154
154
|
# User Defined Messages.
|
155
155
|
# @param [String] call_sid The SID of the
|
156
156
|
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
157
|
-
#
|
158
|
-
# producing the
|
157
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
158
|
+
# producing the User Defined Messages.
|
159
159
|
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
160
160
|
# Subscription.
|
161
161
|
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
@@ -193,31 +193,31 @@ module Twilio
|
|
193
193
|
end
|
194
194
|
|
195
195
|
##
|
196
|
-
# @return [String] Account
|
196
|
+
# @return [String] Account SID.
|
197
197
|
def account_sid
|
198
198
|
@properties['account_sid']
|
199
199
|
end
|
200
200
|
|
201
201
|
##
|
202
|
-
# @return [String] Call
|
202
|
+
# @return [String] Call SID.
|
203
203
|
def call_sid
|
204
204
|
@properties['call_sid']
|
205
205
|
end
|
206
206
|
|
207
207
|
##
|
208
|
-
# @return [String] User Defined Message Subscription
|
208
|
+
# @return [String] User Defined Message Subscription SID.
|
209
209
|
def sid
|
210
210
|
@properties['sid']
|
211
211
|
end
|
212
212
|
|
213
213
|
##
|
214
|
-
# @return [Time] The date this User Defined Message Subscription was created
|
214
|
+
# @return [Time] The date this User Defined Message Subscription was created.
|
215
215
|
def date_created
|
216
216
|
@properties['date_created']
|
217
217
|
end
|
218
218
|
|
219
219
|
##
|
220
|
-
# @return [String] The URI of the
|
220
|
+
# @return [String] The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`.
|
221
221
|
def uri
|
222
222
|
@properties['uri']
|
223
223
|
end
|
@@ -34,6 +34,7 @@ module Twilio
|
|
34
34
|
@api = nil
|
35
35
|
@autopilot = nil
|
36
36
|
@chat = nil
|
37
|
+
@content = nil
|
37
38
|
@conversations = nil
|
38
39
|
@events = nil
|
39
40
|
@flex_api = nil
|
@@ -188,6 +189,12 @@ module Twilio
|
|
188
189
|
@chat ||= Chat.new self
|
189
190
|
end
|
190
191
|
|
192
|
+
##
|
193
|
+
# Access the Content Twilio Domain
|
194
|
+
def content
|
195
|
+
@content ||= Content.new self
|
196
|
+
end
|
197
|
+
|
191
198
|
##
|
192
199
|
# Access the Conversations Twilio Domain
|
193
200
|
def conversations
|
@@ -0,0 +1,337 @@
|
|
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 Content < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# 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.
|
15
|
+
class ContentList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the ContentList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [ContentList] ContentList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Content"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the ContentInstance
|
30
|
+
# @return [ContentInstance] Created ContentInstance
|
31
|
+
def create
|
32
|
+
payload = @version.create('POST', @uri)
|
33
|
+
|
34
|
+
ContentInstance.new(@version, payload, )
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Lists ContentInstance records from the API as a list.
|
39
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
40
|
+
# memory before returning.
|
41
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
42
|
+
# guarantees to never return more than limit. Default is no limit
|
43
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
44
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
45
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
46
|
+
# efficient page size, i.e. min(limit, 1000)
|
47
|
+
# @return [Array] Array of up to limit results
|
48
|
+
def list(limit: nil, page_size: nil)
|
49
|
+
self.stream(limit: limit, page_size: page_size).entries
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Streams ContentInstance records from the API as an Enumerable.
|
54
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
55
|
+
# is reached.
|
56
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
|
+
# guarantees to never return more than limit. Default is no limit.
|
58
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
59
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
60
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
|
+
# efficient page size, i.e. min(limit, 1000)
|
62
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
+
def stream(limit: nil, page_size: nil)
|
64
|
+
limits = @version.read_limits(limit, page_size)
|
65
|
+
|
66
|
+
page = self.page(page_size: limits[:page_size], )
|
67
|
+
|
68
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# When passed a block, yields ContentInstance records from the API.
|
73
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
74
|
+
# is reached.
|
75
|
+
def each
|
76
|
+
limits = @version.read_limits
|
77
|
+
|
78
|
+
page = self.page(page_size: limits[:page_size], )
|
79
|
+
|
80
|
+
@version.stream(page,
|
81
|
+
limit: limits[:limit],
|
82
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
83
|
+
end
|
84
|
+
|
85
|
+
##
|
86
|
+
# Retrieve a single page of ContentInstance records from the API.
|
87
|
+
# Request is executed immediately.
|
88
|
+
# @param [String] page_token PageToken provided by the API
|
89
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
90
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
91
|
+
# @return [Page] Page of ContentInstance
|
92
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
93
|
+
params = Twilio::Values.of({
|
94
|
+
'PageToken' => page_token,
|
95
|
+
'Page' => page_number,
|
96
|
+
'PageSize' => page_size,
|
97
|
+
})
|
98
|
+
|
99
|
+
response = @version.page('GET', @uri, params: params)
|
100
|
+
|
101
|
+
ContentPage.new(@version, response, @solution)
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# Retrieve a single page of ContentInstance records from the API.
|
106
|
+
# Request is executed immediately.
|
107
|
+
# @param [String] target_url API-generated URL for the requested results page
|
108
|
+
# @return [Page] Page of ContentInstance
|
109
|
+
def get_page(target_url)
|
110
|
+
response = @version.domain.request(
|
111
|
+
'GET',
|
112
|
+
target_url
|
113
|
+
)
|
114
|
+
ContentPage.new(@version, response, @solution)
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Provide a user friendly representation
|
119
|
+
def to_s
|
120
|
+
'#<Twilio.Content.V1.ContentList>'
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# 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.
|
126
|
+
class ContentPage < Page
|
127
|
+
##
|
128
|
+
# Initialize the ContentPage
|
129
|
+
# @param [Version] version Version that contains the resource
|
130
|
+
# @param [Response] response Response from the API
|
131
|
+
# @param [Hash] solution Path solution for the resource
|
132
|
+
# @return [ContentPage] ContentPage
|
133
|
+
def initialize(version, response, solution)
|
134
|
+
super(version, response)
|
135
|
+
|
136
|
+
# Path Solution
|
137
|
+
@solution = solution
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Build an instance of ContentInstance
|
142
|
+
# @param [Hash] payload Payload response from the API
|
143
|
+
# @return [ContentInstance] ContentInstance
|
144
|
+
def get_instance(payload)
|
145
|
+
ContentInstance.new(@version, payload, )
|
146
|
+
end
|
147
|
+
|
148
|
+
##
|
149
|
+
# Provide a user friendly representation
|
150
|
+
def to_s
|
151
|
+
'<Twilio.Content.V1.ContentPage>'
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# 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.
|
157
|
+
class ContentContext < InstanceContext
|
158
|
+
##
|
159
|
+
# Initialize the ContentContext
|
160
|
+
# @param [Version] version Version that contains the resource
|
161
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
162
|
+
# Content resource to fetch.
|
163
|
+
# @return [ContentContext] ContentContext
|
164
|
+
def initialize(version, sid)
|
165
|
+
super(version)
|
166
|
+
|
167
|
+
# Path Solution
|
168
|
+
@solution = {sid: sid, }
|
169
|
+
@uri = "/Content/#{@solution[:sid]}"
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# Fetch the ContentInstance
|
174
|
+
# @return [ContentInstance] Fetched ContentInstance
|
175
|
+
def fetch
|
176
|
+
payload = @version.fetch('GET', @uri)
|
177
|
+
|
178
|
+
ContentInstance.new(@version, payload, sid: @solution[:sid], )
|
179
|
+
end
|
180
|
+
|
181
|
+
##
|
182
|
+
# Delete the ContentInstance
|
183
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
184
|
+
def delete
|
185
|
+
@version.delete('DELETE', @uri)
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# Provide a user friendly representation
|
190
|
+
def to_s
|
191
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
192
|
+
"#<Twilio.Content.V1.ContentContext #{context}>"
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Provide a detailed, user friendly representation
|
197
|
+
def inspect
|
198
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
199
|
+
"#<Twilio.Content.V1.ContentContext #{context}>"
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# 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.
|
205
|
+
class ContentInstance < InstanceResource
|
206
|
+
##
|
207
|
+
# Initialize the ContentInstance
|
208
|
+
# @param [Version] version Version that contains the resource
|
209
|
+
# @param [Hash] payload payload that contains response from Twilio
|
210
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
211
|
+
# Content resource to fetch.
|
212
|
+
# @return [ContentInstance] ContentInstance
|
213
|
+
def initialize(version, payload, sid: nil)
|
214
|
+
super(version)
|
215
|
+
|
216
|
+
# Marshaled Properties
|
217
|
+
@properties = {
|
218
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
219
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
220
|
+
'sid' => payload['sid'],
|
221
|
+
'account_sid' => payload['account_sid'],
|
222
|
+
'friendly_name' => payload['friendly_name'],
|
223
|
+
'language' => payload['language'],
|
224
|
+
'variables' => payload['variables'],
|
225
|
+
'types' => payload['types'],
|
226
|
+
'url' => payload['url'],
|
227
|
+
'links' => payload['links'],
|
228
|
+
}
|
229
|
+
|
230
|
+
# Context
|
231
|
+
@instance_context = nil
|
232
|
+
@params = {'sid' => sid || @properties['sid'], }
|
233
|
+
end
|
234
|
+
|
235
|
+
##
|
236
|
+
# Generate an instance context for the instance, the context is capable of
|
237
|
+
# performing various actions. All instance actions are proxied to the context
|
238
|
+
# @return [ContentContext] ContentContext for this ContentInstance
|
239
|
+
def context
|
240
|
+
unless @instance_context
|
241
|
+
@instance_context = ContentContext.new(@version, @params['sid'], )
|
242
|
+
end
|
243
|
+
@instance_context
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
248
|
+
def date_created
|
249
|
+
@properties['date_created']
|
250
|
+
end
|
251
|
+
|
252
|
+
##
|
253
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
254
|
+
def date_updated
|
255
|
+
@properties['date_updated']
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# @return [String] The unique string that identifies the resource
|
260
|
+
def sid
|
261
|
+
@properties['sid']
|
262
|
+
end
|
263
|
+
|
264
|
+
##
|
265
|
+
# @return [String] The SID of the Account that created the resource
|
266
|
+
def account_sid
|
267
|
+
@properties['account_sid']
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# @return [String] A string name used to describe the Content resource
|
272
|
+
def friendly_name
|
273
|
+
@properties['friendly_name']
|
274
|
+
end
|
275
|
+
|
276
|
+
##
|
277
|
+
# @return [String] Two-letter language code identifying the language the Content resource is in.
|
278
|
+
def language
|
279
|
+
@properties['language']
|
280
|
+
end
|
281
|
+
|
282
|
+
##
|
283
|
+
# @return [Hash] Defines the default placeholder values for variables included in the Content resource
|
284
|
+
def variables
|
285
|
+
@properties['variables']
|
286
|
+
end
|
287
|
+
|
288
|
+
##
|
289
|
+
# @return [Hash] The Content types (e.g. twilio/text) for this Content resource
|
290
|
+
def types
|
291
|
+
@properties['types']
|
292
|
+
end
|
293
|
+
|
294
|
+
##
|
295
|
+
# @return [String] The URL of the resource, relative to `https://content.twilio.com`
|
296
|
+
def url
|
297
|
+
@properties['url']
|
298
|
+
end
|
299
|
+
|
300
|
+
##
|
301
|
+
# @return [String] A list of links related to the Content resource
|
302
|
+
def links
|
303
|
+
@properties['links']
|
304
|
+
end
|
305
|
+
|
306
|
+
##
|
307
|
+
# Fetch the ContentInstance
|
308
|
+
# @return [ContentInstance] Fetched ContentInstance
|
309
|
+
def fetch
|
310
|
+
context.fetch
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# Delete the ContentInstance
|
315
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
316
|
+
def delete
|
317
|
+
context.delete
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Provide a user friendly representation
|
322
|
+
def to_s
|
323
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
324
|
+
"<Twilio.Content.V1.ContentInstance #{values}>"
|
325
|
+
end
|
326
|
+
|
327
|
+
##
|
328
|
+
# Provide a detailed, user friendly representation
|
329
|
+
def inspect
|
330
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
331
|
+
"<Twilio.Content.V1.ContentInstance #{values}>"
|
332
|
+
end
|
333
|
+
end
|
334
|
+
end
|
335
|
+
end
|
336
|
+
end
|
337
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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 Content
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# Initialize the V1 version of Content
|
15
|
+
def initialize(domain)
|
16
|
+
super
|
17
|
+
@version = 'v1'
|
18
|
+
@contents = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
23
|
+
# Content resource to fetch.
|
24
|
+
# @return [Twilio::REST::Content::V1::ContentContext] if sid was passed.
|
25
|
+
# @return [Twilio::REST::Content::V1::ContentList]
|
26
|
+
def contents(sid=:unset)
|
27
|
+
if sid.nil?
|
28
|
+
raise ArgumentError, 'sid cannot be nil'
|
29
|
+
end
|
30
|
+
if sid == :unset
|
31
|
+
@contents ||= ContentList.new self
|
32
|
+
else
|
33
|
+
ContentContext.new(self, sid)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
##
|
38
|
+
# Provide a user friendly representation
|
39
|
+
def to_s
|
40
|
+
'<Twilio::REST::Content::V1>'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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 Content < Domain
|
12
|
+
##
|
13
|
+
# Initialize the Content Domain
|
14
|
+
def initialize(twilio)
|
15
|
+
super
|
16
|
+
|
17
|
+
@base_url = 'https://content.twilio.com'
|
18
|
+
@host = 'content.twilio.com'
|
19
|
+
@port = 443
|
20
|
+
|
21
|
+
# Versions
|
22
|
+
@v1 = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Version v1 of content
|
27
|
+
def v1
|
28
|
+
@v1 ||= V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# @param [String] sid The unique string that that we created to identify the
|
33
|
+
# Content resource.
|
34
|
+
# @return [Twilio::REST::Content::V1::ContentInstance] if sid was passed.
|
35
|
+
# @return [Twilio::REST::Content::V1::ContentList]
|
36
|
+
def contents(sid=:unset)
|
37
|
+
self.v1.contents(sid)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Provide a user friendly representation
|
42
|
+
def to_s
|
43
|
+
'#<Twilio::REST::Content>'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,190 @@
|
|
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 FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class GoodDataList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the GoodDataList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [GoodDataList] GoodDataList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.FlexApi.V1.GoodDataList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class GoodDataPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the GoodDataPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [GoodDataPage] GoodDataPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of GoodDataInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [GoodDataInstance] GoodDataInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
GoodDataInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.FlexApi.V1.GoodDataPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoodDataContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the GoodDataContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @return [GoodDataContext] GoodDataContext
|
66
|
+
def initialize(version)
|
67
|
+
super(version)
|
68
|
+
|
69
|
+
# Path Solution
|
70
|
+
@solution = {}
|
71
|
+
@uri = "/Accounts/GoodData"
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Create the GoodDataInstance
|
76
|
+
# @param [String] token The Token HTTP request header
|
77
|
+
# @return [GoodDataInstance] Created GoodDataInstance
|
78
|
+
def create(token: :unset)
|
79
|
+
headers = Twilio::Values.of({'Token' => token, })
|
80
|
+
|
81
|
+
payload = @version.create('POST', @uri, headers: headers)
|
82
|
+
|
83
|
+
GoodDataInstance.new(@version, payload, )
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Provide a user friendly representation
|
88
|
+
def to_s
|
89
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
90
|
+
"#<Twilio.FlexApi.V1.GoodDataContext #{context}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a detailed, user friendly representation
|
95
|
+
def inspect
|
96
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.FlexApi.V1.GoodDataContext #{context}>"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class GoodDataInstance < InstanceResource
|
102
|
+
##
|
103
|
+
# Initialize the GoodDataInstance
|
104
|
+
# @param [Version] version Version that contains the resource
|
105
|
+
# @param [Hash] payload payload that contains response from Twilio
|
106
|
+
# @return [GoodDataInstance] GoodDataInstance
|
107
|
+
def initialize(version, payload)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {
|
112
|
+
'workspace_id' => payload['workspace_id'],
|
113
|
+
'session_expiry' => payload['session_expiry'],
|
114
|
+
'session_id' => payload['session_id'],
|
115
|
+
'gd_base_url' => payload['gd_base_url'],
|
116
|
+
'url' => payload['url'],
|
117
|
+
}
|
118
|
+
|
119
|
+
# Context
|
120
|
+
@instance_context = nil
|
121
|
+
@params = {}
|
122
|
+
end
|
123
|
+
|
124
|
+
##
|
125
|
+
# Generate an instance context for the instance, the context is capable of
|
126
|
+
# performing various actions. All instance actions are proxied to the context
|
127
|
+
# @return [GoodDataContext] GoodDataContext for this GoodDataInstance
|
128
|
+
def context
|
129
|
+
unless @instance_context
|
130
|
+
@instance_context = GoodDataContext.new(@version, )
|
131
|
+
end
|
132
|
+
@instance_context
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [String] Unique workspace ID in gooddata
|
137
|
+
def workspace_id
|
138
|
+
@properties['workspace_id']
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# @return [String] The session expiry date and time
|
143
|
+
def session_expiry
|
144
|
+
@properties['session_expiry']
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [String] Unique session ID
|
149
|
+
def session_id
|
150
|
+
@properties['session_id']
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# @return [String] GoodData login base URL
|
155
|
+
def gd_base_url
|
156
|
+
@properties['gd_base_url']
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# @return [String] The URL of this resource.
|
161
|
+
def url
|
162
|
+
@properties['url']
|
163
|
+
end
|
164
|
+
|
165
|
+
##
|
166
|
+
# Create the GoodDataInstance
|
167
|
+
# @param [String] token The Token HTTP request header
|
168
|
+
# @return [GoodDataInstance] Created GoodDataInstance
|
169
|
+
def create(token: :unset)
|
170
|
+
context.create(token: token, )
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Provide a user friendly representation
|
175
|
+
def to_s
|
176
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
177
|
+
"<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
|
178
|
+
end
|
179
|
+
|
180
|
+
##
|
181
|
+
# Provide a detailed, user friendly representation
|
182
|
+
def inspect
|
183
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
184
|
+
"<Twilio.FlexApi.V1.GoodDataInstance #{values}>"
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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 FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class UserRolesList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the UserRolesList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [UserRolesList] UserRolesList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Provide a user friendly representation
|
27
|
+
def to_s
|
28
|
+
'#<Twilio.FlexApi.V1.UserRolesList>'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class UserRolesPage < Page
|
33
|
+
##
|
34
|
+
# Initialize the UserRolesPage
|
35
|
+
# @param [Version] version Version that contains the resource
|
36
|
+
# @param [Response] response Response from the API
|
37
|
+
# @param [Hash] solution Path solution for the resource
|
38
|
+
# @return [UserRolesPage] UserRolesPage
|
39
|
+
def initialize(version, response, solution)
|
40
|
+
super(version, response)
|
41
|
+
|
42
|
+
# Path Solution
|
43
|
+
@solution = solution
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Build an instance of UserRolesInstance
|
48
|
+
# @param [Hash] payload Payload response from the API
|
49
|
+
# @return [UserRolesInstance] UserRolesInstance
|
50
|
+
def get_instance(payload)
|
51
|
+
UserRolesInstance.new(@version, payload, )
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'<Twilio.FlexApi.V1.UserRolesPage>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class UserRolesContext < InstanceContext
|
62
|
+
##
|
63
|
+
# Initialize the UserRolesContext
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @return [UserRolesContext] UserRolesContext
|
66
|
+
def initialize(version)
|
67
|
+
super(version)
|
68
|
+
|
69
|
+
# Path Solution
|
70
|
+
@solution = {}
|
71
|
+
@uri = "/Accounts/UserRoles"
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Fetch the UserRolesInstance
|
76
|
+
# @param [String] token The Token HTTP request header
|
77
|
+
# @return [UserRolesInstance] Fetched UserRolesInstance
|
78
|
+
def fetch(token: :unset)
|
79
|
+
headers = Twilio::Values.of({'Token' => token, })
|
80
|
+
|
81
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
82
|
+
|
83
|
+
UserRolesInstance.new(@version, payload, )
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Provide a user friendly representation
|
88
|
+
def to_s
|
89
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
90
|
+
"#<Twilio.FlexApi.V1.UserRolesContext #{context}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Provide a detailed, user friendly representation
|
95
|
+
def inspect
|
96
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
97
|
+
"#<Twilio.FlexApi.V1.UserRolesContext #{context}>"
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
class UserRolesInstance < InstanceResource
|
102
|
+
##
|
103
|
+
# Initialize the UserRolesInstance
|
104
|
+
# @param [Version] version Version that contains the resource
|
105
|
+
# @param [Hash] payload payload that contains response from Twilio
|
106
|
+
# @return [UserRolesInstance] UserRolesInstance
|
107
|
+
def initialize(version, payload)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {'roles' => payload['roles'], 'url' => payload['url'], }
|
112
|
+
|
113
|
+
# Context
|
114
|
+
@instance_context = nil
|
115
|
+
@params = {}
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# Generate an instance context for the instance, the context is capable of
|
120
|
+
# performing various actions. All instance actions are proxied to the context
|
121
|
+
# @return [UserRolesContext] UserRolesContext for this UserRolesInstance
|
122
|
+
def context
|
123
|
+
unless @instance_context
|
124
|
+
@instance_context = UserRolesContext.new(@version, )
|
125
|
+
end
|
126
|
+
@instance_context
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# @return [Array[String]] Flex Insights roles for the user
|
131
|
+
def roles
|
132
|
+
@properties['roles']
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [String] The url
|
137
|
+
def url
|
138
|
+
@properties['url']
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# Fetch the UserRolesInstance
|
143
|
+
# @param [String] token The Token HTTP request header
|
144
|
+
# @return [UserRolesInstance] Fetched UserRolesInstance
|
145
|
+
def fetch(token: :unset)
|
146
|
+
context.fetch(token: token, )
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Provide a user friendly representation
|
151
|
+
def to_s
|
152
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
153
|
+
"<Twilio.FlexApi.V1.UserRolesInstance #{values}>"
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# Provide a detailed, user friendly representation
|
158
|
+
def inspect
|
159
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
160
|
+
"<Twilio.FlexApi.V1.UserRolesInstance #{values}>"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -18,7 +18,9 @@ module Twilio
|
|
18
18
|
@channel = nil
|
19
19
|
@configuration = nil
|
20
20
|
@flex_flow = nil
|
21
|
+
@good_data = nil
|
21
22
|
@interaction = nil
|
23
|
+
@user_roles = nil
|
22
24
|
@web_channel = nil
|
23
25
|
end
|
24
26
|
|
@@ -58,6 +60,12 @@ module Twilio
|
|
58
60
|
end
|
59
61
|
end
|
60
62
|
|
63
|
+
##
|
64
|
+
# @return [Twilio::REST::Flex_api::V1::GoodDataContext]
|
65
|
+
def good_data
|
66
|
+
@good_data ||= GoodDataContext.new self
|
67
|
+
end
|
68
|
+
|
61
69
|
##
|
62
70
|
# @param [String] sid The SID of the Interaction resource to fetch.
|
63
71
|
# @return [Twilio::REST::Flex_api::V1::InteractionContext] if sid was passed.
|
@@ -73,6 +81,12 @@ module Twilio
|
|
73
81
|
end
|
74
82
|
end
|
75
83
|
|
84
|
+
##
|
85
|
+
# @return [Twilio::REST::Flex_api::V1::UserRolesContext]
|
86
|
+
def user_roles
|
87
|
+
@user_roles ||= UserRolesContext.new self
|
88
|
+
end
|
89
|
+
|
76
90
|
##
|
77
91
|
# @param [String] sid The SID of the WebChannel resource to fetch.
|
78
92
|
# @return [Twilio::REST::Flex_api::V1::WebChannelContext] if sid was passed.
|
@@ -52,6 +52,12 @@ module Twilio
|
|
52
52
|
self.v1.flex_flow(sid)
|
53
53
|
end
|
54
54
|
|
55
|
+
##
|
56
|
+
# @return [Twilio::REST::Flex_api::V1::GoodDataInstance]
|
57
|
+
def good_data
|
58
|
+
self.v1.good_data()
|
59
|
+
end
|
60
|
+
|
55
61
|
##
|
56
62
|
# @param [String] sid The unique string created by Twilio to identify an
|
57
63
|
# Interaction resource, prefixed with KD.
|
@@ -61,6 +67,12 @@ module Twilio
|
|
61
67
|
self.v1.interaction(sid)
|
62
68
|
end
|
63
69
|
|
70
|
+
##
|
71
|
+
# @return [Twilio::REST::Flex_api::V1::UserRolesInstance]
|
72
|
+
def user_roles
|
73
|
+
self.v1.user_roles()
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# @param [String] sid The unique string that we created to identify the WebChannel
|
66
78
|
# resource.
|
@@ -117,6 +117,7 @@ module Twilio
|
|
117
117
|
'call_sid' => payload['call_sid'],
|
118
118
|
'call_type' => payload['call_type'],
|
119
119
|
'call_state' => payload['call_state'],
|
120
|
+
'answered_by' => payload['answered_by'],
|
120
121
|
'processing_state' => payload['processing_state'],
|
121
122
|
'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
|
122
123
|
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
@@ -177,6 +178,12 @@ module Twilio
|
|
177
178
|
@properties['call_state']
|
178
179
|
end
|
179
180
|
|
181
|
+
##
|
182
|
+
# @return [call_summary.AnsweredBy] The answered_by
|
183
|
+
def answered_by
|
184
|
+
@properties['answered_by']
|
185
|
+
end
|
186
|
+
|
180
187
|
##
|
181
188
|
# @return [call_summary.ProcessingState] The processing_state
|
182
189
|
def processing_state
|
@@ -268,6 +268,7 @@ module Twilio
|
|
268
268
|
@properties = {
|
269
269
|
'account_sid' => payload['account_sid'],
|
270
270
|
'call_sid' => payload['call_sid'],
|
271
|
+
'answered_by' => payload['answered_by'],
|
271
272
|
'call_type' => payload['call_type'],
|
272
273
|
'call_state' => payload['call_state'],
|
273
274
|
'processing_state' => payload['processing_state'],
|
@@ -302,6 +303,12 @@ module Twilio
|
|
302
303
|
@properties['call_sid']
|
303
304
|
end
|
304
305
|
|
306
|
+
##
|
307
|
+
# @return [call_summaries.AnsweredBy] The answered_by
|
308
|
+
def answered_by
|
309
|
+
@properties['answered_by']
|
310
|
+
end
|
311
|
+
|
305
312
|
##
|
306
313
|
# @return [call_summaries.CallType] The call_type
|
307
314
|
def call_type
|
@@ -41,8 +41,22 @@ module Twilio
|
|
41
41
|
# messages that contain links.
|
42
42
|
# @param [Boolean] has_embedded_phone Indicates that this SMS campaign will send
|
43
43
|
# messages that contain phone numbers.
|
44
|
+
# @param [String] message_flow Description of how end users opt-in to the SMS
|
45
|
+
# campaign, therefore giving consent to receive messages.
|
46
|
+
# @param [String] opt_in_message The message that will be sent to the user when
|
47
|
+
# they opt in to the SMS campaign.
|
48
|
+
# @param [String] opt_out_message The message that will be sent to the user when
|
49
|
+
# they opt out of the SMS campaign.
|
50
|
+
# @param [String] help_message The message that will be sent to the user when they
|
51
|
+
# request help for the SMS campaign.
|
52
|
+
# @param [Array[String]] opt_in_keywords The keywords that will be used to opt in
|
53
|
+
# to the SMS campaign.
|
54
|
+
# @param [Array[String]] opt_out_keywords The keywords that will be used to opt
|
55
|
+
# out of the SMS campaign.
|
56
|
+
# @param [Array[String]] help_keywords The keywords that will be used to request
|
57
|
+
# help for the SMS campaign.
|
44
58
|
# @return [UsAppToPersonInstance] Created UsAppToPersonInstance
|
45
|
-
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil)
|
59
|
+
def create(brand_registration_sid: nil, description: nil, message_samples: nil, us_app_to_person_usecase: nil, has_embedded_links: nil, has_embedded_phone: nil, message_flow: :unset, opt_in_message: :unset, opt_out_message: :unset, help_message: :unset, opt_in_keywords: :unset, opt_out_keywords: :unset, help_keywords: :unset)
|
46
60
|
data = Twilio::Values.of({
|
47
61
|
'BrandRegistrationSid' => brand_registration_sid,
|
48
62
|
'Description' => description,
|
@@ -50,6 +64,13 @@ module Twilio
|
|
50
64
|
'UsAppToPersonUsecase' => us_app_to_person_usecase,
|
51
65
|
'HasEmbeddedLinks' => has_embedded_links,
|
52
66
|
'HasEmbeddedPhone' => has_embedded_phone,
|
67
|
+
'MessageFlow' => message_flow,
|
68
|
+
'OptInMessage' => opt_in_message,
|
69
|
+
'OptOutMessage' => opt_out_message,
|
70
|
+
'HelpMessage' => help_message,
|
71
|
+
'OptInKeywords' => Twilio.serialize_list(opt_in_keywords) { |e| e },
|
72
|
+
'OptOutKeywords' => Twilio.serialize_list(opt_out_keywords) { |e| e },
|
73
|
+
'HelpKeywords' => Twilio.serialize_list(help_keywords) { |e| e },
|
53
74
|
})
|
54
75
|
|
55
76
|
payload = @version.create('POST', @uri, data: data)
|
@@ -270,6 +291,13 @@ module Twilio
|
|
270
291
|
'campaign_id' => payload['campaign_id'],
|
271
292
|
'is_externally_registered' => payload['is_externally_registered'],
|
272
293
|
'rate_limits' => payload['rate_limits'],
|
294
|
+
'message_flow' => payload['message_flow'],
|
295
|
+
'opt_in_message' => payload['opt_in_message'],
|
296
|
+
'opt_out_message' => payload['opt_out_message'],
|
297
|
+
'help_message' => payload['help_message'],
|
298
|
+
'opt_in_keywords' => payload['opt_in_keywords'],
|
299
|
+
'opt_out_keywords' => payload['opt_out_keywords'],
|
300
|
+
'help_keywords' => payload['help_keywords'],
|
273
301
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
274
302
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
275
303
|
'url' => payload['url'],
|
@@ -374,6 +402,48 @@ module Twilio
|
|
374
402
|
@properties['rate_limits']
|
375
403
|
end
|
376
404
|
|
405
|
+
##
|
406
|
+
# @return [String] Consumer opt-in flow
|
407
|
+
def message_flow
|
408
|
+
@properties['message_flow']
|
409
|
+
end
|
410
|
+
|
411
|
+
##
|
412
|
+
# @return [String] Opt In Message
|
413
|
+
def opt_in_message
|
414
|
+
@properties['opt_in_message']
|
415
|
+
end
|
416
|
+
|
417
|
+
##
|
418
|
+
# @return [String] Opt Out Message
|
419
|
+
def opt_out_message
|
420
|
+
@properties['opt_out_message']
|
421
|
+
end
|
422
|
+
|
423
|
+
##
|
424
|
+
# @return [String] Help Message
|
425
|
+
def help_message
|
426
|
+
@properties['help_message']
|
427
|
+
end
|
428
|
+
|
429
|
+
##
|
430
|
+
# @return [Array[String]] Opt In Keywords
|
431
|
+
def opt_in_keywords
|
432
|
+
@properties['opt_in_keywords']
|
433
|
+
end
|
434
|
+
|
435
|
+
##
|
436
|
+
# @return [Array[String]] Opt Out Keywords
|
437
|
+
def opt_out_keywords
|
438
|
+
@properties['opt_out_keywords']
|
439
|
+
end
|
440
|
+
|
441
|
+
##
|
442
|
+
# @return [Array[String]] Help Keywords
|
443
|
+
def help_keywords
|
444
|
+
@properties['help_keywords']
|
445
|
+
end
|
446
|
+
|
377
447
|
##
|
378
448
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
379
449
|
def date_created
|
data/lib/twilio-ruby/version.rb
CHANGED
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.73.
|
4
|
+
version: 5.73.3
|
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: 2022-
|
11
|
+
date: 2022-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -381,6 +381,9 @@ files:
|
|
381
381
|
- lib/twilio-ruby/rest/chat/v3.rb
|
382
382
|
- lib/twilio-ruby/rest/chat/v3/channel.rb
|
383
383
|
- lib/twilio-ruby/rest/client.rb
|
384
|
+
- lib/twilio-ruby/rest/content.rb
|
385
|
+
- lib/twilio-ruby/rest/content/v1.rb
|
386
|
+
- lib/twilio-ruby/rest/content/v1/content.rb
|
384
387
|
- lib/twilio-ruby/rest/conversations.rb
|
385
388
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
386
389
|
- lib/twilio-ruby/rest/conversations/v1/address_configuration.rb
|
@@ -425,10 +428,12 @@ files:
|
|
425
428
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
426
429
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
427
430
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
431
|
+
- lib/twilio-ruby/rest/flex_api/v1/good_data.rb
|
428
432
|
- lib/twilio-ruby/rest/flex_api/v1/interaction.rb
|
429
433
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
|
430
434
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
|
431
435
|
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
|
436
|
+
- lib/twilio-ruby/rest/flex_api/v1/user_roles.rb
|
432
437
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
433
438
|
- lib/twilio-ruby/rest/frontline_api.rb
|
434
439
|
- lib/twilio-ruby/rest/frontline_api/v1.rb
|