twilio-ruby 5.10.7 → 5.11.0
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/.travis.yml +1 -2
- data/CHANGES.md +11 -0
- data/README.md +3 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +1 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +29 -25
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +9 -3
- data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +59 -29
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/studio.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +11 -11
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +27 -19
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +11 -11
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +18 -18
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +17 -15
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/security/request_validator.rb +48 -7
- data/lib/twilio-ruby/twiml/voice_response.rb +194 -6
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +4 -4
- data/spec/security/request_validator_spec.rb +34 -61
- data/spec/twiml/voice_response_spec.rb +8 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b2e383ba3a1cdb7ac1935ff265cf2c2c7f984da
|
4
|
+
data.tar.gz: ab1586c39a2a53cd964a89f8401d31056522070d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0924160a623cb392ffc3ed6d6b863afcced646cb19beccec461d1d9e16bf3f77f1c08a522b09edee4524cc0db12a3d4c826be22d9179bf8cf3ad5070e0a570c
|
7
|
+
data.tar.gz: 00f50a63129f3b0ef5e92c98f95890bcc48fc753041b8997c6a2899fd4e022caa57552c0fa6566940bee0fbb9779e0af85014ae9bf493eea8c1d3faae96cdc3f
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-07-16] Version 5.11.0
|
5
|
+
----------------------------
|
6
|
+
**Library**
|
7
|
+
- PR #421: Fix TwiML Say verb spec. Thanks to @HuipengRen!
|
8
|
+
- PR #419: Add a request body validator. Thanks to @cjcodes!
|
9
|
+
- PR #418: Remove support for ruby 2.0 and 2.1, adds 2.5. Thanks to @cjcodes!
|
10
|
+
|
11
|
+
**Twiml**
|
12
|
+
- Add support for SSML on Say verb, the message body is changed to be optional **(breaking change)**
|
13
|
+
|
14
|
+
|
4
15
|
[2018-07-11] Version 5.10.7
|
5
16
|
----------------------------
|
6
17
|
**Api**
|
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.11.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.11.0
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -178,11 +178,10 @@ This will print the following (except for the whitespace):
|
|
178
178
|
This library supports and is [tested against][travis] the following Ruby
|
179
179
|
implementations:
|
180
180
|
|
181
|
+
- Ruby 2.5.0
|
181
182
|
- Ruby 2.4.0
|
182
183
|
- Ruby 2.3.0
|
183
184
|
- Ruby 2.2.0
|
184
|
-
- Ruby 2.1.0
|
185
|
-
- Ruby 2.0.0
|
186
185
|
|
187
186
|
[capability]: https://github.com/twilio/twilio-ruby/wiki/JWT-Tokens
|
188
187
|
[examples]: https://github.com/twilio/twilio-ruby/blob/master/examples
|
@@ -42,18 +42,14 @@ module Twilio
|
|
42
42
|
# `trim-silence` will trim the silence from the beginning and end of the
|
43
43
|
# recording. `do-not-trim` will not trim the silence. Defaults to `do-not-trim`
|
44
44
|
# @param [String] recording_channels The recording_channels
|
45
|
-
# @param [Boolean] play_beep Possible values : true or false. true will play a
|
46
|
-
# double beep before the recording is paused or stopped or a single beep after the
|
47
|
-
# recording is resumed. Defaults to false
|
48
45
|
# @return [RecordingInstance] Newly created RecordingInstance
|
49
|
-
def create(recording_status_callback_event: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, trim: :unset, recording_channels: :unset
|
46
|
+
def create(recording_status_callback_event: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, trim: :unset, recording_channels: :unset)
|
50
47
|
data = Twilio::Values.of({
|
51
48
|
'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
|
52
49
|
'RecordingStatusCallback' => recording_status_callback,
|
53
50
|
'RecordingStatusCallbackMethod' => recording_status_callback_method,
|
54
51
|
'Trim' => trim,
|
55
52
|
'RecordingChannels' => recording_channels,
|
56
|
-
'PlayBeep' => play_beep,
|
57
53
|
})
|
58
54
|
|
59
55
|
payload = @version.create(
|
@@ -30,33 +30,37 @@ module Twilio
|
|
30
30
|
# Retrieve a single page of MessageInstance records from the API.
|
31
31
|
# Request is executed immediately.
|
32
32
|
# @param [String] to The destination phone number for SMS/MMS or a [Channel user
|
33
|
-
# address](https://www.twilio.com/docs/
|
33
|
+
# address](https://www.twilio.com/docs/sms/channels#channel-addresses) for other
|
34
34
|
# 3rd party channels. Destination phone numbers should be formatted with a '+' and
|
35
35
|
# country code e.g., +16175551212
|
36
36
|
# ([E.164](https://www.twilio.com/docs/glossary/what-e164) format).
|
37
37
|
# @param [String] status_callback A URL where Twilio will POST each time your
|
38
38
|
# message status changes to one of the following: `queued`, `failed`, `sent`,
|
39
|
-
# `delivered`, or `undelivered`. Twilio will POST the `MessageSid
|
40
|
-
# other [standard request
|
41
|
-
# parameters](https://www.twilio.com/docs/
|
39
|
+
# `delivered`, or `undelivered`. Twilio will POST the `MessageSid`,
|
40
|
+
# `MessageStatus`, and `ErrorCode` along with the other [standard request
|
41
|
+
# parameters](https://www.twilio.com/docs/sms/twiml#request-parameters). If you
|
42
|
+
# include this parameter in addition to a `MessagingServiceSid`, Twilio will
|
43
|
+
# override the Status Callback URL of the [Messaging
|
44
|
+
# Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a
|
45
|
+
# valid hostname – underscores are not allowed.
|
42
46
|
# @param [String] application_sid Twilio will POST `MessageSid` as well as
|
43
47
|
# `MessageStatus=sent` or `MessageStatus=failed` to the URL in the
|
44
48
|
# `MessageStatusCallback` property of this
|
45
|
-
# [
|
46
|
-
# `StatusCallback` parameter
|
49
|
+
# [application](https://www.twilio.com/docs/usage/api/applications). If the
|
50
|
+
# `StatusCallback` parameter is also passed, the application's
|
47
51
|
# `MessageStatusCallback` parameter will take precedence.
|
48
52
|
# @param [String] max_price The total maximum price up to the fourth decimal
|
49
|
-
# (0.0001) in US dollars acceptable for the message to be delivered. All messages
|
50
|
-
# regardless of the price point
|
53
|
+
# (0.0001) in US dollars acceptable for the message to be delivered. *All messages
|
54
|
+
# will be queued for delivery regardless of the price point.* A POST request will
|
51
55
|
# later be made to your Status Callback URL with a status change of 'Sent' or
|
52
|
-
# 'Failed'. When the price of the message is
|
53
|
-
# fail and not be sent. When MaxPrice is not set, all prices for the
|
54
|
-
# accepted.
|
56
|
+
# 'Failed'. When the price of the message is greater than this value, the message
|
57
|
+
# will fail and not be sent. When `MaxPrice` is not set, all prices for the
|
58
|
+
# message are accepted.
|
55
59
|
# @param [Boolean] provide_feedback Set this value to `true` if you are sending
|
56
60
|
# messages that have a trackable user action and you intend to confirm delivery of
|
57
61
|
# the message using the [Message Feedback
|
58
|
-
# API](https://www.twilio.com/docs/api/
|
59
|
-
#
|
62
|
+
# API](https://www.twilio.com/docs/sms/api/message-feedback). This parameter is
|
63
|
+
# `false` by default.
|
60
64
|
# @param [String] validity_period The number of seconds that the message can
|
61
65
|
# remain in a Twilio queue. After exceeding this time limit, the message will fail
|
62
66
|
# and a POST request will later be made to your Status Callback URL. Valid values
|
@@ -71,26 +75,26 @@ module Twilio
|
|
71
75
|
# @param [Boolean] smart_encoded The smart_encoded
|
72
76
|
# @param [String] from A Twilio phone number (in
|
73
77
|
# [E.164](https://www.twilio.com/docs/glossary/what-e164) format), [alphanumeric
|
74
|
-
# sender
|
75
|
-
#
|
76
|
-
#
|
77
|
-
# address](https://www.twilio.com/docs/api/channels#channel-addresses) enabled for
|
78
|
+
# sender ID](https://www.twilio.com/docs/sms/send-messages#alphanumeric-sender-id)
|
79
|
+
# or a [Channel Endpoint
|
80
|
+
# address](https://www.twilio.com/docs/sms/channels#channel-addresses) enabled for
|
78
81
|
# the type of message you wish to send. Phone numbers or [short
|
79
82
|
# codes](https://www.twilio.com/docs/sms/api/short-codes) purchased from Twilio
|
80
83
|
# work here. You cannot (for example) spoof messages from your own cell phone
|
81
|
-
# number. *Should not be passed if you are using MessagingServiceSid
|
82
|
-
# @param [String] messaging_service_sid The 34
|
84
|
+
# number. *Should not be passed if you are using `MessagingServiceSid`.*
|
85
|
+
# @param [String] messaging_service_sid The 34-character unique ID of the
|
83
86
|
# [Messaging
|
84
|
-
# Service](https://www.twilio.com/docs/api/messaging/send-messages#messaging-services) you want to associate with this Message. Set this parameter to use the Messaging Service Settings and [Copilot Features](https://www.twilio.com/docs/
|
87
|
+
# Service](https://www.twilio.com/docs/api/messaging/send-messages#messaging-services) you want to associate with this Message. Set this parameter to use the Messaging Service Settings and [Copilot Features](https://www.twilio.com/docs/sms/services) you have configured. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `From` phone number for delivery. *Should not be passed if you are using `From`.*
|
85
88
|
# @param [String] body The text of the message you want to send, limited to 1600
|
86
89
|
# characters.
|
87
|
-
# @param [String] media_url The URL of the media you wish to send
|
90
|
+
# @param [String] media_url The URL of the media you wish to send with the
|
88
91
|
# message. `gif` , `png` and `jpeg` content is currently supported and will be
|
89
92
|
# formatted correctly on the recipient's device. [Other
|
90
|
-
# types](https://www.twilio.com/docs/
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
93
|
+
# types](https://www.twilio.com/docs/sms/accepted-mime-types) are also accepted by
|
94
|
+
# the API. The media size limit is 5MB. If you wish to send more than one image in
|
95
|
+
# the message body, please provide multiple `MediaUrl` values in the POST request.
|
96
|
+
# You may include up to 10 MediaUrls per message. *Sending images via SMS is
|
97
|
+
# currently only possible in the US and Canada*
|
94
98
|
# @return [MessageInstance] Newly created MessageInstance
|
95
99
|
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)
|
96
100
|
data = Twilio::Values.of({
|
@@ -51,7 +51,9 @@ module Twilio
|
|
51
51
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
52
52
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
53
53
|
# `EndDate` be 30 days from today.
|
54
|
-
# @param [Boolean] include_subaccounts
|
54
|
+
# @param [Boolean] include_subaccounts `true` to include usage from the master
|
55
|
+
# account and all subaccounts. `false` to only retrieve usage from the specified
|
56
|
+
# account. `IncludeSubaccounts` is `true` by default.
|
55
57
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
56
58
|
# guarantees to never return more than limit. Default is no limit
|
57
59
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -84,7 +86,9 @@ module Twilio
|
|
84
86
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
85
87
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
86
88
|
# `EndDate` be 30 days from today.
|
87
|
-
# @param [Boolean] include_subaccounts
|
89
|
+
# @param [Boolean] include_subaccounts `true` to include usage from the master
|
90
|
+
# account and all subaccounts. `false` to only retrieve usage from the specified
|
91
|
+
# account. `IncludeSubaccounts` is `true` by default.
|
88
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
93
|
# guarantees to never return more than limit. Default is no limit.
|
90
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -133,7 +137,9 @@ module Twilio
|
|
133
137
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
134
138
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
135
139
|
# `EndDate` be 30 days from today.
|
136
|
-
# @param [Boolean] include_subaccounts
|
140
|
+
# @param [Boolean] include_subaccounts `true` to include usage from the master
|
141
|
+
# account and all subaccounts. `false` to only retrieve usage from the specified
|
142
|
+
# account. `IncludeSubaccounts` is `true` by default.
|
137
143
|
# @param [String] page_token PageToken provided by the API
|
138
144
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
139
145
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -34,7 +34,7 @@ module Twilio
|
|
34
34
|
end
|
35
35
|
|
36
36
|
##
|
37
|
-
# @param [String] sid
|
37
|
+
# @param [String] sid A 34 character string that uniquely identifies this event.
|
38
38
|
# @return [Twilio::REST::Monitor::V1::EventContext] if sid was passed.
|
39
39
|
# @return [Twilio::REST::Monitor::V1::EventList]
|
40
40
|
def events(sid=:unset)
|
@@ -27,12 +27,22 @@ module Twilio
|
|
27
27
|
# Lists EventInstance records from the API as a list.
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
29
|
# memory before returning.
|
30
|
-
# @param [String] actor_sid
|
31
|
-
#
|
32
|
-
# @param [String]
|
33
|
-
# @param [String]
|
34
|
-
#
|
35
|
-
# @param [
|
30
|
+
# @param [String] actor_sid Only include Events initiated by this Actor. Useful
|
31
|
+
# for auditing actions taken by specific users or API credentials.
|
32
|
+
# @param [String] event_type Only include Events of this EventType.
|
33
|
+
# @param [String] resource_sid Only include Events referring to this resource.
|
34
|
+
# Useful for discovering the history of a specific resource.
|
35
|
+
# @param [String] source_ip_address Only include Events that originated from this
|
36
|
+
# IP address. Useful for tracking suspicious activity originating from the API or
|
37
|
+
# the Twilio Console.
|
38
|
+
# @param [Time] start_date Only show events on or after this date. Useful in
|
39
|
+
# combination with `EndDate` to define a date-range of events. Input is a [UTC ISO
|
40
|
+
# 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day is
|
41
|
+
# ignored by the filter.
|
42
|
+
# @param [Time] end_date Only show events on or before this date. Useful in
|
43
|
+
# combination with `StartDate` to define a date-range of events. Input is a [UTC
|
44
|
+
# ISO 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day
|
45
|
+
# is ignored by the filter.
|
36
46
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
37
47
|
# guarantees to never return more than limit. Default is no limit
|
38
48
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -57,12 +67,22 @@ module Twilio
|
|
57
67
|
# Streams EventInstance records from the API as an Enumerable.
|
58
68
|
# This operation lazily loads records as efficiently as possible until the limit
|
59
69
|
# is reached.
|
60
|
-
# @param [String] actor_sid
|
61
|
-
#
|
62
|
-
# @param [String]
|
63
|
-
# @param [String]
|
64
|
-
#
|
65
|
-
# @param [
|
70
|
+
# @param [String] actor_sid Only include Events initiated by this Actor. Useful
|
71
|
+
# for auditing actions taken by specific users or API credentials.
|
72
|
+
# @param [String] event_type Only include Events of this EventType.
|
73
|
+
# @param [String] resource_sid Only include Events referring to this resource.
|
74
|
+
# Useful for discovering the history of a specific resource.
|
75
|
+
# @param [String] source_ip_address Only include Events that originated from this
|
76
|
+
# IP address. Useful for tracking suspicious activity originating from the API or
|
77
|
+
# the Twilio Console.
|
78
|
+
# @param [Time] start_date Only show events on or after this date. Useful in
|
79
|
+
# combination with `EndDate` to define a date-range of events. Input is a [UTC ISO
|
80
|
+
# 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day is
|
81
|
+
# ignored by the filter.
|
82
|
+
# @param [Time] end_date Only show events on or before this date. Useful in
|
83
|
+
# combination with `StartDate` to define a date-range of events. Input is a [UTC
|
84
|
+
# ISO 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day
|
85
|
+
# is ignored by the filter.
|
66
86
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
67
87
|
# guarantees to never return more than limit. Default is no limit.
|
68
88
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -103,12 +123,22 @@ module Twilio
|
|
103
123
|
##
|
104
124
|
# Retrieve a single page of EventInstance records from the API.
|
105
125
|
# Request is executed immediately.
|
106
|
-
# @param [String] actor_sid
|
107
|
-
#
|
108
|
-
# @param [String]
|
109
|
-
# @param [String]
|
110
|
-
#
|
111
|
-
# @param [
|
126
|
+
# @param [String] actor_sid Only include Events initiated by this Actor. Useful
|
127
|
+
# for auditing actions taken by specific users or API credentials.
|
128
|
+
# @param [String] event_type Only include Events of this EventType.
|
129
|
+
# @param [String] resource_sid Only include Events referring to this resource.
|
130
|
+
# Useful for discovering the history of a specific resource.
|
131
|
+
# @param [String] source_ip_address Only include Events that originated from this
|
132
|
+
# IP address. Useful for tracking suspicious activity originating from the API or
|
133
|
+
# the Twilio Console.
|
134
|
+
# @param [Time] start_date Only show events on or after this date. Useful in
|
135
|
+
# combination with `EndDate` to define a date-range of events. Input is a [UTC ISO
|
136
|
+
# 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day is
|
137
|
+
# ignored by the filter.
|
138
|
+
# @param [Time] end_date Only show events on or before this date. Useful in
|
139
|
+
# combination with `StartDate` to define a date-range of events. Input is a [UTC
|
140
|
+
# ISO 8601 Timestamp](http://en.wikipedia.org/wiki/ISO_8601#UTC), but time of day
|
141
|
+
# is ignored by the filter.
|
112
142
|
# @param [String] page_token PageToken provided by the API
|
113
143
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
114
144
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -186,7 +216,7 @@ module Twilio
|
|
186
216
|
##
|
187
217
|
# Initialize the EventContext
|
188
218
|
# @param [Version] version Version that contains the resource
|
189
|
-
# @param [String] sid
|
219
|
+
# @param [String] sid A 34 character string that uniquely identifies this event.
|
190
220
|
# @return [EventContext] EventContext
|
191
221
|
def initialize(version, sid)
|
192
222
|
super(version)
|
@@ -224,7 +254,7 @@ module Twilio
|
|
224
254
|
# Initialize the EventInstance
|
225
255
|
# @param [Version] version Version that contains the resource
|
226
256
|
# @param [Hash] payload payload that contains response from Twilio
|
227
|
-
# @param [String] sid
|
257
|
+
# @param [String] sid A 34 character string that uniquely identifies this event.
|
228
258
|
# @return [EventInstance] EventInstance
|
229
259
|
def initialize(version, payload, sid: nil)
|
230
260
|
super(version)
|
@@ -264,19 +294,19 @@ module Twilio
|
|
264
294
|
end
|
265
295
|
|
266
296
|
##
|
267
|
-
# @return [String]
|
297
|
+
# @return [String] A 34 character string identifying the Account for which this Event was recorded.
|
268
298
|
def account_sid
|
269
299
|
@properties['account_sid']
|
270
300
|
end
|
271
301
|
|
272
302
|
##
|
273
|
-
# @return [String]
|
303
|
+
# @return [String] If available, a 34 character string identifying the actor that caused this event. May be null.
|
274
304
|
def actor_sid
|
275
305
|
@properties['actor_sid']
|
276
306
|
end
|
277
307
|
|
278
308
|
##
|
279
|
-
# @return [String] The
|
309
|
+
# @return [String] The type of actor that caused this event
|
280
310
|
def actor_type
|
281
311
|
@properties['actor_type']
|
282
312
|
end
|
@@ -288,31 +318,31 @@ module Twilio
|
|
288
318
|
end
|
289
319
|
|
290
320
|
##
|
291
|
-
# @return [Hash]
|
321
|
+
# @return [Hash] A freeform json object encoding additional data about the event
|
292
322
|
def event_data
|
293
323
|
@properties['event_data']
|
294
324
|
end
|
295
325
|
|
296
326
|
##
|
297
|
-
# @return [Time] The
|
327
|
+
# @return [Time] The date-time the event was recorded
|
298
328
|
def event_date
|
299
329
|
@properties['event_date']
|
300
330
|
end
|
301
331
|
|
302
332
|
##
|
303
|
-
# @return [String] The
|
333
|
+
# @return [String] The event's type, as a string.
|
304
334
|
def event_type
|
305
335
|
@properties['event_type']
|
306
336
|
end
|
307
337
|
|
308
338
|
##
|
309
|
-
# @return [String]
|
339
|
+
# @return [String] A 34 character string identifying the resource that was affected.
|
310
340
|
def resource_sid
|
311
341
|
@properties['resource_sid']
|
312
342
|
end
|
313
343
|
|
314
344
|
##
|
315
|
-
# @return [String] The
|
345
|
+
# @return [String] The type of resource that was affected
|
316
346
|
def resource_type
|
317
347
|
@properties['resource_type']
|
318
348
|
end
|
@@ -330,7 +360,7 @@ module Twilio
|
|
330
360
|
end
|
331
361
|
|
332
362
|
##
|
333
|
-
# @return [String] The
|
363
|
+
# @return [String] The IP address of the source
|
334
364
|
def source_ip_address
|
335
365
|
@properties['source_ip_address']
|
336
366
|
end
|
@@ -134,14 +134,6 @@ module Twilio
|
|
134
134
|
self.hosted_numbers.hosted_number_orders(sid)
|
135
135
|
end
|
136
136
|
|
137
|
-
##
|
138
|
-
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
139
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
140
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
141
|
-
def available_add_ons(sid=:unset)
|
142
|
-
self.marketplace.available_add_ons(sid)
|
143
|
-
end
|
144
|
-
|
145
137
|
##
|
146
138
|
# @param [String] sid 34 character string that uniquely identifies the Add-on.
|
147
139
|
# This Sid can also be found in the Console on that specific Add-ons page as the
|
@@ -152,6 +144,14 @@ module Twilio
|
|
152
144
|
self.marketplace.installed_add_ons(sid)
|
153
145
|
end
|
154
146
|
|
147
|
+
##
|
148
|
+
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
149
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
150
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
151
|
+
def available_add_ons(sid=:unset)
|
152
|
+
self.marketplace.available_add_ons(sid)
|
153
|
+
end
|
154
|
+
|
155
155
|
##
|
156
156
|
# @param [String] sid The sid
|
157
157
|
# @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed.
|
@@ -15,37 +15,37 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'marketplace'
|
18
|
-
@available_add_ons = nil
|
19
18
|
@installed_add_ons = nil
|
19
|
+
@available_add_ons = nil
|
20
20
|
end
|
21
21
|
|
22
22
|
##
|
23
|
-
# @param [String] sid The
|
23
|
+
# @param [String] sid The Installed Add-on Sid that uniquely identifies this
|
24
24
|
# resource
|
25
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
26
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
27
|
-
def
|
25
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
|
26
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
27
|
+
def installed_add_ons(sid=:unset)
|
28
28
|
if sid.nil?
|
29
29
|
raise ArgumentError, 'sid cannot be nil'
|
30
30
|
elsif sid == :unset
|
31
|
-
@
|
31
|
+
@installed_add_ons ||= InstalledAddOnList.new self
|
32
32
|
else
|
33
|
-
|
33
|
+
InstalledAddOnContext.new(self, sid)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
##
|
38
|
-
# @param [String] sid The
|
38
|
+
# @param [String] sid The Available Add-on Sid that uniquely identifies this
|
39
39
|
# resource
|
40
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
41
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
42
|
-
def
|
40
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
|
41
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
42
|
+
def available_add_ons(sid=:unset)
|
43
43
|
if sid.nil?
|
44
44
|
raise ArgumentError, 'sid cannot be nil'
|
45
45
|
elsif sid == :unset
|
46
|
-
@
|
46
|
+
@available_add_ons ||= AvailableAddOnList.new self
|
47
47
|
else
|
48
|
-
|
48
|
+
AvailableAddOnContext.new(self, sid)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|