twilio-ruby 5.73.0 → 5.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +32 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +10 -1
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +183 -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/messaging/v1/service/us_app_to_person.rb +71 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +4 -45
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +4 -2
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 420da06b1b46fcad457f163296ce2b934ef3d87d
|
4
|
+
data.tar.gz: 499104cf3de9b1f2757cfcc513e4cff7a1466e42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 333168f9d4403e1f1f49ac38d626486593548131ac316f188393b943f8bcf2b695fd7c92eee53d1a9cb427573bdce7b3e4f8548dbc6b0e442ea0c16994efe34a
|
7
|
+
data.tar.gz: 26ef0ae6cc128348d192ba8777220d4c13a12534acc36d0bcbd0f986a01ba964671233e64c752ededc5eaf4949e7382c5e39ce598f8dd0c391ddc134c9670cf9
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,38 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2022-11-10] Version 5.73.2
|
5
|
+
---------------------------
|
6
|
+
**Flex**
|
7
|
+
- Adding two new authorization API 'user_roles' and 'gooddata' in version `v1`
|
8
|
+
|
9
|
+
**Messaging**
|
10
|
+
- Add new Campaign properties (MessageFlow, OptInMessage, OptInKeywords, OptOutMessage, OptOutKeywords, HelpMessage, HelpKeywords)
|
11
|
+
|
12
|
+
**Twiml**
|
13
|
+
- Add new speech models to `Gather`.
|
14
|
+
|
15
|
+
|
16
|
+
[2022-10-31] Version 5.73.1
|
17
|
+
---------------------------
|
18
|
+
**Api**
|
19
|
+
- Added `contentSid` and `contentVariables` to Message resource with public visibility as Beta
|
20
|
+
- Add `UserDefinedMessageSubscription` and `UserDefinedMessage` resource
|
21
|
+
|
22
|
+
**Proxy**
|
23
|
+
- Remove FailOnParticipantConflict param from Proxy Session create and update and Proxy Participant create
|
24
|
+
|
25
|
+
**Supersim**
|
26
|
+
- Update SettingsUpdates resource to remove PackageSid
|
27
|
+
|
28
|
+
**Taskrouter**
|
29
|
+
- Add `Ordering` query parameter to Workers and TaskQueues for sorting by
|
30
|
+
- Add `worker_sid` query param for list reservations endpoint
|
31
|
+
|
32
|
+
**Twiml**
|
33
|
+
- Add `url` and `method` attributes to `<Conversation>`
|
34
|
+
|
35
|
+
|
4
36
|
[2022-10-19] Version 5.73.0
|
5
37
|
---------------------------
|
6
38
|
**Library - Feature**
|
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.2'
|
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.2
|
44
44
|
```
|
45
45
|
|
46
46
|
To build and install the development branch yourself from the latest source:
|
@@ -0,0 +1,160 @@
|
|
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 Api < Domain
|
12
|
+
class V2010 < Version
|
13
|
+
class AccountContext < InstanceContext
|
14
|
+
class CallContext < InstanceContext
|
15
|
+
class UserDefinedMessageList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the UserDefinedMessageList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] account_sid The SID of the
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created User Defined
|
21
|
+
# Message.
|
22
|
+
# @param [String] call_sid The SID of the
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
24
|
+
# Message is associated with.
|
25
|
+
# @return [UserDefinedMessageList] UserDefinedMessageList
|
26
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
27
|
+
super(version)
|
28
|
+
|
29
|
+
# Path Solution
|
30
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
31
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessages.json"
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Create the UserDefinedMessageInstance
|
36
|
+
# @param [String] content The User Defined Message in the form of URL-encoded JSON
|
37
|
+
# string.
|
38
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
39
|
+
# should be a unique string value per API call and can be a randomly generated.
|
40
|
+
# @return [UserDefinedMessageInstance] Created UserDefinedMessageInstance
|
41
|
+
def create(content: nil, idempotency_key: :unset)
|
42
|
+
data = Twilio::Values.of({'Content' => content, 'IdempotencyKey' => idempotency_key, })
|
43
|
+
|
44
|
+
payload = @version.create('POST', @uri, data: data)
|
45
|
+
|
46
|
+
UserDefinedMessageInstance.new(
|
47
|
+
@version,
|
48
|
+
payload,
|
49
|
+
account_sid: @solution[:account_sid],
|
50
|
+
call_sid: @solution[:call_sid],
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Provide a user friendly representation
|
56
|
+
def to_s
|
57
|
+
'#<Twilio.Api.V2010.UserDefinedMessageList>'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class UserDefinedMessagePage < Page
|
62
|
+
##
|
63
|
+
# Initialize the UserDefinedMessagePage
|
64
|
+
# @param [Version] version Version that contains the resource
|
65
|
+
# @param [Response] response Response from the API
|
66
|
+
# @param [Hash] solution Path solution for the resource
|
67
|
+
# @return [UserDefinedMessagePage] UserDefinedMessagePage
|
68
|
+
def initialize(version, response, solution)
|
69
|
+
super(version, response)
|
70
|
+
|
71
|
+
# Path Solution
|
72
|
+
@solution = solution
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Build an instance of UserDefinedMessageInstance
|
77
|
+
# @param [Hash] payload Payload response from the API
|
78
|
+
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
|
79
|
+
def get_instance(payload)
|
80
|
+
UserDefinedMessageInstance.new(
|
81
|
+
@version,
|
82
|
+
payload,
|
83
|
+
account_sid: @solution[:account_sid],
|
84
|
+
call_sid: @solution[:call_sid],
|
85
|
+
)
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Provide a user friendly representation
|
90
|
+
def to_s
|
91
|
+
'<Twilio.Api.V2010.UserDefinedMessagePage>'
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
class UserDefinedMessageInstance < InstanceResource
|
96
|
+
##
|
97
|
+
# Initialize the UserDefinedMessageInstance
|
98
|
+
# @param [Version] version Version that contains the resource
|
99
|
+
# @param [Hash] payload payload that contains response from Twilio
|
100
|
+
# @param [String] account_sid The SID of the
|
101
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created User Defined
|
102
|
+
# Message.
|
103
|
+
# @param [String] call_sid The SID of the
|
104
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
105
|
+
# Message is associated with.
|
106
|
+
# @return [UserDefinedMessageInstance] UserDefinedMessageInstance
|
107
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil)
|
108
|
+
super(version)
|
109
|
+
|
110
|
+
# Marshaled Properties
|
111
|
+
@properties = {
|
112
|
+
'account_sid' => payload['account_sid'],
|
113
|
+
'call_sid' => payload['call_sid'],
|
114
|
+
'sid' => payload['sid'],
|
115
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
116
|
+
}
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# @return [String] Account SID.
|
121
|
+
def account_sid
|
122
|
+
@properties['account_sid']
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# @return [String] Call SID.
|
127
|
+
def call_sid
|
128
|
+
@properties['call_sid']
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [String] User Defined Message SID.
|
133
|
+
def sid
|
134
|
+
@properties['sid']
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# @return [Time] The date this User Defined Message was created.
|
139
|
+
def date_created
|
140
|
+
@properties['date_created']
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# Provide a user friendly representation
|
145
|
+
def to_s
|
146
|
+
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Provide a detailed, user friendly representation
|
151
|
+
def inspect
|
152
|
+
"<Twilio.Api.V2010.UserDefinedMessageInstance>"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
@@ -0,0 +1,251 @@
|
|
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 Api < Domain
|
12
|
+
class V2010 < Version
|
13
|
+
class AccountContext < InstanceContext
|
14
|
+
class CallContext < InstanceContext
|
15
|
+
class UserDefinedMessageSubscriptionList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the UserDefinedMessageSubscriptionList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @param [String] account_sid The SID of the
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
21
|
+
# User Defined Messages.
|
22
|
+
# @param [String] call_sid The SID of the
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
24
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
25
|
+
# producing the User Defined Messages.
|
26
|
+
# @return [UserDefinedMessageSubscriptionList] UserDefinedMessageSubscriptionList
|
27
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
28
|
+
super(version)
|
29
|
+
|
30
|
+
# Path Solution
|
31
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions.json"
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Create the UserDefinedMessageSubscriptionInstance
|
37
|
+
# @param [String] callback The URL we should call using the `method` to send user
|
38
|
+
# defined events to your application. URLs must contain a valid hostname
|
39
|
+
# (underscores are not permitted).
|
40
|
+
# @param [String] method The HTTP method Twilio will use when requesting the above
|
41
|
+
# `Url`. Either `GET` or `POST`.
|
42
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
43
|
+
# should be a unique string value per API call and can be a randomly generated.
|
44
|
+
# @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
|
45
|
+
def create(callback: nil, method: nil, idempotency_key: :unset)
|
46
|
+
data = Twilio::Values.of({
|
47
|
+
'Callback' => callback,
|
48
|
+
'Method' => method,
|
49
|
+
'IdempotencyKey' => idempotency_key,
|
50
|
+
})
|
51
|
+
|
52
|
+
payload = @version.create('POST', @uri, data: data)
|
53
|
+
|
54
|
+
UserDefinedMessageSubscriptionInstance.new(
|
55
|
+
@version,
|
56
|
+
payload,
|
57
|
+
account_sid: @solution[:account_sid],
|
58
|
+
call_sid: @solution[:call_sid],
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Provide a user friendly representation
|
64
|
+
def to_s
|
65
|
+
'#<Twilio.Api.V2010.UserDefinedMessageSubscriptionList>'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class UserDefinedMessageSubscriptionPage < Page
|
70
|
+
##
|
71
|
+
# Initialize the UserDefinedMessageSubscriptionPage
|
72
|
+
# @param [Version] version Version that contains the resource
|
73
|
+
# @param [Response] response Response from the API
|
74
|
+
# @param [Hash] solution Path solution for the resource
|
75
|
+
# @return [UserDefinedMessageSubscriptionPage] UserDefinedMessageSubscriptionPage
|
76
|
+
def initialize(version, response, solution)
|
77
|
+
super(version, response)
|
78
|
+
|
79
|
+
# Path Solution
|
80
|
+
@solution = solution
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Build an instance of UserDefinedMessageSubscriptionInstance
|
85
|
+
# @param [Hash] payload Payload response from the API
|
86
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
87
|
+
def get_instance(payload)
|
88
|
+
UserDefinedMessageSubscriptionInstance.new(
|
89
|
+
@version,
|
90
|
+
payload,
|
91
|
+
account_sid: @solution[:account_sid],
|
92
|
+
call_sid: @solution[:call_sid],
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Provide a user friendly representation
|
98
|
+
def to_s
|
99
|
+
'<Twilio.Api.V2010.UserDefinedMessageSubscriptionPage>'
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class UserDefinedMessageSubscriptionContext < InstanceContext
|
104
|
+
##
|
105
|
+
# Initialize the UserDefinedMessageSubscriptionContext
|
106
|
+
# @param [Version] version Version that contains the resource
|
107
|
+
# @param [String] account_sid The SID of the
|
108
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
109
|
+
# User Defined Messages.
|
110
|
+
# @param [String] call_sid The SID of the
|
111
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
112
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
113
|
+
# producing the User Defined Messages.
|
114
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
115
|
+
# Subscription.
|
116
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext
|
117
|
+
def initialize(version, account_sid, call_sid, sid)
|
118
|
+
super(version)
|
119
|
+
|
120
|
+
# Path Solution
|
121
|
+
@solution = {account_sid: account_sid, call_sid: call_sid, sid: sid, }
|
122
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions/#{@solution[:sid]}.json"
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
127
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
128
|
+
def delete
|
129
|
+
@version.delete('DELETE', @uri)
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Provide a user friendly representation
|
134
|
+
def to_s
|
135
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
136
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Provide a detailed, user friendly representation
|
141
|
+
def inspect
|
142
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
143
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class UserDefinedMessageSubscriptionInstance < InstanceResource
|
148
|
+
##
|
149
|
+
# Initialize the UserDefinedMessageSubscriptionInstance
|
150
|
+
# @param [Version] version Version that contains the resource
|
151
|
+
# @param [Hash] payload payload that contains response from Twilio
|
152
|
+
# @param [String] account_sid The SID of the
|
153
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
154
|
+
# User Defined Messages.
|
155
|
+
# @param [String] call_sid The SID of the
|
156
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
157
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
158
|
+
# producing the User Defined Messages.
|
159
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
160
|
+
# Subscription.
|
161
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
162
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
163
|
+
super(version)
|
164
|
+
|
165
|
+
# Marshaled Properties
|
166
|
+
@properties = {
|
167
|
+
'account_sid' => payload['account_sid'],
|
168
|
+
'call_sid' => payload['call_sid'],
|
169
|
+
'sid' => payload['sid'],
|
170
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
171
|
+
'uri' => payload['uri'],
|
172
|
+
}
|
173
|
+
|
174
|
+
# Context
|
175
|
+
@instance_context = nil
|
176
|
+
@params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'], }
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Generate an instance context for the instance, the context is capable of
|
181
|
+
# performing various actions. All instance actions are proxied to the context
|
182
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext for this UserDefinedMessageSubscriptionInstance
|
183
|
+
def context
|
184
|
+
unless @instance_context
|
185
|
+
@instance_context = UserDefinedMessageSubscriptionContext.new(
|
186
|
+
@version,
|
187
|
+
@params['account_sid'],
|
188
|
+
@params['call_sid'],
|
189
|
+
@params['sid'],
|
190
|
+
)
|
191
|
+
end
|
192
|
+
@instance_context
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [String] Account SID.
|
197
|
+
def account_sid
|
198
|
+
@properties['account_sid']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [String] Call SID.
|
203
|
+
def call_sid
|
204
|
+
@properties['call_sid']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# @return [String] User Defined Message Subscription SID.
|
209
|
+
def sid
|
210
|
+
@properties['sid']
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# @return [Time] The date this User Defined Message Subscription was created.
|
215
|
+
def date_created
|
216
|
+
@properties['date_created']
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# @return [String] The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`.
|
221
|
+
def uri
|
222
|
+
@properties['uri']
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
227
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
228
|
+
def delete
|
229
|
+
context.delete
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# Provide a user friendly representation
|
234
|
+
def to_s
|
235
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
236
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Provide a detailed, user friendly representation
|
241
|
+
def inspect
|
242
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
243
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
@@ -444,6 +444,8 @@ module Twilio
|
|
444
444
|
@payments = nil
|
445
445
|
@siprec = nil
|
446
446
|
@streams = nil
|
447
|
+
@user_defined_message_subscriptions = nil
|
448
|
+
@user_defined_messages = nil
|
447
449
|
end
|
448
450
|
|
449
451
|
##
|
@@ -636,6 +638,49 @@ module Twilio
|
|
636
638
|
@streams
|
637
639
|
end
|
638
640
|
|
641
|
+
##
|
642
|
+
# Access the user_defined_message_subscriptions
|
643
|
+
# @return [UserDefinedMessageSubscriptionList]
|
644
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
645
|
+
def user_defined_message_subscriptions(sid=:unset)
|
646
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
647
|
+
|
648
|
+
if sid != :unset
|
649
|
+
return UserDefinedMessageSubscriptionContext.new(
|
650
|
+
@version,
|
651
|
+
@solution[:account_sid],
|
652
|
+
@solution[:sid],
|
653
|
+
sid,
|
654
|
+
)
|
655
|
+
end
|
656
|
+
|
657
|
+
unless @user_defined_message_subscriptions
|
658
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
659
|
+
@version,
|
660
|
+
account_sid: @solution[:account_sid],
|
661
|
+
call_sid: @solution[:sid],
|
662
|
+
)
|
663
|
+
end
|
664
|
+
|
665
|
+
@user_defined_message_subscriptions
|
666
|
+
end
|
667
|
+
|
668
|
+
##
|
669
|
+
# Access the user_defined_messages
|
670
|
+
# @return [UserDefinedMessageList]
|
671
|
+
# @return [UserDefinedMessageContext]
|
672
|
+
def user_defined_messages
|
673
|
+
unless @user_defined_messages
|
674
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
675
|
+
@version,
|
676
|
+
account_sid: @solution[:account_sid],
|
677
|
+
call_sid: @solution[:sid],
|
678
|
+
)
|
679
|
+
end
|
680
|
+
|
681
|
+
@user_defined_messages
|
682
|
+
end
|
683
|
+
|
639
684
|
##
|
640
685
|
# Provide a user friendly representation
|
641
686
|
def to_s
|
@@ -977,6 +1022,20 @@ module Twilio
|
|
977
1022
|
context.streams
|
978
1023
|
end
|
979
1024
|
|
1025
|
+
##
|
1026
|
+
# Access the user_defined_message_subscriptions
|
1027
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
1028
|
+
def user_defined_message_subscriptions
|
1029
|
+
context.user_defined_message_subscriptions
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
##
|
1033
|
+
# Access the user_defined_messages
|
1034
|
+
# @return [user_defined_messages] user_defined_messages
|
1035
|
+
def user_defined_messages
|
1036
|
+
context.user_defined_messages
|
1037
|
+
end
|
1038
|
+
|
980
1039
|
##
|
981
1040
|
# Provide a user friendly representation
|
982
1041
|
def to_s
|
@@ -90,6 +90,13 @@ module Twilio
|
|
90
90
|
# 8601 format.
|
91
91
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
92
92
|
# a single MMS message, regardless of the presence of media.
|
93
|
+
# @param [String] content_sid The SID of the Content object returned at Content
|
94
|
+
# API content create time
|
95
|
+
# (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template).
|
96
|
+
# If this parameter is not specified, then the Content API will not be utilized.
|
97
|
+
# @param [String] content_variables Key-value pairs of variable names to
|
98
|
+
# substitution values, used alongside a content_sid. If not specified, Content API
|
99
|
+
# will default to the default variables defined at create time.
|
93
100
|
# @param [String] from A Twilio phone number in
|
94
101
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
95
102
|
# sender
|
@@ -120,7 +127,7 @@ module Twilio
|
|
120
127
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
121
128
|
# per message. You can send images in an SMS message in only the US and Canada.
|
122
129
|
# @return [MessageInstance] Created MessageInstance
|
123
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
130
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, content_sid: :unset, content_variables: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
124
131
|
data = Twilio::Values.of({
|
125
132
|
'To' => to,
|
126
133
|
'From' => from,
|
@@ -142,6 +149,8 @@ module Twilio
|
|
142
149
|
'ScheduleType' => schedule_type,
|
143
150
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
144
151
|
'SendAsMms' => send_as_mms,
|
152
|
+
'ContentSid' => content_sid,
|
153
|
+
'ContentVariables' => content_variables,
|
145
154
|
})
|
146
155
|
|
147
156
|
payload = @version.create('POST', @uri, data: data)
|