files.com 1.1.506 → 1.1.508
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/README.md +1 -0
- data/_VERSION +1 -1
- data/docs/api_key.md +5 -1
- data/docs/automation_run.md +1 -1
- data/docs/partner_site_request.md +154 -0
- data/docs/user.md +2 -2
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/api_key.rb +19 -1
- data/lib/files.com/models/automation_run.rb +1 -1
- data/lib/files.com/models/partner_site_request.rb +200 -0
- data/lib/files.com/models/user.rb +2 -2
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26aecc97bf9646c7b3054d2a896110ff41fcc703ae98eafbe72f7d7a36141417
|
|
4
|
+
data.tar.gz: e3b8b0a93ee04896070353c46587b2381a28fff3550166ae2d07b2a7ce1be266
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a39f54ba49b7f73a8fadb5785364515fe385309c62f17e5ded428967878b2e35724901b897ea0b07371ccee41fb6656b95d4891412186ee73a5bacc5e8f7027
|
|
7
|
+
data.tar.gz: 3923b0fd749ccf81da70097358b9442730da98231dcf92be6f1077654ce7c4d5c9a8a8406731e31b54c8882b5b945336c8913b29e2f18394269d8e8a7c62f77b
|
data/README.md
CHANGED
|
@@ -476,6 +476,7 @@ Files::FolderAdminPermissionRequiredError -> Files::NotAuthorizedError -> Files:
|
|
|
476
476
|
|`CantMoveWithMultipleLocationsError`| `BadRequestError` |
|
|
477
477
|
|`DatetimeParseError`| `BadRequestError` |
|
|
478
478
|
|`DestinationSameError`| `BadRequestError` |
|
|
479
|
+
|`DestinationSiteMismatchError`| `BadRequestError` |
|
|
479
480
|
|`DoesNotSupportSortingError`| `BadRequestError` |
|
|
480
481
|
|`FolderMustNotBeAFileError`| `BadRequestError` |
|
|
481
482
|
|`FoldersNotAllowedError`| `BadRequestError` |
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.508
|
data/docs/api_key.md
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"name": "My Main API Key",
|
|
18
18
|
"permission_set": "full",
|
|
19
19
|
"platform": "win32",
|
|
20
|
+
"site_id": 1,
|
|
21
|
+
"site_name": "example",
|
|
20
22
|
"url": "example",
|
|
21
23
|
"user_id": 1
|
|
22
24
|
}
|
|
@@ -35,6 +37,8 @@
|
|
|
35
37
|
* `name` (string): Internal name for the API Key. For your use.
|
|
36
38
|
* `permission_set` (string): Permissions for this API Key. It must be full for site-wide API Keys. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Keys with the `office_integration` permission set are auto generated, and automatically expire, to allow users to interact with office integration platforms. Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
|
|
37
39
|
* `platform` (string): If this API key represents a Desktop app, what platform was it created on?
|
|
40
|
+
* `site_id` (int64): Site ID
|
|
41
|
+
* `site_name` (string): Site Name
|
|
38
42
|
* `url` (string): URL for API host.
|
|
39
43
|
* `user_id` (int64): User ID for the owner of this API Key. May be blank for Site-wide API Keys.
|
|
40
44
|
* `path` (string): Folder path restriction for `office_integration` permission set API keys.
|
|
@@ -55,7 +59,7 @@ Files::ApiKey.list(
|
|
|
55
59
|
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
|
56
60
|
* `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.
|
|
57
61
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
58
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
62
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `expires_at`.
|
|
59
63
|
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `expires_at`.
|
|
60
64
|
* `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `expires_at`.
|
|
61
65
|
* `filter_gteq` (object): If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `expires_at`.
|
data/docs/automation_run.md
CHANGED
|
@@ -54,7 +54,7 @@ Files::AutomationRun.list(
|
|
|
54
54
|
* `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.
|
|
55
55
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
56
56
|
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
57
|
-
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
57
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
58
58
|
* `automation_id` (int64): Required - ID of the associated Automation.
|
|
59
59
|
|
|
60
60
|
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# PartnerSiteRequest
|
|
2
|
+
|
|
3
|
+
## Example PartnerSiteRequest Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"id": 1,
|
|
8
|
+
"partner_id": 1,
|
|
9
|
+
"linked_site_id": 1,
|
|
10
|
+
"status": "pending",
|
|
11
|
+
"pairing_key": "abc123xyz",
|
|
12
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
13
|
+
"updated_at": "2000-01-01T01:00:00Z"
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
* `id` (int64): Partner Site Request ID
|
|
18
|
+
* `partner_id` (int64): Partner ID
|
|
19
|
+
* `linked_site_id` (int64): Linked Site ID
|
|
20
|
+
* `status` (string): Request status (pending, approved, rejected)
|
|
21
|
+
* `pairing_key` (string): Pairing key used to approve this request on the target site
|
|
22
|
+
* `created_at` (date-time): Request creation date/time
|
|
23
|
+
* `updated_at` (date-time): Request last updated date/time
|
|
24
|
+
* `site_url` (string): Site URL to link to
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## List Partner Site Requests
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Files::PartnerSiteRequest.list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
* `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.
|
|
38
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Find partner site request by pairing key
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Files::PartnerSiteRequest.find_by_pairing_key(
|
|
47
|
+
pairing_key: "pairing_key"
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Parameters
|
|
52
|
+
|
|
53
|
+
* `pairing_key` (string): Required - Pairing key for the partner site request
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Create Partner Site Request
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Files::PartnerSiteRequest.create(
|
|
62
|
+
partner_id: 1,
|
|
63
|
+
site_url: "site_url"
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Parameters
|
|
68
|
+
|
|
69
|
+
* `partner_id` (int64): Required - Partner ID to link with
|
|
70
|
+
* `site_url` (string): Required - Site URL to link to
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Reject partner site request
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Files::PartnerSiteRequest.reject(id)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
82
|
+
|
|
83
|
+
* `id` (int64): Required - Partner Site Request ID.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Approve partner site request
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Files::PartnerSiteRequest.approve(id)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Parameters
|
|
95
|
+
|
|
96
|
+
* `id` (int64): Required - Partner Site Request ID.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Delete Partner Site Request
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Files::PartnerSiteRequest.delete(id)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Parameters
|
|
108
|
+
|
|
109
|
+
* `id` (int64): Required - Partner Site Request ID.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Reject partner site request
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
partner_site_request = Files::PartnerSiteRequest.list.first
|
|
118
|
+
|
|
119
|
+
partner_site_request.reject
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Parameters
|
|
123
|
+
|
|
124
|
+
* `id` (int64): Required - Partner Site Request ID.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Approve partner site request
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
partner_site_request = Files::PartnerSiteRequest.list.first
|
|
133
|
+
|
|
134
|
+
partner_site_request.approve
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Parameters
|
|
138
|
+
|
|
139
|
+
* `id` (int64): Required - Partner Site Request ID.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Delete Partner Site Request
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
partner_site_request = Files::PartnerSiteRequest.list.first
|
|
148
|
+
|
|
149
|
+
partner_site_request.delete
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Parameters
|
|
153
|
+
|
|
154
|
+
* `id` (int64): Required - Partner Site Request ID.
|
data/docs/user.md
CHANGED
|
@@ -184,10 +184,10 @@ Files::User.list(
|
|
|
184
184
|
* `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.
|
|
185
185
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
186
186
|
* `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`, `last_desktop_login_at`, `last_login_at`, `site_admin`, `password_validity_days` or `ssl_required`.
|
|
187
|
-
* `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` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[
|
|
187
|
+
* `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` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[ workspace_id, disabled ]` or `[ workspace_id, disabled, username ]`.
|
|
188
188
|
* `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`.
|
|
189
189
|
* `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`.
|
|
190
|
-
* `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`.
|
|
190
|
+
* `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`.
|
|
191
191
|
* `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`.
|
|
192
192
|
* `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`.
|
|
193
193
|
* `ids` (string): comma-separated list of User IDs
|
data/lib/files.com/errors.rb
CHANGED
|
@@ -52,6 +52,7 @@ module Files
|
|
|
52
52
|
class CantMoveWithMultipleLocationsError < BadRequestError; end
|
|
53
53
|
class DatetimeParseError < BadRequestError; end
|
|
54
54
|
class DestinationSameError < BadRequestError; end
|
|
55
|
+
class DestinationSiteMismatchError < BadRequestError; end
|
|
55
56
|
class DoesNotSupportSortingError < BadRequestError; end
|
|
56
57
|
class FolderMustNotBeAFileError < BadRequestError; end
|
|
57
58
|
class FoldersNotAllowedError < BadRequestError; end
|
|
@@ -122,6 +122,24 @@ module Files
|
|
|
122
122
|
@attributes[:platform] = value
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
+
# int64 - Site ID
|
|
126
|
+
def site_id
|
|
127
|
+
@attributes[:site_id]
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def site_id=(value)
|
|
131
|
+
@attributes[:site_id] = value
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# string - Site Name
|
|
135
|
+
def site_name
|
|
136
|
+
@attributes[:site_name]
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def site_name=(value)
|
|
140
|
+
@attributes[:site_name] = value
|
|
141
|
+
end
|
|
142
|
+
|
|
125
143
|
# string - URL for API host.
|
|
126
144
|
def url
|
|
127
145
|
@attributes[:url]
|
|
@@ -196,7 +214,7 @@ module Files
|
|
|
196
214
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
197
215
|
# 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.
|
|
198
216
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
199
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `expires_at`.
|
|
217
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id` and `expires_at`.
|
|
200
218
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `expires_at`.
|
|
201
219
|
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `expires_at`.
|
|
202
220
|
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `expires_at`.
|
|
@@ -84,7 +84,7 @@ module Files
|
|
|
84
84
|
# 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.
|
|
85
85
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
86
86
|
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `automation_id`, `created_at` or `status`.
|
|
87
|
-
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
87
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `status`, `workspace_id` or `automation_id`. Valid field combinations are `[ workspace_id, status ]`, `[ automation_id, status ]`, `[ workspace_id, automation_id ]` or `[ workspace_id, automation_id, status ]`.
|
|
88
88
|
# automation_id (required) - int64 - ID of the associated Automation.
|
|
89
89
|
def self.list(params = {}, options = {})
|
|
90
90
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class PartnerSiteRequest
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# int64 - Partner Site Request ID
|
|
13
|
+
def id
|
|
14
|
+
@attributes[:id]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def id=(value)
|
|
18
|
+
@attributes[:id] = value
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# int64 - Partner ID
|
|
22
|
+
def partner_id
|
|
23
|
+
@attributes[:partner_id]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def partner_id=(value)
|
|
27
|
+
@attributes[:partner_id] = value
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# int64 - Linked Site ID
|
|
31
|
+
def linked_site_id
|
|
32
|
+
@attributes[:linked_site_id]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def linked_site_id=(value)
|
|
36
|
+
@attributes[:linked_site_id] = value
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# string - Request status (pending, approved, rejected)
|
|
40
|
+
def status
|
|
41
|
+
@attributes[:status]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def status=(value)
|
|
45
|
+
@attributes[:status] = value
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# string - Pairing key used to approve this request on the target site
|
|
49
|
+
def pairing_key
|
|
50
|
+
@attributes[:pairing_key]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def pairing_key=(value)
|
|
54
|
+
@attributes[:pairing_key] = value
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# date-time - Request creation date/time
|
|
58
|
+
def created_at
|
|
59
|
+
@attributes[:created_at]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# date-time - Request last updated date/time
|
|
63
|
+
def updated_at
|
|
64
|
+
@attributes[:updated_at]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# string - Site URL to link to
|
|
68
|
+
def site_url
|
|
69
|
+
@attributes[:site_url]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def site_url=(value)
|
|
73
|
+
@attributes[:site_url] = value
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Reject partner site request
|
|
77
|
+
def reject(params = {})
|
|
78
|
+
params ||= {}
|
|
79
|
+
params[:id] = @attributes[:id]
|
|
80
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
81
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
82
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
83
|
+
|
|
84
|
+
Api.send_request("/partner_site_requests/#{@attributes[:id]}/reject", :post, params, @options)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Approve partner site request
|
|
88
|
+
def approve(params = {})
|
|
89
|
+
params ||= {}
|
|
90
|
+
params[:id] = @attributes[:id]
|
|
91
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
92
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
93
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
94
|
+
|
|
95
|
+
Api.send_request("/partner_site_requests/#{@attributes[:id]}/approve", :post, params, @options)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def delete(params = {})
|
|
99
|
+
params ||= {}
|
|
100
|
+
params[:id] = @attributes[:id]
|
|
101
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
102
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
103
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
104
|
+
|
|
105
|
+
Api.send_request("/partner_site_requests/#{@attributes[:id]}", :delete, params, @options)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def destroy(params = {})
|
|
109
|
+
delete(params)
|
|
110
|
+
nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def save
|
|
114
|
+
if @attributes[:id]
|
|
115
|
+
raise NotImplementedError.new("The PartnerSiteRequest object doesn't support updates.")
|
|
116
|
+
else
|
|
117
|
+
new_obj = PartnerSiteRequest.create(@attributes, @options)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@attributes = new_obj.attributes
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Parameters:
|
|
125
|
+
# 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.
|
|
126
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
127
|
+
def self.list(params = {}, options = {})
|
|
128
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
129
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
130
|
+
|
|
131
|
+
List.new(PartnerSiteRequest, params) do
|
|
132
|
+
Api.send_request("/partner_site_requests", :get, params, options)
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def self.all(params = {}, options = {})
|
|
137
|
+
list(params, options)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Parameters:
|
|
141
|
+
# pairing_key (required) - string - Pairing key for the partner site request
|
|
142
|
+
def self.find_by_pairing_key(params = {}, options = {})
|
|
143
|
+
raise InvalidParameterError.new("Bad parameter: pairing_key must be an String") if params[:pairing_key] and !params[:pairing_key].is_a?(String)
|
|
144
|
+
raise MissingParameterError.new("Parameter missing: pairing_key") unless params[:pairing_key]
|
|
145
|
+
|
|
146
|
+
Api.send_request("/partner_site_requests/find_by_pairing_key", :get, params, options)
|
|
147
|
+
nil
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Parameters:
|
|
151
|
+
# partner_id (required) - int64 - Partner ID to link with
|
|
152
|
+
# site_url (required) - string - Site URL to link to
|
|
153
|
+
def self.create(params = {}, options = {})
|
|
154
|
+
raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
|
|
155
|
+
raise InvalidParameterError.new("Bad parameter: site_url must be an String") if params[:site_url] and !params[:site_url].is_a?(String)
|
|
156
|
+
raise MissingParameterError.new("Parameter missing: partner_id") unless params[:partner_id]
|
|
157
|
+
raise MissingParameterError.new("Parameter missing: site_url") unless params[:site_url]
|
|
158
|
+
|
|
159
|
+
response, options = Api.send_request("/partner_site_requests", :post, params, options)
|
|
160
|
+
PartnerSiteRequest.new(response.data, options)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Reject partner site request
|
|
164
|
+
def self.reject(id, params = {}, options = {})
|
|
165
|
+
params ||= {}
|
|
166
|
+
params[:id] = id
|
|
167
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
168
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
169
|
+
|
|
170
|
+
Api.send_request("/partner_site_requests/#{params[:id]}/reject", :post, params, options)
|
|
171
|
+
nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Approve partner site request
|
|
175
|
+
def self.approve(id, params = {}, options = {})
|
|
176
|
+
params ||= {}
|
|
177
|
+
params[:id] = id
|
|
178
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
179
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
180
|
+
|
|
181
|
+
Api.send_request("/partner_site_requests/#{params[:id]}/approve", :post, params, options)
|
|
182
|
+
nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def self.delete(id, params = {}, options = {})
|
|
186
|
+
params ||= {}
|
|
187
|
+
params[:id] = id
|
|
188
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
189
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
190
|
+
|
|
191
|
+
Api.send_request("/partner_site_requests/#{params[:id]}", :delete, params, options)
|
|
192
|
+
nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def self.destroy(id, params = {}, options = {})
|
|
196
|
+
delete(id, params, options)
|
|
197
|
+
nil
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
@@ -931,10 +931,10 @@ module Files
|
|
|
931
931
|
# 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.
|
|
932
932
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
933
933
|
# 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`, `last_desktop_login_at`, `last_login_at`, `site_admin`, `password_validity_days` or `ssl_required`.
|
|
934
|
-
# 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` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[
|
|
934
|
+
# 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` or `workspace_id`. Valid field combinations are `[ site_admin, username ]`, `[ not_site_admin, username ]`, `[ workspace_id, username ]`, `[ workspace_id, disabled ]` or `[ workspace_id, disabled, username ]`.
|
|
935
935
|
# 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`.
|
|
936
936
|
# 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`.
|
|
937
|
-
# 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`.
|
|
937
|
+
# 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`.
|
|
938
938
|
# 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`.
|
|
939
939
|
# 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`.
|
|
940
940
|
# ids - string - comma-separated list of User IDs
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
|
@@ -100,6 +100,7 @@ require "files.com/models/message_reaction"
|
|
|
100
100
|
require "files.com/models/notification"
|
|
101
101
|
require "files.com/models/outbound_connection_log"
|
|
102
102
|
require "files.com/models/partner"
|
|
103
|
+
require "files.com/models/partner_site_request"
|
|
103
104
|
require "files.com/models/payment"
|
|
104
105
|
require "files.com/models/payment_line_item"
|
|
105
106
|
require "files.com/models/permission"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.508
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
@@ -225,6 +225,7 @@ files:
|
|
|
225
225
|
- docs/notification.md
|
|
226
226
|
- docs/outbound_connection_log.md
|
|
227
227
|
- docs/partner.md
|
|
228
|
+
- docs/partner_site_request.md
|
|
228
229
|
- docs/payment.md
|
|
229
230
|
- docs/payment_line_item.md
|
|
230
231
|
- docs/permission.md
|
|
@@ -344,6 +345,7 @@ files:
|
|
|
344
345
|
- lib/files.com/models/notification.rb
|
|
345
346
|
- lib/files.com/models/outbound_connection_log.rb
|
|
346
347
|
- lib/files.com/models/partner.rb
|
|
348
|
+
- lib/files.com/models/partner_site_request.rb
|
|
347
349
|
- lib/files.com/models/payment.rb
|
|
348
350
|
- lib/files.com/models/payment_line_item.rb
|
|
349
351
|
- lib/files.com/models/permission.rb
|