twilio-ruby 5.4.4 → 5.4.5

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 (371) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +12 -0
  3. data/README.md +16 -2
  4. data/lib/twilio-ruby/rest/accounts/v1.rb +3 -9
  5. data/lib/twilio-ruby/rest/accounts/v1/credential.rb +19 -3
  6. data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +338 -0
  7. data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +11 -11
  8. data/lib/twilio-ruby/rest/api/v2010.rb +1 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account.rb +51 -51
  10. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +8 -8
  11. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +9 -9
  13. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +4 -4
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +4 -4
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +1 -1
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +1 -1
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +1 -1
  18. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +13 -13
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +3 -3
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +3 -3
  23. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +10 -10
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +3 -3
  25. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +8 -8
  26. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +10 -10
  27. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +4 -4
  28. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +3 -3
  30. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +3 -3
  31. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +3 -3
  32. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +10 -10
  33. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +12 -12
  34. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +2 -2
  36. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +3 -3
  37. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +3 -3
  38. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +6 -6
  39. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +7 -7
  40. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +14 -14
  41. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +5 -5
  42. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -8
  43. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +3 -3
  44. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +2 -2
  45. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +3 -3
  46. data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +8 -8
  47. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +10 -10
  48. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +7 -7
  49. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +11 -11
  50. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +6 -6
  51. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +11 -11
  52. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
  53. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
  54. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +11 -11
  55. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
  56. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +3 -3
  57. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +6 -6
  58. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +4 -4
  59. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +10 -10
  60. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +2 -2
  61. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +2 -2
  62. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +2 -2
  63. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +2 -2
  64. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +2 -2
  65. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +2 -2
  66. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +2 -2
  67. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +2 -2
  68. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +8 -8
  69. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -2
  70. data/lib/twilio-ruby/rest/chat/v1.rb +2 -2
  71. data/lib/twilio-ruby/rest/chat/v1/credential.rb +9 -9
  72. data/lib/twilio-ruby/rest/chat/v1/service.rb +16 -16
  73. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +13 -13
  74. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +4 -4
  75. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +5 -5
  76. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +6 -6
  77. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +11 -11
  78. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +10 -10
  79. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +2 -2
  80. data/lib/twilio-ruby/rest/chat/v2.rb +2 -2
  81. data/lib/twilio-ruby/rest/chat/v2/credential.rb +9 -9
  82. data/lib/twilio-ruby/rest/chat/v2/service.rb +18 -18
  83. data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
  84. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +12 -12
  85. data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +4 -4
  86. data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
  87. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +3 -3
  88. data/lib/twilio-ruby/rest/chat/v2/service/role.rb +11 -11
  89. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +11 -11
  90. data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +4 -4
  91. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +2 -2
  92. data/lib/twilio-ruby/rest/fax/v1.rb +1 -1
  93. data/lib/twilio-ruby/rest/fax/v1/fax.rb +12 -12
  94. data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +7 -7
  95. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +2 -2
  96. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +9 -9
  97. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +16 -16
  98. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +13 -13
  99. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +4 -4
  100. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +5 -5
  101. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +6 -6
  102. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +11 -11
  103. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +10 -10
  104. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +2 -2
  105. data/lib/twilio-ruby/rest/ip_messaging/v2.rb +2 -2
  106. data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +9 -9
  107. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +18 -18
  108. data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
  109. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +12 -12
  110. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +4 -4
  111. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
  112. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +3 -3
  113. data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +11 -11
  114. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +11 -11
  115. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
  116. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +2 -2
  117. data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
  118. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +6 -6
  119. data/lib/twilio-ruby/rest/messaging/v1.rb +1 -1
  120. data/lib/twilio-ruby/rest/messaging/v1/service.rb +15 -15
  121. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +9 -9
  122. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +9 -9
  123. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +9 -9
  124. data/lib/twilio-ruby/rest/monitor/v1.rb +2 -2
  125. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +6 -6
  126. data/lib/twilio-ruby/rest/monitor/v1/event.rb +6 -6
  127. data/lib/twilio-ruby/rest/notify/v1.rb +2 -2
  128. data/lib/twilio-ruby/rest/notify/v1/credential.rb +9 -9
  129. data/lib/twilio-ruby/rest/notify/v1/service.rb +15 -15
  130. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +7 -7
  131. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +2 -2
  132. data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +3 -3
  133. data/lib/twilio-ruby/rest/notify/v1/service/user.rb +9 -9
  134. data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +2 -2
  135. data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +4 -4
  136. data/lib/twilio-ruby/rest/preview.rb +15 -0
  137. data/lib/twilio-ruby/rest/preview/acc_security.rb +1 -1
  138. data/lib/twilio-ruby/rest/preview/acc_security/service.rb +14 -14
  139. data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +3 -3
  140. data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +3 -3
  141. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +2 -2
  142. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +6 -6
  143. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +3 -3
  144. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +7 -7
  145. data/lib/twilio-ruby/rest/preview/deployed_devices.rb +1 -1
  146. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +19 -19
  147. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +11 -11
  148. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +12 -12
  149. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +9 -9
  150. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +12 -12
  151. data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +2 -2
  152. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +9 -9
  153. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +9 -11
  154. data/lib/twilio-ruby/rest/preview/marketplace.rb +2 -2
  155. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +9 -9
  156. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +4 -4
  157. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +12 -12
  158. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +6 -6
  159. data/lib/twilio-ruby/rest/preview/proxy.rb +1 -1
  160. data/lib/twilio-ruby/rest/preview/proxy/service.rb +16 -16
  161. data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +9 -9
  162. data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +12 -12
  163. data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +2 -2
  164. data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +2 -2
  165. data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +3 -3
  166. data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +9 -9
  167. data/lib/twilio-ruby/rest/preview/studio.rb +41 -0
  168. data/lib/twilio-ruby/rest/preview/studio/flow.rb +353 -0
  169. data/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb +384 -0
  170. data/lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb +348 -0
  171. data/lib/twilio-ruby/rest/preview/sync.rb +1 -1
  172. data/lib/twilio-ruby/rest/preview/sync/service.rb +15 -15
  173. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +13 -13
  174. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +5 -5
  175. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +11 -11
  176. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +6 -6
  177. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +5 -5
  178. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +11 -11
  179. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +7 -7
  180. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +5 -5
  181. data/lib/twilio-ruby/rest/preview/understand.rb +1 -1
  182. data/lib/twilio-ruby/rest/preview/understand/service.rb +17 -17
  183. data/lib/twilio-ruby/rest/preview/understand/service/field_type.rb +13 -13
  184. data/lib/twilio-ruby/rest/preview/understand/service/field_type/field_value.rb +4 -4
  185. data/lib/twilio-ruby/rest/preview/understand/service/intent.rb +16 -16
  186. data/lib/twilio-ruby/rest/preview/understand/service/intent/field.rb +4 -4
  187. data/lib/twilio-ruby/rest/preview/understand/service/intent/sample.rb +6 -6
  188. data/lib/twilio-ruby/rest/preview/understand/service/model_build.rb +12 -12
  189. data/lib/twilio-ruby/rest/preview/understand/service/query.rb +10 -10
  190. data/lib/twilio-ruby/rest/preview/wireless.rb +3 -3
  191. data/lib/twilio-ruby/rest/preview/wireless/command.rb +7 -7
  192. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +11 -11
  193. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +8 -8
  194. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +7 -7
  195. data/lib/twilio-ruby/rest/pricing/v1.rb +9 -27
  196. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +4 -4
  197. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +7 -7
  198. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +4 -4
  199. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +7 -7
  200. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +6 -6
  201. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +7 -7
  202. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +5 -5
  203. data/lib/twilio-ruby/rest/proxy/v1.rb +1 -1
  204. data/lib/twilio-ruby/rest/proxy/v1/service.rb +87 -19
  205. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +11 -10
  206. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +35 -19
  207. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +2 -2
  208. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +11 -40
  209. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +3 -3
  210. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +10 -10
  211. data/lib/twilio-ruby/rest/sync/v1.rb +1 -1
  212. data/lib/twilio-ruby/rest/sync/v1/service.rb +17 -17
  213. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +13 -13
  214. data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +5 -5
  215. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +11 -11
  216. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +6 -6
  217. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +5 -5
  218. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +11 -11
  219. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +7 -7
  220. data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +5 -5
  221. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -9
  222. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +2 -2
  223. data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
  224. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +26 -26
  225. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +12 -12
  226. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -6
  227. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +9 -9
  228. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +3 -3
  229. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +6 -6
  230. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -10
  231. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +2 -2
  232. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +4 -4
  233. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +2 -2
  234. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +2 -2
  235. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +16 -16
  236. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +3 -3
  237. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +5 -5
  238. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +3 -3
  239. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  240. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +7 -7
  241. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +5 -5
  242. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +12 -12
  243. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +2 -2
  244. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +4 -4
  245. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +2 -2
  246. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +5 -5
  247. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +7 -7
  248. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +5 -5
  249. data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
  250. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +17 -17
  251. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +9 -9
  252. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -8
  253. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +9 -9
  254. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +9 -9
  255. data/lib/twilio-ruby/rest/video/v1.rb +2 -2
  256. data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
  257. data/lib/twilio-ruby/rest/video/v1/room.rb +14 -14
  258. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +6 -6
  259. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +10 -10
  260. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +3 -3
  261. data/lib/twilio-ruby/rest/wireless/v1.rb +3 -3
  262. data/lib/twilio-ruby/rest/wireless/v1/command.rb +8 -8
  263. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +11 -11
  264. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +9 -9
  265. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -3
  266. data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +3 -3
  267. data/lib/twilio-ruby/version.rb +1 -1
  268. data/spec/integration/accounts/v1/credential/aws_spec.rb +224 -0
  269. data/spec/integration/accounts/v1/credential/public_key_spec.rb +1 -1
  270. data/spec/integration/api/v2010/account/application_spec.rb +1 -1
  271. data/spec/integration/api/v2010/account/call/feedback_spec.rb +2 -2
  272. data/spec/integration/api/v2010/account/call_spec.rb +1 -1
  273. data/spec/integration/api/v2010/account/conference/participant_spec.rb +1 -1
  274. data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +1 -1
  275. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +1 -1
  276. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +1 -1
  277. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +1 -1
  278. data/spec/integration/api/v2010/account/message_spec.rb +2 -2
  279. data/spec/integration/api/v2010/account/queue/member_spec.rb +1 -1
  280. data/spec/integration/api/v2010/account/queue_spec.rb +1 -1
  281. data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +1 -1
  282. data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +2 -2
  283. data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +1 -1
  284. data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +1 -1
  285. data/spec/integration/api/v2010/account/sip/domain_spec.rb +1 -1
  286. data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +1 -1
  287. data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +2 -2
  288. data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
  289. data/spec/integration/chat/v1/credential_spec.rb +1 -1
  290. data/spec/integration/chat/v1/service/channel/invite_spec.rb +1 -1
  291. data/spec/integration/chat/v1/service/channel/member_spec.rb +1 -1
  292. data/spec/integration/chat/v1/service/channel/message_spec.rb +1 -1
  293. data/spec/integration/chat/v1/service/role_spec.rb +1 -1
  294. data/spec/integration/chat/v1/service/user_spec.rb +1 -1
  295. data/spec/integration/chat/v1/service_spec.rb +1 -1
  296. data/spec/integration/chat/v2/credential_spec.rb +1 -1
  297. data/spec/integration/chat/v2/service/channel/invite_spec.rb +1 -1
  298. data/spec/integration/chat/v2/service/channel/member_spec.rb +1 -1
  299. data/spec/integration/chat/v2/service/role_spec.rb +1 -1
  300. data/spec/integration/chat/v2/service/user_spec.rb +1 -1
  301. data/spec/integration/chat/v2/service_spec.rb +1 -1
  302. data/spec/integration/fax/v1/fax_spec.rb +1 -1
  303. data/spec/integration/ip_messaging/v1/credential_spec.rb +1 -1
  304. data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +1 -1
  305. data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +1 -1
  306. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +1 -1
  307. data/spec/integration/ip_messaging/v1/service/role_spec.rb +1 -1
  308. data/spec/integration/ip_messaging/v1/service/user_spec.rb +1 -1
  309. data/spec/integration/ip_messaging/v1/service_spec.rb +1 -1
  310. data/spec/integration/ip_messaging/v2/credential_spec.rb +1 -1
  311. data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +1 -1
  312. data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +1 -1
  313. data/spec/integration/ip_messaging/v2/service/role_spec.rb +1 -1
  314. data/spec/integration/ip_messaging/v2/service/user_spec.rb +1 -1
  315. data/spec/integration/ip_messaging/v2/service_spec.rb +1 -1
  316. data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +1 -1
  317. data/spec/integration/messaging/v1/service/phone_number_spec.rb +1 -1
  318. data/spec/integration/messaging/v1/service/short_code_spec.rb +1 -1
  319. data/spec/integration/messaging/v1/service_spec.rb +1 -1
  320. data/spec/integration/notify/v1/credential_spec.rb +1 -1
  321. data/spec/integration/notify/v1/service/binding_spec.rb +1 -1
  322. data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +1 -1
  323. data/spec/integration/notify/v1/service/user/user_binding_spec.rb +1 -1
  324. data/spec/integration/notify/v1/service/user_spec.rb +1 -1
  325. data/spec/integration/preview/acc_security/service/verification_check_spec.rb +1 -1
  326. data/spec/integration/preview/acc_security/service/verification_spec.rb +1 -1
  327. data/spec/integration/preview/acc_security/service_spec.rb +1 -1
  328. data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +1 -1
  329. data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +4 -4
  330. data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +1 -1
  331. data/spec/integration/preview/proxy/service/phone_number_spec.rb +1 -1
  332. data/spec/integration/preview/proxy/service/session/participant_spec.rb +1 -1
  333. data/spec/integration/preview/proxy/service/short_code_spec.rb +1 -1
  334. data/spec/integration/preview/studio/flow/engagement/step_spec.rb +96 -0
  335. data/spec/integration/preview/studio/flow/engagement_spec.rb +171 -0
  336. data/spec/integration/preview/studio/flow_spec.rb +115 -0
  337. data/spec/integration/preview/sync/service/document/document_permission_spec.rb +1 -1
  338. data/spec/integration/preview/sync/service/document_spec.rb +1 -1
  339. data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +2 -2
  340. data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +1 -1
  341. data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +2 -2
  342. data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +1 -1
  343. data/spec/integration/preview/understand/service/field_type/field_value_spec.rb +1 -1
  344. data/spec/integration/preview/understand/service/field_type_spec.rb +1 -1
  345. data/spec/integration/preview/understand/service/intent/field_spec.rb +1 -1
  346. data/spec/integration/preview/understand/service/intent/sample_spec.rb +1 -1
  347. data/spec/integration/preview/understand/service/intent_spec.rb +1 -1
  348. data/spec/integration/preview/understand/service/query_spec.rb +1 -1
  349. data/spec/integration/preview/wireless/command_spec.rb +1 -1
  350. data/spec/integration/proxy/v1/service/phone_number_spec.rb +15 -7
  351. data/spec/integration/proxy/v1/service/session/participant_spec.rb +1 -4
  352. data/spec/integration/proxy/v1/service/session_spec.rb +3 -0
  353. data/spec/integration/proxy/v1/service/short_code_spec.rb +13 -4
  354. data/spec/integration/proxy/v1/service_spec.rb +12 -0
  355. data/spec/integration/sync/v1/service/document/document_permission_spec.rb +1 -1
  356. data/spec/integration/sync/v1/service/document_spec.rb +1 -1
  357. data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +2 -2
  358. data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +1 -1
  359. data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +2 -2
  360. data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +1 -1
  361. data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +1 -1
  362. data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +1 -1
  363. data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +1 -1
  364. data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +1 -1
  365. data/spec/integration/taskrouter/v1/workspace_spec.rb +1 -1
  366. data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +1 -1
  367. data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +1 -1
  368. data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +1 -1
  369. data/spec/integration/video/v1/room_spec.rb +1 -1
  370. data/spec/integration/wireless/v1/command_spec.rb +1 -1
  371. metadata +16 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3bf1c2defc4e433a856c4f21793a107b3034ca3
4
- data.tar.gz: b6889bf4225f59e64912cbc938bbe5452bb444b7
3
+ metadata.gz: fbfdbc284ee5f66bb3ad186e1f7963c8ac9547eb
4
+ data.tar.gz: fe6ca5303962c0ab33c6fcafeffacfd2c8c5a9c8
5
5
  SHA512:
6
- metadata.gz: d9a5c4e7511836685fc04ff2372fd98608a6cd66b63b715d50195ec12cd09870641bd72e8d20db532655a20da211d948058ebba4cadfe3d4f79281502b7a4b26
7
- data.tar.gz: 9ff3d3494bfefbbd68b718554252139095d7ef9d0fa4c37221d13e3e765cd881b5d9df19c6626fe426341688e9252ee33075f12b6605089a2fe6bf29f5995ddd
6
+ metadata.gz: 44f962fca3d1e86a93b7301f0e7c69a708039fa86ad3985c966f8bb35530f404a7ef3f64d0e609b0db591135af96e910436d4fc03b93cd720d5ff376fb485ca8
7
+ data.tar.gz: 37d6837d74805d553d87394fde14149f86f644ba8158ba81d83030a3d28a53f3fabe07974c5bc9237f9202aabbbe661474ae8777aaa56323470d646bcc0339a7
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2017-11-10] Version 5.4.5
5
+ ---------------------------
6
+ **Accounts**
7
+ - Add AWS credential type
8
+
9
+ **Preview**
10
+ - Removed `iso_country` as required field for creating a HostedNumberOrder.
11
+
12
+ **Proxy**
13
+ - Added new fields to Service: geo_match_level, number_selection_behavior, intercept_callback_url, out_of_session_callback_url
14
+
15
+
4
16
  [2017-11-03] Version 5.4.4
5
17
  ---------------------------
6
18
  **Library**
data/README.md CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
27
27
  To install using [Bundler][bundler] grab the latest stable version:
28
28
 
29
29
  ```ruby
30
- gem 'twilio-ruby', '~> 5.4.4'
30
+ gem 'twilio-ruby', '~> 5.4.5'
31
31
  ```
32
32
 
33
33
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
34
34
 
35
35
  ```bash
36
- gem install twilio-ruby -v 5.4.4
36
+ gem install twilio-ruby -v 5.4.5
37
37
  ```
38
38
 
39
39
  To build and install the development branch yourself from the latest source:
@@ -88,6 +88,20 @@ auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
88
88
  )
89
89
  ```
90
90
 
91
+ ### List your SMS Messages
92
+
93
+ ```ruby
94
+ @client.api.account.messages.list
95
+ ```
96
+
97
+ ### Fetch a single SMS message by Sid
98
+
99
+ ```ruby
100
+ # put the message sid you want to retrieve here:
101
+ message_sid = 'SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
102
+ @client.api.account.messages(message_sid).fetch
103
+ ```
104
+
91
105
  ### Customizing your HTTP Client
92
106
  twilio-ruby uses [Faraday][faraday] to make HTTP requests. You can tell
93
107
  Twilio::REST::Client to use any of the Faraday adapters like so:
@@ -17,15 +17,9 @@ module Twilio
17
17
  end
18
18
 
19
19
  ##
20
- # @return [Twilio::REST::Accounts::V1::CredentialInstance]
21
- def credentials(sid=:unset)
22
- if sid.nil?
23
- raise ArgumentError, 'sid cannot be nil'
24
- elsif sid == :unset
25
- @credentials ||= CredentialList.new self
26
- else
27
- CredentialContext.new(self, sid)
28
- end
20
+ # @return [Twilio::REST::Accounts::V1::CredentialContext]
21
+ def credentials
22
+ @credentials ||= CredentialList.new self
29
23
  end
30
24
 
31
25
  ##
@@ -21,6 +21,7 @@ module Twilio
21
21
 
22
22
  # Components
23
23
  @public_key = nil
24
+ @aws = nil
24
25
  end
25
26
 
26
27
  ##
@@ -33,10 +34,25 @@ module Twilio
33
34
  raise ArgumentError, 'sid cannot be nil' if sid.nil?
34
35
 
35
36
  if sid != :unset
36
- return PublicKeyContext.new(@version, sid,)
37
+ return PublicKeyContext.new(@version, sid)
37
38
  end
38
39
 
39
- @public_key ||= PublicKeyList.new(@version,)
40
+ @public_key ||= PublicKeyList.new(@version)
41
+ end
42
+
43
+ ##
44
+ # Access the aws
45
+ # @param [String] sid The sid
46
+ # @return [AwsList]
47
+ # @return [AwsContext] if sid was passed.
48
+ def aws(sid=:unset)
49
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
50
+
51
+ if sid != :unset
52
+ return AwsContext.new(@version, sid)
53
+ end
54
+
55
+ @aws ||= AwsList.new(@version)
40
56
  end
41
57
 
42
58
  ##
@@ -65,7 +81,7 @@ module Twilio
65
81
  # @param [Hash] payload Payload response from the API
66
82
  # @return [CredentialInstance] CredentialInstance
67
83
  def get_instance(payload)
68
- CredentialInstance.new(@version, payload,)
84
+ CredentialInstance.new(@version, payload)
69
85
  end
70
86
 
71
87
  ##
@@ -0,0 +1,338 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Accounts < Domain
10
+ class V1 < Version
11
+ class CredentialList < ListResource
12
+ class AwsList < ListResource
13
+ ##
14
+ # Initialize the AwsList
15
+ # @param [Version] version Version that contains the resource
16
+ # @return [AwsList] AwsList
17
+ def initialize(version)
18
+ super(version)
19
+
20
+ # Path Solution
21
+ @solution = {}
22
+ @uri = "/Credentials/AWS"
23
+ end
24
+
25
+ ##
26
+ # Lists AwsInstance records from the API as a list.
27
+ # Unlike stream(), this operation is eager and will load `limit` records into
28
+ # memory before returning.
29
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
30
+ # guarantees to never return more than limit. Default is no limit
31
+ # @param [Integer] page_size Number of records to fetch per request, when
32
+ # not set will use the default value of 50 records. If no page_size is defined
33
+ # but a limit is defined, stream() will attempt to read the limit with the most
34
+ # efficient page size, i.e. min(limit, 1000)
35
+ # @return [Array] Array of up to limit results
36
+ def list(limit: nil, page_size: nil)
37
+ self.stream(limit: limit, page_size: page_size).entries
38
+ end
39
+
40
+ ##
41
+ # Streams AwsInstance records from the API as an Enumerable.
42
+ # This operation lazily loads records as efficiently as possible until the limit
43
+ # is reached.
44
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
45
+ # guarantees to never return more than limit. Default is no limit.
46
+ # @param [Integer] page_size Number of records to fetch per request, when
47
+ # not set will use the default value of 50 records. If no page_size is defined
48
+ # but a limit is defined, stream() will attempt to read the limit with the most
49
+ # efficient page size, i.e. min(limit, 1000)
50
+ # @return [Enumerable] Enumerable that will yield up to limit results
51
+ def stream(limit: nil, page_size: nil)
52
+ limits = @version.read_limits(limit, page_size)
53
+
54
+ page = self.page(page_size: limits[:page_size])
55
+
56
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
57
+ end
58
+
59
+ ##
60
+ # When passed a block, yields AwsInstance records from the API.
61
+ # This operation lazily loads records as efficiently as possible until the limit
62
+ # is reached.
63
+ def each
64
+ limits = @version.read_limits
65
+
66
+ page = self.page(page_size: limits[:page_size])
67
+
68
+ @version.stream(page,
69
+ limit: limits[:limit],
70
+ page_limit: limits[:page_limit]).each {|x| yield x}
71
+ end
72
+
73
+ ##
74
+ # Retrieve a single page of AwsInstance records from the API.
75
+ # Request is executed immediately.
76
+ # @param [String] page_token PageToken provided by the API
77
+ # @param [Integer] page_number Page Number, this value is simply for client state
78
+ # @param [Integer] page_size Number of records to return, defaults to 50
79
+ # @return [Page] Page of AwsInstance
80
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
81
+ params = Twilio::Values.of({
82
+ 'PageToken' => page_token,
83
+ 'Page' => page_number,
84
+ 'PageSize' => page_size,
85
+ })
86
+ response = @version.page(
87
+ 'GET',
88
+ @uri,
89
+ params
90
+ )
91
+ AwsPage.new(@version, response, @solution)
92
+ end
93
+
94
+ ##
95
+ # Retrieve a single page of AwsInstance records from the API.
96
+ # Request is executed immediately.
97
+ # @param [String] target_url API-generated URL for the requested results page
98
+ # @return [Page] Page of AwsInstance
99
+ def get_page(target_url)
100
+ response = @version.domain.request(
101
+ 'GET',
102
+ target_url
103
+ )
104
+ AwsPage.new(@version, response, @solution)
105
+ end
106
+
107
+ ##
108
+ # Retrieve a single page of AwsInstance records from the API.
109
+ # Request is executed immediately.
110
+ # @param [String] credentials The credentials
111
+ # @param [String] friendly_name The friendly_name
112
+ # @param [String] account_sid The account_sid
113
+ # @return [AwsInstance] Newly created AwsInstance
114
+ def create(credentials: nil, friendly_name: :unset, account_sid: :unset)
115
+ data = Twilio::Values.of({
116
+ 'Credentials' => credentials,
117
+ 'FriendlyName' => friendly_name,
118
+ 'AccountSid' => account_sid,
119
+ })
120
+
121
+ payload = @version.create(
122
+ 'POST',
123
+ @uri,
124
+ data: data
125
+ )
126
+
127
+ AwsInstance.new(@version, payload)
128
+ end
129
+
130
+ ##
131
+ # Provide a user friendly representation
132
+ def to_s
133
+ '#<Twilio.Accounts.V1.AwsList>'
134
+ end
135
+ end
136
+
137
+ class AwsPage < Page
138
+ ##
139
+ # Initialize the AwsPage
140
+ # @param [Version] version Version that contains the resource
141
+ # @param [Response] response Response from the API
142
+ # @param [Hash] solution Path solution for the resource
143
+ # @return [AwsPage] AwsPage
144
+ def initialize(version, response, solution)
145
+ super(version, response)
146
+
147
+ # Path Solution
148
+ @solution = solution
149
+ end
150
+
151
+ ##
152
+ # Build an instance of AwsInstance
153
+ # @param [Hash] payload Payload response from the API
154
+ # @return [AwsInstance] AwsInstance
155
+ def get_instance(payload)
156
+ AwsInstance.new(@version, payload)
157
+ end
158
+
159
+ ##
160
+ # Provide a user friendly representation
161
+ def to_s
162
+ '<Twilio.Accounts.V1.AwsPage>'
163
+ end
164
+ end
165
+
166
+ class AwsContext < InstanceContext
167
+ ##
168
+ # Initialize the AwsContext
169
+ # @param [Version] version Version that contains the resource
170
+ # @param [String] sid The sid
171
+ # @return [AwsContext] AwsContext
172
+ def initialize(version, sid)
173
+ super(version)
174
+
175
+ # Path Solution
176
+ @solution = {sid: sid}
177
+ @uri = "/Credentials/AWS/#{@solution[:sid]}"
178
+ end
179
+
180
+ ##
181
+ # Fetch a AwsInstance
182
+ # @return [AwsInstance] Fetched AwsInstance
183
+ def fetch
184
+ params = Twilio::Values.of({})
185
+
186
+ payload = @version.fetch(
187
+ 'GET',
188
+ @uri,
189
+ params,
190
+ )
191
+
192
+ AwsInstance.new(@version, payload, sid: @solution[:sid])
193
+ end
194
+
195
+ ##
196
+ # Update the AwsInstance
197
+ # @param [String] friendly_name The friendly_name
198
+ # @return [AwsInstance] Updated AwsInstance
199
+ def update(friendly_name: :unset)
200
+ data = Twilio::Values.of({'FriendlyName' => friendly_name})
201
+
202
+ payload = @version.update(
203
+ 'POST',
204
+ @uri,
205
+ data: data,
206
+ )
207
+
208
+ AwsInstance.new(@version, payload, sid: @solution[:sid])
209
+ end
210
+
211
+ ##
212
+ # Deletes the AwsInstance
213
+ # @return [Boolean] true if delete succeeds, true 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.Accounts.V1.AwsContext #{context}>"
223
+ end
224
+ end
225
+
226
+ class AwsInstance < InstanceResource
227
+ ##
228
+ # Initialize the AwsInstance
229
+ # @param [Version] version Version that contains the resource
230
+ # @param [Hash] payload payload that contains response from Twilio
231
+ # @param [String] sid The sid
232
+ # @return [AwsInstance] AwsInstance
233
+ def initialize(version, payload, sid: nil)
234
+ super(version)
235
+
236
+ # Marshaled Properties
237
+ @properties = {
238
+ 'sid' => payload['sid'],
239
+ 'account_sid' => payload['account_sid'],
240
+ 'friendly_name' => payload['friendly_name'],
241
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
242
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
243
+ 'url' => payload['url'],
244
+ }
245
+
246
+ # Context
247
+ @instance_context = nil
248
+ @params = {'sid' => sid || @properties['sid']}
249
+ end
250
+
251
+ ##
252
+ # Generate an instance context for the instance, the context is capable of
253
+ # performing various actions. All instance actions are proxied to the context
254
+ # @return [AwsContext] AwsContext for this AwsInstance
255
+ def context
256
+ unless @instance_context
257
+ @instance_context = AwsContext.new(@version, @params['sid'])
258
+ end
259
+ @instance_context
260
+ end
261
+
262
+ ##
263
+ # @return [String] The sid
264
+ def sid
265
+ @properties['sid']
266
+ end
267
+
268
+ ##
269
+ # @return [String] The account_sid
270
+ def account_sid
271
+ @properties['account_sid']
272
+ end
273
+
274
+ ##
275
+ # @return [String] The friendly_name
276
+ def friendly_name
277
+ @properties['friendly_name']
278
+ end
279
+
280
+ ##
281
+ # @return [Time] The date_created
282
+ def date_created
283
+ @properties['date_created']
284
+ end
285
+
286
+ ##
287
+ # @return [Time] The date_updated
288
+ def date_updated
289
+ @properties['date_updated']
290
+ end
291
+
292
+ ##
293
+ # @return [String] The url
294
+ def url
295
+ @properties['url']
296
+ end
297
+
298
+ ##
299
+ # Fetch a AwsInstance
300
+ # @return [AwsInstance] Fetched AwsInstance
301
+ def fetch
302
+ context.fetch
303
+ end
304
+
305
+ ##
306
+ # Update the AwsInstance
307
+ # @param [String] friendly_name The friendly_name
308
+ # @return [AwsInstance] Updated AwsInstance
309
+ def update(friendly_name: :unset)
310
+ context.update(friendly_name: friendly_name)
311
+ end
312
+
313
+ ##
314
+ # Deletes the AwsInstance
315
+ # @return [Boolean] true if delete succeeds, true otherwise
316
+ def delete
317
+ context.delete
318
+ end
319
+
320
+ ##
321
+ # Provide a user friendly representation
322
+ def to_s
323
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
324
+ "<Twilio.Accounts.V1.AwsInstance #{values}>"
325
+ end
326
+
327
+ ##
328
+ # Provide a detailed, user friendly representation
329
+ def inspect
330
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
331
+ "<Twilio.Accounts.V1.AwsInstance #{values}>"
332
+ end
333
+ end
334
+ end
335
+ end
336
+ end
337
+ end
338
+ end