twilio-ruby 5.65.1 → 5.66.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +28 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +10 -10
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
- data/lib/twilio-ruby/rest/chat.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +377 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api.rb +9 -0
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +16 -0
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +26 -5
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +14 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +3 -55
- data/lib/twilio-ruby/rest/supersim/v1.rb +0 -16
- data/lib/twilio-ruby/rest/supersim.rb +0 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +14 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +14 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -3
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
@@ -97,7 +97,8 @@ module Twilio
|
|
97
97
|
# above and below the specified thresholds in seconds are computed. For example,
|
98
98
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
99
99
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
100
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
100
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
101
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
101
102
|
# @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
|
102
103
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
103
104
|
params = Twilio::Values.of({
|
@@ -328,7 +329,8 @@ module Twilio
|
|
328
329
|
# above and below the specified thresholds in seconds are computed. For example,
|
329
330
|
# `5,30` would show splits of Tasks that were canceled or accepted before and
|
330
331
|
# after 5 seconds and before and after 30 seconds. This can be used to show short
|
331
|
-
# abandoned Tasks or Tasks that failed to meet an SLA.
|
332
|
+
# abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
|
333
|
+
# statistics on up to 10,000 Tasks for any given threshold.
|
332
334
|
# @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
|
333
335
|
def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
|
334
336
|
context.fetch(
|
@@ -335,6 +335,8 @@ module Twilio
|
|
335
335
|
'size' => payload['size'].to_i,
|
336
336
|
'duration' => payload['duration'].to_i,
|
337
337
|
'media_external_location' => payload['media_external_location'],
|
338
|
+
'status_callback' => payload['status_callback'],
|
339
|
+
'status_callback_method' => payload['status_callback_method'],
|
338
340
|
'url' => payload['url'],
|
339
341
|
'links' => payload['links'],
|
340
342
|
}
|
@@ -457,6 +459,18 @@ module Twilio
|
|
457
459
|
@properties['media_external_location']
|
458
460
|
end
|
459
461
|
|
462
|
+
##
|
463
|
+
# @return [String] The URL called to send status information on every composition event.
|
464
|
+
def status_callback
|
465
|
+
@properties['status_callback']
|
466
|
+
end
|
467
|
+
|
468
|
+
##
|
469
|
+
# @return [String] The HTTP method used to call `status_callback`
|
470
|
+
def status_callback_method
|
471
|
+
@properties['status_callback_method']
|
472
|
+
end
|
473
|
+
|
460
474
|
##
|
461
475
|
# @return [String] The absolute URL of the resource
|
462
476
|
def url
|
@@ -273,6 +273,8 @@ module Twilio
|
|
273
273
|
'track_name' => payload['track_name'],
|
274
274
|
'offset' => payload['offset'].to_i,
|
275
275
|
'media_external_location' => payload['media_external_location'],
|
276
|
+
'status_callback' => payload['status_callback'],
|
277
|
+
'status_callback_method' => payload['status_callback_method'],
|
276
278
|
'links' => payload['links'],
|
277
279
|
}
|
278
280
|
|
@@ -382,6 +384,18 @@ module Twilio
|
|
382
384
|
@properties['media_external_location']
|
383
385
|
end
|
384
386
|
|
387
|
+
##
|
388
|
+
# @return [String] The URL called to send status information on every recording event.
|
389
|
+
def status_callback
|
390
|
+
@properties['status_callback']
|
391
|
+
end
|
392
|
+
|
393
|
+
##
|
394
|
+
# @return [String] The HTTP method used to call `status_callback`
|
395
|
+
def status_callback_method
|
396
|
+
@properties['status_callback_method']
|
397
|
+
end
|
398
|
+
|
385
399
|
##
|
386
400
|
# @return [String] The URLs of related resources
|
387
401
|
def links
|
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.
|
4
|
+
version: 5.66.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -375,6 +375,8 @@ files:
|
|
375
375
|
- lib/twilio-ruby/rest/chat/v2/service/user.rb
|
376
376
|
- lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb
|
377
377
|
- lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb
|
378
|
+
- lib/twilio-ruby/rest/chat/v3.rb
|
379
|
+
- lib/twilio-ruby/rest/chat/v3/channel.rb
|
378
380
|
- lib/twilio-ruby/rest/client.rb
|
379
381
|
- lib/twilio-ruby/rest/conversations.rb
|
380
382
|
- lib/twilio-ruby/rest/conversations/v1.rb
|
@@ -424,12 +426,17 @@ files:
|
|
424
426
|
- lib/twilio-ruby/rest/flex_api/v1/channel.rb
|
425
427
|
- lib/twilio-ruby/rest/flex_api/v1/configuration.rb
|
426
428
|
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
|
429
|
+
- lib/twilio-ruby/rest/flex_api/v1/interaction.rb
|
430
|
+
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
|
431
|
+
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
|
432
|
+
- lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
|
427
433
|
- lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
|
428
434
|
- lib/twilio-ruby/rest/frontline_api.rb
|
429
435
|
- lib/twilio-ruby/rest/frontline_api/v1.rb
|
430
436
|
- lib/twilio-ruby/rest/frontline_api/v1/user.rb
|
431
437
|
- lib/twilio-ruby/rest/insights.rb
|
432
438
|
- lib/twilio-ruby/rest/insights/v1.rb
|
439
|
+
- lib/twilio-ruby/rest/insights/v1/annotation.rb
|
433
440
|
- lib/twilio-ruby/rest/insights/v1/call.rb
|
434
441
|
- lib/twilio-ruby/rest/insights/v1/call/event.rb
|
435
442
|
- lib/twilio-ruby/rest/insights/v1/call/metric.rb
|
@@ -627,7 +634,6 @@ files:
|
|
627
634
|
- lib/twilio-ruby/rest/studio/v2/flow_validate.rb
|
628
635
|
- lib/twilio-ruby/rest/supersim.rb
|
629
636
|
- lib/twilio-ruby/rest/supersim/v1.rb
|
630
|
-
- lib/twilio-ruby/rest/supersim/v1/command.rb
|
631
637
|
- lib/twilio-ruby/rest/supersim/v1/esim_profile.rb
|
632
638
|
- lib/twilio-ruby/rest/supersim/v1/fleet.rb
|
633
639
|
- lib/twilio-ruby/rest/supersim/v1/ip_command.rb
|
@@ -1,368 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Supersim < Domain
|
12
|
-
class V1 < Version
|
13
|
-
##
|
14
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
-
class CommandList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the CommandList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [CommandList] CommandList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
@uri = "/Commands"
|
26
|
-
end
|
27
|
-
|
28
|
-
##
|
29
|
-
# Create the CommandInstance
|
30
|
-
# @param [String] sim The `sid` or `unique_name` of the
|
31
|
-
# {SIM}[https://www.twilio.com/docs/wireless/api/sim-resource] to send the Command
|
32
|
-
# to.
|
33
|
-
# @param [String] command The message body of the command.
|
34
|
-
# @param [String] callback_method The HTTP method we should use to call
|
35
|
-
# `callback_url`. Can be: `GET` or `POST` and the default is POST.
|
36
|
-
# @param [String] callback_url The URL we should call using the `callback_method`
|
37
|
-
# after we have sent the command.
|
38
|
-
# @return [CommandInstance] Created CommandInstance
|
39
|
-
def create(sim: nil, command: nil, callback_method: :unset, callback_url: :unset)
|
40
|
-
data = Twilio::Values.of({
|
41
|
-
'Sim' => sim,
|
42
|
-
'Command' => command,
|
43
|
-
'CallbackMethod' => callback_method,
|
44
|
-
'CallbackUrl' => callback_url,
|
45
|
-
})
|
46
|
-
|
47
|
-
payload = @version.create('POST', @uri, data: data)
|
48
|
-
|
49
|
-
CommandInstance.new(@version, payload, )
|
50
|
-
end
|
51
|
-
|
52
|
-
##
|
53
|
-
# Lists CommandInstance records from the API as a list.
|
54
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
55
|
-
# memory before returning.
|
56
|
-
# @param [String] sim The SID or unique name of the Sim that Command was sent to
|
57
|
-
# or from.
|
58
|
-
# @param [command.Status] status The status of the Command. Can be: `queued`,
|
59
|
-
# `sent`, `delivered`, `received` or `failed`. See the {Command Status
|
60
|
-
# Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
|
61
|
-
# for a description of each.
|
62
|
-
# @param [command.Direction] direction The direction of the Command. Can be
|
63
|
-
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
64
|
-
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
65
|
-
# originated`.
|
66
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
67
|
-
# guarantees to never return more than limit. Default is no limit
|
68
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
69
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
70
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
71
|
-
# efficient page size, i.e. min(limit, 1000)
|
72
|
-
# @return [Array] Array of up to limit results
|
73
|
-
def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
74
|
-
self.stream(
|
75
|
-
sim: sim,
|
76
|
-
status: status,
|
77
|
-
direction: direction,
|
78
|
-
limit: limit,
|
79
|
-
page_size: page_size
|
80
|
-
).entries
|
81
|
-
end
|
82
|
-
|
83
|
-
##
|
84
|
-
# Streams CommandInstance records from the API as an Enumerable.
|
85
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
86
|
-
# is reached.
|
87
|
-
# @param [String] sim The SID or unique name of the Sim that Command was sent to
|
88
|
-
# or from.
|
89
|
-
# @param [command.Status] status The status of the Command. Can be: `queued`,
|
90
|
-
# `sent`, `delivered`, `received` or `failed`. See the {Command Status
|
91
|
-
# Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
|
92
|
-
# for a description of each.
|
93
|
-
# @param [command.Direction] direction The direction of the Command. Can be
|
94
|
-
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
95
|
-
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
96
|
-
# originated`.
|
97
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
98
|
-
# guarantees to never return more than limit. Default is no limit.
|
99
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
100
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
101
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
102
|
-
# efficient page size, i.e. min(limit, 1000)
|
103
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
104
|
-
def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
105
|
-
limits = @version.read_limits(limit, page_size)
|
106
|
-
|
107
|
-
page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size], )
|
108
|
-
|
109
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
110
|
-
end
|
111
|
-
|
112
|
-
##
|
113
|
-
# When passed a block, yields CommandInstance records from the API.
|
114
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
115
|
-
# is reached.
|
116
|
-
def each
|
117
|
-
limits = @version.read_limits
|
118
|
-
|
119
|
-
page = self.page(page_size: limits[:page_size], )
|
120
|
-
|
121
|
-
@version.stream(page,
|
122
|
-
limit: limits[:limit],
|
123
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
124
|
-
end
|
125
|
-
|
126
|
-
##
|
127
|
-
# Retrieve a single page of CommandInstance records from the API.
|
128
|
-
# Request is executed immediately.
|
129
|
-
# @param [String] sim The SID or unique name of the Sim that Command was sent to
|
130
|
-
# or from.
|
131
|
-
# @param [command.Status] status The status of the Command. Can be: `queued`,
|
132
|
-
# `sent`, `delivered`, `received` or `failed`. See the {Command Status
|
133
|
-
# Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
|
134
|
-
# for a description of each.
|
135
|
-
# @param [command.Direction] direction The direction of the Command. Can be
|
136
|
-
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
137
|
-
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
138
|
-
# originated`.
|
139
|
-
# @param [String] page_token PageToken provided by the API
|
140
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
141
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
142
|
-
# @return [Page] Page of CommandInstance
|
143
|
-
def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
144
|
-
params = Twilio::Values.of({
|
145
|
-
'Sim' => sim,
|
146
|
-
'Status' => status,
|
147
|
-
'Direction' => direction,
|
148
|
-
'PageToken' => page_token,
|
149
|
-
'Page' => page_number,
|
150
|
-
'PageSize' => page_size,
|
151
|
-
})
|
152
|
-
|
153
|
-
response = @version.page('GET', @uri, params: params)
|
154
|
-
|
155
|
-
CommandPage.new(@version, response, @solution)
|
156
|
-
end
|
157
|
-
|
158
|
-
##
|
159
|
-
# Retrieve a single page of CommandInstance records from the API.
|
160
|
-
# Request is executed immediately.
|
161
|
-
# @param [String] target_url API-generated URL for the requested results page
|
162
|
-
# @return [Page] Page of CommandInstance
|
163
|
-
def get_page(target_url)
|
164
|
-
response = @version.domain.request(
|
165
|
-
'GET',
|
166
|
-
target_url
|
167
|
-
)
|
168
|
-
CommandPage.new(@version, response, @solution)
|
169
|
-
end
|
170
|
-
|
171
|
-
##
|
172
|
-
# Provide a user friendly representation
|
173
|
-
def to_s
|
174
|
-
'#<Twilio.Supersim.V1.CommandList>'
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
##
|
179
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
180
|
-
class CommandPage < Page
|
181
|
-
##
|
182
|
-
# Initialize the CommandPage
|
183
|
-
# @param [Version] version Version that contains the resource
|
184
|
-
# @param [Response] response Response from the API
|
185
|
-
# @param [Hash] solution Path solution for the resource
|
186
|
-
# @return [CommandPage] CommandPage
|
187
|
-
def initialize(version, response, solution)
|
188
|
-
super(version, response)
|
189
|
-
|
190
|
-
# Path Solution
|
191
|
-
@solution = solution
|
192
|
-
end
|
193
|
-
|
194
|
-
##
|
195
|
-
# Build an instance of CommandInstance
|
196
|
-
# @param [Hash] payload Payload response from the API
|
197
|
-
# @return [CommandInstance] CommandInstance
|
198
|
-
def get_instance(payload)
|
199
|
-
CommandInstance.new(@version, payload, )
|
200
|
-
end
|
201
|
-
|
202
|
-
##
|
203
|
-
# Provide a user friendly representation
|
204
|
-
def to_s
|
205
|
-
'<Twilio.Supersim.V1.CommandPage>'
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
##
|
210
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
211
|
-
class CommandContext < InstanceContext
|
212
|
-
##
|
213
|
-
# Initialize the CommandContext
|
214
|
-
# @param [Version] version Version that contains the resource
|
215
|
-
# @param [String] sid The SID of the Command resource to fetch.
|
216
|
-
# @return [CommandContext] CommandContext
|
217
|
-
def initialize(version, sid)
|
218
|
-
super(version)
|
219
|
-
|
220
|
-
# Path Solution
|
221
|
-
@solution = {sid: sid, }
|
222
|
-
@uri = "/Commands/#{@solution[:sid]}"
|
223
|
-
end
|
224
|
-
|
225
|
-
##
|
226
|
-
# Fetch the CommandInstance
|
227
|
-
# @return [CommandInstance] Fetched CommandInstance
|
228
|
-
def fetch
|
229
|
-
payload = @version.fetch('GET', @uri)
|
230
|
-
|
231
|
-
CommandInstance.new(@version, payload, sid: @solution[:sid], )
|
232
|
-
end
|
233
|
-
|
234
|
-
##
|
235
|
-
# Provide a user friendly representation
|
236
|
-
def to_s
|
237
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
238
|
-
"#<Twilio.Supersim.V1.CommandContext #{context}>"
|
239
|
-
end
|
240
|
-
|
241
|
-
##
|
242
|
-
# Provide a detailed, user friendly representation
|
243
|
-
def inspect
|
244
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
245
|
-
"#<Twilio.Supersim.V1.CommandContext #{context}>"
|
246
|
-
end
|
247
|
-
end
|
248
|
-
|
249
|
-
##
|
250
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
251
|
-
class CommandInstance < InstanceResource
|
252
|
-
##
|
253
|
-
# Initialize the CommandInstance
|
254
|
-
# @param [Version] version Version that contains the resource
|
255
|
-
# @param [Hash] payload payload that contains response from Twilio
|
256
|
-
# @param [String] sid The SID of the Command resource to fetch.
|
257
|
-
# @return [CommandInstance] CommandInstance
|
258
|
-
def initialize(version, payload, sid: nil)
|
259
|
-
super(version)
|
260
|
-
|
261
|
-
# Marshaled Properties
|
262
|
-
@properties = {
|
263
|
-
'sid' => payload['sid'],
|
264
|
-
'account_sid' => payload['account_sid'],
|
265
|
-
'sim_sid' => payload['sim_sid'],
|
266
|
-
'command' => payload['command'],
|
267
|
-
'status' => payload['status'],
|
268
|
-
'direction' => payload['direction'],
|
269
|
-
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
270
|
-
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
271
|
-
'url' => payload['url'],
|
272
|
-
}
|
273
|
-
|
274
|
-
# Context
|
275
|
-
@instance_context = nil
|
276
|
-
@params = {'sid' => sid || @properties['sid'], }
|
277
|
-
end
|
278
|
-
|
279
|
-
##
|
280
|
-
# Generate an instance context for the instance, the context is capable of
|
281
|
-
# performing various actions. All instance actions are proxied to the context
|
282
|
-
# @return [CommandContext] CommandContext for this CommandInstance
|
283
|
-
def context
|
284
|
-
unless @instance_context
|
285
|
-
@instance_context = CommandContext.new(@version, @params['sid'], )
|
286
|
-
end
|
287
|
-
@instance_context
|
288
|
-
end
|
289
|
-
|
290
|
-
##
|
291
|
-
# @return [String] The unique string that identifies the resource
|
292
|
-
def sid
|
293
|
-
@properties['sid']
|
294
|
-
end
|
295
|
-
|
296
|
-
##
|
297
|
-
# @return [String] The SID of the Account that created the resource
|
298
|
-
def account_sid
|
299
|
-
@properties['account_sid']
|
300
|
-
end
|
301
|
-
|
302
|
-
##
|
303
|
-
# @return [String] The SID of the SIM that this Command was sent to or from
|
304
|
-
def sim_sid
|
305
|
-
@properties['sim_sid']
|
306
|
-
end
|
307
|
-
|
308
|
-
##
|
309
|
-
# @return [String] The message body of the command sent to or from the SIM
|
310
|
-
def command
|
311
|
-
@properties['command']
|
312
|
-
end
|
313
|
-
|
314
|
-
##
|
315
|
-
# @return [command.Status] The status of the Command
|
316
|
-
def status
|
317
|
-
@properties['status']
|
318
|
-
end
|
319
|
-
|
320
|
-
##
|
321
|
-
# @return [command.Direction] The direction of the Command
|
322
|
-
def direction
|
323
|
-
@properties['direction']
|
324
|
-
end
|
325
|
-
|
326
|
-
##
|
327
|
-
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
328
|
-
def date_created
|
329
|
-
@properties['date_created']
|
330
|
-
end
|
331
|
-
|
332
|
-
##
|
333
|
-
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
334
|
-
def date_updated
|
335
|
-
@properties['date_updated']
|
336
|
-
end
|
337
|
-
|
338
|
-
##
|
339
|
-
# @return [String] The absolute URL of the Command resource
|
340
|
-
def url
|
341
|
-
@properties['url']
|
342
|
-
end
|
343
|
-
|
344
|
-
##
|
345
|
-
# Fetch the CommandInstance
|
346
|
-
# @return [CommandInstance] Fetched CommandInstance
|
347
|
-
def fetch
|
348
|
-
context.fetch
|
349
|
-
end
|
350
|
-
|
351
|
-
##
|
352
|
-
# Provide a user friendly representation
|
353
|
-
def to_s
|
354
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
355
|
-
"<Twilio.Supersim.V1.CommandInstance #{values}>"
|
356
|
-
end
|
357
|
-
|
358
|
-
##
|
359
|
-
# Provide a detailed, user friendly representation
|
360
|
-
def inspect
|
361
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
362
|
-
"<Twilio.Supersim.V1.CommandInstance #{values}>"
|
363
|
-
end
|
364
|
-
end
|
365
|
-
end
|
366
|
-
end
|
367
|
-
end
|
368
|
-
end
|