files.com 1.1.669 → 1.1.671

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 (347) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/_VERSION +1 -1
  4. data/docs/account.md +155 -0
  5. data/docs/action_log.md +21 -1
  6. data/docs/action_notification_export_result.md +17 -0
  7. data/docs/action_webhook_failure.md +28 -0
  8. data/docs/agent_proxy_identity.md +49 -0
  9. data/docs/agent_proxy_identity_endpoint.md +11 -0
  10. data/docs/agent_proxy_identity_result.md +24 -0
  11. data/docs/agent_v2_auth.md +17 -0
  12. data/docs/ai_assistant_personality.md +14 -0
  13. data/docs/ai_task.md +14 -0
  14. data/docs/announcement.md +57 -0
  15. data/docs/api_key.md +27 -1
  16. data/docs/api_request_log.md +21 -1
  17. data/docs/app.md +15 -0
  18. data/docs/as2_incoming_message.md +18 -0
  19. data/docs/as2_outgoing_message.md +18 -0
  20. data/docs/as2_partner.md +14 -0
  21. data/docs/as2_station.md +14 -0
  22. data/docs/automation.md +22 -1
  23. data/docs/automation_log.md +21 -1
  24. data/docs/automation_run.md +19 -0
  25. data/docs/bandwidth_snapshot.md +18 -0
  26. data/docs/behavior.md +14 -0
  27. data/docs/blog_post.md +57 -0
  28. data/docs/bundle.md +50 -1
  29. data/docs/bundle_action.md +25 -0
  30. data/docs/bundle_download.md +23 -0
  31. data/docs/bundle_notification.md +19 -0
  32. data/docs/bundle_recipient.md +21 -0
  33. data/docs/bundle_recipient_registration.md +39 -0
  34. data/docs/bundle_registration.md +61 -0
  35. data/docs/certificate.md +258 -0
  36. data/docs/chat_session.md +14 -0
  37. data/docs/child_site.md +583 -0
  38. data/docs/child_site_management_policy.md +9 -0
  39. data/docs/clickwrap.md +13 -0
  40. data/docs/clickwrap_acceptance.md +30 -0
  41. data/docs/client_log.md +17 -0
  42. data/docs/crash_report.md +50 -0
  43. data/docs/custom_domain.md +13 -0
  44. data/docs/custom_domain_for_proxy.md +23 -0
  45. data/docs/desktop_configuration_profile.md +14 -0
  46. data/docs/dns_record.md +9 -0
  47. data/docs/email_incoming_message.md +19 -0
  48. data/docs/email_log.md +20 -1
  49. data/docs/email_preference.md +108 -0
  50. data/docs/email_preference_bundle_notification.md +15 -0
  51. data/docs/email_preference_notification.md +17 -0
  52. data/docs/event_channel.md +14 -0
  53. data/docs/event_delivery_attempt.md +14 -0
  54. data/docs/event_record.md +19 -0
  55. data/docs/event_subscription.md +14 -0
  56. data/docs/event_target.md +14 -0
  57. data/docs/exavault_api_request_log.md +21 -1
  58. data/docs/expectation.md +14 -0
  59. data/docs/expectation_evaluation.md +14 -0
  60. data/docs/expectation_incident.md +14 -0
  61. data/docs/export.md +90 -0
  62. data/docs/external_event.md +18 -0
  63. data/docs/file.md +90 -2
  64. data/docs/file_migration.md +32 -0
  65. data/docs/file_migration_log.md +20 -1
  66. data/docs/file_upload_part.md +3 -1
  67. data/docs/folder.md +20 -0
  68. data/docs/form_field_set.md +15 -0
  69. data/docs/front_end_server.md +111 -0
  70. data/docs/frontend_metric.md +34 -0
  71. data/docs/ftp_action_log.md +21 -1
  72. data/docs/gpg_key.md +21 -0
  73. data/docs/group.md +19 -0
  74. data/docs/group_user.md +22 -2
  75. data/docs/history.md +85 -0
  76. data/docs/history_export_result.md +17 -0
  77. data/docs/holiday_region.md +9 -0
  78. data/docs/inbound_s3_log.md +21 -1
  79. data/docs/inbox.md +102 -0
  80. data/docs/inbox_recipient.md +19 -0
  81. data/docs/inbox_recipient_registration.md +35 -0
  82. data/docs/inbox_registration.md +57 -0
  83. data/docs/inbox_upload.md +18 -0
  84. data/docs/invoice.md +9 -0
  85. data/docs/ip.md +63 -0
  86. data/docs/ip_abuse_entry.md +47 -0
  87. data/docs/ip_address.md +59 -0
  88. data/docs/key_lifecycle_rule.md +14 -0
  89. data/docs/label.md +9 -0
  90. data/docs/lead.md +161 -0
  91. data/docs/lock.md +15 -0
  92. data/docs/message.md +17 -0
  93. data/docs/message_comment.md +18 -0
  94. data/docs/message_comment_reaction.md +18 -0
  95. data/docs/message_reaction.md +17 -0
  96. data/docs/metadata_category.md +13 -0
  97. data/docs/monitoring_stat.md +38 -0
  98. data/docs/monitoring_stats.md +15 -0
  99. data/docs/mover_package.md +68 -0
  100. data/docs/notification.md +20 -0
  101. data/docs/nps_response.md +75 -0
  102. data/docs/oauth_redirect.md +11 -0
  103. data/docs/outbound_connection_log.md +21 -1
  104. data/docs/paired_api_key.md +19 -0
  105. data/docs/partner.md +14 -0
  106. data/docs/partner_channel.md +14 -0
  107. data/docs/partner_site_request.md +14 -0
  108. data/docs/payment.md +9 -0
  109. data/docs/paypal_express_info.md +31 -0
  110. data/docs/paypal_express_url.md +11 -0
  111. data/docs/pending_work_event.md +18 -0
  112. data/docs/permission.md +22 -0
  113. data/docs/plan.md +107 -0
  114. data/docs/preview.md +57 -0
  115. data/docs/project.md +9 -0
  116. data/docs/public_hosting_request_log.md +21 -1
  117. data/docs/public_hosting_session_pairing.md +15 -0
  118. data/docs/public_inbox.md +121 -0
  119. data/docs/public_key.md +21 -0
  120. data/docs/public_url.md +59 -0
  121. data/docs/regional_migration.md +0 -0
  122. data/docs/release.md +83 -0
  123. data/docs/release_package.md +19 -0
  124. data/docs/remote_bandwidth_snapshot.md +18 -0
  125. data/docs/remote_mount_backend.md +13 -0
  126. data/docs/remote_server.md +233 -0
  127. data/docs/remote_server_credential.md +15 -0
  128. data/docs/request.md +17 -0
  129. data/docs/restore.md +14 -0
  130. data/docs/revision.md +40 -0
  131. data/docs/safe_plan.md +0 -0
  132. data/docs/scheduled_export.md +15 -0
  133. data/docs/scim_log.md +13 -0
  134. data/docs/session.md +232 -1
  135. data/docs/session_available_site.md +26 -0
  136. data/docs/setting.md +33 -0
  137. data/docs/settings.md +498 -0
  138. data/docs/settings_change.md +16 -0
  139. data/docs/sftp_action_log.md +21 -1
  140. data/docs/sftp_host_key.md +9 -0
  141. data/docs/share_group.md +15 -0
  142. data/docs/siem_http_destination.md +9 -0
  143. data/docs/siem_http_destination_event.md +18 -0
  144. data/docs/site.md +179 -0
  145. data/docs/site_subdomain_redirect.md +13 -0
  146. data/docs/snapshot.md +9 -0
  147. data/docs/ssl_certificate.md +37 -0
  148. data/docs/sso_event.md +19 -0
  149. data/docs/sso_strategy.md +406 -0
  150. data/docs/staging_site.md +591 -0
  151. data/docs/support_request.md +126 -0
  152. data/docs/sync.md +14 -0
  153. data/docs/sync_api_usage_snapshot.md +23 -0
  154. data/docs/sync_api_usage_snapshot_report.md +71 -0
  155. data/docs/sync_bandwidth_snapshot.md +48 -0
  156. data/docs/sync_log.md +20 -1
  157. data/docs/sync_run.md +21 -0
  158. data/docs/two_factor_authentication_method.md +169 -0
  159. data/docs/usage_daily_snapshot.md +18 -0
  160. data/docs/usage_snapshot.md +9 -0
  161. data/docs/user.md +49 -2
  162. data/docs/user_cipher_use.md +21 -0
  163. data/docs/user_lifecycle_rule.md +14 -0
  164. data/docs/user_request.md +9 -0
  165. data/docs/user_security_event.md +18 -0
  166. data/docs/user_sftp_client_use.md +15 -0
  167. data/docs/warning.md +36 -0
  168. data/docs/web_dav_action_log.md +21 -1
  169. data/docs/webauthn_sign_request.md +13 -0
  170. data/docs/workspace.md +15 -0
  171. data/docs/zip_download.md +32 -0
  172. data/docs/zip_download_file.md +45 -0
  173. data/docs/zip_download_files.md +23 -0
  174. data/lib/files.com/errors.rb +1 -0
  175. data/lib/files.com/models/account.rb +346 -0
  176. data/lib/files.com/models/action_log.rb +24 -0
  177. data/lib/files.com/models/action_notification_export_result.rb +12 -0
  178. data/lib/files.com/models/action_webhook_failure.rb +34 -0
  179. data/lib/files.com/models/agent_proxy_identity.rb +47 -0
  180. data/lib/files.com/models/agent_proxy_identity_endpoint.rb +17 -0
  181. data/lib/files.com/models/agent_proxy_identity_result.rb +27 -0
  182. data/lib/files.com/models/agent_v2_auth.rb +32 -0
  183. data/lib/files.com/models/ai_assistant_personality.rb +11 -0
  184. data/lib/files.com/models/ai_task.rb +11 -0
  185. data/lib/files.com/models/announcement.rb +89 -0
  186. data/lib/files.com/models/api_key.rb +39 -5
  187. data/lib/files.com/models/api_request_log.rb +24 -0
  188. data/lib/files.com/models/app.rb +13 -0
  189. data/lib/files.com/models/as2_incoming_message.rb +19 -0
  190. data/lib/files.com/models/as2_outgoing_message.rb +19 -0
  191. data/lib/files.com/models/as2_partner.rb +11 -0
  192. data/lib/files.com/models/as2_station.rb +11 -0
  193. data/lib/files.com/models/automation.rb +30 -0
  194. data/lib/files.com/models/automation_log.rb +24 -0
  195. data/lib/files.com/models/automation_run.rb +16 -0
  196. data/lib/files.com/models/bandwidth_snapshot.rb +19 -0
  197. data/lib/files.com/models/behavior.rb +11 -0
  198. data/lib/files.com/models/blog_post.rb +84 -0
  199. data/lib/files.com/models/bundle.rb +52 -0
  200. data/lib/files.com/models/bundle_action.rb +25 -0
  201. data/lib/files.com/models/bundle_download.rb +23 -0
  202. data/lib/files.com/models/bundle_notification.rb +15 -0
  203. data/lib/files.com/models/bundle_recipient.rb +27 -0
  204. data/lib/files.com/models/bundle_recipient_registration.rb +105 -0
  205. data/lib/files.com/models/bundle_registration.rb +125 -0
  206. data/lib/files.com/models/certificate.rb +455 -0
  207. data/lib/files.com/models/chat_session.rb +11 -0
  208. data/lib/files.com/models/child_site.rb +1756 -0
  209. data/lib/files.com/models/child_site_management_policy.rb +5 -0
  210. data/lib/files.com/models/clickwrap.rb +9 -0
  211. data/lib/files.com/models/clickwrap_acceptance.rb +56 -0
  212. data/lib/files.com/models/client_log.rb +25 -0
  213. data/lib/files.com/models/crash_report.rb +151 -0
  214. data/lib/files.com/models/custom_domain.rb +9 -0
  215. data/lib/files.com/models/custom_domain_for_proxy.rb +47 -0
  216. data/lib/files.com/models/desktop_configuration_profile.rb +11 -0
  217. data/lib/files.com/models/dns_record.rb +5 -0
  218. data/lib/files.com/models/email_incoming_message.rb +21 -0
  219. data/lib/files.com/models/email_log.rb +22 -0
  220. data/lib/files.com/models/email_preference.rb +124 -0
  221. data/lib/files.com/models/email_preference_bundle_notification.rb +27 -0
  222. data/lib/files.com/models/email_preference_notification.rb +32 -0
  223. data/lib/files.com/models/event_channel.rb +11 -0
  224. data/lib/files.com/models/event_delivery_attempt.rb +11 -0
  225. data/lib/files.com/models/event_record.rb +21 -0
  226. data/lib/files.com/models/event_subscription.rb +11 -0
  227. data/lib/files.com/models/event_target.rb +11 -0
  228. data/lib/files.com/models/exavault_api_request_log.rb +24 -0
  229. data/lib/files.com/models/expectation.rb +11 -0
  230. data/lib/files.com/models/expectation_evaluation.rb +11 -0
  231. data/lib/files.com/models/expectation_incident.rb +11 -0
  232. data/lib/files.com/models/export.rb +153 -0
  233. data/lib/files.com/models/external_event.rb +19 -0
  234. data/lib/files.com/models/file.rb +207 -0
  235. data/lib/files.com/models/file_migration.rb +27 -0
  236. data/lib/files.com/models/file_migration_log.rb +22 -0
  237. data/lib/files.com/models/file_upload_part.rb +5 -0
  238. data/lib/files.com/models/folder.rb +69 -0
  239. data/lib/files.com/models/form_field_set.rb +9 -0
  240. data/lib/files.com/models/front_end_server.rb +335 -0
  241. data/lib/files.com/models/frontend_metric.rb +65 -0
  242. data/lib/files.com/models/ftp_action_log.rb +24 -0
  243. data/lib/files.com/models/gpg_key.rb +21 -0
  244. data/lib/files.com/models/group.rb +16 -0
  245. data/lib/files.com/models/group_user.rb +21 -1
  246. data/lib/files.com/models/history.rb +94 -0
  247. data/lib/files.com/models/history_export_result.rb +12 -0
  248. data/lib/files.com/models/holiday_region.rb +5 -0
  249. data/lib/files.com/models/inbound_s3_log.rb +24 -0
  250. data/lib/files.com/models/inbox.rb +123 -0
  251. data/lib/files.com/models/inbox_recipient.rb +25 -0
  252. data/lib/files.com/models/inbox_recipient_registration.rb +87 -0
  253. data/lib/files.com/models/inbox_registration.rb +121 -0
  254. data/lib/files.com/models/inbox_upload.rb +19 -0
  255. data/lib/files.com/models/invoice.rb +5 -0
  256. data/lib/files.com/models/ip.rb +82 -0
  257. data/lib/files.com/models/ip_abuse_entry.rb +96 -0
  258. data/lib/files.com/models/ip_address.rb +37 -0
  259. data/lib/files.com/models/key_lifecycle_rule.rb +11 -0
  260. data/lib/files.com/models/label.rb +22 -0
  261. data/lib/files.com/models/lead.rb +434 -0
  262. data/lib/files.com/models/lock.rb +27 -0
  263. data/lib/files.com/models/message.rb +12 -0
  264. data/lib/files.com/models/message_comment.rb +14 -0
  265. data/lib/files.com/models/message_comment_reaction.rb +14 -0
  266. data/lib/files.com/models/message_reaction.rb +12 -0
  267. data/lib/files.com/models/metadata_category.rb +9 -0
  268. data/lib/files.com/models/monitoring_stat.rb +43 -0
  269. data/lib/files.com/models/monitoring_stats.rb +22 -0
  270. data/lib/files.com/models/mover_package.rb +80 -0
  271. data/lib/files.com/models/notification.rb +18 -0
  272. data/lib/files.com/models/nps_response.rb +128 -0
  273. data/lib/files.com/models/oauth_redirect.rb +17 -0
  274. data/lib/files.com/models/outbound_connection_log.rb +24 -0
  275. data/lib/files.com/models/paired_api_key.rb +37 -0
  276. data/lib/files.com/models/partner.rb +11 -0
  277. data/lib/files.com/models/partner_channel.rb +11 -0
  278. data/lib/files.com/models/partner_site_request.rb +11 -0
  279. data/lib/files.com/models/payment.rb +5 -0
  280. data/lib/files.com/models/paypal_express_info.rb +67 -0
  281. data/lib/files.com/models/paypal_express_url.rb +17 -0
  282. data/lib/files.com/models/pending_work_event.rb +19 -0
  283. data/lib/files.com/models/permission.rb +22 -0
  284. data/lib/files.com/models/plan.rb +209 -0
  285. data/lib/files.com/models/preview.rb +57 -0
  286. data/lib/files.com/models/project.rb +5 -0
  287. data/lib/files.com/models/public_hosting_request_log.rb +24 -0
  288. data/lib/files.com/models/public_hosting_session_pairing.rb +27 -0
  289. data/lib/files.com/models/public_inbox.rb +142 -0
  290. data/lib/files.com/models/public_key.rb +21 -0
  291. data/lib/files.com/models/public_url.rb +177 -0
  292. data/lib/files.com/models/regional_migration.rb +12 -0
  293. data/lib/files.com/models/release.rb +153 -0
  294. data/lib/files.com/models/release_package.rb +37 -0
  295. data/lib/files.com/models/remote_bandwidth_snapshot.rb +19 -0
  296. data/lib/files.com/models/remote_mount_backend.rb +9 -0
  297. data/lib/files.com/models/remote_server.rb +297 -0
  298. data/lib/files.com/models/remote_server_credential.rb +13 -0
  299. data/lib/files.com/models/request.rb +12 -0
  300. data/lib/files.com/models/restore.rb +11 -0
  301. data/lib/files.com/models/revision.rb +53 -0
  302. data/lib/files.com/models/safe_plan.rb +12 -0
  303. data/lib/files.com/models/scheduled_export.rb +13 -0
  304. data/lib/files.com/models/scim_log.rb +9 -0
  305. data/lib/files.com/models/session.rb +493 -0
  306. data/lib/files.com/models/session_available_site.rb +47 -0
  307. data/lib/files.com/models/setting.rb +36 -0
  308. data/lib/files.com/models/settings.rb +1072 -0
  309. data/lib/files.com/models/settings_change.rb +16 -0
  310. data/lib/files.com/models/sftp_action_log.rb +24 -0
  311. data/lib/files.com/models/sftp_host_key.rb +5 -0
  312. data/lib/files.com/models/share_group.rb +9 -0
  313. data/lib/files.com/models/siem_http_destination.rb +5 -0
  314. data/lib/files.com/models/siem_http_destination_event.rb +19 -0
  315. data/lib/files.com/models/site.rb +1021 -0
  316. data/lib/files.com/models/site_subdomain_redirect.rb +9 -0
  317. data/lib/files.com/models/snapshot.rb +5 -0
  318. data/lib/files.com/models/ssl_certificate.rb +77 -0
  319. data/lib/files.com/models/sso_event.rb +21 -0
  320. data/lib/files.com/models/sso_strategy.rb +632 -0
  321. data/lib/files.com/models/staging_site.rb +1781 -0
  322. data/lib/files.com/models/support_request.rb +209 -0
  323. data/lib/files.com/models/sync.rb +11 -0
  324. data/lib/files.com/models/sync_api_usage_snapshot.rb +47 -0
  325. data/lib/files.com/models/sync_api_usage_snapshot_report.rb +162 -0
  326. data/lib/files.com/models/sync_bandwidth_snapshot.rb +104 -0
  327. data/lib/files.com/models/sync_log.rb +22 -0
  328. data/lib/files.com/models/sync_run.rb +21 -0
  329. data/lib/files.com/models/two_factor_authentication_method.rb +250 -0
  330. data/lib/files.com/models/usage_daily_snapshot.rb +19 -0
  331. data/lib/files.com/models/usage_snapshot.rb +5 -0
  332. data/lib/files.com/models/user.rb +59 -0
  333. data/lib/files.com/models/user_cipher_use.rb +21 -0
  334. data/lib/files.com/models/user_lifecycle_rule.rb +11 -0
  335. data/lib/files.com/models/user_request.rb +5 -0
  336. data/lib/files.com/models/user_security_event.rb +19 -0
  337. data/lib/files.com/models/user_sftp_client_use.rb +9 -0
  338. data/lib/files.com/models/warning.rb +38 -0
  339. data/lib/files.com/models/web_dav_action_log.rb +24 -0
  340. data/lib/files.com/models/webauthn_sign_request.rb +17 -0
  341. data/lib/files.com/models/workspace.rb +13 -0
  342. data/lib/files.com/models/zip_download.rb +73 -0
  343. data/lib/files.com/models/zip_download_file.rb +111 -0
  344. data/lib/files.com/models/zip_download_files.rb +42 -0
  345. data/lib/files.com/version.rb +1 -1
  346. data/lib/files.com.rb +59 -0
  347. metadata +120 -2
@@ -0,0 +1,250 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class TwoFactorAuthenticationMethod
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - 2fa ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - 2fa method name
22
+ def name
23
+ @attributes[:name]
24
+ end
25
+
26
+ def name=(value)
27
+ @attributes[:name] = value
28
+ end
29
+
30
+ # string - Type of 2fa
31
+ def method_type
32
+ @attributes[:method_type]
33
+ end
34
+
35
+ def method_type=(value)
36
+ @attributes[:method_type] = value
37
+ end
38
+
39
+ # string - 2fa phone number (if SMS)
40
+ def phone_number
41
+ @attributes[:phone_number]
42
+ end
43
+
44
+ def phone_number=(value)
45
+ @attributes[:phone_number] = value
46
+ end
47
+
48
+ # string - 2fa phone number country (if SMS)
49
+ def phone_number_country
50
+ @attributes[:phone_number_country]
51
+ end
52
+
53
+ def phone_number_country=(value)
54
+ @attributes[:phone_number_country] = value
55
+ end
56
+
57
+ # string - 2fa phone number national format (if SMS)
58
+ def phone_number_national_format
59
+ @attributes[:phone_number_national_format]
60
+ end
61
+
62
+ def phone_number_national_format=(value)
63
+ @attributes[:phone_number_national_format] = value
64
+ end
65
+
66
+ # array(string) - For the Static method type, this is the list of tokens which can be used
67
+ def secret_tokens
68
+ @attributes[:secret_tokens]
69
+ end
70
+
71
+ def secret_tokens=(value)
72
+ @attributes[:secret_tokens] = value
73
+ end
74
+
75
+ # boolean - 2fa setup expired?
76
+ def setup_expired
77
+ @attributes[:setup_expired]
78
+ end
79
+
80
+ def setup_expired=(value)
81
+ @attributes[:setup_expired] = value
82
+ end
83
+
84
+ # boolean - 2fa setup complete?
85
+ def setup_complete
86
+ @attributes[:setup_complete]
87
+ end
88
+
89
+ def setup_complete=(value)
90
+ @attributes[:setup_complete] = value
91
+ end
92
+
93
+ # date-time - 2fa setup expires at this date/time (typically 10 minutes after a new method is created)
94
+ def setup_expires_at
95
+ @attributes[:setup_expires_at]
96
+ end
97
+
98
+ def setup_expires_at=(value)
99
+ @attributes[:setup_expires_at] = value
100
+ end
101
+
102
+ # string - TOTP provisioning URI (if TOTP)
103
+ def totp_provisioning_uri
104
+ @attributes[:totp_provisioning_uri]
105
+ end
106
+
107
+ def totp_provisioning_uri=(value)
108
+ @attributes[:totp_provisioning_uri] = value
109
+ end
110
+
111
+ # object - WebAuthn / FIDO 2 registration options (if WebAuthn)
112
+ def webauthn_registration_options
113
+ @attributes[:webauthn_registration_options]
114
+ end
115
+
116
+ def webauthn_registration_options=(value)
117
+ @attributes[:webauthn_registration_options] = value
118
+ end
119
+
120
+ # boolean - Set true to skip checking this 2FA method when using FTP, SFTP, and DAV
121
+ def bypass_for_ftp_sftp_dav
122
+ @attributes[:bypass_for_ftp_sftp_dav]
123
+ end
124
+
125
+ def bypass_for_ftp_sftp_dav=(value)
126
+ @attributes[:bypass_for_ftp_sftp_dav] = value
127
+ end
128
+
129
+ # string - Current value of OTP, Yubikey string, or Webauthn response value.
130
+ def otp
131
+ @attributes[:otp]
132
+ end
133
+
134
+ def otp=(value)
135
+ @attributes[:otp] = value
136
+ end
137
+
138
+ # Parameters:
139
+ # otp - string - Current value of OTP, Yubikey string, or Webauthn response value.
140
+ # name - string - 2fa method name
141
+ # bypass_for_ftp_sftp_dav - boolean - Set true to skip checking this 2FA method when using FTP, SFTP, and DAV
142
+ def update(params = {})
143
+ params ||= {}
144
+ params[:id] = @attributes[:id]
145
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
146
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
147
+ raise InvalidParameterError.new("Bad parameter: otp must be an String") if params[:otp] and !params[:otp].is_a?(String)
148
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
149
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
150
+
151
+ Api.send_request("/2fa/#{@attributes[:id]}", :patch, params, @options)
152
+ end
153
+
154
+ def delete(params = {})
155
+ params ||= {}
156
+ params[:id] = @attributes[:id]
157
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
158
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
159
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
160
+
161
+ Api.send_request("/2fa/#{@attributes[:id]}", :delete, params, @options)
162
+ end
163
+
164
+ def destroy(params = {})
165
+ delete(params)
166
+ nil
167
+ end
168
+
169
+ def save
170
+ if @attributes[:id]
171
+ new_obj = update(@attributes)
172
+ else
173
+ new_obj = TwoFactorAuthenticationMethod.create(@attributes, @options)
174
+ end
175
+
176
+ @attributes = new_obj.attributes
177
+ true
178
+ end
179
+
180
+ # Parameters:
181
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
182
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
183
+ def self.get(params = {}, options = {})
184
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
185
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
186
+
187
+ List.new(TwoFactorAuthenticationMethod, params) do
188
+ Api.send_request("/2fa", :get, params, options)
189
+ end
190
+ end
191
+
192
+ # Parameters:
193
+ # method_type (required) - string - Type of 2fa
194
+ # name - string - 2fa method name
195
+ # phone_number - string - 2fa phone number (if SMS)
196
+ # bypass_for_ftp_sftp_dav - boolean - Set true to skip checking this 2FA method when using FTP, SFTP, and DAV
197
+ def self.create(params = {}, options = {})
198
+ raise InvalidParameterError.new("Bad parameter: method_type must be an String") if params[:method_type] and !params[:method_type].is_a?(String)
199
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
200
+ raise InvalidParameterError.new("Bad parameter: phone_number must be an String") if params[:phone_number] and !params[:phone_number].is_a?(String)
201
+ raise MissingParameterError.new("Parameter missing: method_type") unless params[:method_type]
202
+
203
+ response, options = Api.send_request("/2fa", :post, params, options)
204
+ TwoFactorAuthenticationMethod.new(response.data, options)
205
+ end
206
+
207
+ # Parameters:
208
+ # webauthn_only - boolean - Set to `true` to only generate an OTP for Webauthn keys and skip things like SMS.
209
+ def self.send_code(params = {}, options = {})
210
+ response, options = Api.send_request("/2fa/send_code", :post, params, options)
211
+ WebauthnSignRequest.new(response.data, options)
212
+ end
213
+
214
+ def self.create_export(params = {}, options = {})
215
+ response, options = Api.send_request("/2fa/create_export", :post, params, options)
216
+ Export.new(response.data, options)
217
+ end
218
+
219
+ # Parameters:
220
+ # otp - string - Current value of OTP, Yubikey string, or Webauthn response value.
221
+ # name - string - 2fa method name
222
+ # bypass_for_ftp_sftp_dav - boolean - Set true to skip checking this 2FA method when using FTP, SFTP, and DAV
223
+ def self.update(id, params = {}, options = {})
224
+ params ||= {}
225
+ params[:id] = id
226
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
227
+ raise InvalidParameterError.new("Bad parameter: otp must be an String") if params[:otp] and !params[:otp].is_a?(String)
228
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
229
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
230
+
231
+ response, options = Api.send_request("/2fa/#{params[:id]}", :patch, params, options)
232
+ TwoFactorAuthenticationMethod.new(response.data, options)
233
+ end
234
+
235
+ def self.delete(id, params = {}, options = {})
236
+ params ||= {}
237
+ params[:id] = id
238
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
239
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
240
+
241
+ Api.send_request("/2fa/#{params[:id]}", :delete, params, options)
242
+ nil
243
+ end
244
+
245
+ def self.destroy(id, params = {}, options = {})
246
+ delete(id, params, options)
247
+ nil
248
+ end
249
+ end
250
+ end
@@ -96,5 +96,24 @@ module Files
96
96
  def self.all(params = {}, options = {})
97
97
  list(params, options)
98
98
  end
99
+
100
+ # Parameters:
101
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `date`.
102
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
103
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date`.
104
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `date`.
105
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date`.
106
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `date`.
107
+ def self.create_export(params = {}, options = {})
108
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
109
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
110
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
111
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
112
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
113
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
114
+
115
+ response, options = Api.send_request("/usage_daily_snapshots/create_export", :post, params, options)
116
+ Export.new(response.data, options)
117
+ end
99
118
  end
100
119
  end
@@ -99,5 +99,10 @@ module Files
99
99
  def self.all(params = {}, options = {})
100
100
  list(params, options)
101
101
  end
102
+
103
+ def self.create_export(params = {}, options = {})
104
+ response, options = Api.send_request("/usage_snapshots/create_export", :post, params, options)
105
+ Export.new(response.data, options)
106
+ end
102
107
  end
103
108
  end
@@ -734,6 +734,11 @@ module Files
734
734
  @attributes[:type_of_2fa_for_display] = value
735
735
  end
736
736
 
737
+ # date-time - When this user was updated. Used only for ExaVault compatibility API. Do not use for other purposes, as this value reveals information about internal changes to users that isn't necessarily public.
738
+ def updated_at
739
+ @attributes[:updated_at]
740
+ end
741
+
737
742
  # string - Root folder for FTP (and optionally SFTP if the appropriate site-wide setting is set). Note that this is not used for API, Desktop, or Web interface.
738
743
  def user_root
739
744
  @attributes[:user_root]
@@ -770,6 +775,15 @@ module Files
770
775
  @attributes[:password_expire_at] = value
771
776
  end
772
777
 
778
+ # boolean - Does this user have any associations that can be reassigned on delete?
779
+ def has_reassignable_associations
780
+ @attributes[:has_reassignable_associations]
781
+ end
782
+
783
+ def has_reassignable_associations=(value)
784
+ @attributes[:has_reassignable_associations] = value
785
+ end
786
+
773
787
  # file - An image file for your user avatar.
774
788
  def avatar_file
775
789
  @attributes[:avatar_file]
@@ -1063,8 +1077,16 @@ module Files
1063
1077
  # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
1064
1078
  # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1065
1079
  # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1080
+ # action - string - Set to `count` to return a count of results rather than the actual results.
1066
1081
  # ids - string - comma-separated list of User IDs
1067
1082
  # include_parent_site_users - boolean - Include users from the parent site.
1083
+ # q[username] - string - List users matching username.
1084
+ # q[email] - string - List users matching email.
1085
+ # q[notes] - string - List users matching notes field.
1086
+ # q[admin] - string - If `true`, list only admin users.
1087
+ # q[allowed_ips] - string - If set, list only users with overridden allowed IP setting.
1088
+ # q[password_validity_days] - string - If set, list only users with overridden password validity days setting.
1089
+ # q[ssl_required] - string - If set, list only users with overridden SSL required setting.
1068
1090
  # search - string - Searches for partial matches of name, username, or email.
1069
1091
  def self.list(params = {}, options = {})
1070
1092
  raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
@@ -1076,6 +1098,7 @@ module Files
1076
1098
  raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
1077
1099
  raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
1078
1100
  raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
1101
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
1079
1102
  raise InvalidParameterError.new("Bad parameter: ids must be an String") if params[:ids] and !params[:ids].is_a?(String)
1080
1103
  raise InvalidParameterError.new("Bad parameter: search must be an String") if params[:search] and !params[:search].is_a?(String)
1081
1104
 
@@ -1090,6 +1113,7 @@ module Files
1090
1113
 
1091
1114
  # Parameters:
1092
1115
  # id (required) - int64 - User ID.
1116
+ # include_reassignable_associations - boolean - If true includes has_reassignable_associations in the response.
1093
1117
  def self.find(id, params = {}, options = {})
1094
1118
  params ||= {}
1095
1119
  params[:id] = id
@@ -1245,6 +1269,41 @@ module Files
1245
1269
  nil
1246
1270
  end
1247
1271
 
1272
+ # Parameters:
1273
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `workspace_id`, `company`, `name`, `disabled`, `authenticate_until`, `username`, `email`, `site_admin`, `last_desktop_login_at`, `last_login_at`, `password_validity_days` or `ssl_required`.
1274
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `name`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until`, `not_site_admin`, `disabled`, `partner_id`, `primary_group_id` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[ company, name ]`, `[ workspace_id, name ]`, `[ workspace_id, email ]`, `[ workspace_id, company ]`, `[ workspace_id, site_admin ]`, `[ workspace_id, not_site_admin ]`, `[ workspace_id, disabled ]`, `[ workspace_id, partner_id ]`, `[ workspace_id, site_admin, username ]`, `[ workspace_id, not_site_admin, username ]`, `[ workspace_id, disabled, username ]`, `[ workspace_id, partner_id, username ]` or `[ workspace_id, company, name ]`.
1275
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1276
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1277
+ # filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `username`, `name`, `email` or `company`. Valid field combinations are `[ company, name ]`.
1278
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1279
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `password_validity_days`, `last_login_at` or `authenticate_until`.
1280
+ # action - string - Set to `count` to return a count of results rather than the actual results.
1281
+ # ids - string - comma-separated list of User IDs
1282
+ # include_parent_site_users - boolean - Include users from the parent site.
1283
+ # q[username] - string - List users matching username.
1284
+ # q[email] - string - List users matching email.
1285
+ # q[notes] - string - List users matching notes field.
1286
+ # q[admin] - string - If `true`, list only admin users.
1287
+ # q[allowed_ips] - string - If set, list only users with overridden allowed IP setting.
1288
+ # q[password_validity_days] - string - If set, list only users with overridden password validity days setting.
1289
+ # q[ssl_required] - string - If set, list only users with overridden SSL required setting.
1290
+ # search - string - Searches for partial matches of name, username, or email.
1291
+ def self.create_export(params = {}, options = {})
1292
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
1293
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
1294
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
1295
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
1296
+ raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
1297
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
1298
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
1299
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
1300
+ raise InvalidParameterError.new("Bad parameter: ids must be an String") if params[:ids] and !params[:ids].is_a?(String)
1301
+ raise InvalidParameterError.new("Bad parameter: search must be an String") if params[:search] and !params[:search].is_a?(String)
1302
+
1303
+ response, options = Api.send_request("/users/create_export", :post, params, options)
1304
+ Export.new(response.data, options)
1305
+ end
1306
+
1248
1307
  # Parameters:
1249
1308
  # avatar_file - file - An image file for your user avatar.
1250
1309
  # avatar_delete - boolean - If true, the avatar will be deleted.
@@ -78,5 +78,26 @@ module Files
78
78
  def self.all(params = {}, options = {})
79
79
  list(params, options)
80
80
  end
81
+
82
+ # Parameters:
83
+ # user_id - int64 - User ID. If provided, will return uses for this user.
84
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `updated_at`.
85
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `insecure` and `updated_at`. Valid field combinations are `[ insecure, updated_at ]`.
86
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `updated_at`.
87
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `updated_at`.
88
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `updated_at`.
89
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `updated_at`.
90
+ def self.create_export(params = {}, options = {})
91
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
92
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
93
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
94
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
95
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
96
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
97
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
98
+
99
+ response, options = Api.send_request("/user_cipher_uses/create_export", :post, params, options)
100
+ Export.new(response.data, options)
101
+ end
81
102
  end
82
103
  end
@@ -268,6 +268,17 @@ module Files
268
268
  UserLifecycleRule.new(response.data, options)
269
269
  end
270
270
 
271
+ # Parameters:
272
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `workspace_id`.
273
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `workspace_id`.
274
+ def self.create_export(params = {}, options = {})
275
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
276
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
277
+
278
+ response, options = Api.send_request("/user_lifecycle_rules/create_export", :post, params, options)
279
+ Export.new(response.data, options)
280
+ end
281
+
271
282
  # Parameters:
272
283
  # action - string - Action to take on inactive users (disable or delete)
273
284
  # apply_to_all_workspaces - boolean - If true, a default-workspace rule also applies to users in all workspaces.
@@ -130,6 +130,11 @@ module Files
130
130
  UserRequest.new(response.data, options)
131
131
  end
132
132
 
133
+ def self.create_export(params = {}, options = {})
134
+ response, options = Api.send_request("/user_requests/create_export", :post, params, options)
135
+ Export.new(response.data, options)
136
+ end
137
+
133
138
  def self.delete(id, params = {}, options = {})
134
139
  params ||= {}
135
140
  params[:id] = id
@@ -87,5 +87,24 @@ module Files
87
87
  def self.get(id, params = {}, options = {})
88
88
  find(id, params, options)
89
89
  end
90
+
91
+ # Parameters:
92
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at` and `user_id`.
93
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at` and `user_id`. Valid field combinations are `[ user_id, created_at ]`.
94
+ # filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
95
+ # filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
96
+ # filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
97
+ # filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
98
+ def self.create_export(params = {}, options = {})
99
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
100
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
101
+ raise InvalidParameterError.new("Bad parameter: filter_gt must be an Hash") if params[:filter_gt] and !params[:filter_gt].is_a?(Hash)
102
+ raise InvalidParameterError.new("Bad parameter: filter_gteq must be an Hash") if params[:filter_gteq] and !params[:filter_gteq].is_a?(Hash)
103
+ raise InvalidParameterError.new("Bad parameter: filter_lt must be an Hash") if params[:filter_lt] and !params[:filter_lt].is_a?(Hash)
104
+ raise InvalidParameterError.new("Bad parameter: filter_lteq must be an Hash") if params[:filter_lteq] and !params[:filter_lteq].is_a?(Hash)
105
+
106
+ response, options = Api.send_request("/user_security_events/create_export", :post, params, options)
107
+ Export.new(response.data, options)
108
+ end
90
109
  end
91
110
  end
@@ -51,5 +51,14 @@ module Files
51
51
  def self.all(params = {}, options = {})
52
52
  list(params, options)
53
53
  end
54
+
55
+ # Parameters:
56
+ # user_id - int64 - User ID. If provided, will return uses for this user.
57
+ def self.create_export(params = {}, options = {})
58
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
59
+
60
+ response, options = Api.send_request("/user_sftp_client_uses/create_export", :post, params, options)
61
+ Export.new(response.data, options)
62
+ end
54
63
  end
55
64
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class Warning
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # array(object) - A list of warnings
13
+ def warnings
14
+ @attributes[:warnings]
15
+ end
16
+
17
+ # Parameters:
18
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
19
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
20
+ def self.list(params = {}, options = {})
21
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
22
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
23
+
24
+ List.new(Warning, params) do
25
+ Api.send_request("/warnings", :get, params, options)
26
+ end
27
+ end
28
+
29
+ def self.all(params = {}, options = {})
30
+ list(params, options)
31
+ end
32
+
33
+ def self.create_export(params = {}, options = {})
34
+ response, options = Api.send_request("/warnings/create_export", :post, params, options)
35
+ Export.new(response.data, options)
36
+ end
37
+ end
38
+ end