twilio-ruby 5.72.0 → 5.77.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.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +234 -0
  5. data/CONTRIBUTING.md +1 -7
  6. data/LICENSE +1 -1
  7. data/README.md +132 -45
  8. data/advanced-examples/custom-http-client.md +170 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  26. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
  28. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +6 -6
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
  33. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  34. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  43. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  44. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  45. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  47. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  48. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  49. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  51. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  52. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  53. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  54. data/lib/twilio-ruby/rest/client.rb +14 -0
  55. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  56. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  57. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +240 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +59 -0
  60. data/lib/twilio-ruby/rest/content.rb +59 -0
  61. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
  62. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
  63. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +43 -5
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  65. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  66. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +43 -5
  67. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  68. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  69. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  70. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  75. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  77. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  78. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  79. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  80. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  81. data/lib/twilio-ruby/rest/flex_api/v1.rb +122 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  83. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  84. data/lib/twilio-ruby/rest/flex_api.rb +89 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +16 -3
  87. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  88. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  89. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  90. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  91. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  93. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  94. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  95. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  97. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +88 -6
  98. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  99. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
  100. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
  101. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +134 -0
  102. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +26 -3
  103. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +242 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
  107. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
  108. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
  109. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +165 -1
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +75 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +36 -0
  112. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
  113. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
  114. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
  115. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +25 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +335 -0
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +61 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +16 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -0
  123. data/lib/twilio-ruby/rest/numbers/v1.rb +35 -0
  124. data/lib/twilio-ruby/rest/numbers.rb +13 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  127. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  128. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  129. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  130. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  131. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  132. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  134. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  135. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  136. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  137. data/lib/twilio-ruby/rest/preview.rb +0 -33
  138. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  139. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  140. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  141. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  142. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  143. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  144. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  146. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  148. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  149. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  150. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  151. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  152. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  153. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  154. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  155. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  156. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  157. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  158. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  170. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  171. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  172. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  173. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  174. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  175. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  176. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  177. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  178. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +12 -6
  179. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
  181. data/lib/twilio-ruby/rest/verify/v2/template.rb +10 -3
  182. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  183. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  184. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  185. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  186. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  187. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  188. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  189. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  190. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  191. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  192. data/lib/twilio-ruby/twiml/voice_response.rb +132 -33
  193. data/lib/twilio-ruby/version.rb +1 -1
  194. data/twilio-ruby.gemspec +1 -1
  195. metadata +48 -12
  196. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  197. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  198. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  199. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,192 @@
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 Microvisor < Domain
12
+ class V1 < Version
13
+ class AppContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ class AppManifestList < ListResource
17
+ ##
18
+ # Initialize the AppManifestList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
21
+ # @return [AppManifestList] AppManifestList
22
+ def initialize(version, app_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {app_sid: app_sid}
27
+ end
28
+
29
+ ##
30
+ # Provide a user friendly representation
31
+ def to_s
32
+ '#<Twilio.Microvisor.V1.AppManifestList>'
33
+ end
34
+ end
35
+
36
+ ##
37
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
38
+ class AppManifestPage < Page
39
+ ##
40
+ # Initialize the AppManifestPage
41
+ # @param [Version] version Version that contains the resource
42
+ # @param [Response] response Response from the API
43
+ # @param [Hash] solution Path solution for the resource
44
+ # @return [AppManifestPage] AppManifestPage
45
+ def initialize(version, response, solution)
46
+ super(version, response)
47
+
48
+ # Path Solution
49
+ @solution = solution
50
+ end
51
+
52
+ ##
53
+ # Build an instance of AppManifestInstance
54
+ # @param [Hash] payload Payload response from the API
55
+ # @return [AppManifestInstance] AppManifestInstance
56
+ def get_instance(payload)
57
+ AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Microvisor.V1.AppManifestPage>'
64
+ end
65
+ end
66
+
67
+ ##
68
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
69
+ class AppManifestContext < InstanceContext
70
+ ##
71
+ # Initialize the AppManifestContext
72
+ # @param [Version] version Version that contains the resource
73
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
74
+ # @return [AppManifestContext] AppManifestContext
75
+ def initialize(version, app_sid)
76
+ super(version)
77
+
78
+ # Path Solution
79
+ @solution = {app_sid: app_sid, }
80
+ @uri = "/Apps/#{@solution[:app_sid]}/Manifest"
81
+ end
82
+
83
+ ##
84
+ # Fetch the AppManifestInstance
85
+ # @return [AppManifestInstance] Fetched AppManifestInstance
86
+ def fetch
87
+ payload = @version.fetch('GET', @uri)
88
+
89
+ AppManifestInstance.new(@version, payload, app_sid: @solution[:app_sid], )
90
+ end
91
+
92
+ ##
93
+ # Provide a user friendly representation
94
+ def to_s
95
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
96
+ "#<Twilio.Microvisor.V1.AppManifestContext #{context}>"
97
+ end
98
+
99
+ ##
100
+ # Provide a detailed, user friendly representation
101
+ def inspect
102
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
103
+ "#<Twilio.Microvisor.V1.AppManifestContext #{context}>"
104
+ end
105
+ end
106
+
107
+ ##
108
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
109
+ class AppManifestInstance < InstanceResource
110
+ ##
111
+ # Initialize the AppManifestInstance
112
+ # @param [Version] version Version that contains the resource
113
+ # @param [Hash] payload payload that contains response from Twilio
114
+ # @param [String] app_sid A 34-character string that uniquely identifies this App.
115
+ # @return [AppManifestInstance] AppManifestInstance
116
+ def initialize(version, payload, app_sid: nil)
117
+ super(version)
118
+
119
+ # Marshaled Properties
120
+ @properties = {
121
+ 'app_sid' => payload['app_sid'],
122
+ 'hash' => payload['hash'],
123
+ 'encoded_bytes' => payload['encoded_bytes'],
124
+ 'url' => payload['url'],
125
+ }
126
+
127
+ # Context
128
+ @instance_context = nil
129
+ @params = {'app_sid' => app_sid, }
130
+ end
131
+
132
+ ##
133
+ # Generate an instance context for the instance, the context is capable of
134
+ # performing various actions. All instance actions are proxied to the context
135
+ # @return [AppManifestContext] AppManifestContext for this AppManifestInstance
136
+ def context
137
+ unless @instance_context
138
+ @instance_context = AppManifestContext.new(@version, @params['app_sid'], )
139
+ end
140
+ @instance_context
141
+ end
142
+
143
+ ##
144
+ # @return [String] A string that uniquely identifies this App.
145
+ def app_sid
146
+ @properties['app_sid']
147
+ end
148
+
149
+ ##
150
+ # @return [String] App manifest hash represented as hash_algorithm:hash_value.
151
+ def hash
152
+ @properties['hash']
153
+ end
154
+
155
+ ##
156
+ # @return [String] The base-64 encoded manifest
157
+ def encoded_bytes
158
+ @properties['encoded_bytes']
159
+ end
160
+
161
+ ##
162
+ # @return [String] The absolute URL of this Manifest.
163
+ def url
164
+ @properties['url']
165
+ end
166
+
167
+ ##
168
+ # Fetch the AppManifestInstance
169
+ # @return [AppManifestInstance] Fetched AppManifestInstance
170
+ def fetch
171
+ context.fetch
172
+ end
173
+
174
+ ##
175
+ # Provide a user friendly representation
176
+ def to_s
177
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
178
+ "<Twilio.Microvisor.V1.AppManifestInstance #{values}>"
179
+ end
180
+
181
+ ##
182
+ # Provide a detailed, user friendly representation
183
+ def inspect
184
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
185
+ "<Twilio.Microvisor.V1.AppManifestInstance #{values}>"
186
+ end
187
+ end
188
+ end
189
+ end
190
+ end
191
+ end
192
+ end
@@ -157,6 +157,9 @@ module Twilio
157
157
  # Path Solution
158
158
  @solution = {sid: sid, }
159
159
  @uri = "/Apps/#{@solution[:sid]}"
160
+
161
+ # Dependents
162
+ @app_manifests = nil
160
163
  end
161
164
 
162
165
  ##
@@ -175,6 +178,14 @@ module Twilio
175
178
  @version.delete('DELETE', @uri)
176
179
  end
177
180
 
181
+ ##
182
+ # Access the app_manifests
183
+ # @return [AppManifestList]
184
+ # @return [AppManifestContext]
185
+ def app_manifests
186
+ AppManifestContext.new(@version, @solution[:sid], )
187
+ end
188
+
178
189
  ##
179
190
  # Provide a user friendly representation
180
191
  def to_s
@@ -211,6 +222,7 @@ module Twilio
211
222
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
212
223
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
213
224
  'url' => payload['url'],
225
+ 'links' => payload['links'],
214
226
  }
215
227
 
216
228
  # Context
@@ -271,6 +283,12 @@ module Twilio
271
283
  @properties['url']
272
284
  end
273
285
 
286
+ ##
287
+ # @return [String] The links
288
+ def links
289
+ @properties['links']
290
+ end
291
+
274
292
  ##
275
293
  # Fetch the AppInstance
276
294
  # @return [AppInstance] Fetched AppInstance
@@ -285,6 +303,13 @@ module Twilio
285
303
  context.delete
286
304
  end
287
305
 
306
+ ##
307
+ # Access the app_manifests
308
+ # @return [app_manifests] app_manifests
309
+ def app_manifests
310
+ context.app_manifests
311
+ end
312
+
288
313
  ##
289
314
  # Provide a user friendly representation
290
315
  def to_s
@@ -0,0 +1,342 @@
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 Microvisor < Domain
12
+ class V1 < Version
13
+ class DeviceContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
16
+ class DeviceConfigList < ListResource
17
+ ##
18
+ # Initialize the DeviceConfigList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] device_sid A 34-character string that uniquely identifies the
21
+ # parent Device.
22
+ # @return [DeviceConfigList] DeviceConfigList
23
+ def initialize(version, device_sid: nil)
24
+ super(version)
25
+
26
+ # Path Solution
27
+ @solution = {device_sid: device_sid}
28
+ @uri = "/Devices/#{@solution[:device_sid]}/Configs"
29
+ end
30
+
31
+ ##
32
+ # Lists DeviceConfigInstance records from the API as a list.
33
+ # Unlike stream(), this operation is eager and will load `limit` records into
34
+ # memory before returning.
35
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
36
+ # guarantees to never return more than limit. Default is no limit
37
+ # @param [Integer] page_size Number of records to fetch per request, when
38
+ # not set will use the default value of 50 records. If no page_size is defined
39
+ # but a limit is defined, stream() will attempt to read the limit with the most
40
+ # efficient page size, i.e. min(limit, 1000)
41
+ # @return [Array] Array of up to limit results
42
+ def list(limit: nil, page_size: nil)
43
+ self.stream(limit: limit, page_size: page_size).entries
44
+ end
45
+
46
+ ##
47
+ # Streams DeviceConfigInstance records from the API as an Enumerable.
48
+ # This operation lazily loads records as efficiently as possible until the limit
49
+ # is reached.
50
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
51
+ # guarantees to never return more than limit. Default is no limit.
52
+ # @param [Integer] page_size Number of records to fetch per request, when
53
+ # not set will use the default value of 50 records. If no page_size is defined
54
+ # but a limit is defined, stream() will attempt to read the limit with the most
55
+ # efficient page size, i.e. min(limit, 1000)
56
+ # @return [Enumerable] Enumerable that will yield up to limit results
57
+ def stream(limit: nil, page_size: nil)
58
+ limits = @version.read_limits(limit, page_size)
59
+
60
+ page = self.page(page_size: limits[:page_size], )
61
+
62
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
63
+ end
64
+
65
+ ##
66
+ # When passed a block, yields DeviceConfigInstance records from the API.
67
+ # This operation lazily loads records as efficiently as possible until the limit
68
+ # is reached.
69
+ def each
70
+ limits = @version.read_limits
71
+
72
+ page = self.page(page_size: limits[:page_size], )
73
+
74
+ @version.stream(page,
75
+ limit: limits[:limit],
76
+ page_limit: limits[:page_limit]).each {|x| yield x}
77
+ end
78
+
79
+ ##
80
+ # Retrieve a single page of DeviceConfigInstance records from the API.
81
+ # Request is executed immediately.
82
+ # @param [String] page_token PageToken provided by the API
83
+ # @param [Integer] page_number Page Number, this value is simply for client state
84
+ # @param [Integer] page_size Number of records to return, defaults to 50
85
+ # @return [Page] Page of DeviceConfigInstance
86
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
87
+ params = Twilio::Values.of({
88
+ 'PageToken' => page_token,
89
+ 'Page' => page_number,
90
+ 'PageSize' => page_size,
91
+ })
92
+
93
+ response = @version.page('GET', @uri, params: params)
94
+
95
+ DeviceConfigPage.new(@version, response, @solution)
96
+ end
97
+
98
+ ##
99
+ # Retrieve a single page of DeviceConfigInstance records from the API.
100
+ # Request is executed immediately.
101
+ # @param [String] target_url API-generated URL for the requested results page
102
+ # @return [Page] Page of DeviceConfigInstance
103
+ def get_page(target_url)
104
+ response = @version.domain.request(
105
+ 'GET',
106
+ target_url
107
+ )
108
+ DeviceConfigPage.new(@version, response, @solution)
109
+ end
110
+
111
+ ##
112
+ # Create the DeviceConfigInstance
113
+ # @param [String] key The config key; up to 100 characters.
114
+ # @param [String] value The config value; up to 4096 characters.
115
+ # @return [DeviceConfigInstance] Created DeviceConfigInstance
116
+ def create(key: nil, value: nil)
117
+ data = Twilio::Values.of({'Key' => key, 'Value' => value, })
118
+
119
+ payload = @version.create('POST', @uri, data: data)
120
+
121
+ DeviceConfigInstance.new(@version, payload, device_sid: @solution[:device_sid], )
122
+ end
123
+
124
+ ##
125
+ # Provide a user friendly representation
126
+ def to_s
127
+ '#<Twilio.Microvisor.V1.DeviceConfigList>'
128
+ end
129
+ end
130
+
131
+ ##
132
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
133
+ class DeviceConfigPage < Page
134
+ ##
135
+ # Initialize the DeviceConfigPage
136
+ # @param [Version] version Version that contains the resource
137
+ # @param [Response] response Response from the API
138
+ # @param [Hash] solution Path solution for the resource
139
+ # @return [DeviceConfigPage] DeviceConfigPage
140
+ def initialize(version, response, solution)
141
+ super(version, response)
142
+
143
+ # Path Solution
144
+ @solution = solution
145
+ end
146
+
147
+ ##
148
+ # Build an instance of DeviceConfigInstance
149
+ # @param [Hash] payload Payload response from the API
150
+ # @return [DeviceConfigInstance] DeviceConfigInstance
151
+ def get_instance(payload)
152
+ DeviceConfigInstance.new(@version, payload, device_sid: @solution[:device_sid], )
153
+ end
154
+
155
+ ##
156
+ # Provide a user friendly representation
157
+ def to_s
158
+ '<Twilio.Microvisor.V1.DeviceConfigPage>'
159
+ end
160
+ end
161
+
162
+ ##
163
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
164
+ class DeviceConfigContext < InstanceContext
165
+ ##
166
+ # Initialize the DeviceConfigContext
167
+ # @param [Version] version Version that contains the resource
168
+ # @param [String] device_sid A 34-character string that uniquely identifies the
169
+ # Device.
170
+ # @param [String] key The config key; up to 100 characters.
171
+ # @return [DeviceConfigContext] DeviceConfigContext
172
+ def initialize(version, device_sid, key)
173
+ super(version)
174
+
175
+ # Path Solution
176
+ @solution = {device_sid: device_sid, key: key, }
177
+ @uri = "/Devices/#{@solution[:device_sid]}/Configs/#{@solution[:key]}"
178
+ end
179
+
180
+ ##
181
+ # Fetch the DeviceConfigInstance
182
+ # @return [DeviceConfigInstance] Fetched DeviceConfigInstance
183
+ def fetch
184
+ payload = @version.fetch('GET', @uri)
185
+
186
+ DeviceConfigInstance.new(
187
+ @version,
188
+ payload,
189
+ device_sid: @solution[:device_sid],
190
+ key: @solution[:key],
191
+ )
192
+ end
193
+
194
+ ##
195
+ # Update the DeviceConfigInstance
196
+ # @param [String] value The config value; up to 4096 characters.
197
+ # @return [DeviceConfigInstance] Updated DeviceConfigInstance
198
+ def update(value: nil)
199
+ data = Twilio::Values.of({'Value' => value, })
200
+
201
+ payload = @version.update('POST', @uri, data: data)
202
+
203
+ DeviceConfigInstance.new(
204
+ @version,
205
+ payload,
206
+ device_sid: @solution[:device_sid],
207
+ key: @solution[:key],
208
+ )
209
+ end
210
+
211
+ ##
212
+ # Delete the DeviceConfigInstance
213
+ # @return [Boolean] true if delete succeeds, false otherwise
214
+ def delete
215
+ @version.delete('DELETE', @uri)
216
+ end
217
+
218
+ ##
219
+ # Provide a user friendly representation
220
+ def to_s
221
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
222
+ "#<Twilio.Microvisor.V1.DeviceConfigContext #{context}>"
223
+ end
224
+
225
+ ##
226
+ # Provide a detailed, user friendly representation
227
+ def inspect
228
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
229
+ "#<Twilio.Microvisor.V1.DeviceConfigContext #{context}>"
230
+ end
231
+ end
232
+
233
+ ##
234
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
235
+ class DeviceConfigInstance < InstanceResource
236
+ ##
237
+ # Initialize the DeviceConfigInstance
238
+ # @param [Version] version Version that contains the resource
239
+ # @param [Hash] payload payload that contains response from Twilio
240
+ # @param [String] device_sid A 34-character string that uniquely identifies the
241
+ # parent Device.
242
+ # @param [String] key The config key; up to 100 characters.
243
+ # @return [DeviceConfigInstance] DeviceConfigInstance
244
+ def initialize(version, payload, device_sid: nil, key: nil)
245
+ super(version)
246
+
247
+ # Marshaled Properties
248
+ @properties = {
249
+ 'device_sid' => payload['device_sid'],
250
+ 'key' => payload['key'],
251
+ 'value' => payload['value'],
252
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
253
+ 'url' => payload['url'],
254
+ }
255
+
256
+ # Context
257
+ @instance_context = nil
258
+ @params = {'device_sid' => device_sid, 'key' => key || @properties['key'], }
259
+ end
260
+
261
+ ##
262
+ # Generate an instance context for the instance, the context is capable of
263
+ # performing various actions. All instance actions are proxied to the context
264
+ # @return [DeviceConfigContext] DeviceConfigContext for this DeviceConfigInstance
265
+ def context
266
+ unless @instance_context
267
+ @instance_context = DeviceConfigContext.new(@version, @params['device_sid'], @params['key'], )
268
+ end
269
+ @instance_context
270
+ end
271
+
272
+ ##
273
+ # @return [String] A string that uniquely identifies the parent Device.
274
+ def device_sid
275
+ @properties['device_sid']
276
+ end
277
+
278
+ ##
279
+ # @return [String] The config key.
280
+ def key
281
+ @properties['key']
282
+ end
283
+
284
+ ##
285
+ # @return [String] The config value.
286
+ def value
287
+ @properties['value']
288
+ end
289
+
290
+ ##
291
+ # @return [Time] The date_updated
292
+ def date_updated
293
+ @properties['date_updated']
294
+ end
295
+
296
+ ##
297
+ # @return [String] The absolute URL of the Config.
298
+ def url
299
+ @properties['url']
300
+ end
301
+
302
+ ##
303
+ # Fetch the DeviceConfigInstance
304
+ # @return [DeviceConfigInstance] Fetched DeviceConfigInstance
305
+ def fetch
306
+ context.fetch
307
+ end
308
+
309
+ ##
310
+ # Update the DeviceConfigInstance
311
+ # @param [String] value The config value; up to 4096 characters.
312
+ # @return [DeviceConfigInstance] Updated DeviceConfigInstance
313
+ def update(value: nil)
314
+ context.update(value: value, )
315
+ end
316
+
317
+ ##
318
+ # Delete the DeviceConfigInstance
319
+ # @return [Boolean] true if delete succeeds, false otherwise
320
+ def delete
321
+ context.delete
322
+ end
323
+
324
+ ##
325
+ # Provide a user friendly representation
326
+ def to_s
327
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
328
+ "<Twilio.Microvisor.V1.DeviceConfigInstance #{values}>"
329
+ end
330
+
331
+ ##
332
+ # Provide a detailed, user friendly representation
333
+ def inspect
334
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
335
+ "<Twilio.Microvisor.V1.DeviceConfigInstance #{values}>"
336
+ end
337
+ end
338
+ end
339
+ end
340
+ end
341
+ end
342
+ end