twilio-ruby 5.52.0 → 5.67.3
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 +5 -5
- data/.github/workflows/pr-lint.yml +15 -0
- data/.github/workflows/test-and-deploy.yml +129 -0
- data/.gitignore +5 -1
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +91 -28
- data/CHANGES.md +563 -0
- data/Gemfile +1 -0
- data/Makefile +8 -11
- data/README.md +13 -6
- data/examples/examples.rb +1 -1
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/http/http_client.rb +20 -4
- data/lib/twilio-ruby/http.rb +5 -0
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
- 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/client.rb +21 -12
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
- data/lib/twilio-ruby/rest/conversations.rb +15 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
- data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
- 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 +384 -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/frontline_api/v1/user.rb +258 -0
- data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
- data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
- data/lib/twilio-ruby/rest/insights.rb +28 -0
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
- data/lib/twilio-ruby/rest/lookups.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
- data/lib/twilio-ruby/rest/media/v1.rb +76 -0
- data/lib/twilio-ruby/rest/media.rb +65 -0
- data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
- data/lib/twilio-ruby/rest/pricing.rb +19 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
- data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
- data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
- data/lib/twilio-ruby/rest/supersim.rb +15 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
- 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/worker/reservation.rb +7 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
- 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/taskrouter/v1/workspace.rb +38 -22
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
- data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
- data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
- data/lib/twilio-ruby/rest/verify.rb +14 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
- data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
- data/lib/twilio-ruby/rest/voice.rb +8 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/rest.rb +13 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +6 -16
- data/sonar-project.properties +13 -0
- data/twilio-ruby.gemspec +1 -2
- metadata +59 -32
- data/.travis.yml +0 -45
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
- /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
- /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
- /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
- /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
- /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
- /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
- /data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +0 -0
@@ -12,54 +12,62 @@ module Twilio
|
|
12
12
|
class V1 < Version
|
13
13
|
##
|
14
14
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
-
class
|
15
|
+
class IpCommandList < ListResource
|
16
16
|
##
|
17
|
-
# Initialize the
|
17
|
+
# Initialize the IpCommandList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [
|
19
|
+
# @return [IpCommandList] IpCommandList
|
20
20
|
def initialize(version)
|
21
21
|
super(version)
|
22
22
|
|
23
23
|
# Path Solution
|
24
24
|
@solution = {}
|
25
|
-
@uri = "/
|
25
|
+
@uri = "/IpCommands"
|
26
26
|
end
|
27
27
|
|
28
28
|
##
|
29
|
-
# Create the
|
30
|
-
# @param [String] sim The `sid` or `unique_name` of the
|
31
|
-
#
|
32
|
-
# to.
|
33
|
-
# @param [String]
|
34
|
-
# @param [String]
|
35
|
-
#
|
29
|
+
# Create the IpCommandInstance
|
30
|
+
# @param [String] sim The `sid` or `unique_name` of the {Super
|
31
|
+
# SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
|
32
|
+
# Command to.
|
33
|
+
# @param [String] payload The payload to be delivered to the device.
|
34
|
+
# @param [String] device_port The device port to which the IP Command will be
|
35
|
+
# sent.
|
36
|
+
# @param [ip_command.PayloadType] payload_type Indicates how the payload is
|
37
|
+
# encoded. Either `text` or `binary`. Defaults to `text`.
|
36
38
|
# @param [String] callback_url The URL we should call using the `callback_method`
|
37
|
-
# after we have sent the
|
38
|
-
# @
|
39
|
-
|
39
|
+
# after we have sent the IP Command.
|
40
|
+
# @param [String] callback_method The HTTP method we should use to call
|
41
|
+
# `callback_url`. Can be `GET` or `POST`, and the default is `POST`.
|
42
|
+
# @return [IpCommandInstance] Created IpCommandInstance
|
43
|
+
def create(sim: nil, payload: nil, device_port: nil, payload_type: :unset, callback_url: :unset, callback_method: :unset)
|
40
44
|
data = Twilio::Values.of({
|
41
45
|
'Sim' => sim,
|
42
|
-
'
|
43
|
-
'
|
46
|
+
'Payload' => payload,
|
47
|
+
'DevicePort' => device_port,
|
48
|
+
'PayloadType' => payload_type,
|
44
49
|
'CallbackUrl' => callback_url,
|
50
|
+
'CallbackMethod' => callback_method,
|
45
51
|
})
|
46
52
|
|
47
53
|
payload = @version.create('POST', @uri, data: data)
|
48
54
|
|
49
|
-
|
55
|
+
IpCommandInstance.new(@version, payload, )
|
50
56
|
end
|
51
57
|
|
52
58
|
##
|
53
|
-
# Lists
|
59
|
+
# Lists IpCommandInstance records from the API as a list.
|
54
60
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
55
61
|
# memory before returning.
|
56
|
-
# @param [String] sim The SID or unique name of the Sim that Command
|
57
|
-
# or from.
|
58
|
-
# @param [
|
59
|
-
#
|
60
|
-
#
|
62
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
63
|
+
# was sent to or from.
|
64
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
65
|
+
# to or from.
|
66
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
67
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
68
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
61
69
|
# for a description of each.
|
62
|
-
# @param [
|
70
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
63
71
|
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
64
72
|
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
65
73
|
# originated`.
|
@@ -70,9 +78,10 @@ module Twilio
|
|
70
78
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
71
79
|
# efficient page size, i.e. min(limit, 1000)
|
72
80
|
# @return [Array] Array of up to limit results
|
73
|
-
def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
81
|
+
def list(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
74
82
|
self.stream(
|
75
83
|
sim: sim,
|
84
|
+
sim_iccid: sim_iccid,
|
76
85
|
status: status,
|
77
86
|
direction: direction,
|
78
87
|
limit: limit,
|
@@ -81,16 +90,18 @@ module Twilio
|
|
81
90
|
end
|
82
91
|
|
83
92
|
##
|
84
|
-
# Streams
|
93
|
+
# Streams IpCommandInstance records from the API as an Enumerable.
|
85
94
|
# This operation lazily loads records as efficiently as possible until the limit
|
86
95
|
# is reached.
|
87
|
-
# @param [String] sim The SID or unique name of the Sim that Command
|
88
|
-
# or from.
|
89
|
-
# @param [
|
90
|
-
#
|
91
|
-
#
|
96
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
97
|
+
# was sent to or from.
|
98
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
99
|
+
# to or from.
|
100
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
101
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
102
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
92
103
|
# for a description of each.
|
93
|
-
# @param [
|
104
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
94
105
|
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
95
106
|
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
96
107
|
# originated`.
|
@@ -101,16 +112,22 @@ module Twilio
|
|
101
112
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
102
113
|
# efficient page size, i.e. min(limit, 1000)
|
103
114
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
104
|
-
def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
115
|
+
def stream(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
105
116
|
limits = @version.read_limits(limit, page_size)
|
106
117
|
|
107
|
-
page = self.page(
|
118
|
+
page = self.page(
|
119
|
+
sim: sim,
|
120
|
+
sim_iccid: sim_iccid,
|
121
|
+
status: status,
|
122
|
+
direction: direction,
|
123
|
+
page_size: limits[:page_size],
|
124
|
+
)
|
108
125
|
|
109
126
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
110
127
|
end
|
111
128
|
|
112
129
|
##
|
113
|
-
# When passed a block, yields
|
130
|
+
# When passed a block, yields IpCommandInstance records from the API.
|
114
131
|
# This operation lazily loads records as efficiently as possible until the limit
|
115
132
|
# is reached.
|
116
133
|
def each
|
@@ -124,25 +141,28 @@ module Twilio
|
|
124
141
|
end
|
125
142
|
|
126
143
|
##
|
127
|
-
# Retrieve a single page of
|
144
|
+
# Retrieve a single page of IpCommandInstance records from the API.
|
128
145
|
# Request is executed immediately.
|
129
|
-
# @param [String] sim The SID or unique name of the Sim that Command
|
130
|
-
# or from.
|
131
|
-
# @param [
|
132
|
-
#
|
133
|
-
#
|
146
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
147
|
+
# was sent to or from.
|
148
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
149
|
+
# to or from.
|
150
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
151
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
152
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
134
153
|
# for a description of each.
|
135
|
-
# @param [
|
154
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
136
155
|
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
137
156
|
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
138
157
|
# originated`.
|
139
158
|
# @param [String] page_token PageToken provided by the API
|
140
159
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
141
160
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
142
|
-
# @return [Page] Page of
|
143
|
-
def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
161
|
+
# @return [Page] Page of IpCommandInstance
|
162
|
+
def page(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
144
163
|
params = Twilio::Values.of({
|
145
164
|
'Sim' => sim,
|
165
|
+
'SimIccid' => sim_iccid,
|
146
166
|
'Status' => status,
|
147
167
|
'Direction' => direction,
|
148
168
|
'PageToken' => page_token,
|
@@ -152,38 +172,38 @@ module Twilio
|
|
152
172
|
|
153
173
|
response = @version.page('GET', @uri, params: params)
|
154
174
|
|
155
|
-
|
175
|
+
IpCommandPage.new(@version, response, @solution)
|
156
176
|
end
|
157
177
|
|
158
178
|
##
|
159
|
-
# Retrieve a single page of
|
179
|
+
# Retrieve a single page of IpCommandInstance records from the API.
|
160
180
|
# Request is executed immediately.
|
161
181
|
# @param [String] target_url API-generated URL for the requested results page
|
162
|
-
# @return [Page] Page of
|
182
|
+
# @return [Page] Page of IpCommandInstance
|
163
183
|
def get_page(target_url)
|
164
184
|
response = @version.domain.request(
|
165
185
|
'GET',
|
166
186
|
target_url
|
167
187
|
)
|
168
|
-
|
188
|
+
IpCommandPage.new(@version, response, @solution)
|
169
189
|
end
|
170
190
|
|
171
191
|
##
|
172
192
|
# Provide a user friendly representation
|
173
193
|
def to_s
|
174
|
-
'#<Twilio.Supersim.V1.
|
194
|
+
'#<Twilio.Supersim.V1.IpCommandList>'
|
175
195
|
end
|
176
196
|
end
|
177
197
|
|
178
198
|
##
|
179
199
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
180
|
-
class
|
200
|
+
class IpCommandPage < Page
|
181
201
|
##
|
182
|
-
# Initialize the
|
202
|
+
# Initialize the IpCommandPage
|
183
203
|
# @param [Version] version Version that contains the resource
|
184
204
|
# @param [Response] response Response from the API
|
185
205
|
# @param [Hash] solution Path solution for the resource
|
186
|
-
# @return [
|
206
|
+
# @return [IpCommandPage] IpCommandPage
|
187
207
|
def initialize(version, response, solution)
|
188
208
|
super(version, response)
|
189
209
|
|
@@ -192,69 +212,69 @@ module Twilio
|
|
192
212
|
end
|
193
213
|
|
194
214
|
##
|
195
|
-
# Build an instance of
|
215
|
+
# Build an instance of IpCommandInstance
|
196
216
|
# @param [Hash] payload Payload response from the API
|
197
|
-
# @return [
|
217
|
+
# @return [IpCommandInstance] IpCommandInstance
|
198
218
|
def get_instance(payload)
|
199
|
-
|
219
|
+
IpCommandInstance.new(@version, payload, )
|
200
220
|
end
|
201
221
|
|
202
222
|
##
|
203
223
|
# Provide a user friendly representation
|
204
224
|
def to_s
|
205
|
-
'<Twilio.Supersim.V1.
|
225
|
+
'<Twilio.Supersim.V1.IpCommandPage>'
|
206
226
|
end
|
207
227
|
end
|
208
228
|
|
209
229
|
##
|
210
230
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
211
|
-
class
|
231
|
+
class IpCommandContext < InstanceContext
|
212
232
|
##
|
213
|
-
# Initialize the
|
233
|
+
# Initialize the IpCommandContext
|
214
234
|
# @param [Version] version Version that contains the resource
|
215
|
-
# @param [String] sid The SID of the Command resource to fetch.
|
216
|
-
# @return [
|
235
|
+
# @param [String] sid The SID of the IP Command resource to fetch.
|
236
|
+
# @return [IpCommandContext] IpCommandContext
|
217
237
|
def initialize(version, sid)
|
218
238
|
super(version)
|
219
239
|
|
220
240
|
# Path Solution
|
221
241
|
@solution = {sid: sid, }
|
222
|
-
@uri = "/
|
242
|
+
@uri = "/IpCommands/#{@solution[:sid]}"
|
223
243
|
end
|
224
244
|
|
225
245
|
##
|
226
|
-
# Fetch the
|
227
|
-
# @return [
|
246
|
+
# Fetch the IpCommandInstance
|
247
|
+
# @return [IpCommandInstance] Fetched IpCommandInstance
|
228
248
|
def fetch
|
229
249
|
payload = @version.fetch('GET', @uri)
|
230
250
|
|
231
|
-
|
251
|
+
IpCommandInstance.new(@version, payload, sid: @solution[:sid], )
|
232
252
|
end
|
233
253
|
|
234
254
|
##
|
235
255
|
# Provide a user friendly representation
|
236
256
|
def to_s
|
237
257
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
238
|
-
"#<Twilio.Supersim.V1.
|
258
|
+
"#<Twilio.Supersim.V1.IpCommandContext #{context}>"
|
239
259
|
end
|
240
260
|
|
241
261
|
##
|
242
262
|
# Provide a detailed, user friendly representation
|
243
263
|
def inspect
|
244
264
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
245
|
-
"#<Twilio.Supersim.V1.
|
265
|
+
"#<Twilio.Supersim.V1.IpCommandContext #{context}>"
|
246
266
|
end
|
247
267
|
end
|
248
268
|
|
249
269
|
##
|
250
270
|
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
251
|
-
class
|
271
|
+
class IpCommandInstance < InstanceResource
|
252
272
|
##
|
253
|
-
# Initialize the
|
273
|
+
# Initialize the IpCommandInstance
|
254
274
|
# @param [Version] version Version that contains the resource
|
255
275
|
# @param [Hash] payload payload that contains response from Twilio
|
256
|
-
# @param [String] sid The SID of the Command resource to fetch.
|
257
|
-
# @return [
|
276
|
+
# @param [String] sid The SID of the IP Command resource to fetch.
|
277
|
+
# @return [IpCommandInstance] IpCommandInstance
|
258
278
|
def initialize(version, payload, sid: nil)
|
259
279
|
super(version)
|
260
280
|
|
@@ -263,9 +283,13 @@ module Twilio
|
|
263
283
|
'sid' => payload['sid'],
|
264
284
|
'account_sid' => payload['account_sid'],
|
265
285
|
'sim_sid' => payload['sim_sid'],
|
266
|
-
'
|
286
|
+
'sim_iccid' => payload['sim_iccid'],
|
267
287
|
'status' => payload['status'],
|
268
288
|
'direction' => payload['direction'],
|
289
|
+
'device_ip' => payload['device_ip'],
|
290
|
+
'device_port' => payload['device_port'].to_i,
|
291
|
+
'payload_type' => payload['payload_type'],
|
292
|
+
'payload' => payload['payload'],
|
269
293
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
270
294
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
271
295
|
'url' => payload['url'],
|
@@ -279,10 +303,10 @@ module Twilio
|
|
279
303
|
##
|
280
304
|
# Generate an instance context for the instance, the context is capable of
|
281
305
|
# performing various actions. All instance actions are proxied to the context
|
282
|
-
# @return [
|
306
|
+
# @return [IpCommandContext] IpCommandContext for this IpCommandInstance
|
283
307
|
def context
|
284
308
|
unless @instance_context
|
285
|
-
@instance_context =
|
309
|
+
@instance_context = IpCommandContext.new(@version, @params['sid'], )
|
286
310
|
end
|
287
311
|
@instance_context
|
288
312
|
end
|
@@ -300,29 +324,53 @@ module Twilio
|
|
300
324
|
end
|
301
325
|
|
302
326
|
##
|
303
|
-
# @return [String] The SID of the SIM that this Command was sent to or from
|
327
|
+
# @return [String] The SID of the Super SIM that this IP Command was sent to or from
|
304
328
|
def sim_sid
|
305
329
|
@properties['sim_sid']
|
306
330
|
end
|
307
331
|
|
308
332
|
##
|
309
|
-
# @return [String] The
|
310
|
-
def
|
311
|
-
@properties['
|
333
|
+
# @return [String] The ICCID of the Super SIM that this IP Command was sent to or from
|
334
|
+
def sim_iccid
|
335
|
+
@properties['sim_iccid']
|
312
336
|
end
|
313
337
|
|
314
338
|
##
|
315
|
-
# @return [
|
339
|
+
# @return [ip_command.Status] The status of the IP Command
|
316
340
|
def status
|
317
341
|
@properties['status']
|
318
342
|
end
|
319
343
|
|
320
344
|
##
|
321
|
-
# @return [
|
345
|
+
# @return [ip_command.Direction] The direction of the IP Command
|
322
346
|
def direction
|
323
347
|
@properties['direction']
|
324
348
|
end
|
325
349
|
|
350
|
+
##
|
351
|
+
# @return [String] The IP address of the device that the IP Command was sent to or received from
|
352
|
+
def device_ip
|
353
|
+
@properties['device_ip']
|
354
|
+
end
|
355
|
+
|
356
|
+
##
|
357
|
+
# @return [String] The port that the IP Command either originated from or was sent to
|
358
|
+
def device_port
|
359
|
+
@properties['device_port']
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# @return [ip_command.PayloadType] The payload type of the IP Command
|
364
|
+
def payload_type
|
365
|
+
@properties['payload_type']
|
366
|
+
end
|
367
|
+
|
368
|
+
##
|
369
|
+
# @return [String] The payload of the IP Command sent to or from the Super SIM
|
370
|
+
def payload
|
371
|
+
@properties['payload']
|
372
|
+
end
|
373
|
+
|
326
374
|
##
|
327
375
|
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
328
376
|
def date_created
|
@@ -336,14 +384,14 @@ module Twilio
|
|
336
384
|
end
|
337
385
|
|
338
386
|
##
|
339
|
-
# @return [String] The absolute URL of the Command resource
|
387
|
+
# @return [String] The absolute URL of the IP Command resource
|
340
388
|
def url
|
341
389
|
@properties['url']
|
342
390
|
end
|
343
391
|
|
344
392
|
##
|
345
|
-
# Fetch the
|
346
|
-
# @return [
|
393
|
+
# Fetch the IpCommandInstance
|
394
|
+
# @return [IpCommandInstance] Fetched IpCommandInstance
|
347
395
|
def fetch
|
348
396
|
context.fetch
|
349
397
|
end
|
@@ -352,14 +400,14 @@ module Twilio
|
|
352
400
|
# Provide a user friendly representation
|
353
401
|
def to_s
|
354
402
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
355
|
-
"<Twilio.Supersim.V1.
|
403
|
+
"<Twilio.Supersim.V1.IpCommandInstance #{values}>"
|
356
404
|
end
|
357
405
|
|
358
406
|
##
|
359
407
|
# Provide a detailed, user friendly representation
|
360
408
|
def inspect
|
361
409
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
362
|
-
"<Twilio.Supersim.V1.
|
410
|
+
"<Twilio.Supersim.V1.IpCommandInstance #{values}>"
|
363
411
|
end
|
364
412
|
end
|
365
413
|
end
|