files-com 1.6.208__py3-none-any.whl
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.
Potentially problematic release.
This version of files-com might be problematic. Click here for more details.
- README.md +758 -0
- _VERSION +1 -0
- files_com-1.6.208.dist-info/METADATA +770 -0
- files_com-1.6.208.dist-info/RECORD +126 -0
- files_com-1.6.208.dist-info/WHEEL +5 -0
- files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
- files_com-1.6.208.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +309 -0
- files_sdk/api.py +63 -0
- files_sdk/api_client.py +336 -0
- files_sdk/error.py +2981 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +119 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +153 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/agent_push_update.py +44 -0
- files_sdk/models/api_key.py +318 -0
- files_sdk/models/api_request_log.py +105 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +117 -0
- files_sdk/models/as2_outgoing_message.py +113 -0
- files_sdk/models/as2_partner.py +415 -0
- files_sdk/models/as2_station.py +282 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +823 -0
- files_sdk/models/automation_log.py +94 -0
- files_sdk/models/automation_run.py +112 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +340 -0
- files_sdk/models/bundle.py +686 -0
- files_sdk/models/bundle_action.py +93 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +252 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +133 -0
- files_sdk/models/bundle_registration.py +82 -0
- files_sdk/models/child_site_management_policy.py +278 -0
- files_sdk/models/clickwrap.py +268 -0
- files_sdk/models/dns_record.py +59 -0
- files_sdk/models/email_incoming_message.py +102 -0
- files_sdk/models/email_log.py +84 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +102 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +851 -0
- files_sdk/models/file_action.py +39 -0
- files_sdk/models/file_comment.py +191 -0
- files_sdk/models/file_comment_reaction.py +125 -0
- files_sdk/models/file_migration.py +69 -0
- files_sdk/models/file_migration_log.py +88 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +186 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +265 -0
- files_sdk/models/ftp_action_log.py +104 -0
- files_sdk/models/gpg_key.py +333 -0
- files_sdk/models/group.py +338 -0
- files_sdk/models/group_user.py +235 -0
- files_sdk/models/history.py +236 -0
- files_sdk/models/history_export.py +238 -0
- files_sdk/models/history_export_result.py +98 -0
- files_sdk/models/holiday_region.py +58 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbound_s3_log.py +95 -0
- files_sdk/models/inbox_recipient.py +124 -0
- files_sdk/models/inbox_registration.py +79 -0
- files_sdk/models/inbox_upload.py +80 -0
- files_sdk/models/invoice.py +91 -0
- files_sdk/models/invoice_line_item.py +51 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/key_lifecycle_rule.py +243 -0
- files_sdk/models/lock.py +174 -0
- files_sdk/models/message.py +244 -0
- files_sdk/models/message_comment.py +223 -0
- files_sdk/models/message_comment_reaction.py +181 -0
- files_sdk/models/message_reaction.py +170 -0
- files_sdk/models/notification.py +451 -0
- files_sdk/models/outbound_connection_log.py +105 -0
- files_sdk/models/partner.py +307 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +190 -0
- files_sdk/models/preview.py +40 -0
- files_sdk/models/priority.py +63 -0
- files_sdk/models/project.py +205 -0
- files_sdk/models/public_hosting_request_log.py +101 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +269 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +1854 -0
- files_sdk/models/remote_server_configuration_file.py +73 -0
- files_sdk/models/remote_server_credential.py +855 -0
- files_sdk/models/request.py +184 -0
- files_sdk/models/restore.py +142 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +108 -0
- files_sdk/models/sftp_host_key.py +215 -0
- files_sdk/models/share_group.py +228 -0
- files_sdk/models/share_group_member.py +41 -0
- files_sdk/models/siem_http_destination.py +1074 -0
- files_sdk/models/site.py +1289 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +168 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync.py +588 -0
- files_sdk/models/sync_log.py +86 -0
- files_sdk/models/sync_run.py +124 -0
- files_sdk/models/usage_by_top_level_dir.py +41 -0
- files_sdk/models/usage_daily_snapshot.py +93 -0
- files_sdk/models/usage_snapshot.py +73 -0
- files_sdk/models/user.py +1232 -0
- files_sdk/models/user_cipher_use.py +91 -0
- files_sdk/models/user_lifecycle_rule.py +355 -0
- files_sdk/models/user_request.py +166 -0
- files_sdk/models/user_sftp_client_use.py +68 -0
- files_sdk/models/web_dav_action_log.py +104 -0
- files_sdk/models/webhook_test.py +116 -0
- files_sdk/models/workspace.py +202 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InboxRecipient:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"company": None, # string - The recipient's company.
|
|
14
|
+
"name": None, # string - The recipient's name.
|
|
15
|
+
"note": None, # string - A note sent to the recipient with the inbox.
|
|
16
|
+
"recipient": None, # string - The recipient's email address.
|
|
17
|
+
"sent_at": None, # date-time - When the Inbox was shared with this recipient.
|
|
18
|
+
"inbox_id": None, # int64 - Inbox to share.
|
|
19
|
+
"share_after_create": None, # boolean - Set to true to share the link with the recipient upon creation.
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
def __init__(self, attributes=None, options=None):
|
|
23
|
+
if not isinstance(attributes, dict):
|
|
24
|
+
attributes = {}
|
|
25
|
+
if not isinstance(options, dict):
|
|
26
|
+
options = {}
|
|
27
|
+
self.set_attributes(attributes)
|
|
28
|
+
self.options = options
|
|
29
|
+
|
|
30
|
+
def set_attributes(self, attributes):
|
|
31
|
+
for (
|
|
32
|
+
attribute,
|
|
33
|
+
default_value,
|
|
34
|
+
) in InboxRecipient.default_attributes.items():
|
|
35
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
36
|
+
|
|
37
|
+
def get_attributes(self):
|
|
38
|
+
return {
|
|
39
|
+
k: getattr(self, k, None)
|
|
40
|
+
for k in InboxRecipient.default_attributes
|
|
41
|
+
if getattr(self, k, None) is not None
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
def save(self):
|
|
45
|
+
if hasattr(self, "id") and self.id:
|
|
46
|
+
raise NotImplementedError(
|
|
47
|
+
"The InboxRecipient object doesn't support updates."
|
|
48
|
+
)
|
|
49
|
+
else:
|
|
50
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
51
|
+
self.set_attributes(new_obj.get_attributes())
|
|
52
|
+
return True
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Parameters:
|
|
56
|
+
# 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
|
+
# 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 .
|
|
59
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `has_registrations`.
|
|
60
|
+
# inbox_id (required) - int64 - List recipients for the inbox with this ID.
|
|
61
|
+
def list(params=None, options=None):
|
|
62
|
+
if not isinstance(params, dict):
|
|
63
|
+
params = {}
|
|
64
|
+
if not isinstance(options, dict):
|
|
65
|
+
options = {}
|
|
66
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
67
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
68
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
69
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
70
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
71
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
72
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
73
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
74
|
+
if "inbox_id" in params and not isinstance(params["inbox_id"], int):
|
|
75
|
+
raise InvalidParameterError("Bad parameter: inbox_id must be an int")
|
|
76
|
+
if "inbox_id" not in params:
|
|
77
|
+
raise MissingParameterError("Parameter missing: inbox_id")
|
|
78
|
+
return ListObj(InboxRecipient, "GET", "/inbox_recipients", params, options)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def all(params=None, options=None):
|
|
82
|
+
list(params, options)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# Parameters:
|
|
86
|
+
# inbox_id (required) - int64 - Inbox to share.
|
|
87
|
+
# recipient (required) - string - Email address to share this inbox with.
|
|
88
|
+
# name - string - Name of recipient.
|
|
89
|
+
# company - string - Company of recipient.
|
|
90
|
+
# note - string - Note to include in email.
|
|
91
|
+
# share_after_create - boolean - Set to true to share the link with the recipient upon creation.
|
|
92
|
+
def create(params=None, options=None):
|
|
93
|
+
if not isinstance(params, dict):
|
|
94
|
+
params = {}
|
|
95
|
+
if not isinstance(options, dict):
|
|
96
|
+
options = {}
|
|
97
|
+
if "inbox_id" in params and not isinstance(params["inbox_id"], int):
|
|
98
|
+
raise InvalidParameterError("Bad parameter: inbox_id must be an int")
|
|
99
|
+
if "recipient" in params and not isinstance(params["recipient"], str):
|
|
100
|
+
raise InvalidParameterError("Bad parameter: recipient must be an str")
|
|
101
|
+
if "name" in params and not isinstance(params["name"], str):
|
|
102
|
+
raise InvalidParameterError("Bad parameter: name must be an str")
|
|
103
|
+
if "company" in params and not isinstance(params["company"], str):
|
|
104
|
+
raise InvalidParameterError("Bad parameter: company must be an str")
|
|
105
|
+
if "note" in params and not isinstance(params["note"], str):
|
|
106
|
+
raise InvalidParameterError("Bad parameter: note must be an str")
|
|
107
|
+
if "share_after_create" in params and not isinstance(
|
|
108
|
+
params["share_after_create"], bool
|
|
109
|
+
):
|
|
110
|
+
raise InvalidParameterError(
|
|
111
|
+
"Bad parameter: share_after_create must be an bool"
|
|
112
|
+
)
|
|
113
|
+
if "inbox_id" not in params:
|
|
114
|
+
raise MissingParameterError("Parameter missing: inbox_id")
|
|
115
|
+
if "recipient" not in params:
|
|
116
|
+
raise MissingParameterError("Parameter missing: recipient")
|
|
117
|
+
response, options = Api.send_request(
|
|
118
|
+
"POST", "/inbox_recipients", params, options
|
|
119
|
+
)
|
|
120
|
+
return InboxRecipient(response.data, options)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def new(*args, **kwargs):
|
|
124
|
+
return InboxRecipient(*args, **kwargs)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InboxRegistration:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"code": None, # string - Registration cookie code
|
|
14
|
+
"name": None, # string - Registrant name
|
|
15
|
+
"company": None, # string - Registrant company name
|
|
16
|
+
"email": None, # string - Registrant email address
|
|
17
|
+
"ip": None, # string - Registrant IP Address
|
|
18
|
+
"clickwrap_body": None, # string - Clickwrap text that was shown to the registrant
|
|
19
|
+
"form_field_set_id": None, # int64 - Id of associated form field set
|
|
20
|
+
"form_field_data": None, # object - Data for form field set with form field ids as keys and user data as values
|
|
21
|
+
"inbox_id": None, # int64 - Id of associated inbox
|
|
22
|
+
"inbox_recipient_id": None, # int64 - Id of associated inbox recipient
|
|
23
|
+
"inbox_title": None, # string - Title of associated inbox
|
|
24
|
+
"created_at": None, # date-time - Registration creation date/time
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, attributes=None, options=None):
|
|
28
|
+
if not isinstance(attributes, dict):
|
|
29
|
+
attributes = {}
|
|
30
|
+
if not isinstance(options, dict):
|
|
31
|
+
options = {}
|
|
32
|
+
self.set_attributes(attributes)
|
|
33
|
+
self.options = options
|
|
34
|
+
|
|
35
|
+
def set_attributes(self, attributes):
|
|
36
|
+
for (
|
|
37
|
+
attribute,
|
|
38
|
+
default_value,
|
|
39
|
+
) in InboxRegistration.default_attributes.items():
|
|
40
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
41
|
+
|
|
42
|
+
def get_attributes(self):
|
|
43
|
+
return {
|
|
44
|
+
k: getattr(self, k, None)
|
|
45
|
+
for k in InboxRegistration.default_attributes
|
|
46
|
+
if getattr(self, k, None) is not None
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Parameters:
|
|
51
|
+
# 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.
|
|
52
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
53
|
+
# folder_behavior_id - int64 - ID of the associated Inbox. This is required if the user is not a site admin.
|
|
54
|
+
def list(params=None, options=None):
|
|
55
|
+
if not isinstance(params, dict):
|
|
56
|
+
params = {}
|
|
57
|
+
if not isinstance(options, dict):
|
|
58
|
+
options = {}
|
|
59
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
60
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
61
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
62
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
63
|
+
if "folder_behavior_id" in params and not isinstance(
|
|
64
|
+
params["folder_behavior_id"], int
|
|
65
|
+
):
|
|
66
|
+
raise InvalidParameterError(
|
|
67
|
+
"Bad parameter: folder_behavior_id must be an int"
|
|
68
|
+
)
|
|
69
|
+
return ListObj(
|
|
70
|
+
InboxRegistration, "GET", "/inbox_registrations", params, options
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def all(params=None, options=None):
|
|
75
|
+
list(params, options)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def new(*args, **kwargs):
|
|
79
|
+
return InboxRegistration(*args, **kwargs)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InboxUpload:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"inbox_registration": None, # InboxRegistration
|
|
14
|
+
"path": None, # string - Upload path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
15
|
+
"created_at": None, # date-time - Upload date/time
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
def __init__(self, attributes=None, options=None):
|
|
19
|
+
if not isinstance(attributes, dict):
|
|
20
|
+
attributes = {}
|
|
21
|
+
if not isinstance(options, dict):
|
|
22
|
+
options = {}
|
|
23
|
+
self.set_attributes(attributes)
|
|
24
|
+
self.options = options
|
|
25
|
+
|
|
26
|
+
def set_attributes(self, attributes):
|
|
27
|
+
for attribute, default_value in InboxUpload.default_attributes.items():
|
|
28
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
29
|
+
|
|
30
|
+
def get_attributes(self):
|
|
31
|
+
return {
|
|
32
|
+
k: getattr(self, k, None)
|
|
33
|
+
for k in InboxUpload.default_attributes
|
|
34
|
+
if getattr(self, k, None) is not None
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Parameters:
|
|
39
|
+
# 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.
|
|
40
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
41
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`.
|
|
42
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `folder_behavior_id` or `inbox_registration_id`. Valid field combinations are `[ folder_behavior_id, created_at ]`, `[ inbox_registration_id, created_at ]`, `[ folder_behavior_id, inbox_registration_id ]` or `[ folder_behavior_id, inbox_registration_id, created_at ]`.
|
|
43
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`.
|
|
44
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`.
|
|
45
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`.
|
|
46
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`.
|
|
47
|
+
def list(params=None, options=None):
|
|
48
|
+
if not isinstance(params, dict):
|
|
49
|
+
params = {}
|
|
50
|
+
if not isinstance(options, dict):
|
|
51
|
+
options = {}
|
|
52
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
53
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
54
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
55
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
56
|
+
if "sort_by" in params and not isinstance(params["sort_by"], dict):
|
|
57
|
+
raise InvalidParameterError("Bad parameter: sort_by must be an dict")
|
|
58
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
59
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
60
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
61
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
62
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
63
|
+
raise InvalidParameterError(
|
|
64
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
65
|
+
)
|
|
66
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
67
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
68
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
69
|
+
raise InvalidParameterError(
|
|
70
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
71
|
+
)
|
|
72
|
+
return ListObj(InboxUpload, "GET", "/inbox_uploads", params, options)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def all(params=None, options=None):
|
|
76
|
+
list(params, options)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def new(*args, **kwargs):
|
|
80
|
+
return InboxUpload(*args, **kwargs)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.models.account_line_item import AccountLineItem
|
|
3
|
+
from files_sdk.api import Api # noqa: F401
|
|
4
|
+
from files_sdk.list_obj import ListObj
|
|
5
|
+
from files_sdk.error import ( # noqa: F401
|
|
6
|
+
InvalidParameterError,
|
|
7
|
+
MissingParameterError,
|
|
8
|
+
NotImplementedError,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Invoice:
|
|
13
|
+
default_attributes = {
|
|
14
|
+
"id": None, # int64 - Line item Id
|
|
15
|
+
"amount": None, # double - Line item amount
|
|
16
|
+
"balance": None, # double - Line item balance
|
|
17
|
+
"created_at": None, # date-time - Line item created at
|
|
18
|
+
"currency": None, # string - Line item currency
|
|
19
|
+
"download_uri": None, # string - Line item download uri
|
|
20
|
+
"invoice_line_items": None, # array(object) - Associated invoice line items
|
|
21
|
+
"method": None, # string - Line item payment method
|
|
22
|
+
"payment_line_items": None, # array(object) - Associated payment line items
|
|
23
|
+
"payment_reversed_at": None, # date-time - Date/time payment was reversed if applicable
|
|
24
|
+
"payment_type": None, # string - Type of payment if applicable
|
|
25
|
+
"site_name": None, # string - Site name this line item is for
|
|
26
|
+
"type": None, # string - Type of line item, either payment or invoice
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
def __init__(self, attributes=None, options=None):
|
|
30
|
+
if not isinstance(attributes, dict):
|
|
31
|
+
attributes = {}
|
|
32
|
+
if not isinstance(options, dict):
|
|
33
|
+
options = {}
|
|
34
|
+
self.set_attributes(attributes)
|
|
35
|
+
self.options = options
|
|
36
|
+
|
|
37
|
+
def set_attributes(self, attributes):
|
|
38
|
+
for attribute, default_value in Invoice.default_attributes.items():
|
|
39
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
40
|
+
|
|
41
|
+
def get_attributes(self):
|
|
42
|
+
return {
|
|
43
|
+
k: getattr(self, k, None)
|
|
44
|
+
for k in Invoice.default_attributes
|
|
45
|
+
if getattr(self, k, None) is not None
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Parameters:
|
|
50
|
+
# 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.
|
|
51
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
52
|
+
def list(params=None, options=None):
|
|
53
|
+
if not isinstance(params, dict):
|
|
54
|
+
params = {}
|
|
55
|
+
if not isinstance(options, dict):
|
|
56
|
+
options = {}
|
|
57
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
58
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
59
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
60
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
61
|
+
return ListObj(AccountLineItem, "GET", "/invoices", params, options)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def all(params=None, options=None):
|
|
65
|
+
list(params, options)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Parameters:
|
|
69
|
+
# id (required) - int64 - Invoice ID.
|
|
70
|
+
def find(id, params=None, options=None):
|
|
71
|
+
if not isinstance(params, dict):
|
|
72
|
+
params = {}
|
|
73
|
+
if not isinstance(options, dict):
|
|
74
|
+
options = {}
|
|
75
|
+
params["id"] = id
|
|
76
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
77
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
78
|
+
if "id" not in params:
|
|
79
|
+
raise MissingParameterError("Parameter missing: id")
|
|
80
|
+
response, options = Api.send_request(
|
|
81
|
+
"GET", "/invoices/{id}".format(id=params["id"]), params, options
|
|
82
|
+
)
|
|
83
|
+
return AccountLineItem(response.data, options)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def get(id, params=None, options=None):
|
|
87
|
+
find(id, params, options)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def new(*args, **kwargs):
|
|
91
|
+
return Invoice(*args, **kwargs)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.error import ( # noqa: F401
|
|
4
|
+
InvalidParameterError,
|
|
5
|
+
MissingParameterError,
|
|
6
|
+
NotImplementedError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InvoiceLineItem:
|
|
11
|
+
default_attributes = {
|
|
12
|
+
"id": None, # int64 - Invoice Line item Id
|
|
13
|
+
"amount": None, # double - Invoice line item amount
|
|
14
|
+
"created_at": None, # date-time - Invoice line item created at date/time
|
|
15
|
+
"description": None, # string - Invoice line item description
|
|
16
|
+
"type": None, # string - Invoice line item type
|
|
17
|
+
"service_end_at": None, # date-time - Invoice line item service end date/time
|
|
18
|
+
"service_start_at": None, # date-time - Invoice line item service start date/time
|
|
19
|
+
"plan": None, # string - Plan name
|
|
20
|
+
"site": None, # string - Site name
|
|
21
|
+
"prepaid_bytes": None, # int64 - Prepaid bytes purchased for this invoice line item
|
|
22
|
+
"prepaid_bytes_expire_at": None, # date-time - When the prepaid bytes expire
|
|
23
|
+
"prepaid_bytes_used": None, # int64 - Total prepaid bytes used for this invoice line item
|
|
24
|
+
"prepaid_bytes_available": None, # int64 - Available prepaid bytes for this invoice line item
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(self, attributes=None, options=None):
|
|
28
|
+
if not isinstance(attributes, dict):
|
|
29
|
+
attributes = {}
|
|
30
|
+
if not isinstance(options, dict):
|
|
31
|
+
options = {}
|
|
32
|
+
self.set_attributes(attributes)
|
|
33
|
+
self.options = options
|
|
34
|
+
|
|
35
|
+
def set_attributes(self, attributes):
|
|
36
|
+
for (
|
|
37
|
+
attribute,
|
|
38
|
+
default_value,
|
|
39
|
+
) in InvoiceLineItem.default_attributes.items():
|
|
40
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
41
|
+
|
|
42
|
+
def get_attributes(self):
|
|
43
|
+
return {
|
|
44
|
+
k: getattr(self, k, None)
|
|
45
|
+
for k in InvoiceLineItem.default_attributes
|
|
46
|
+
if getattr(self, k, None) is not None
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def new(*args, **kwargs):
|
|
51
|
+
return InvoiceLineItem(*args, **kwargs)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.models.public_ip_address import PublicIpAddress
|
|
3
|
+
from files_sdk.api import Api # noqa: F401
|
|
4
|
+
from files_sdk.list_obj import ListObj
|
|
5
|
+
from files_sdk.error import ( # noqa: F401
|
|
6
|
+
InvalidParameterError,
|
|
7
|
+
MissingParameterError,
|
|
8
|
+
NotImplementedError,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IpAddress:
|
|
13
|
+
default_attributes = {
|
|
14
|
+
"id": None, # string - Unique label for list; used by Zapier and other integrations.
|
|
15
|
+
"associated_with": None, # string - The object that this public IP address list is associated with.
|
|
16
|
+
"group_id": None, # int64 - Group ID
|
|
17
|
+
"ip_addresses": None, # array(string) - A list of IP addresses.
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
def __init__(self, attributes=None, options=None):
|
|
21
|
+
if not isinstance(attributes, dict):
|
|
22
|
+
attributes = {}
|
|
23
|
+
if not isinstance(options, dict):
|
|
24
|
+
options = {}
|
|
25
|
+
self.set_attributes(attributes)
|
|
26
|
+
self.options = options
|
|
27
|
+
|
|
28
|
+
def set_attributes(self, attributes):
|
|
29
|
+
for attribute, default_value in IpAddress.default_attributes.items():
|
|
30
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
31
|
+
|
|
32
|
+
def get_attributes(self):
|
|
33
|
+
return {
|
|
34
|
+
k: getattr(self, k, None)
|
|
35
|
+
for k in IpAddress.default_attributes
|
|
36
|
+
if getattr(self, k, None) is not None
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Parameters:
|
|
41
|
+
# 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.
|
|
42
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
43
|
+
def list(params=None, options=None):
|
|
44
|
+
if not isinstance(params, dict):
|
|
45
|
+
params = {}
|
|
46
|
+
if not isinstance(options, dict):
|
|
47
|
+
options = {}
|
|
48
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
49
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
50
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
51
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
52
|
+
return ListObj(IpAddress, "GET", "/ip_addresses", params, options)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def all(params=None, options=None):
|
|
56
|
+
list(params, options)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Parameters:
|
|
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.
|
|
61
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
62
|
+
def get_smartfile_reserved(params=None, options=None):
|
|
63
|
+
if not isinstance(params, dict):
|
|
64
|
+
params = {}
|
|
65
|
+
if not isinstance(options, dict):
|
|
66
|
+
options = {}
|
|
67
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
68
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
69
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
70
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
71
|
+
return ListObj(
|
|
72
|
+
PublicIpAddress,
|
|
73
|
+
"GET",
|
|
74
|
+
"/ip_addresses/smartfile-reserved",
|
|
75
|
+
params,
|
|
76
|
+
options,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# Parameters:
|
|
81
|
+
# 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.
|
|
82
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
83
|
+
def get_exavault_reserved(params=None, options=None):
|
|
84
|
+
if not isinstance(params, dict):
|
|
85
|
+
params = {}
|
|
86
|
+
if not isinstance(options, dict):
|
|
87
|
+
options = {}
|
|
88
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
89
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
90
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
91
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
92
|
+
return ListObj(
|
|
93
|
+
PublicIpAddress,
|
|
94
|
+
"GET",
|
|
95
|
+
"/ip_addresses/exavault-reserved",
|
|
96
|
+
params,
|
|
97
|
+
options,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# Parameters:
|
|
102
|
+
# 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.
|
|
103
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
104
|
+
def get_reserved(params=None, options=None):
|
|
105
|
+
if not isinstance(params, dict):
|
|
106
|
+
params = {}
|
|
107
|
+
if not isinstance(options, dict):
|
|
108
|
+
options = {}
|
|
109
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
110
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
111
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
112
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
113
|
+
return ListObj(
|
|
114
|
+
PublicIpAddress, "GET", "/ip_addresses/reserved", params, options
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def new(*args, **kwargs):
|
|
119
|
+
return IpAddress(*args, **kwargs)
|