files.com 1.1.650 → 1.1.652

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7dde18d343e9bf8a8538ccfb34491976a3db43de79ce6589d686767c75316bd
4
- data.tar.gz: 7d82c5763649255e9817bca9f5c06a6936615ab76e2dd3e160b2d86ece0f61a5
3
+ metadata.gz: 3144d1cb5586604b15707297a2eb1e77f3e0cf972df41e544fe86068a6d3f133
4
+ data.tar.gz: 6aa3e0c516063edf075f20141cc247efcdaaa50e3a6248f024c39b3bf5614d43
5
5
  SHA512:
6
- metadata.gz: b83595592c9e9e3ac15367209f141970cd60c28a6c7dd78756a82adb027e70e2b026aadaf0c66398c9a82be5b4ab31c5479447496e129b0eb5ec76449caec23a
7
- data.tar.gz: 3350a714101aa458812fd311a8899040484d16b2d4393cfce4cd445230e87866a783e37cc0f945d288e72fcbc37d278d7a879834c2b34e6e47f4ade1f1a3d1f3
6
+ metadata.gz: 0672b7871f40017040ca9867b87776a7798b431d7017e2ccc01e44b09d01e1fe90509efb28889671fb442238458cda29920c15b98bccdd6b44aeef0dfdcc2d9e
7
+ data.tar.gz: 288aeb803c8a603e69bc48b957d0895ee5e281184011b47942194b99165e41e6635b99e7cb705e6a45f6c6dbd22ec884050b676d98da3ecff5b9217628832216
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.650
1
+ 1.1.652
data/docs/file.md CHANGED
@@ -268,6 +268,56 @@ Files::File.move(path,
268
268
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
269
269
 
270
270
 
271
+ ---
272
+
273
+ ## Decrypt a GPG-encrypted file and save it to a destination path
274
+
275
+ ```
276
+ Files::File.gpg_decrypt(path,
277
+ destination: "destination",
278
+ gpg_key_partner_id: 1,
279
+ use_all_private_keys: false,
280
+ ignore_mdc_error: false,
281
+ overwrite: false
282
+ )
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ * `path` (string): Required - Path to operate on.
288
+ * `destination` (string): Required - Destination file path for the decrypted file.
289
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
290
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
291
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
292
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
293
+ * `overwrite` (boolean): Overwrite existing file in the destination?
294
+
295
+
296
+ ---
297
+
298
+ ## Encrypt a file with GPG and save it to a destination path
299
+
300
+ ```
301
+ Files::File.gpg_encrypt(path,
302
+ destination: "destination",
303
+ gpg_key_partner_id: 1,
304
+ signing_key_id: 1,
305
+ armor: false,
306
+ overwrite: false
307
+ )
308
+ ```
309
+
310
+ ### Parameters
311
+
312
+ * `path` (string): Required - Path to operate on.
313
+ * `destination` (string): Required - Destination file path for the encrypted file.
314
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
315
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
316
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
317
+ * `armor` (boolean): Output ASCII-armored encrypted data.
318
+ * `overwrite` (boolean): Overwrite existing file in the destination?
319
+
320
+
271
321
  ---
272
322
 
273
323
  ## Extract a ZIP file to a destination folder
@@ -457,6 +507,60 @@ file.move(
457
507
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
458
508
 
459
509
 
510
+ ---
511
+
512
+ ## Decrypt a GPG-encrypted file and save it to a destination path
513
+
514
+ ```
515
+ file = Files::File.find(path)
516
+
517
+ file.gpg_decrypt(
518
+ destination: "destination",
519
+ gpg_key_partner_id: 1,
520
+ use_all_private_keys: false,
521
+ ignore_mdc_error: false,
522
+ overwrite: false
523
+ )
524
+ ```
525
+
526
+ ### Parameters
527
+
528
+ * `path` (string): Required - Path to operate on.
529
+ * `destination` (string): Required - Destination file path for the decrypted file.
530
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
531
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
532
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
533
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
534
+ * `overwrite` (boolean): Overwrite existing file in the destination?
535
+
536
+
537
+ ---
538
+
539
+ ## Encrypt a file with GPG and save it to a destination path
540
+
541
+ ```
542
+ file = Files::File.find(path)
543
+
544
+ file.gpg_encrypt(
545
+ destination: "destination",
546
+ gpg_key_partner_id: 1,
547
+ signing_key_id: 1,
548
+ armor: false,
549
+ overwrite: false
550
+ )
551
+ ```
552
+
553
+ ### Parameters
554
+
555
+ * `path` (string): Required - Path to operate on.
556
+ * `destination` (string): Required - Destination file path for the encrypted file.
557
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
558
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
559
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
560
+ * `armor` (boolean): Output ASCII-armored encrypted data.
561
+ * `overwrite` (boolean): Overwrite existing file in the destination?
562
+
563
+
460
564
  ---
461
565
 
462
566
  ## Extract a ZIP file to a destination folder
@@ -0,0 +1,169 @@
1
+ # PartnerChannel
2
+
3
+ ## Example PartnerChannel Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "workspace_id": 1,
9
+ "partner_id": 1,
10
+ "path": "claims/medical",
11
+ "to_partner_folder_name": "incoming",
12
+ "from_partner_folder_name": "outgoing",
13
+ "from_partner_route_path": "processing/from-partner",
14
+ "to_partner_route_path": "delivery/to-partner",
15
+ "effective_to_partner_folder_name": "incoming",
16
+ "effective_from_partner_folder_name": "outgoing",
17
+ "channel_path": "partners/acme/claims/medical",
18
+ "to_partner_folder_path": "partners/acme/claims/medical/incoming",
19
+ "from_partner_folder_path": "partners/acme/claims/medical/outgoing"
20
+ }
21
+ ```
22
+
23
+ * `id` (int64): The unique ID of the Partner Channel.
24
+ * `workspace_id` (int64): ID of the Workspace associated with this Partner Channel.
25
+ * `partner_id` (int64): ID of the Partner this Channel belongs to.
26
+ * `path` (string): Channel path relative to the Partner root folder. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
27
+ * `to_partner_folder_name` (string): Optional Channel-level to-Partner folder name override.
28
+ * `from_partner_folder_name` (string): Optional Channel-level from-Partner folder name override.
29
+ * `from_partner_route_path` (string): Optional route path for files uploaded by the Partner.
30
+ * `to_partner_route_path` (string): Optional route path for files delivered to the Partner.
31
+ * `effective_to_partner_folder_name` (string): Resolved to-Partner folder name after Channel override and default.
32
+ * `effective_from_partner_folder_name` (string): Resolved from-Partner folder name after Channel override and default.
33
+ * `channel_path` (string): Resolved Channel folder path.
34
+ * `to_partner_folder_path` (string): Resolved to-Partner folder path.
35
+ * `from_partner_folder_path` (string): Resolved from-Partner folder path.
36
+
37
+
38
+ ---
39
+
40
+ ## List Partner Channels
41
+
42
+ ```
43
+ Files::PartnerChannel.list
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ * `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.
49
+ * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
50
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `path` or `partner_id`.
51
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `partner_id` and `workspace_id`. Valid field combinations are `[ workspace_id, partner_id ]`.
52
+
53
+
54
+ ---
55
+
56
+ ## Show Partner Channel
57
+
58
+ ```
59
+ Files::PartnerChannel.find(id)
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ * `id` (int64): Required - Partner Channel ID.
65
+
66
+
67
+ ---
68
+
69
+ ## Create Partner Channel
70
+
71
+ ```
72
+ Files::PartnerChannel.create(
73
+ from_partner_folder_name: "outgoing",
74
+ from_partner_route_path: "processing/from-partner",
75
+ to_partner_folder_name: "incoming",
76
+ to_partner_route_path: "delivery/to-partner",
77
+ partner_id: 1,
78
+ path: "claims/medical",
79
+ workspace_id: 0
80
+ )
81
+ ```
82
+
83
+ ### Parameters
84
+
85
+ * `from_partner_folder_name` (string): Optional Channel-level from-Partner folder name override.
86
+ * `from_partner_route_path` (string): Optional route path for files uploaded by the Partner.
87
+ * `to_partner_folder_name` (string): Optional Channel-level to-Partner folder name override.
88
+ * `to_partner_route_path` (string): Optional route path for files delivered to the Partner.
89
+ * `partner_id` (int64): Required - ID of the Partner this Channel belongs to.
90
+ * `path` (string): Required - Channel path relative to the Partner root folder.
91
+ * `workspace_id` (int64): ID of the Workspace associated with this Partner Channel.
92
+
93
+
94
+ ---
95
+
96
+ ## Update Partner Channel
97
+
98
+ ```
99
+ Files::PartnerChannel.update(id,
100
+ from_partner_folder_name: "outgoing",
101
+ from_partner_route_path: "processing/from-partner",
102
+ to_partner_folder_name: "incoming",
103
+ to_partner_route_path: "delivery/to-partner",
104
+ path: "claims/medical"
105
+ )
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ * `id` (int64): Required - Partner Channel ID.
111
+ * `from_partner_folder_name` (string): Optional Channel-level from-Partner folder name override.
112
+ * `from_partner_route_path` (string): Optional route path for files uploaded by the Partner.
113
+ * `to_partner_folder_name` (string): Optional Channel-level to-Partner folder name override.
114
+ * `to_partner_route_path` (string): Optional route path for files delivered to the Partner.
115
+ * `path` (string): Channel path relative to the Partner root folder.
116
+
117
+
118
+ ---
119
+
120
+ ## Delete Partner Channel
121
+
122
+ ```
123
+ Files::PartnerChannel.delete(id)
124
+ ```
125
+
126
+ ### Parameters
127
+
128
+ * `id` (int64): Required - Partner Channel ID.
129
+
130
+
131
+ ---
132
+
133
+ ## Update Partner Channel
134
+
135
+ ```
136
+ partner_channel = Files::PartnerChannel.find(id)
137
+
138
+ partner_channel.update(
139
+ from_partner_folder_name: "outgoing",
140
+ from_partner_route_path: "processing/from-partner",
141
+ to_partner_folder_name: "incoming",
142
+ to_partner_route_path: "delivery/to-partner",
143
+ path: "claims/medical"
144
+ )
145
+ ```
146
+
147
+ ### Parameters
148
+
149
+ * `id` (int64): Required - Partner Channel ID.
150
+ * `from_partner_folder_name` (string): Optional Channel-level from-Partner folder name override.
151
+ * `from_partner_route_path` (string): Optional route path for files uploaded by the Partner.
152
+ * `to_partner_folder_name` (string): Optional Channel-level to-Partner folder name override.
153
+ * `to_partner_route_path` (string): Optional route path for files delivered to the Partner.
154
+ * `path` (string): Channel path relative to the Partner root folder.
155
+
156
+
157
+ ---
158
+
159
+ ## Delete Partner Channel
160
+
161
+ ```
162
+ partner_channel = Files::PartnerChannel.find(id)
163
+
164
+ partner_channel.delete
165
+ ```
166
+
167
+ ### Parameters
168
+
169
+ * `id` (int64): Required - Partner Channel ID.
@@ -1075,6 +1075,53 @@ module Files
1075
1075
  Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
1076
1076
  end
1077
1077
 
1078
+ # Decrypt a GPG-encrypted file and save it to a destination path
1079
+ #
1080
+ # Parameters:
1081
+ # destination (required) - string - Destination file path for the decrypted file.
1082
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1083
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1084
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1085
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1086
+ # overwrite - boolean - Overwrite existing file in the destination?
1087
+ def gpg_decrypt(params = {})
1088
+ params ||= {}
1089
+ params[:path] = @attributes[:path]
1090
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1091
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1092
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1093
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1094
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1095
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1096
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1097
+
1098
+ Api.send_request("/file_actions/gpg_decrypt/#{@attributes[:path]}", :post, params, @options)
1099
+ end
1100
+
1101
+ # Encrypt a file with GPG and save it to a destination path
1102
+ #
1103
+ # Parameters:
1104
+ # destination (required) - string - Destination file path for the encrypted file.
1105
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1106
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1107
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1108
+ # armor - boolean - Output ASCII-armored encrypted data.
1109
+ # overwrite - boolean - Overwrite existing file in the destination?
1110
+ def gpg_encrypt(params = {})
1111
+ params ||= {}
1112
+ params[:path] = @attributes[:path]
1113
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1114
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1115
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1116
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1117
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1118
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1119
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1120
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1121
+
1122
+ Api.send_request("/file_actions/gpg_encrypt/#{@attributes[:path]}", :post, params, @options)
1123
+ end
1124
+
1078
1125
  # Extract a ZIP file to a destination folder
1079
1126
  #
1080
1127
  # Parameters:
@@ -1284,6 +1331,53 @@ module Files
1284
1331
  FileAction.new(response.data, options)
1285
1332
  end
1286
1333
 
1334
+ # Decrypt a GPG-encrypted file and save it to a destination path
1335
+ #
1336
+ # Parameters:
1337
+ # destination (required) - string - Destination file path for the decrypted file.
1338
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1339
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1340
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1341
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1342
+ # overwrite - boolean - Overwrite existing file in the destination?
1343
+ def self.gpg_decrypt(path, params = {}, options = {})
1344
+ params ||= {}
1345
+ params[:path] = path
1346
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1347
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1348
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1349
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1350
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1351
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1352
+
1353
+ response, options = Api.send_request("/file_actions/gpg_decrypt/#{params[:path]}", :post, params, options)
1354
+ FileAction.new(response.data, options)
1355
+ end
1356
+
1357
+ # Encrypt a file with GPG and save it to a destination path
1358
+ #
1359
+ # Parameters:
1360
+ # destination (required) - string - Destination file path for the encrypted file.
1361
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1362
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1363
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1364
+ # armor - boolean - Output ASCII-armored encrypted data.
1365
+ # overwrite - boolean - Overwrite existing file in the destination?
1366
+ def self.gpg_encrypt(path, params = {}, options = {})
1367
+ params ||= {}
1368
+ params[:path] = path
1369
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1370
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1371
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1372
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1373
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1374
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1375
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1376
+
1377
+ response, options = Api.send_request("/file_actions/gpg_encrypt/#{params[:path]}", :post, params, options)
1378
+ FileAction.new(response.data, options)
1379
+ end
1380
+
1287
1381
  # Extract a ZIP file to a destination folder
1288
1382
  #
1289
1383
  # Parameters:
@@ -0,0 +1,271 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class PartnerChannel
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - The unique ID of the Partner Channel.
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # int64 - ID of the Workspace associated with this Partner Channel.
22
+ def workspace_id
23
+ @attributes[:workspace_id]
24
+ end
25
+
26
+ def workspace_id=(value)
27
+ @attributes[:workspace_id] = value
28
+ end
29
+
30
+ # int64 - ID of the Partner this Channel belongs to.
31
+ def partner_id
32
+ @attributes[:partner_id]
33
+ end
34
+
35
+ def partner_id=(value)
36
+ @attributes[:partner_id] = value
37
+ end
38
+
39
+ # string - Channel path relative to the Partner root folder. 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
+ # string - Optional Channel-level to-Partner folder name override.
49
+ def to_partner_folder_name
50
+ @attributes[:to_partner_folder_name]
51
+ end
52
+
53
+ def to_partner_folder_name=(value)
54
+ @attributes[:to_partner_folder_name] = value
55
+ end
56
+
57
+ # string - Optional Channel-level from-Partner folder name override.
58
+ def from_partner_folder_name
59
+ @attributes[:from_partner_folder_name]
60
+ end
61
+
62
+ def from_partner_folder_name=(value)
63
+ @attributes[:from_partner_folder_name] = value
64
+ end
65
+
66
+ # string - Optional route path for files uploaded by the Partner.
67
+ def from_partner_route_path
68
+ @attributes[:from_partner_route_path]
69
+ end
70
+
71
+ def from_partner_route_path=(value)
72
+ @attributes[:from_partner_route_path] = value
73
+ end
74
+
75
+ # string - Optional route path for files delivered to the Partner.
76
+ def to_partner_route_path
77
+ @attributes[:to_partner_route_path]
78
+ end
79
+
80
+ def to_partner_route_path=(value)
81
+ @attributes[:to_partner_route_path] = value
82
+ end
83
+
84
+ # string - Resolved to-Partner folder name after Channel override and default.
85
+ def effective_to_partner_folder_name
86
+ @attributes[:effective_to_partner_folder_name]
87
+ end
88
+
89
+ def effective_to_partner_folder_name=(value)
90
+ @attributes[:effective_to_partner_folder_name] = value
91
+ end
92
+
93
+ # string - Resolved from-Partner folder name after Channel override and default.
94
+ def effective_from_partner_folder_name
95
+ @attributes[:effective_from_partner_folder_name]
96
+ end
97
+
98
+ def effective_from_partner_folder_name=(value)
99
+ @attributes[:effective_from_partner_folder_name] = value
100
+ end
101
+
102
+ # string - Resolved Channel folder path.
103
+ def channel_path
104
+ @attributes[:channel_path]
105
+ end
106
+
107
+ def channel_path=(value)
108
+ @attributes[:channel_path] = value
109
+ end
110
+
111
+ # string - Resolved to-Partner folder path.
112
+ def to_partner_folder_path
113
+ @attributes[:to_partner_folder_path]
114
+ end
115
+
116
+ def to_partner_folder_path=(value)
117
+ @attributes[:to_partner_folder_path] = value
118
+ end
119
+
120
+ # string - Resolved from-Partner folder path.
121
+ def from_partner_folder_path
122
+ @attributes[:from_partner_folder_path]
123
+ end
124
+
125
+ def from_partner_folder_path=(value)
126
+ @attributes[:from_partner_folder_path] = value
127
+ end
128
+
129
+ # Parameters:
130
+ # from_partner_folder_name - string - Optional Channel-level from-Partner folder name override.
131
+ # from_partner_route_path - string - Optional route path for files uploaded by the Partner.
132
+ # to_partner_folder_name - string - Optional Channel-level to-Partner folder name override.
133
+ # to_partner_route_path - string - Optional route path for files delivered to the Partner.
134
+ # path - string - Channel path relative to the Partner root folder.
135
+ def update(params = {})
136
+ params ||= {}
137
+ params[:id] = @attributes[:id]
138
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
139
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
140
+ raise InvalidParameterError.new("Bad parameter: from_partner_folder_name must be an String") if params[:from_partner_folder_name] and !params[:from_partner_folder_name].is_a?(String)
141
+ raise InvalidParameterError.new("Bad parameter: from_partner_route_path must be an String") if params[:from_partner_route_path] and !params[:from_partner_route_path].is_a?(String)
142
+ raise InvalidParameterError.new("Bad parameter: to_partner_folder_name must be an String") if params[:to_partner_folder_name] and !params[:to_partner_folder_name].is_a?(String)
143
+ raise InvalidParameterError.new("Bad parameter: to_partner_route_path must be an String") if params[:to_partner_route_path] and !params[:to_partner_route_path].is_a?(String)
144
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
145
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
146
+
147
+ Api.send_request("/partner_channels/#{@attributes[:id]}", :patch, params, @options)
148
+ end
149
+
150
+ def delete(params = {})
151
+ params ||= {}
152
+ params[:id] = @attributes[:id]
153
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
154
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
155
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
156
+
157
+ Api.send_request("/partner_channels/#{@attributes[:id]}", :delete, params, @options)
158
+ end
159
+
160
+ def destroy(params = {})
161
+ delete(params)
162
+ nil
163
+ end
164
+
165
+ def save
166
+ if @attributes[:id]
167
+ new_obj = update(@attributes)
168
+ else
169
+ new_obj = PartnerChannel.create(@attributes, @options)
170
+ end
171
+
172
+ @attributes = new_obj.attributes
173
+ true
174
+ end
175
+
176
+ # Parameters:
177
+ # 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.
178
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
179
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `workspace_id`, `path` or `partner_id`.
180
+ # filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `partner_id` and `workspace_id`. Valid field combinations are `[ workspace_id, partner_id ]`.
181
+ def self.list(params = {}, options = {})
182
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
183
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
184
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
185
+ raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
186
+
187
+ List.new(PartnerChannel, params) do
188
+ Api.send_request("/partner_channels", :get, params, options)
189
+ end
190
+ end
191
+
192
+ def self.all(params = {}, options = {})
193
+ list(params, options)
194
+ end
195
+
196
+ # Parameters:
197
+ # id (required) - int64 - Partner Channel ID.
198
+ def self.find(id, params = {}, options = {})
199
+ params ||= {}
200
+ params[:id] = id
201
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
202
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
203
+
204
+ response, options = Api.send_request("/partner_channels/#{params[:id]}", :get, params, options)
205
+ PartnerChannel.new(response.data, options)
206
+ end
207
+
208
+ def self.get(id, params = {}, options = {})
209
+ find(id, params, options)
210
+ end
211
+
212
+ # Parameters:
213
+ # from_partner_folder_name - string - Optional Channel-level from-Partner folder name override.
214
+ # from_partner_route_path - string - Optional route path for files uploaded by the Partner.
215
+ # to_partner_folder_name - string - Optional Channel-level to-Partner folder name override.
216
+ # to_partner_route_path - string - Optional route path for files delivered to the Partner.
217
+ # partner_id (required) - int64 - ID of the Partner this Channel belongs to.
218
+ # path (required) - string - Channel path relative to the Partner root folder.
219
+ # workspace_id - int64 - ID of the Workspace associated with this Partner Channel.
220
+ def self.create(params = {}, options = {})
221
+ raise InvalidParameterError.new("Bad parameter: from_partner_folder_name must be an String") if params[:from_partner_folder_name] and !params[:from_partner_folder_name].is_a?(String)
222
+ raise InvalidParameterError.new("Bad parameter: from_partner_route_path must be an String") if params[:from_partner_route_path] and !params[:from_partner_route_path].is_a?(String)
223
+ raise InvalidParameterError.new("Bad parameter: to_partner_folder_name must be an String") if params[:to_partner_folder_name] and !params[:to_partner_folder_name].is_a?(String)
224
+ raise InvalidParameterError.new("Bad parameter: to_partner_route_path must be an String") if params[:to_partner_route_path] and !params[:to_partner_route_path].is_a?(String)
225
+ raise InvalidParameterError.new("Bad parameter: partner_id must be an Integer") if params[:partner_id] and !params[:partner_id].is_a?(Integer)
226
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
227
+ raise InvalidParameterError.new("Bad parameter: workspace_id must be an Integer") if params[:workspace_id] and !params[:workspace_id].is_a?(Integer)
228
+ raise MissingParameterError.new("Parameter missing: partner_id") unless params[:partner_id]
229
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
230
+
231
+ response, options = Api.send_request("/partner_channels", :post, params, options)
232
+ PartnerChannel.new(response.data, options)
233
+ end
234
+
235
+ # Parameters:
236
+ # from_partner_folder_name - string - Optional Channel-level from-Partner folder name override.
237
+ # from_partner_route_path - string - Optional route path for files uploaded by the Partner.
238
+ # to_partner_folder_name - string - Optional Channel-level to-Partner folder name override.
239
+ # to_partner_route_path - string - Optional route path for files delivered to the Partner.
240
+ # path - string - Channel path relative to the Partner root folder.
241
+ def self.update(id, params = {}, options = {})
242
+ params ||= {}
243
+ params[:id] = id
244
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
245
+ raise InvalidParameterError.new("Bad parameter: from_partner_folder_name must be an String") if params[:from_partner_folder_name] and !params[:from_partner_folder_name].is_a?(String)
246
+ raise InvalidParameterError.new("Bad parameter: from_partner_route_path must be an String") if params[:from_partner_route_path] and !params[:from_partner_route_path].is_a?(String)
247
+ raise InvalidParameterError.new("Bad parameter: to_partner_folder_name must be an String") if params[:to_partner_folder_name] and !params[:to_partner_folder_name].is_a?(String)
248
+ raise InvalidParameterError.new("Bad parameter: to_partner_route_path must be an String") if params[:to_partner_route_path] and !params[:to_partner_route_path].is_a?(String)
249
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
250
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
251
+
252
+ response, options = Api.send_request("/partner_channels/#{params[:id]}", :patch, params, options)
253
+ PartnerChannel.new(response.data, options)
254
+ end
255
+
256
+ def self.delete(id, params = {}, options = {})
257
+ params ||= {}
258
+ params[:id] = id
259
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
260
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
261
+
262
+ Api.send_request("/partner_channels/#{params[:id]}", :delete, params, options)
263
+ nil
264
+ end
265
+
266
+ def self.destroy(id, params = {}, options = {})
267
+ delete(id, params, options)
268
+ nil
269
+ end
270
+ end
271
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.650"
4
+ VERSION = "1.1.652"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -112,6 +112,7 @@ require "files.com/models/metadata_category"
112
112
  require "files.com/models/notification"
113
113
  require "files.com/models/outbound_connection_log"
114
114
  require "files.com/models/partner"
115
+ require "files.com/models/partner_channel"
115
116
  require "files.com/models/partner_site"
116
117
  require "files.com/models/partner_site_request"
117
118
  require "files.com/models/payment"
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.650
4
+ version: 1.1.652
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
@@ -251,6 +251,7 @@ files:
251
251
  - docs/notification.md
252
252
  - docs/outbound_connection_log.md
253
253
  - docs/partner.md
254
+ - docs/partner_channel.md
254
255
  - docs/partner_site.md
255
256
  - docs/partner_site_request.md
256
257
  - docs/payment.md
@@ -391,6 +392,7 @@ files:
391
392
  - lib/files.com/models/notification.rb
392
393
  - lib/files.com/models/outbound_connection_log.rb
393
394
  - lib/files.com/models/partner.rb
395
+ - lib/files.com/models/partner_channel.rb
394
396
  - lib/files.com/models/partner_site.rb
395
397
  - lib/files.com/models/partner_site_request.rb
396
398
  - lib/files.com/models/payment.rb