files.com 1.0.73 → 1.0.74
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.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/bundle.md +13 -3
- data/docs/clickwrap.md +143 -0
- data/lib/files.com.rb +1 -0
- data/lib/files.com/models/bundle.rb +24 -0
- data/lib/files.com/models/clickwrap.rb +197 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66116793646b3cd90791fcec4e03e61285c72a22cd92b16160db1efb2968f006
|
4
|
+
data.tar.gz: 32de4d820eb178cab2f7e02e8eb452c13ab0ecebdf2aaae9bdc112f3883c0b9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0475802bc0ba98c9497eb16335637f37d30297589ae96491a32b5302272fe6349e7e6f1007f5e7fdcc813bf1c711f3751c3a2eb6138f6e0192870179632f07
|
7
|
+
data.tar.gz: f5dfd5890fba0f59cc963c6fcc40bf9e0b741cd986d97644ad3bcb0d2657b6717dd74cb9876631fb20e1fba1b82e76e2a7efb68379e082d140e64b72a12fbccb
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.74
|
data/docs/bundle.md
CHANGED
@@ -9,12 +9,14 @@
|
|
9
9
|
"description": "The public description of the bundle.",
|
10
10
|
"password_protected": true,
|
11
11
|
"require_registration": true,
|
12
|
+
"clickwrap_body": "[Legal text]",
|
12
13
|
"id": 1,
|
13
14
|
"created_at": "2000-01-01T01:00:00Z",
|
14
15
|
"expires_at": "2000-01-01T01:00:00Z",
|
15
16
|
"note": "The internal note on the bundle.",
|
16
17
|
"user_id": 1,
|
17
18
|
"username": "user",
|
19
|
+
"clickwrap_id": 1,
|
18
20
|
"paths": [
|
19
21
|
|
20
22
|
]
|
@@ -26,12 +28,14 @@
|
|
26
28
|
* `description` (string): Public description
|
27
29
|
* `password_protected` (boolean): Is this bundle password protected?
|
28
30
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
31
|
+
* `clickwrap_body` (string): Legal text that must be agreed to prior to accessing Bundle.
|
29
32
|
* `id` (int64): Bundle ID
|
30
33
|
* `created_at` (date-time): Bundle created at date/time
|
31
34
|
* `expires_at` (date-time): Bundle expiration date/time
|
32
35
|
* `note` (string): Bundle internal note
|
33
36
|
* `user_id` (int64): Bundle creator user ID
|
34
37
|
* `username` (string): Bundle creator username
|
38
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
35
39
|
* `paths` (array): A list of paths in this bundle
|
36
40
|
* `password` (string): Password for this bundle.
|
37
41
|
|
@@ -82,7 +86,8 @@ Files::Bundle.create(
|
|
82
86
|
description: "The public description of the bundle.",
|
83
87
|
note: "The internal note on the bundle.",
|
84
88
|
code: "abc123",
|
85
|
-
require_registration: true
|
89
|
+
require_registration: true,
|
90
|
+
clickwrap_id: 1
|
86
91
|
)
|
87
92
|
```
|
88
93
|
|
@@ -96,6 +101,7 @@ Files::Bundle.create(
|
|
96
101
|
* `note` (string): Bundle internal note
|
97
102
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
98
103
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
104
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
99
105
|
|
100
106
|
|
101
107
|
---
|
@@ -127,7 +133,8 @@ Files::Bundle.update(id,
|
|
127
133
|
description: "The public description of the bundle.",
|
128
134
|
note: "The internal note on the bundle.",
|
129
135
|
code: "abc123",
|
130
|
-
require_registration: true
|
136
|
+
require_registration: true,
|
137
|
+
clickwrap_id: 1
|
131
138
|
)
|
132
139
|
```
|
133
140
|
|
@@ -140,6 +147,7 @@ Files::Bundle.update(id,
|
|
140
147
|
* `note` (string): Bundle internal note
|
141
148
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
142
149
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
150
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
143
151
|
|
144
152
|
|
145
153
|
---
|
@@ -188,7 +196,8 @@ bundle.update(
|
|
188
196
|
description: "The public description of the bundle.",
|
189
197
|
note: "The internal note on the bundle.",
|
190
198
|
code: "abc123",
|
191
|
-
require_registration: true
|
199
|
+
require_registration: true,
|
200
|
+
clickwrap_id: 1
|
192
201
|
)
|
193
202
|
```
|
194
203
|
|
@@ -201,6 +210,7 @@ bundle.update(
|
|
201
210
|
* `note` (string): Bundle internal note
|
202
211
|
* `code` (string): Bundle code. This code forms the end part of the Public URL.
|
203
212
|
* `require_registration` (boolean): Show a registration page that captures the downloader's name and email address?
|
213
|
+
* `clickwrap_id` (int64): ID of the clickwrap to use with this bundle.
|
204
214
|
|
205
215
|
|
206
216
|
---
|
data/docs/clickwrap.md
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
# Clickwrap
|
2
|
+
|
3
|
+
## Example Clickwrap Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"name": "Example Site NDA for Files.com Use",
|
8
|
+
"body": "[Legal body text]",
|
9
|
+
"use_with_users": "",
|
10
|
+
"use_with_bundles": "",
|
11
|
+
"use_with_inboxes": ""
|
12
|
+
}
|
13
|
+
```
|
14
|
+
|
15
|
+
* `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
16
|
+
* `body` (string): Body text of Clickwrap (supports Markdown formatting).
|
17
|
+
* `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
18
|
+
* `use_with_bundles` (string): Use this Clickwrap for Bundles?
|
19
|
+
* `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
|
20
|
+
* `id` (int64): Clickwrap ID.
|
21
|
+
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## List Clickwraps
|
26
|
+
|
27
|
+
```
|
28
|
+
Files::Clickwrap.list(
|
29
|
+
page: 1,
|
30
|
+
per_page: 1
|
31
|
+
)
|
32
|
+
```
|
33
|
+
|
34
|
+
### Parameters
|
35
|
+
|
36
|
+
* `page` (int64): Current page number.
|
37
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
38
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
39
|
+
|
40
|
+
|
41
|
+
---
|
42
|
+
|
43
|
+
## Show Clickwrap
|
44
|
+
|
45
|
+
```
|
46
|
+
Files::Clickwrap.find(id)
|
47
|
+
```
|
48
|
+
|
49
|
+
### Parameters
|
50
|
+
|
51
|
+
* `id` (int64): Required - Clickwrap ID.
|
52
|
+
|
53
|
+
|
54
|
+
---
|
55
|
+
|
56
|
+
## Create Clickwrap
|
57
|
+
|
58
|
+
```
|
59
|
+
Files::Clickwrap.create(
|
60
|
+
name: "Example Site NDA for Files.com Use",
|
61
|
+
body: "[Legal body text]"
|
62
|
+
)
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
* `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
68
|
+
* `body` (string): Body text of Clickwrap (supports Markdown formatting).
|
69
|
+
* `use_with_bundles` (string): Use this Clickwrap for Bundles?
|
70
|
+
* `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
|
71
|
+
* `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
72
|
+
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
## Update Clickwrap
|
77
|
+
|
78
|
+
```
|
79
|
+
Files::Clickwrap.update(id,
|
80
|
+
name: "Example Site NDA for Files.com Use",
|
81
|
+
body: "[Legal body text]"
|
82
|
+
)
|
83
|
+
```
|
84
|
+
|
85
|
+
### Parameters
|
86
|
+
|
87
|
+
* `id` (int64): Required - Clickwrap ID.
|
88
|
+
* `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
89
|
+
* `body` (string): Body text of Clickwrap (supports Markdown formatting).
|
90
|
+
* `use_with_bundles` (string): Use this Clickwrap for Bundles?
|
91
|
+
* `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
|
92
|
+
* `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
93
|
+
|
94
|
+
|
95
|
+
---
|
96
|
+
|
97
|
+
## Delete Clickwrap
|
98
|
+
|
99
|
+
```
|
100
|
+
Files::Clickwrap.delete(id)
|
101
|
+
```
|
102
|
+
|
103
|
+
### Parameters
|
104
|
+
|
105
|
+
* `id` (int64): Required - Clickwrap ID.
|
106
|
+
|
107
|
+
|
108
|
+
---
|
109
|
+
|
110
|
+
## Update Clickwrap
|
111
|
+
|
112
|
+
```
|
113
|
+
clickwrap = Files::Clickwrap.list_for(path).first
|
114
|
+
|
115
|
+
clickwrap.update(
|
116
|
+
name: "Example Site NDA for Files.com Use",
|
117
|
+
body: "[Legal body text]"
|
118
|
+
)
|
119
|
+
```
|
120
|
+
|
121
|
+
### Parameters
|
122
|
+
|
123
|
+
* `id` (int64): Required - Clickwrap ID.
|
124
|
+
* `name` (string): Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
125
|
+
* `body` (string): Body text of Clickwrap (supports Markdown formatting).
|
126
|
+
* `use_with_bundles` (string): Use this Clickwrap for Bundles?
|
127
|
+
* `use_with_inboxes` (string): Use this Clickwrap for Inboxes?
|
128
|
+
* `use_with_users` (string): Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
129
|
+
|
130
|
+
|
131
|
+
---
|
132
|
+
|
133
|
+
## Delete Clickwrap
|
134
|
+
|
135
|
+
```
|
136
|
+
clickwrap = Files::Clickwrap.list_for(path).first
|
137
|
+
|
138
|
+
clickwrap.delete
|
139
|
+
```
|
140
|
+
|
141
|
+
### Parameters
|
142
|
+
|
143
|
+
* `id` (int64): Required - Clickwrap ID.
|
data/lib/files.com.rb
CHANGED
@@ -34,6 +34,7 @@ require "files.com/models/auto"
|
|
34
34
|
require "files.com/models/automation"
|
35
35
|
require "files.com/models/behavior"
|
36
36
|
require "files.com/models/bundle"
|
37
|
+
require "files.com/models/clickwrap"
|
37
38
|
require "files.com/models/dns_record"
|
38
39
|
require "files.com/models/errors"
|
39
40
|
require "files.com/models/file"
|
@@ -54,6 +54,15 @@ module Files
|
|
54
54
|
@attributes[:require_registration] = value
|
55
55
|
end
|
56
56
|
|
57
|
+
# string - Legal text that must be agreed to prior to accessing Bundle.
|
58
|
+
def clickwrap_body
|
59
|
+
@attributes[:clickwrap_body]
|
60
|
+
end
|
61
|
+
|
62
|
+
def clickwrap_body=(value)
|
63
|
+
@attributes[:clickwrap_body] = value
|
64
|
+
end
|
65
|
+
|
57
66
|
# int64 - Bundle ID
|
58
67
|
def id
|
59
68
|
@attributes[:id]
|
@@ -104,6 +113,15 @@ module Files
|
|
104
113
|
@attributes[:username] = value
|
105
114
|
end
|
106
115
|
|
116
|
+
# int64 - ID of the clickwrap to use with this bundle.
|
117
|
+
def clickwrap_id
|
118
|
+
@attributes[:clickwrap_id]
|
119
|
+
end
|
120
|
+
|
121
|
+
def clickwrap_id=(value)
|
122
|
+
@attributes[:clickwrap_id] = value
|
123
|
+
end
|
124
|
+
|
107
125
|
# array - A list of paths in this bundle
|
108
126
|
def paths
|
109
127
|
@attributes[:paths]
|
@@ -147,6 +165,7 @@ module Files
|
|
147
165
|
# note - string - Bundle internal note
|
148
166
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
149
167
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
168
|
+
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
150
169
|
def update(params = {})
|
151
170
|
params ||= {}
|
152
171
|
params[:id] = @attributes[:id]
|
@@ -157,6 +176,7 @@ module Files
|
|
157
176
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
158
177
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
|
159
178
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
179
|
+
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
160
180
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
161
181
|
|
162
182
|
Api.send_request("/bundles/#{@attributes[:id]}", :patch, params, @options)
|
@@ -231,6 +251,7 @@ module Files
|
|
231
251
|
# note - string - Bundle internal note
|
232
252
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
233
253
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
254
|
+
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
234
255
|
def self.create(params = {}, options = {})
|
235
256
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
236
257
|
raise InvalidParameterError.new("Bad parameter: paths must be an Array") if params.dig(:paths) and !params.dig(:paths).is_a?(Array)
|
@@ -239,6 +260,7 @@ module Files
|
|
239
260
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
240
261
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
|
241
262
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
263
|
+
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
242
264
|
raise MissingParameterError.new("Parameter missing: paths") unless params.dig(:paths)
|
243
265
|
|
244
266
|
response, options = Api.send_request("/bundles", :post, params, options)
|
@@ -270,6 +292,7 @@ module Files
|
|
270
292
|
# note - string - Bundle internal note
|
271
293
|
# code - string - Bundle code. This code forms the end part of the Public URL.
|
272
294
|
# require_registration - boolean - Show a registration page that captures the downloader's name and email address?
|
295
|
+
# clickwrap_id - int64 - ID of the clickwrap to use with this bundle.
|
273
296
|
def self.update(id, params = {}, options = {})
|
274
297
|
params ||= {}
|
275
298
|
params[:id] = id
|
@@ -279,6 +302,7 @@ module Files
|
|
279
302
|
raise InvalidParameterError.new("Bad parameter: description must be an String") if params.dig(:description) and !params.dig(:description).is_a?(String)
|
280
303
|
raise InvalidParameterError.new("Bad parameter: note must be an String") if params.dig(:note) and !params.dig(:note).is_a?(String)
|
281
304
|
raise InvalidParameterError.new("Bad parameter: code must be an String") if params.dig(:code) and !params.dig(:code).is_a?(String)
|
305
|
+
raise InvalidParameterError.new("Bad parameter: clickwrap_id must be an Integer") if params.dig(:clickwrap_id) and !params.dig(:clickwrap_id).is_a?(Integer)
|
282
306
|
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
283
307
|
|
284
308
|
response, options = Api.send_request("/bundles/#{params[:id]}", :patch, params, options)
|
@@ -0,0 +1,197 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class Clickwrap
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
13
|
+
def name
|
14
|
+
@attributes[:name]
|
15
|
+
end
|
16
|
+
|
17
|
+
def name=(value)
|
18
|
+
@attributes[:name] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# string - Body text of Clickwrap (supports Markdown formatting).
|
22
|
+
def body
|
23
|
+
@attributes[:body]
|
24
|
+
end
|
25
|
+
|
26
|
+
def body=(value)
|
27
|
+
@attributes[:body] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
31
|
+
def use_with_users
|
32
|
+
@attributes[:use_with_users]
|
33
|
+
end
|
34
|
+
|
35
|
+
def use_with_users=(value)
|
36
|
+
@attributes[:use_with_users] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# string - Use this Clickwrap for Bundles?
|
40
|
+
def use_with_bundles
|
41
|
+
@attributes[:use_with_bundles]
|
42
|
+
end
|
43
|
+
|
44
|
+
def use_with_bundles=(value)
|
45
|
+
@attributes[:use_with_bundles] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# string - Use this Clickwrap for Inboxes?
|
49
|
+
def use_with_inboxes
|
50
|
+
@attributes[:use_with_inboxes]
|
51
|
+
end
|
52
|
+
|
53
|
+
def use_with_inboxes=(value)
|
54
|
+
@attributes[:use_with_inboxes] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# int64 - Clickwrap ID.
|
58
|
+
def id
|
59
|
+
@attributes[:id]
|
60
|
+
end
|
61
|
+
|
62
|
+
def id=(value)
|
63
|
+
@attributes[:id] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
# Parameters:
|
67
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
68
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
69
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
70
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
71
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
72
|
+
def update(params = {})
|
73
|
+
params ||= {}
|
74
|
+
params[:id] = @attributes[:id]
|
75
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
76
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
77
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
78
|
+
raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
|
79
|
+
raise InvalidParameterError.new("Bad parameter: use_with_bundles must be an String") if params.dig(:use_with_bundles) and !params.dig(:use_with_bundles).is_a?(String)
|
80
|
+
raise InvalidParameterError.new("Bad parameter: use_with_inboxes must be an String") if params.dig(:use_with_inboxes) and !params.dig(:use_with_inboxes).is_a?(String)
|
81
|
+
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params.dig(:use_with_users) and !params.dig(:use_with_users).is_a?(String)
|
82
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
83
|
+
|
84
|
+
Api.send_request("/clickwraps/#{@attributes[:id]}", :patch, params, @options)
|
85
|
+
end
|
86
|
+
|
87
|
+
def delete(params = {})
|
88
|
+
params ||= {}
|
89
|
+
params[:id] = @attributes[:id]
|
90
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
91
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
92
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
93
|
+
|
94
|
+
Api.send_request("/clickwraps/#{@attributes[:id]}", :delete, params, @options)
|
95
|
+
end
|
96
|
+
|
97
|
+
def destroy(params = {})
|
98
|
+
delete(params)
|
99
|
+
end
|
100
|
+
|
101
|
+
def save
|
102
|
+
if @attributes[:id]
|
103
|
+
update(@attributes)
|
104
|
+
else
|
105
|
+
new_obj = Clickwrap.create(@attributes, @options)
|
106
|
+
@attributes = new_obj.attributes
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# Parameters:
|
111
|
+
# page - int64 - Current page number.
|
112
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
114
|
+
def self.list(params = {}, options = {})
|
115
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
116
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
117
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
118
|
+
|
119
|
+
response, options = Api.send_request("/clickwraps", :get, params, options)
|
120
|
+
response.data.map do |entity_data|
|
121
|
+
Clickwrap.new(entity_data, options)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def self.all(params = {}, options = {})
|
126
|
+
list(params, options)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Parameters:
|
130
|
+
# id (required) - int64 - Clickwrap ID.
|
131
|
+
def self.find(id, params = {}, options = {})
|
132
|
+
params ||= {}
|
133
|
+
params[:id] = id
|
134
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
135
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
136
|
+
|
137
|
+
response, options = Api.send_request("/clickwraps/#{params[:id]}", :get, params, options)
|
138
|
+
Clickwrap.new(response.data, options)
|
139
|
+
end
|
140
|
+
|
141
|
+
def self.get(id, params = {}, options = {})
|
142
|
+
find(id, params, options)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Parameters:
|
146
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
147
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
148
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
149
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
150
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
151
|
+
def self.create(params = {}, options = {})
|
152
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
153
|
+
raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
|
154
|
+
raise InvalidParameterError.new("Bad parameter: use_with_bundles must be an String") if params.dig(:use_with_bundles) and !params.dig(:use_with_bundles).is_a?(String)
|
155
|
+
raise InvalidParameterError.new("Bad parameter: use_with_inboxes must be an String") if params.dig(:use_with_inboxes) and !params.dig(:use_with_inboxes).is_a?(String)
|
156
|
+
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params.dig(:use_with_users) and !params.dig(:use_with_users).is_a?(String)
|
157
|
+
|
158
|
+
response, options = Api.send_request("/clickwraps", :post, params, options)
|
159
|
+
Clickwrap.new(response.data, options)
|
160
|
+
end
|
161
|
+
|
162
|
+
# Parameters:
|
163
|
+
# name - string - Name of the Clickwrap agreement (used when selecting from multiple Clickwrap agreements.)
|
164
|
+
# body - string - Body text of Clickwrap (supports Markdown formatting).
|
165
|
+
# use_with_bundles - string - Use this Clickwrap for Bundles?
|
166
|
+
# use_with_inboxes - string - Use this Clickwrap for Inboxes?
|
167
|
+
# use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
|
168
|
+
def self.update(id, params = {}, options = {})
|
169
|
+
params ||= {}
|
170
|
+
params[:id] = id
|
171
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
172
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
|
173
|
+
raise InvalidParameterError.new("Bad parameter: body must be an String") if params.dig(:body) and !params.dig(:body).is_a?(String)
|
174
|
+
raise InvalidParameterError.new("Bad parameter: use_with_bundles must be an String") if params.dig(:use_with_bundles) and !params.dig(:use_with_bundles).is_a?(String)
|
175
|
+
raise InvalidParameterError.new("Bad parameter: use_with_inboxes must be an String") if params.dig(:use_with_inboxes) and !params.dig(:use_with_inboxes).is_a?(String)
|
176
|
+
raise InvalidParameterError.new("Bad parameter: use_with_users must be an String") if params.dig(:use_with_users) and !params.dig(:use_with_users).is_a?(String)
|
177
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
178
|
+
|
179
|
+
response, options = Api.send_request("/clickwraps/#{params[:id]}", :patch, params, options)
|
180
|
+
Clickwrap.new(response.data, options)
|
181
|
+
end
|
182
|
+
|
183
|
+
def self.delete(id, params = {}, options = {})
|
184
|
+
params ||= {}
|
185
|
+
params[:id] = id
|
186
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
187
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
188
|
+
|
189
|
+
response, _options = Api.send_request("/clickwraps/#{params[:id]}", :delete, params, options)
|
190
|
+
response.data
|
191
|
+
end
|
192
|
+
|
193
|
+
def self.destroy(id, params = {}, options = {})
|
194
|
+
delete(id, params, options)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
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.74
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- docs/automation.md
|
93
93
|
- docs/behavior.md
|
94
94
|
- docs/bundle.md
|
95
|
+
- docs/clickwrap.md
|
95
96
|
- docs/dns_record.md
|
96
97
|
- docs/errors.md
|
97
98
|
- docs/file.md
|
@@ -146,6 +147,7 @@ files:
|
|
146
147
|
- lib/files.com/models/automation.rb
|
147
148
|
- lib/files.com/models/behavior.rb
|
148
149
|
- lib/files.com/models/bundle.rb
|
150
|
+
- lib/files.com/models/clickwrap.rb
|
149
151
|
- lib/files.com/models/dir.rb
|
150
152
|
- lib/files.com/models/dns_record.rb
|
151
153
|
- lib/files.com/models/errors.rb
|