twilio-ruby 5.16.0 → 5.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +2 -2
- data/lib/twilio-ruby/rest/authy.rb +9 -9
- data/lib/twilio-ruby/rest/authy/v1.rb +16 -16
- data/lib/twilio-ruby/rest/authy/v1/form.rb +18 -18
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +6 -12
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +6 -13
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +25 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +25 -3
- data/lib/twilio-ruby/rest/preview.rb +13 -20
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +6 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +6 -3
- data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +4 -1
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/authy/v1/form_spec.rb +1 -1
- data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +5 -10
- data/spec/integration/authy/v1/service/entity/factor_spec.rb +3 -3
- data/spec/integration/chat/v2/service/channel/member_spec.rb +4 -0
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +4 -0
- metadata +3 -10
- data/lib/twilio-ruby/rest/preview/authy.rb +0 -43
- data/lib/twilio-ruby/rest/preview/authy/service.rb +0 -364
- data/lib/twilio-ruby/rest/preview/authy/service/entity.rb +0 -326
- data/spec/integration/preview/authy/service/entity_spec.rb +0 -173
- data/spec/integration/preview/authy/service_spec.rb +0 -201
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 76bee160e21650babe371c8f045b020200e802d65d9553ade40a9f27a0cb1454
|
4
|
+
data.tar.gz: 8a48441e1b442b85976a0a5b731a45bb7895be15be33b981d6a7bcfb8f2b729f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c01b2cd4e9afba17aaebae337eabbd928d1de846de76373e2062d5b2796bccdb71267ba8164e2c3b65a0018987e11f12216022c8eac4ab42ce33447187cc17b
|
7
|
+
data.tar.gz: 755535e5ba8b07e7310fffc001b5d746f4a98d60cb64ab090438e291fa4b48f27b2a46c0e1faefb4016dda299989a72068d50731acb8de5ff1f6bee31a1f53d7
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-11-30] Version 5.17.0
|
5
|
+
----------------------------
|
6
|
+
**Api**
|
7
|
+
- Add `interactive_data` optional param to Messages create request
|
8
|
+
|
9
|
+
**Authy**
|
10
|
+
- Required authentication for `/v1/Forms/{type}` endpoint **(breaking change)**
|
11
|
+
- Removed `Challenge.reason` to `Challenge.responded_reason`
|
12
|
+
- Removed `verification_sid` from Challenge responses
|
13
|
+
- Removed `config` param from the Factor creation
|
14
|
+
- Replaced all occurrences of `FactorType` and `FormType` in favor of a unified `Type` **(breaking change)**
|
15
|
+
|
16
|
+
**Chat**
|
17
|
+
- Add Member attributes
|
18
|
+
|
19
|
+
**Preview**
|
20
|
+
- Removed `Authy` version from `preview` subdomain in favor to `authy` subdomain. **(breaking change)**
|
21
|
+
|
22
|
+
**Verify**
|
23
|
+
- Add `CustomCode` optional parameter on Verication creation.
|
24
|
+
|
25
|
+
|
4
26
|
[2018-11-16] Version 5.16.0
|
5
27
|
----------------------------
|
6
28
|
**Messaging**
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.
|
30
|
+
gem 'twilio-ruby', '~> 5.17.0'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.
|
36
|
+
gem install twilio-ruby -v 5.17.0
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -74,6 +74,9 @@ module Twilio
|
|
74
74
|
# @param [message.ContentRetention] content_retention The content_retention
|
75
75
|
# @param [message.AddressRetention] address_retention The address_retention
|
76
76
|
# @param [Boolean] smart_encoded The smart_encoded
|
77
|
+
# @param [String] interactive_data A JSON string that represents interactive
|
78
|
+
# message which is a category of messages including list picker, time picker, and
|
79
|
+
# an Apple Pay request.
|
77
80
|
# @param [String] from A Twilio phone number (in
|
78
81
|
# [E.164](https://www.twilio.com/docs/glossary/what-e164) format), [alphanumeric
|
79
82
|
# sender
|
@@ -104,7 +107,7 @@ module Twilio
|
|
104
107
|
# You may include up to 10 MediaUrls per message. *Sending images via SMS is
|
105
108
|
# currently only possible in the US and Canada*
|
106
109
|
# @return [MessageInstance] Newly created MessageInstance
|
107
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, max_rate: :unset, force_delivery: :unset, provider_sid: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
110
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, max_rate: :unset, force_delivery: :unset, provider_sid: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, interactive_data: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
108
111
|
data = Twilio::Values.of({
|
109
112
|
'To' => to,
|
110
113
|
'From' => from,
|
@@ -122,6 +125,7 @@ module Twilio
|
|
122
125
|
'ContentRetention' => content_retention,
|
123
126
|
'AddressRetention' => address_retention,
|
124
127
|
'SmartEncoded' => smart_encoded,
|
128
|
+
'InteractiveData' => interactive_data,
|
125
129
|
})
|
126
130
|
|
127
131
|
payload = @version.create(
|
@@ -56,7 +56,7 @@ module Twilio
|
|
56
56
|
|
57
57
|
##
|
58
58
|
# Access the ip_access_control_lists
|
59
|
-
# @param [String] sid The
|
59
|
+
# @param [String] sid The IpAccessControlList Sid that uniquely identifies this
|
60
60
|
# resource
|
61
61
|
# @return [IpAccessControlListList]
|
62
62
|
# @return [IpAccessControlListContext] if sid was passed.
|
@@ -113,7 +113,7 @@ module Twilio
|
|
113
113
|
# Retrieve a single page of CredentialListInstance records from the API.
|
114
114
|
# Request is executed immediately.
|
115
115
|
# @param [String] friendly_name A human readable descriptive text that describes
|
116
|
-
# the
|
116
|
+
# the CredentialList, up to 64 characters long.
|
117
117
|
# @return [CredentialListInstance] Newly created CredentialListInstance
|
118
118
|
def create(friendly_name: nil)
|
119
119
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, })
|
@@ -117,7 +117,7 @@ module Twilio
|
|
117
117
|
# @param [String] username The username that will be passed when authenticating
|
118
118
|
# SIP requests. The username should be sent in response to Twilio’s challenge of
|
119
119
|
# the initial INVITE. It can be up to 32 characters long.
|
120
|
-
# @param [String] password The password that the username will use when
|
120
|
+
# @param [String] password The password that the username will use when
|
121
121
|
# authenticating SIP requests. The password must be a minimum of 12 characters,
|
122
122
|
# contain at least 1 digit, and have mixed case. (eg “IWasAtSignal2018”)
|
123
123
|
# @return [CredentialInstance] Newly created CredentialInstance
|
@@ -218,7 +218,7 @@ module Twilio
|
|
218
218
|
|
219
219
|
##
|
220
220
|
# Update the CredentialInstance
|
221
|
-
# @param [String] password The password that the username will use when
|
221
|
+
# @param [String] password The password that the username will use when
|
222
222
|
# authenticating SIP requests. The password must be a minimum of 12 characters,
|
223
223
|
# contain at least 1 digit, and have mixed case. (eg “IWasAtSignal2018”)
|
224
224
|
# @return [CredentialInstance] Updated CredentialInstance
|
@@ -355,7 +355,7 @@ module Twilio
|
|
355
355
|
|
356
356
|
##
|
357
357
|
# Update the CredentialInstance
|
358
|
-
# @param [String] password The password that the username will use when
|
358
|
+
# @param [String] password The password that the username will use when
|
359
359
|
# authenticating SIP requests. The password must be a minimum of 12 characters,
|
360
360
|
# contain at least 1 digit, and have mixed case. (eg “IWasAtSignal2018”)
|
361
361
|
# @return [CredentialInstance] Updated CredentialInstance
|
@@ -168,7 +168,7 @@ module Twilio
|
|
168
168
|
# Initialize the IpAccessControlListContext
|
169
169
|
# @param [Version] version Version that contains the resource
|
170
170
|
# @param [String] account_sid The account_sid
|
171
|
-
# @param [String] sid The
|
171
|
+
# @param [String] sid The IpAccessControlList Sid that uniquely identifies this
|
172
172
|
# resource
|
173
173
|
# @return [IpAccessControlListContext] IpAccessControlListContext
|
174
174
|
def initialize(version, account_sid, sid)
|
@@ -268,7 +268,7 @@ module Twilio
|
|
268
268
|
# @param [Hash] payload payload that contains response from Twilio
|
269
269
|
# @param [String] account_sid A 34 character string that uniquely identifies this
|
270
270
|
# resource.
|
271
|
-
# @param [String] sid The
|
271
|
+
# @param [String] sid The IpAccessControlList Sid that uniquely identifies this
|
272
272
|
# resource
|
273
273
|
# @return [IpAccessControlListInstance] IpAccessControlListInstance
|
274
274
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
@@ -28,6 +28,15 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
+
##
|
32
|
+
# @param [form.FormTypes] type The Type of this Form. One of `form-app-push`,
|
33
|
+
# `form-sms` or `form-totp`.
|
34
|
+
# @return [Twilio::REST::Authy::V1::FormInstance] if type was passed.
|
35
|
+
# @return [Twilio::REST::Authy::V1::FormList]
|
36
|
+
def forms(type=:unset)
|
37
|
+
self.v1.forms(type)
|
38
|
+
end
|
39
|
+
|
31
40
|
##
|
32
41
|
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
33
42
|
# @return [Twilio::REST::Authy::V1::ServiceInstance] if sid was passed.
|
@@ -36,15 +45,6 @@ module Twilio
|
|
36
45
|
self.v1.services(sid)
|
37
46
|
end
|
38
47
|
|
39
|
-
##
|
40
|
-
# @param [form.FormType] form_type The Form Type of this Form. One of
|
41
|
-
# `form-app-push`, `form-sms` or `form-totp`.
|
42
|
-
# @return [Twilio::REST::Authy::V1::FormInstance] if form_type was passed.
|
43
|
-
# @return [Twilio::REST::Authy::V1::FormList]
|
44
|
-
def forms(form_type=:unset)
|
45
|
-
self.v1.forms(form_type)
|
46
|
-
end
|
47
|
-
|
48
48
|
##
|
49
49
|
# Provide a user friendly representation
|
50
50
|
def to_s
|
@@ -15,8 +15,23 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@services = nil
|
19
18
|
@forms = nil
|
19
|
+
@services = nil
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# @param [form.FormTypes] type The Type of this Form. One of `form-app-push`,
|
24
|
+
# `form-sms` or `form-totp`.
|
25
|
+
# @return [Twilio::REST::Authy::V1::FormContext] if type was passed.
|
26
|
+
# @return [Twilio::REST::Authy::V1::FormList]
|
27
|
+
def forms(type=:unset)
|
28
|
+
if type.nil?
|
29
|
+
raise ArgumentError, 'type cannot be nil'
|
30
|
+
elsif type == :unset
|
31
|
+
@forms ||= FormList.new self
|
32
|
+
else
|
33
|
+
FormContext.new(self, type)
|
34
|
+
end
|
20
35
|
end
|
21
36
|
|
22
37
|
##
|
@@ -33,21 +48,6 @@ module Twilio
|
|
33
48
|
end
|
34
49
|
end
|
35
50
|
|
36
|
-
##
|
37
|
-
# @param [form.FormType] form_type The Form Type of this Form. One of
|
38
|
-
# `form-app-push`, `form-sms` or `form-totp`.
|
39
|
-
# @return [Twilio::REST::Authy::V1::FormContext] if form_type was passed.
|
40
|
-
# @return [Twilio::REST::Authy::V1::FormList]
|
41
|
-
def forms(form_type=:unset)
|
42
|
-
if form_type.nil?
|
43
|
-
raise ArgumentError, 'form_type cannot be nil'
|
44
|
-
elsif form_type == :unset
|
45
|
-
@forms ||= FormList.new self
|
46
|
-
else
|
47
|
-
FormContext.new(self, form_type)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
51
|
##
|
52
52
|
# Provide a user friendly representation
|
53
53
|
def to_s
|
@@ -68,15 +68,15 @@ module Twilio
|
|
68
68
|
##
|
69
69
|
# Initialize the FormContext
|
70
70
|
# @param [Version] version Version that contains the resource
|
71
|
-
# @param [form.
|
72
|
-
# `form-
|
71
|
+
# @param [form.FormTypes] type The Type of this Form. One of `form-app-push`,
|
72
|
+
# `form-sms` or `form-totp`.
|
73
73
|
# @return [FormContext] FormContext
|
74
|
-
def initialize(version,
|
74
|
+
def initialize(version, type)
|
75
75
|
super(version)
|
76
76
|
|
77
77
|
# Path Solution
|
78
|
-
@solution = {
|
79
|
-
@uri = "/Forms/#{@solution[:
|
78
|
+
@solution = {type: type, }
|
79
|
+
@uri = "/Forms/#{@solution[:type]}"
|
80
80
|
end
|
81
81
|
|
82
82
|
##
|
@@ -91,7 +91,7 @@ module Twilio
|
|
91
91
|
params,
|
92
92
|
)
|
93
93
|
|
94
|
-
FormInstance.new(@version, payload,
|
94
|
+
FormInstance.new(@version, payload, type: @solution[:type], )
|
95
95
|
end
|
96
96
|
|
97
97
|
##
|
@@ -109,15 +109,15 @@ module Twilio
|
|
109
109
|
# Initialize the FormInstance
|
110
110
|
# @param [Version] version Version that contains the resource
|
111
111
|
# @param [Hash] payload payload that contains response from Twilio
|
112
|
-
# @param [form.
|
113
|
-
# `form-
|
112
|
+
# @param [form.FormTypes] type The Type of this Form. One of `form-app-push`,
|
113
|
+
# `form-sms` or `form-totp`.
|
114
114
|
# @return [FormInstance] FormInstance
|
115
|
-
def initialize(version, payload,
|
115
|
+
def initialize(version, payload, type: nil)
|
116
116
|
super(version)
|
117
117
|
|
118
118
|
# Marshaled Properties
|
119
119
|
@properties = {
|
120
|
-
'
|
120
|
+
'type' => payload['type'],
|
121
121
|
'forms' => payload['forms'],
|
122
122
|
'form_meta' => payload['form_meta'],
|
123
123
|
'url' => payload['url'],
|
@@ -125,7 +125,7 @@ module Twilio
|
|
125
125
|
|
126
126
|
# Context
|
127
127
|
@instance_context = nil
|
128
|
-
@params = {'
|
128
|
+
@params = {'type' => type || @properties['type'], }
|
129
129
|
end
|
130
130
|
|
131
131
|
##
|
@@ -134,31 +134,31 @@ module Twilio
|
|
134
134
|
# @return [FormContext] FormContext for this FormInstance
|
135
135
|
def context
|
136
136
|
unless @instance_context
|
137
|
-
@instance_context = FormContext.new(@version, @params['
|
137
|
+
@instance_context = FormContext.new(@version, @params['type'], )
|
138
138
|
end
|
139
139
|
@instance_context
|
140
140
|
end
|
141
141
|
|
142
142
|
##
|
143
|
-
# @return [form.
|
144
|
-
def
|
145
|
-
@properties['
|
143
|
+
# @return [form.FormTypes] The Type of this Form
|
144
|
+
def type
|
145
|
+
@properties['type']
|
146
146
|
end
|
147
147
|
|
148
148
|
##
|
149
|
-
# @return [Hash] Object that contains the available forms for this
|
149
|
+
# @return [Hash] Object that contains the available forms for this type.
|
150
150
|
def forms
|
151
151
|
@properties['forms']
|
152
152
|
end
|
153
153
|
|
154
154
|
##
|
155
|
-
# @return [Hash] Additional information for the available forms for this
|
155
|
+
# @return [Hash] Additional information for the available forms for this type.
|
156
156
|
def form_meta
|
157
157
|
@properties['form_meta']
|
158
158
|
end
|
159
159
|
|
160
160
|
##
|
161
|
-
# @return [String] The URL to access the forms for this
|
161
|
+
# @return [String] The URL to access the forms for this type.
|
162
162
|
def url
|
163
163
|
@properties['url']
|
164
164
|
end
|
@@ -36,18 +36,12 @@ module Twilio
|
|
36
36
|
# @param [String] binding A unique binding for this Factor that identifies it.
|
37
37
|
# E.g. a phone number for `sms` factors. Required when creating a new Factor. This
|
38
38
|
# value is never returned because it can contain customer secrets.
|
39
|
-
# @param [String] factor_type The Type of this Factor. One of `app-push`, `sms`,
|
40
|
-
# `totp`, etc.
|
41
39
|
# @param [String] friendly_name The friendly name of this Factor
|
42
|
-
# @param [
|
40
|
+
# @param [factor.FactorTypes] type The Type of this Factor. One of `app-push`,
|
41
|
+
# `sms`, `totp`, etc.
|
43
42
|
# @return [FactorInstance] Newly created FactorInstance
|
44
|
-
def create(binding: nil,
|
45
|
-
data = Twilio::Values.of({
|
46
|
-
'Binding' => binding,
|
47
|
-
'FactorType' => factor_type,
|
48
|
-
'FriendlyName' => friendly_name,
|
49
|
-
'Config' => config,
|
50
|
-
})
|
43
|
+
def create(binding: nil, friendly_name: nil, type: nil)
|
44
|
+
data = Twilio::Values.of({'Binding' => binding, 'FriendlyName' => friendly_name, 'Type' => type, })
|
51
45
|
|
52
46
|
payload = @version.create(
|
53
47
|
'POST',
|
@@ -399,13 +393,13 @@ module Twilio
|
|
399
393
|
end
|
400
394
|
|
401
395
|
##
|
402
|
-
# @return [factor.
|
396
|
+
# @return [factor.FactorStatuses] The Status of this Factor
|
403
397
|
def status
|
404
398
|
@properties['status']
|
405
399
|
end
|
406
400
|
|
407
401
|
##
|
408
|
-
# @return [
|
402
|
+
# @return [factor.FactorTypes] The Type of this Factor
|
409
403
|
def type
|
410
404
|
@properties['type']
|
411
405
|
end
|
@@ -221,9 +221,8 @@ module Twilio
|
|
221
221
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
222
222
|
'date_responded' => Twilio.deserialize_iso8601_datetime(payload['date_responded']),
|
223
223
|
'expiration_date' => Twilio.deserialize_iso8601_datetime(payload['expiration_date']),
|
224
|
-
'verification_sid' => payload['verification_sid'],
|
225
224
|
'status' => payload['status'],
|
226
|
-
'
|
225
|
+
'responded_reason' => payload['responded_reason'],
|
227
226
|
'details' => payload['details'],
|
228
227
|
'hidden_details' => payload['hidden_details'],
|
229
228
|
'type' => payload['type'],
|
@@ -318,21 +317,15 @@ module Twilio
|
|
318
317
|
end
|
319
318
|
|
320
319
|
##
|
321
|
-
# @return [
|
322
|
-
def verification_sid
|
323
|
-
@properties['verification_sid']
|
324
|
-
end
|
325
|
-
|
326
|
-
##
|
327
|
-
# @return [challenge.ChallengeStatus] The Status of this Challenge
|
320
|
+
# @return [challenge.ChallengeStatuses] The Status of this Challenge
|
328
321
|
def status
|
329
322
|
@properties['status']
|
330
323
|
end
|
331
324
|
|
332
325
|
##
|
333
|
-
# @return [challenge.
|
334
|
-
def
|
335
|
-
@properties['
|
326
|
+
# @return [challenge.ChallengeReasons] The Reason of this Challenge `status`
|
327
|
+
def responded_reason
|
328
|
+
@properties['responded_reason']
|
336
329
|
end
|
337
330
|
|
338
331
|
##
|
@@ -348,7 +341,7 @@ module Twilio
|
|
348
341
|
end
|
349
342
|
|
350
343
|
##
|
351
|
-
# @return [
|
344
|
+
# @return [challenge.FactorTypes] The Type of this Challenge
|
352
345
|
def type
|
353
346
|
@properties['type']
|
354
347
|
end
|
@@ -55,8 +55,12 @@ module Twilio
|
|
55
55
|
# Chat service if not specified. Note that this should only be used in cases
|
56
56
|
# where a Member is being recreated from a backup/separate source and where a
|
57
57
|
# Member was previously updated.
|
58
|
+
# @param [String] attributes An optional string metadata field you can use to
|
59
|
+
# store any data you wish. The string value must contain structurally valid JSON
|
60
|
+
# if specified. **Note** that if the attributes are not set "{}" will be
|
61
|
+
# returned.
|
58
62
|
# @return [MemberInstance] Newly created MemberInstance
|
59
|
-
def create(identity: nil, role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
63
|
+
def create(identity: nil, role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
60
64
|
data = Twilio::Values.of({
|
61
65
|
'Identity' => identity,
|
62
66
|
'RoleSid' => role_sid,
|
@@ -64,6 +68,7 @@ module Twilio
|
|
64
68
|
'LastConsumptionTimestamp' => Twilio.serialize_iso8601_datetime(last_consumption_timestamp),
|
65
69
|
'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
|
66
70
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
71
|
+
'Attributes' => attributes,
|
67
72
|
})
|
68
73
|
|
69
74
|
payload = @version.create(
|
@@ -287,14 +292,19 @@ module Twilio
|
|
287
292
|
# Chat service if not specified. Note that this should only be used in cases
|
288
293
|
# where a Member is being recreated from a backup/separate source and where a
|
289
294
|
# Member was previously updated.
|
295
|
+
# @param [String] attributes An optional string metadata field you can use to
|
296
|
+
# store any data you wish. The string value must contain structurally valid JSON
|
297
|
+
# if specified. **Note** that if the attributes are not set "{}" will be
|
298
|
+
# returned.
|
290
299
|
# @return [MemberInstance] Updated MemberInstance
|
291
|
-
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
300
|
+
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
292
301
|
data = Twilio::Values.of({
|
293
302
|
'RoleSid' => role_sid,
|
294
303
|
'LastConsumedMessageIndex' => last_consumed_message_index,
|
295
304
|
'LastConsumptionTimestamp' => Twilio.serialize_iso8601_datetime(last_consumption_timestamp),
|
296
305
|
'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
|
297
306
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
307
|
+
'Attributes' => attributes,
|
298
308
|
})
|
299
309
|
|
300
310
|
payload = @version.update(
|
@@ -349,6 +359,7 @@ module Twilio
|
|
349
359
|
'last_consumed_message_index' => payload['last_consumed_message_index'] == nil ? payload['last_consumed_message_index'] : payload['last_consumed_message_index'].to_i,
|
350
360
|
'last_consumption_timestamp' => Twilio.deserialize_iso8601_datetime(payload['last_consumption_timestamp']),
|
351
361
|
'url' => payload['url'],
|
362
|
+
'attributes' => payload['attributes'],
|
352
363
|
}
|
353
364
|
|
354
365
|
# Context
|
@@ -442,6 +453,12 @@ module Twilio
|
|
442
453
|
@properties['url']
|
443
454
|
end
|
444
455
|
|
456
|
+
##
|
457
|
+
# @return [String] An optional string metadata field you can use to store any data you wish.
|
458
|
+
def attributes
|
459
|
+
@properties['attributes']
|
460
|
+
end
|
461
|
+
|
445
462
|
##
|
446
463
|
# Fetch a MemberInstance
|
447
464
|
# @return [MemberInstance] Fetched MemberInstance
|
@@ -475,14 +492,19 @@ module Twilio
|
|
475
492
|
# Chat service if not specified. Note that this should only be used in cases
|
476
493
|
# where a Member is being recreated from a backup/separate source and where a
|
477
494
|
# Member was previously updated.
|
495
|
+
# @param [String] attributes An optional string metadata field you can use to
|
496
|
+
# store any data you wish. The string value must contain structurally valid JSON
|
497
|
+
# if specified. **Note** that if the attributes are not set "{}" will be
|
498
|
+
# returned.
|
478
499
|
# @return [MemberInstance] Updated MemberInstance
|
479
|
-
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
500
|
+
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
480
501
|
context.update(
|
481
502
|
role_sid: role_sid,
|
482
503
|
last_consumed_message_index: last_consumed_message_index,
|
483
504
|
last_consumption_timestamp: last_consumption_timestamp,
|
484
505
|
date_created: date_created,
|
485
506
|
date_updated: date_updated,
|
507
|
+
attributes: attributes,
|
486
508
|
)
|
487
509
|
end
|
488
510
|
|