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.
Files changed (163) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/.github/workflows/test-and-deploy.yml +129 -0
  4. data/.gitignore +5 -1
  5. data/.rubocop.yml +1 -1
  6. data/.rubocop_todo.yml +91 -28
  7. data/CHANGES.md +563 -0
  8. data/Gemfile +1 -0
  9. data/Makefile +8 -11
  10. data/README.md +13 -6
  11. data/examples/examples.rb +1 -1
  12. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  13. data/lib/twilio-ruby/http/http_client.rb +20 -4
  14. data/lib/twilio-ruby/http.rb +5 -0
  15. data/lib/twilio-ruby/jwt/access_token.rb +13 -0
  16. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +23 -23
  17. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +8 -8
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +674 -0
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  21. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +68 -14
  22. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +12 -8
  23. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  24. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +11 -4
  25. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +11 -4
  26. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +11 -4
  27. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +17 -10
  28. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +18 -5
  29. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +34 -7
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -11
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -11
  32. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +0 -8
  33. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +0 -6
  34. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -8
  35. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -8
  36. data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -8
  37. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  38. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  39. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  40. data/lib/twilio-ruby/rest/chat.rb +16 -0
  41. data/lib/twilio-ruby/rest/client.rb +21 -12
  42. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +454 -0
  43. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +12 -5
  44. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +7 -0
  45. data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +312 -0
  46. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +18 -2
  47. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
  48. data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
  49. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +12 -5
  50. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +7 -0
  51. data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +324 -0
  52. data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +466 -0
  53. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +44 -0
  54. data/lib/twilio-ruby/rest/conversations/v1/service.rb +23 -0
  55. data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +442 -0
  56. data/lib/twilio-ruby/rest/conversations/v1/user.rb +35 -0
  57. data/lib/twilio-ruby/rest/conversations/v1.rb +24 -0
  58. data/lib/twilio-ruby/rest/conversations.rb +15 -0
  59. data/lib/twilio-ruby/rest/events/v1/event_type.rb +12 -5
  60. data/lib/twilio-ruby/rest/events/v1/sink.rb +41 -5
  61. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +28 -0
  62. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +55 -34
  63. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  64. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  65. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +384 -0
  66. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  67. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  68. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  69. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +258 -0
  70. data/lib/twilio-ruby/rest/{fax → frontline_api}/v1.rb +11 -11
  71. data/lib/twilio-ruby/rest/{fax.rb → frontline_api.rb} +11 -11
  72. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  73. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +434 -0
  74. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  75. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  76. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  77. data/lib/twilio-ruby/rest/insights/v1.rb +46 -0
  78. data/lib/twilio-ruby/rest/insights.rb +28 -0
  79. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +268 -0
  80. data/lib/twilio-ruby/rest/lookups/v2.rb +45 -0
  81. data/lib/twilio-ruby/rest/lookups.rb +7 -0
  82. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +397 -0
  83. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
  84. data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
  85. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +403 -0
  86. data/lib/twilio-ruby/rest/media/v1.rb +76 -0
  87. data/lib/twilio-ruby/rest/media.rb +65 -0
  88. data/lib/twilio-ruby/rest/{fax/v1/fax/fax_media.rb → messaging/v1/brand_registration/brand_vetting.rb} +134 -95
  89. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +127 -2
  90. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +7 -0
  91. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +187 -20
  92. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +6 -2
  93. data/lib/twilio-ruby/rest/messaging/v1/service.rb +37 -5
  94. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +268 -0
  95. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +188 -0
  96. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +128 -26
  97. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  98. data/lib/twilio-ruby/rest/pricing/v2/country.rb +280 -0
  99. data/lib/twilio-ruby/rest/pricing/v2/number.rb +225 -0
  100. data/lib/twilio-ruby/rest/pricing/v2.rb +37 -0
  101. data/lib/twilio-ruby/rest/pricing.rb +19 -0
  102. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
  103. data/lib/twilio-ruby/rest/serverless/v1/service.rb +7 -0
  104. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
  105. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
  106. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  107. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +44 -55
  108. data/lib/twilio-ruby/rest/supersim/v1/{command.rb → ip_command.rb} +132 -84
  109. data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +231 -0
  110. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +30 -1
  111. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  112. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +23 -9
  113. data/lib/twilio-ruby/rest/supersim/v1.rb +23 -7
  114. data/lib/twilio-ruby/rest/supersim.rb +15 -6
  115. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +7 -0
  116. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +7 -3
  117. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  118. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +7 -3
  119. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +23 -11
  120. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  121. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  122. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -22
  123. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -3
  124. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +155 -10
  125. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +12 -9
  126. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +74 -22
  127. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +34 -15
  128. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +66 -31
  129. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +7 -3
  130. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +25 -7
  131. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +24 -5
  132. data/lib/twilio-ruby/rest/verify/v2/service.rb +40 -11
  133. data/lib/twilio-ruby/rest/verify/v2/template.rb +206 -0
  134. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  135. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  136. data/lib/twilio-ruby/rest/verify/v2.rb +14 -0
  137. data/lib/twilio-ruby/rest/verify.rb +14 -2
  138. data/lib/twilio-ruby/rest/video/v1/composition.rb +21 -8
  139. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +0 -8
  140. data/lib/twilio-ruby/rest/video/v1/recording.rb +21 -0
  141. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  142. data/lib/twilio-ruby/rest/video/v1/room.rb +62 -5
  143. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  144. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  145. data/lib/twilio-ruby/rest/voice.rb +8 -0
  146. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  147. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
  148. data/lib/twilio-ruby/rest.rb +13 -0
  149. data/lib/twilio-ruby/twiml/voice_response.rb +727 -87
  150. data/lib/twilio-ruby/version.rb +1 -1
  151. data/lib/twilio-ruby.rb +6 -16
  152. data/sonar-project.properties +13 -0
  153. data/twilio-ruby.gemspec +1 -2
  154. metadata +59 -32
  155. data/.travis.yml +0 -45
  156. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -536
  157. /data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +0 -0
  158. /data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +0 -0
  159. /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
  160. /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
  161. /data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +0 -0
  162. /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
  163. /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 CommandList < ListResource
15
+ class IpCommandList < ListResource
16
16
  ##
17
- # Initialize the CommandList
17
+ # Initialize the IpCommandList
18
18
  # @param [Version] version Version that contains the resource
19
- # @return [CommandList] CommandList
19
+ # @return [IpCommandList] IpCommandList
20
20
  def initialize(version)
21
21
  super(version)
22
22
 
23
23
  # Path Solution
24
24
  @solution = {}
25
- @uri = "/Commands"
25
+ @uri = "/IpCommands"
26
26
  end
27
27
 
28
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.
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 command.
38
- # @return [CommandInstance] Created CommandInstance
39
- def create(sim: nil, command: nil, callback_method: :unset, callback_url: :unset)
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
- 'Command' => command,
43
- 'CallbackMethod' => callback_method,
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
- CommandInstance.new(@version, payload, )
55
+ IpCommandInstance.new(@version, payload, )
50
56
  end
51
57
 
52
58
  ##
53
- # Lists CommandInstance records from the API as a list.
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 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]
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 [command.Direction] direction The direction of the Command. Can be
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 CommandInstance records from the API as an Enumerable.
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 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]
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 [command.Direction] direction The direction of the Command. Can be
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(sim: sim, status: status, direction: direction, page_size: limits[:page_size], )
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 CommandInstance records from the API.
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 CommandInstance records from the API.
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 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]
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 [command.Direction] direction The direction of the Command. Can be
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 CommandInstance
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
- CommandPage.new(@version, response, @solution)
175
+ IpCommandPage.new(@version, response, @solution)
156
176
  end
157
177
 
158
178
  ##
159
- # Retrieve a single page of CommandInstance records from the API.
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 CommandInstance
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
- CommandPage.new(@version, response, @solution)
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.CommandList>'
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 CommandPage < Page
200
+ class IpCommandPage < Page
181
201
  ##
182
- # Initialize the CommandPage
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 [CommandPage] CommandPage
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 CommandInstance
215
+ # Build an instance of IpCommandInstance
196
216
  # @param [Hash] payload Payload response from the API
197
- # @return [CommandInstance] CommandInstance
217
+ # @return [IpCommandInstance] IpCommandInstance
198
218
  def get_instance(payload)
199
- CommandInstance.new(@version, payload, )
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.CommandPage>'
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 CommandContext < InstanceContext
231
+ class IpCommandContext < InstanceContext
212
232
  ##
213
- # Initialize the CommandContext
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 [CommandContext] CommandContext
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 = "/Commands/#{@solution[:sid]}"
242
+ @uri = "/IpCommands/#{@solution[:sid]}"
223
243
  end
224
244
 
225
245
  ##
226
- # Fetch the CommandInstance
227
- # @return [CommandInstance] Fetched CommandInstance
246
+ # Fetch the IpCommandInstance
247
+ # @return [IpCommandInstance] Fetched IpCommandInstance
228
248
  def fetch
229
249
  payload = @version.fetch('GET', @uri)
230
250
 
231
- CommandInstance.new(@version, payload, sid: @solution[:sid], )
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.CommandContext #{context}>"
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.CommandContext #{context}>"
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 CommandInstance < InstanceResource
271
+ class IpCommandInstance < InstanceResource
252
272
  ##
253
- # Initialize the CommandInstance
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 [CommandInstance] CommandInstance
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
- 'command' => payload['command'],
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 [CommandContext] CommandContext for this CommandInstance
306
+ # @return [IpCommandContext] IpCommandContext for this IpCommandInstance
283
307
  def context
284
308
  unless @instance_context
285
- @instance_context = CommandContext.new(@version, @params['sid'], )
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 message body of the command sent to or from the SIM
310
- def command
311
- @properties['command']
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 [command.Status] The status of the Command
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 [command.Direction] The direction of the Command
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 CommandInstance
346
- # @return [CommandInstance] Fetched CommandInstance
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.CommandInstance #{values}>"
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.CommandInstance #{values}>"
410
+ "<Twilio.Supersim.V1.IpCommandInstance #{values}>"
363
411
  end
364
412
  end
365
413
  end