files.com 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/account_line_item.md +2 -2
- data/docs/action.md +4 -4
- data/docs/api_key.md +11 -0
- data/docs/behavior.md +2 -2
- data/docs/bundle.md +2 -2
- data/docs/dns_record.md +2 -0
- data/docs/group.md +2 -2
- data/docs/group_user.md +2 -2
- data/docs/history.md +9 -9
- data/docs/invoice.md +2 -2
- data/docs/ip_address.md +2 -0
- data/docs/lock.md +2 -2
- data/docs/notification.md +2 -2
- data/docs/payment.md +2 -2
- data/docs/permission.md +2 -2
- data/docs/preview.md +2 -40
- data/docs/public_key.md +3 -3
- data/docs/session.md +0 -85
- data/docs/site.md +3 -92
- data/docs/style.md +4 -2
- data/docs/usage_daily_snapshot.md +37 -0
- data/docs/usage_snapshot.md +22 -4
- data/docs/user.md +3 -3
- data/docs/user_cipher_use.md +4 -4
- data/lib/files.com.rb +1 -14
- data/lib/files.com/models/account_line_item.rb +5 -5
- data/lib/files.com/models/action.rb +6 -6
- data/lib/files.com/models/api_key.rb +14 -0
- data/lib/files.com/models/behavior.rb +9 -9
- data/lib/files.com/models/bundle.rb +9 -9
- data/lib/files.com/models/dns_record.rb +5 -0
- data/lib/files.com/models/group.rb +9 -9
- data/lib/files.com/models/group_user.rb +9 -9
- data/lib/files.com/models/history.rb +6 -6
- data/lib/files.com/models/invoice.rb +5 -5
- data/lib/files.com/models/ip_address.rb +5 -0
- data/lib/files.com/models/lock.rb +9 -9
- data/lib/files.com/models/notification.rb +9 -9
- data/lib/files.com/models/payment.rb +5 -5
- data/lib/files.com/models/permission.rb +9 -9
- data/lib/files.com/models/preview.rb +5 -45
- data/lib/files.com/models/public_key.rb +9 -9
- data/lib/files.com/models/session.rb +0 -66
- data/lib/files.com/models/site.rb +5 -72
- data/lib/files.com/models/style.rb +14 -5
- data/lib/files.com/models/usage_daily_snapshot.rb +49 -0
- data/lib/files.com/models/usage_snapshot.rb +27 -10
- data/lib/files.com/models/user.rb +9 -9
- data/lib/files.com/models/user_cipher_use.rb +10 -10
- metadata +4 -2
@@ -9,6 +9,11 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# int64 - Line item Id
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
12
17
|
# float - Line item amount
|
13
18
|
def amount
|
14
19
|
@attributes[:amount]
|
@@ -34,11 +39,6 @@ module Files
|
|
34
39
|
@attributes[:download_uri]
|
35
40
|
end
|
36
41
|
|
37
|
-
# int64 - Line item Id
|
38
|
-
def id
|
39
|
-
@attributes[:id]
|
40
|
-
end
|
41
|
-
|
42
42
|
# array - Associated invoice line items
|
43
43
|
def invoice_line_items
|
44
44
|
@attributes[:invoice_line_items]
|
@@ -14,6 +14,11 @@ module Files
|
|
14
14
|
@attributes[:id]
|
15
15
|
end
|
16
16
|
|
17
|
+
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
18
|
+
def path
|
19
|
+
@attributes[:path]
|
20
|
+
end
|
21
|
+
|
17
22
|
# date-time - Action occurrence date/time
|
18
23
|
def when
|
19
24
|
@attributes[:when]
|
@@ -24,7 +29,7 @@ module Files
|
|
24
29
|
@attributes[:destination]
|
25
30
|
end
|
26
31
|
|
27
|
-
# string -
|
32
|
+
# string - Friendly displayed output
|
28
33
|
def display
|
29
34
|
@attributes[:display]
|
30
35
|
end
|
@@ -34,11 +39,6 @@ module Files
|
|
34
39
|
@attributes[:ip]
|
35
40
|
end
|
36
41
|
|
37
|
-
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
38
|
-
def path
|
39
|
-
@attributes[:path]
|
40
|
-
end
|
41
|
-
|
42
42
|
# string - The source path for this action, if applicable
|
43
43
|
def source
|
44
44
|
@attributes[:source]
|
@@ -18,6 +18,15 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
+
# string - Unique label that describes this API key. Useful for external systems where you may have API keys from multiple accounts and want a human-readable label for each key.
|
22
|
+
def descriptive_label
|
23
|
+
@attributes[:descriptive_label]
|
24
|
+
end
|
25
|
+
|
26
|
+
def descriptive_label=(value)
|
27
|
+
@attributes[:descriptive_label] = value
|
28
|
+
end
|
29
|
+
|
21
30
|
# date-time - Time which API Key was created
|
22
31
|
def created_at
|
23
32
|
@attributes[:created_at]
|
@@ -145,6 +154,11 @@ module Files
|
|
145
154
|
list(params, options)
|
146
155
|
end
|
147
156
|
|
157
|
+
def self.get(params = {}, options = {})
|
158
|
+
response, options = Api.send_request("/api_key", :get, params, options)
|
159
|
+
ApiKey.new(response.data, options)
|
160
|
+
end
|
161
|
+
|
148
162
|
# Parameters:
|
149
163
|
# id (required) - integer - Api Key ID.
|
150
164
|
def self.find(id, params = {}, options = {})
|
@@ -18,6 +18,15 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
+
# string - Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
22
|
+
def path
|
23
|
+
@attributes[:path]
|
24
|
+
end
|
25
|
+
|
26
|
+
def path=(value)
|
27
|
+
@attributes[:path] = value
|
28
|
+
end
|
29
|
+
|
21
30
|
# string - URL for attached file
|
22
31
|
def attachment_url
|
23
32
|
@attributes[:attachment_url]
|
@@ -36,15 +45,6 @@ module Files
|
|
36
45
|
@attributes[:behavior] = value
|
37
46
|
end
|
38
47
|
|
39
|
-
# string - Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
40
|
-
def path
|
41
|
-
@attributes[:path]
|
42
|
-
end
|
43
|
-
|
44
|
-
def path=(value)
|
45
|
-
@attributes[:path] = value
|
46
|
-
end
|
47
|
-
|
48
48
|
# object - Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
|
49
49
|
def value
|
50
50
|
@attributes[:value]
|
@@ -9,6 +9,15 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# int64 - Bundle ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
12
21
|
# string - Bundle code. This code forms the end part of the Public URL.
|
13
22
|
def code
|
14
23
|
@attributes[:code]
|
@@ -50,15 +59,6 @@ module Files
|
|
50
59
|
@attributes[:paths] = value
|
51
60
|
end
|
52
61
|
|
53
|
-
# int64 - Bundle ID
|
54
|
-
def id
|
55
|
-
@attributes[:id]
|
56
|
-
end
|
57
|
-
|
58
|
-
def id=(value)
|
59
|
-
@attributes[:id] = value
|
60
|
-
end
|
61
|
-
|
62
62
|
# string - Bundle internal note
|
63
63
|
def note
|
64
64
|
@attributes[:note]
|
@@ -18,15 +18,6 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
-
# array - List of user IDs who are group administrators (separated by commas)
|
22
|
-
def admin_ids
|
23
|
-
@attributes[:admin_ids]
|
24
|
-
end
|
25
|
-
|
26
|
-
def admin_ids=(value)
|
27
|
-
@attributes[:admin_ids] = value
|
28
|
-
end
|
29
|
-
|
30
21
|
# string - Group name
|
31
22
|
def name
|
32
23
|
@attributes[:name]
|
@@ -36,6 +27,15 @@ module Files
|
|
36
27
|
@attributes[:name] = value
|
37
28
|
end
|
38
29
|
|
30
|
+
# array - List of user IDs who are group administrators (separated by commas)
|
31
|
+
def admin_ids
|
32
|
+
@attributes[:admin_ids]
|
33
|
+
end
|
34
|
+
|
35
|
+
def admin_ids=(value)
|
36
|
+
@attributes[:admin_ids] = value
|
37
|
+
end
|
38
|
+
|
39
39
|
# string - Notes about this group
|
40
40
|
def notes
|
41
41
|
@attributes[:notes]
|
@@ -9,6 +9,15 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# string - Group name
|
13
|
+
def name
|
14
|
+
@attributes[:name]
|
15
|
+
end
|
16
|
+
|
17
|
+
def name=(value)
|
18
|
+
@attributes[:name] = value
|
19
|
+
end
|
20
|
+
|
12
21
|
# int64 - Group ID
|
13
22
|
def id
|
14
23
|
@attributes[:id]
|
@@ -27,15 +36,6 @@ module Files
|
|
27
36
|
@attributes[:admin] = value
|
28
37
|
end
|
29
38
|
|
30
|
-
# string - Group name
|
31
|
-
def name
|
32
|
-
@attributes[:name]
|
33
|
-
end
|
34
|
-
|
35
|
-
def name=(value)
|
36
|
-
@attributes[:name] = value
|
37
|
-
end
|
38
|
-
|
39
39
|
# array - A list of usernames for users in this group
|
40
40
|
def usernames
|
41
41
|
@attributes[:usernames]
|
@@ -14,6 +14,11 @@ module Files
|
|
14
14
|
@attributes[:id]
|
15
15
|
end
|
16
16
|
|
17
|
+
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
18
|
+
def path
|
19
|
+
@attributes[:path]
|
20
|
+
end
|
21
|
+
|
17
22
|
# date-time - Action occurrence date/time
|
18
23
|
def when
|
19
24
|
@attributes[:when]
|
@@ -24,7 +29,7 @@ module Files
|
|
24
29
|
@attributes[:destination]
|
25
30
|
end
|
26
31
|
|
27
|
-
# string -
|
32
|
+
# string - Friendly displayed output
|
28
33
|
def display
|
29
34
|
@attributes[:display]
|
30
35
|
end
|
@@ -34,11 +39,6 @@ module Files
|
|
34
39
|
@attributes[:ip]
|
35
40
|
end
|
36
41
|
|
37
|
-
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
38
|
-
def path
|
39
|
-
@attributes[:path]
|
40
|
-
end
|
41
|
-
|
42
42
|
# string - The source path for this action, if applicable
|
43
43
|
def source
|
44
44
|
@attributes[:source]
|
@@ -9,6 +9,11 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# int64 - Line item Id
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
12
17
|
# float - Line item amount
|
13
18
|
def amount
|
14
19
|
@attributes[:amount]
|
@@ -34,11 +39,6 @@ module Files
|
|
34
39
|
@attributes[:download_uri]
|
35
40
|
end
|
36
41
|
|
37
|
-
# int64 - Line item Id
|
38
|
-
def id
|
39
|
-
@attributes[:id]
|
40
|
-
end
|
41
|
-
|
42
42
|
# array - Associated invoice line items
|
43
43
|
def invoice_line_items
|
44
44
|
@attributes[:invoice_line_items]
|
@@ -9,6 +9,11 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# string - Unique label for list; used by Zapier and other integrations.
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
12
17
|
# string - The object that this public IP address list is associated with.
|
13
18
|
def associated_with
|
14
19
|
@attributes[:associated_with]
|
@@ -9,6 +9,15 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
13
|
+
def path
|
14
|
+
@attributes[:path]
|
15
|
+
end
|
16
|
+
|
17
|
+
def path=(value)
|
18
|
+
@attributes[:path] = value
|
19
|
+
end
|
20
|
+
|
12
21
|
# int64 - Lock timeout
|
13
22
|
def timeout
|
14
23
|
@attributes[:timeout]
|
@@ -36,15 +45,6 @@ module Files
|
|
36
45
|
@attributes[:owner] = value
|
37
46
|
end
|
38
47
|
|
39
|
-
# string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
40
|
-
def path
|
41
|
-
@attributes[:path]
|
42
|
-
end
|
43
|
-
|
44
|
-
def path=(value)
|
45
|
-
@attributes[:path] = value
|
46
|
-
end
|
47
|
-
|
48
48
|
# string - Lock scope(shared or exclusive)
|
49
49
|
def scope
|
50
50
|
@attributes[:scope]
|
@@ -18,6 +18,15 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
+
# string - Folder path to notify on This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
22
|
+
def path
|
23
|
+
@attributes[:path]
|
24
|
+
end
|
25
|
+
|
26
|
+
def path=(value)
|
27
|
+
@attributes[:path] = value
|
28
|
+
end
|
29
|
+
|
21
30
|
# int64 - Notification group id
|
22
31
|
def group_id
|
23
32
|
@attributes[:group_id]
|
@@ -54,15 +63,6 @@ module Files
|
|
54
63
|
@attributes[:notify_on_copy] = value
|
55
64
|
end
|
56
65
|
|
57
|
-
# string - Folder path to notify on This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
58
|
-
def path
|
59
|
-
@attributes[:path]
|
60
|
-
end
|
61
|
-
|
62
|
-
def path=(value)
|
63
|
-
@attributes[:path] = value
|
64
|
-
end
|
65
|
-
|
66
66
|
# string - The time interval that notifications are aggregated to
|
67
67
|
def send_interval
|
68
68
|
@attributes[:send_interval]
|
@@ -9,6 +9,11 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# int64 - Line item Id
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
12
17
|
# float - Line item amount
|
13
18
|
def amount
|
14
19
|
@attributes[:amount]
|
@@ -34,11 +39,6 @@ module Files
|
|
34
39
|
@attributes[:download_uri]
|
35
40
|
end
|
36
41
|
|
37
|
-
# int64 - Line item Id
|
38
|
-
def id
|
39
|
-
@attributes[:id]
|
40
|
-
end
|
41
|
-
|
42
42
|
# array - Associated invoice line items
|
43
43
|
def invoice_line_items
|
44
44
|
@attributes[:invoice_line_items]
|
@@ -18,6 +18,15 @@ module Files
|
|
18
18
|
@attributes[:id] = value
|
19
19
|
end
|
20
20
|
|
21
|
+
# string - Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
22
|
+
def path
|
23
|
+
@attributes[:path]
|
24
|
+
end
|
25
|
+
|
26
|
+
def path=(value)
|
27
|
+
@attributes[:path] = value
|
28
|
+
end
|
29
|
+
|
21
30
|
# int64 - User ID
|
22
31
|
def user_id
|
23
32
|
@attributes[:user_id]
|
@@ -54,15 +63,6 @@ module Files
|
|
54
63
|
@attributes[:group_name] = value
|
55
64
|
end
|
56
65
|
|
57
|
-
# string - Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
58
|
-
def path
|
59
|
-
@attributes[:path]
|
60
|
-
end
|
61
|
-
|
62
|
-
def path=(value)
|
63
|
-
@attributes[:path] = value
|
64
|
-
end
|
65
|
-
|
66
66
|
# string - Permission type
|
67
67
|
def permission
|
68
68
|
@attributes[:permission]
|
@@ -9,6 +9,11 @@ module Files
|
|
9
9
|
@options = options || {}
|
10
10
|
end
|
11
11
|
|
12
|
+
# int64 - Preview ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
12
17
|
# string - Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
|
13
18
|
def status
|
14
19
|
@attributes[:status]
|
@@ -19,11 +24,6 @@ module Files
|
|
19
24
|
@attributes[:download_uri]
|
20
25
|
end
|
21
26
|
|
22
|
-
# int64 - Preview ID
|
23
|
-
def id
|
24
|
-
@attributes[:id]
|
25
|
-
end
|
26
|
-
|
27
27
|
# string - Preview status. Can be invalid, not_generated, generating, complete, or file_too_large
|
28
28
|
def type
|
29
29
|
@attributes[:type]
|
@@ -33,45 +33,5 @@ module Files
|
|
33
33
|
def size
|
34
34
|
@attributes[:size]
|
35
35
|
end
|
36
|
-
|
37
|
-
# Parameters:
|
38
|
-
# page - integer - Current page number.
|
39
|
-
# per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
40
|
-
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
41
|
-
# ids (required) - string - Preview IDs. Comma delimited.
|
42
|
-
# size - string - Preview Size
|
43
|
-
def self.list(params = {}, options = {})
|
44
|
-
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
45
|
-
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
46
|
-
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
47
|
-
raise InvalidParameterError.new("Bad parameter: ids must be an String") if params.dig(:ids) and !params.dig(:ids).is_a?(String)
|
48
|
-
raise InvalidParameterError.new("Bad parameter: size must be an String") if params.dig(:size) and !params.dig(:size).is_a?(String)
|
49
|
-
raise MissingParameterError.new("Parameter missing: ids") unless params.dig(:ids)
|
50
|
-
|
51
|
-
response, options = Api.send_request("/previews", :get, params, options)
|
52
|
-
response.data.map { |object| Preview.new(object, options) }
|
53
|
-
end
|
54
|
-
|
55
|
-
def self.all(params = {}, options = {})
|
56
|
-
list(params, options)
|
57
|
-
end
|
58
|
-
|
59
|
-
# Parameters:
|
60
|
-
# id (required) - integer - Preview ID.
|
61
|
-
# size - string - Preview Size
|
62
|
-
def self.find(id, params = {}, options = {})
|
63
|
-
params ||= {}
|
64
|
-
params[:id] = id
|
65
|
-
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
66
|
-
raise InvalidParameterError.new("Bad parameter: size must be an String") if params.dig(:size) and !params.dig(:size).is_a?(String)
|
67
|
-
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
68
|
-
|
69
|
-
response, options = Api.send_request("/previews/#{params[:id]}", :get, params, options)
|
70
|
-
Preview.new(response.data, options)
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.get(id, params = {}, options = {})
|
74
|
-
find(id, params, options)
|
75
|
-
end
|
76
36
|
end
|
77
37
|
end
|