files.com 1.0.314 → 1.0.316
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/bundle_notification.md +42 -0
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/bundle_notification.rb +37 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af58877af11ec39e7ad56c719b5a3b68535ab15547ba54bf0bddd463d998560d
|
4
|
+
data.tar.gz: fd7c1a852976b578e05964bd5d8aaf4959dd7d059627d230d2519f8a0b820c7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee48e9d8f37dd4bb01c635af9c2924fb4cb0be2267264af9a5cb6ef52c5617a73cefa44831e359dd60fcb9fe9c7bd1cb030604bfb2eb10d074e7000e0518a5b1
|
7
|
+
data.tar.gz: 421be6ae44e229d864fc6e413ac123a308d4bb37566fe2d6528d0e81e75c596a439e94c9dad3476d317d237a63ab1ad553724f147dfadd8504f430dfed0cd5a3
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.316
|
data/docs/bundle_notification.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
"bundle_id": 1,
|
8
8
|
"id": 1,
|
9
9
|
"notify_on_registration": true,
|
10
|
+
"notify_on_upload": true,
|
10
11
|
"user_id": 1
|
11
12
|
}
|
12
13
|
```
|
@@ -14,6 +15,7 @@
|
|
14
15
|
* `bundle_id` (int64): Bundle ID to notify on
|
15
16
|
* `id` (int64): Bundle Notification ID
|
16
17
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
18
|
+
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
17
19
|
* `user_id` (int64): The id of the user to notify.
|
18
20
|
|
19
21
|
|
@@ -58,6 +60,7 @@ Files::BundleNotification.find(id)
|
|
58
60
|
Files::BundleNotification.create(
|
59
61
|
user_id: 1,
|
60
62
|
notify_on_registration: true,
|
63
|
+
notify_on_upload: true,
|
61
64
|
bundle_id: 1
|
62
65
|
)
|
63
66
|
```
|
@@ -66,9 +69,28 @@ Files::BundleNotification.create(
|
|
66
69
|
|
67
70
|
* `user_id` (int64): Required - The id of the user to notify.
|
68
71
|
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
72
|
+
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
69
73
|
* `bundle_id` (int64): Required - Bundle ID to notify on
|
70
74
|
|
71
75
|
|
76
|
+
---
|
77
|
+
|
78
|
+
## Update Bundle Notification
|
79
|
+
|
80
|
+
```
|
81
|
+
Files::BundleNotification.update(id,
|
82
|
+
notify_on_registration: true,
|
83
|
+
notify_on_upload: true
|
84
|
+
)
|
85
|
+
```
|
86
|
+
|
87
|
+
### Parameters
|
88
|
+
|
89
|
+
* `id` (int64): Required - Bundle Notification ID.
|
90
|
+
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
91
|
+
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
92
|
+
|
93
|
+
|
72
94
|
---
|
73
95
|
|
74
96
|
## Delete Bundle Notification
|
@@ -82,6 +104,26 @@ Files::BundleNotification.delete(id)
|
|
82
104
|
* `id` (int64): Required - Bundle Notification ID.
|
83
105
|
|
84
106
|
|
107
|
+
---
|
108
|
+
|
109
|
+
## Update Bundle Notification
|
110
|
+
|
111
|
+
```
|
112
|
+
bundle_notification = Files::BundleNotification.list.first
|
113
|
+
|
114
|
+
bundle_notification.update(
|
115
|
+
notify_on_registration: true,
|
116
|
+
notify_on_upload: true
|
117
|
+
)
|
118
|
+
```
|
119
|
+
|
120
|
+
### Parameters
|
121
|
+
|
122
|
+
* `id` (int64): Required - Bundle Notification ID.
|
123
|
+
* `notify_on_registration` (boolean): Triggers bundle notification when a registration action occurs for it.
|
124
|
+
* `notify_on_upload` (boolean): Triggers bundle notification when a upload action occurs for it.
|
125
|
+
|
126
|
+
|
85
127
|
---
|
86
128
|
|
87
129
|
## Delete Bundle Notification
|
data/lib/files.com/errors.rb
CHANGED
@@ -61,6 +61,7 @@ module Files
|
|
61
61
|
class InvalidInputEncodingError < BadRequestError; end
|
62
62
|
class InvalidInterfaceError < BadRequestError; end
|
63
63
|
class InvalidOauthProviderError < BadRequestError; end
|
64
|
+
class InvalidPathError < BadRequestError; end
|
64
65
|
class InvalidReturnToUrlError < BadRequestError; end
|
65
66
|
class InvalidUploadOffsetError < BadRequestError; end
|
66
67
|
class InvalidUploadPartGapError < BadRequestError; end
|
@@ -36,6 +36,15 @@ module Files
|
|
36
36
|
@attributes[:notify_on_registration] = value
|
37
37
|
end
|
38
38
|
|
39
|
+
# boolean - Triggers bundle notification when a upload action occurs for it.
|
40
|
+
def notify_on_upload
|
41
|
+
@attributes[:notify_on_upload]
|
42
|
+
end
|
43
|
+
|
44
|
+
def notify_on_upload=(value)
|
45
|
+
@attributes[:notify_on_upload] = value
|
46
|
+
end
|
47
|
+
|
39
48
|
# int64 - The id of the user to notify.
|
40
49
|
def user_id
|
41
50
|
@attributes[:user_id]
|
@@ -45,6 +54,19 @@ module Files
|
|
45
54
|
@attributes[:user_id] = value
|
46
55
|
end
|
47
56
|
|
57
|
+
# Parameters:
|
58
|
+
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
59
|
+
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
60
|
+
def update(params = {})
|
61
|
+
params ||= {}
|
62
|
+
params[:id] = @attributes[:id]
|
63
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
64
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
65
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
66
|
+
|
67
|
+
Api.send_request("/bundle_notifications/#{@attributes[:id]}", :patch, params, @options)
|
68
|
+
end
|
69
|
+
|
48
70
|
def delete(params = {})
|
49
71
|
params ||= {}
|
50
72
|
params[:id] = @attributes[:id]
|
@@ -61,7 +83,7 @@ module Files
|
|
61
83
|
|
62
84
|
def save
|
63
85
|
if @attributes[:id]
|
64
|
-
|
86
|
+
update(@attributes)
|
65
87
|
else
|
66
88
|
new_obj = BundleNotification.create(@attributes, @options)
|
67
89
|
@attributes = new_obj.attributes
|
@@ -107,6 +129,7 @@ module Files
|
|
107
129
|
# Parameters:
|
108
130
|
# user_id (required) - int64 - The id of the user to notify.
|
109
131
|
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
132
|
+
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
110
133
|
# bundle_id (required) - int64 - Bundle ID to notify on
|
111
134
|
def self.create(params = {}, options = {})
|
112
135
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
@@ -118,6 +141,19 @@ module Files
|
|
118
141
|
BundleNotification.new(response.data, options)
|
119
142
|
end
|
120
143
|
|
144
|
+
# Parameters:
|
145
|
+
# notify_on_registration - boolean - Triggers bundle notification when a registration action occurs for it.
|
146
|
+
# notify_on_upload - boolean - Triggers bundle notification when a upload action occurs for it.
|
147
|
+
def self.update(id, params = {}, options = {})
|
148
|
+
params ||= {}
|
149
|
+
params[:id] = id
|
150
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
151
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
152
|
+
|
153
|
+
response, options = Api.send_request("/bundle_notifications/#{params[:id]}", :patch, params, options)
|
154
|
+
BundleNotification.new(response.data, options)
|
155
|
+
end
|
156
|
+
|
121
157
|
def self.delete(id, params = {}, options = {})
|
122
158
|
params ||= {}
|
123
159
|
params[:id] = id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.316
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|