Class: Files::UsageSnapshot
- Inherits:
-
Object
- Object
- Files::UsageSnapshot
- Defined in:
- lib/files.com/models/usage_snapshot.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
- .all(params = {}, options = {}) ⇒ Object
-
.list(params = {}, options = {}) ⇒ Object
Parameters: cursor - string - Used for pagination.
Instance Method Summary collapse
-
#bytes_sent ⇒ Object
double - Transfer Usage for period - Outbound GB from Files Native Storage.
-
#created_at ⇒ Object
date-time - DEPRECATED: Usage snapshot created at date/time.
-
#current_storage ⇒ Object
double - Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing).
-
#deleted_files_counted_in_minimum ⇒ Object
double - Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing).
-
#deleted_files_storage ⇒ Object
double - Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing).
-
#end_at ⇒ Object
date-time - Usage snapshot end date/time.
-
#high_water_storage ⇒ Object
double - Highest Storage Usage GB recorded in time period (used for billing).
-
#high_water_user_count ⇒ Object
double - Highest user count number in time period.
-
#id ⇒ Object
int64 - Usage snapshot ID.
-
#initialize(attributes = {}, options = {}) ⇒ UsageSnapshot
constructor
A new instance of UsageSnapshot.
-
#root_storage ⇒ Object
double - Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing).
-
#start_at ⇒ Object
date-time - Usage snapshot start date/time.
-
#sync_bytes_received ⇒ Object
double - Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount).
-
#sync_bytes_sent ⇒ Object
double - Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount).
-
#total_billable_transfer_usage ⇒ Object
double - Transfer usage for period - Total Billable amount.
-
#total_billable_usage ⇒ Object
double - Storage + Transfer Usage - Total Billable amount.
-
#total_downloads ⇒ Object
int64 - DEPRECATED: Number of downloads in report time period.
-
#total_uploads ⇒ Object
int64 - DEPRECATED: Number of uploads in time period.
-
#updated_at ⇒ Object
date-time - DEPRECATED: The last time this site usage report was updated.
-
#usage_by_top_level_dir ⇒ Object
object - Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing).
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ UsageSnapshot
Returns a new instance of UsageSnapshot.
7 8 9 10 |
# File 'lib/files.com/models/usage_snapshot.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/usage_snapshot.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/usage_snapshot.rb', line 5 def @options end |
Class Method Details
.all(params = {}, options = {}) ⇒ Object
119 120 121 |
# File 'lib/files.com/models/usage_snapshot.rb', line 119 def self.all(params = {}, = {}) list(params, ) end |
.list(params = {}, options = {}) ⇒ Object
Parameters:
cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
110 111 112 113 114 115 116 117 |
# File 'lib/files.com/models/usage_snapshot.rb', line 110 def self.list(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params.dig(:cursor) and !params.dig(:cursor).is_a?(String) raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer) List.new(UsageSnapshot, params) do Api.send_request("/usage_snapshots", :get, params, ) end end |
Instance Method Details
#bytes_sent ⇒ Object
double - Transfer Usage for period - Outbound GB from Files Native Storage
93 94 95 |
# File 'lib/files.com/models/usage_snapshot.rb', line 93 def bytes_sent @attributes[:bytes_sent] end |
#created_at ⇒ Object
date-time - DEPRECATED: Usage snapshot created at date/time
28 29 30 |
# File 'lib/files.com/models/usage_snapshot.rb', line 28 def created_at @attributes[:created_at] end |
#current_storage ⇒ Object
double - Current total Storage Usage GB as of end date (not necessarily high water mark, which is used for billing)
38 39 40 |
# File 'lib/files.com/models/usage_snapshot.rb', line 38 def current_storage @attributes[:current_storage] end |
#deleted_files_counted_in_minimum ⇒ Object
double - Storage Usage for files that are deleted but uploaded within last 30 days as of end date (not necessarily high water mark, which is used for billing)
73 74 75 |
# File 'lib/files.com/models/usage_snapshot.rb', line 73 def deleted_files_counted_in_minimum @attributes[:deleted_files_counted_in_minimum] end |
#deleted_files_storage ⇒ Object
double - Storage Usage for files that are deleted but retained as backups as of end date (not necessarily high water mark, which is used for billing)
78 79 80 |
# File 'lib/files.com/models/usage_snapshot.rb', line 78 def deleted_files_storage @attributes[:deleted_files_storage] end |
#end_at ⇒ Object
date-time - Usage snapshot end date/time
23 24 25 |
# File 'lib/files.com/models/usage_snapshot.rb', line 23 def end_at @attributes[:end_at] end |
#high_water_storage ⇒ Object
double - Highest Storage Usage GB recorded in time period (used for billing)
43 44 45 |
# File 'lib/files.com/models/usage_snapshot.rb', line 43 def high_water_storage @attributes[:high_water_storage] end |
#high_water_user_count ⇒ Object
double - Highest user count number in time period
33 34 35 |
# File 'lib/files.com/models/usage_snapshot.rb', line 33 def high_water_user_count @attributes[:high_water_user_count] end |
#id ⇒ Object
int64 - Usage snapshot ID
13 14 15 |
# File 'lib/files.com/models/usage_snapshot.rb', line 13 def id @attributes[:id] end |
#root_storage ⇒ Object
double - Storage Usage for root folder as of end date (not necessarily high water mark, which is used for billing)
68 69 70 |
# File 'lib/files.com/models/usage_snapshot.rb', line 68 def root_storage @attributes[:root_storage] end |
#start_at ⇒ Object
date-time - Usage snapshot start date/time
18 19 20 |
# File 'lib/files.com/models/usage_snapshot.rb', line 18 def start_at @attributes[:start_at] end |
#sync_bytes_received ⇒ Object
double - Transfer Usage for period - Inbound GB to Remote Servers (Sync/Mount)
98 99 100 |
# File 'lib/files.com/models/usage_snapshot.rb', line 98 def sync_bytes_received @attributes[:sync_bytes_received] end |
#sync_bytes_sent ⇒ Object
double - Transfer Usage for period - Outbound GB from Remote Servers (Sync/Mount)
103 104 105 |
# File 'lib/files.com/models/usage_snapshot.rb', line 103 def sync_bytes_sent @attributes[:sync_bytes_sent] end |
#total_billable_transfer_usage ⇒ Object
double - Transfer usage for period - Total Billable amount
88 89 90 |
# File 'lib/files.com/models/usage_snapshot.rb', line 88 def total_billable_transfer_usage @attributes[:total_billable_transfer_usage] end |
#total_billable_usage ⇒ Object
double - Storage + Transfer Usage - Total Billable amount
83 84 85 |
# File 'lib/files.com/models/usage_snapshot.rb', line 83 def total_billable_usage @attributes[:total_billable_usage] end |
#total_downloads ⇒ Object
int64 - DEPRECATED: Number of downloads in report time period
48 49 50 |
# File 'lib/files.com/models/usage_snapshot.rb', line 48 def total_downloads @attributes[:total_downloads] end |
#total_uploads ⇒ Object
int64 - DEPRECATED: Number of uploads in time period
53 54 55 |
# File 'lib/files.com/models/usage_snapshot.rb', line 53 def total_uploads @attributes[:total_uploads] end |
#updated_at ⇒ Object
date-time - DEPRECATED: The last time this site usage report was updated
58 59 60 |
# File 'lib/files.com/models/usage_snapshot.rb', line 58 def updated_at @attributes[:updated_at] end |
#usage_by_top_level_dir ⇒ Object
object - Storage Usage - map of root folders to their usage as of end date (not necessarily high water mark, which is used for billing)
63 64 65 |
# File 'lib/files.com/models/usage_snapshot.rb', line 63 def usage_by_top_level_dir @attributes[:usage_by_top_level_dir] end |