-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathget.js
39 lines (31 loc) · 1.37 KB
/
get.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const { Args } = require('@oclif/core');
const BoxCommand = require('../../../box-command');
const PaginationUtils = require('../../../pagination-utils');
class RetentionPoliciesGetFilesRetentionForAssignmentCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(RetentionPoliciesGetFilesRetentionForAssignmentCommand);
let options = PaginationUtils.handlePagination(flags);
if (flags.fields) {
options.fields = flags.fields;
}
let files = await this.client.retentionPolicies.getFilesUnderRetentionForAssignment(args.id, options);
await this.output(files);
}
}
RetentionPoliciesGetFilesRetentionForAssignmentCommand.description = 'Get information about files under retention for assignment';
RetentionPoliciesGetFilesRetentionForAssignmentCommand.examples = ['box retention-policies:files-under-retention:get 77777'];
RetentionPoliciesGetFilesRetentionForAssignmentCommand._endpoint = 'get_retention_policy_assignments_id_files_under_retention';
RetentionPoliciesGetFilesRetentionForAssignmentCommand.flags = {
...BoxCommand.flags,
...PaginationUtils.flags,
};
RetentionPoliciesGetFilesRetentionForAssignmentCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of the retention policy assignment',
}),
};
module.exports = RetentionPoliciesGetFilesRetentionForAssignmentCommand;