hubspot-api-client 20.0.0.pre.beta.1 → 20.0.0
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/CHANGELOG.md +33 -1
- data/Gemfile.lock +2 -2
- data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +91 -22
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +25 -17
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +12 -0
- data/lib/hubspot/codegen/crm/companies/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/companies/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/companies/models/public_merge_input.rb +2 -0
- data/lib/hubspot/codegen/crm/companies/models/public_object_id.rb +6 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_upsert.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +2 -10
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input_for_create.rb +2 -10
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/companies/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +163 -26
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +27 -19
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/contacts/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_gdpr_delete_input.rb +2 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +13 -1
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +67 -0
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/deals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/deals/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/deals/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +2 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/objects/goals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_for_create.rb +252 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +1 -15
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/products/api/basic_api.rb +5 -4
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/products/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_input_for_create.rb +6 -10
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +73 -4
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +17 -9
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/tickets/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/tickets/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/tickets/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/files/api/files_api.rb +144 -104
- data/lib/hubspot/codegen/files/api/folders_api.rb +142 -57
- data/lib/hubspot/codegen/files/api_client.rb +1 -1
- data/lib/hubspot/codegen/files/api_error.rb +1 -1
- data/lib/hubspot/codegen/files/configuration.rb +1 -1
- data/lib/hubspot/codegen/files/models/collection_response_file.rb +2 -1
- data/lib/hubspot/codegen/files/models/collection_response_folder.rb +1 -1
- data/lib/hubspot/codegen/files/models/error.rb +1 -1
- data/lib/hubspot/codegen/files/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/files/models/file.rb +33 -14
- data/lib/hubspot/codegen/files/models/file_action_response.rb +1 -1
- data/lib/hubspot/codegen/files/models/file_stat.rb +1 -1
- data/lib/hubspot/codegen/files/models/file_update_input.rb +15 -5
- data/lib/hubspot/codegen/files/models/folder.rb +12 -12
- data/lib/hubspot/codegen/files/models/folder_action_response.rb +1 -1
- data/lib/hubspot/codegen/files/models/folder_input.rb +2 -1
- data/lib/hubspot/codegen/files/models/folder_update_input.rb +6 -20
- data/lib/hubspot/codegen/files/models/folder_update_input_with_id.rb +244 -0
- data/lib/hubspot/codegen/files/models/folder_update_task_locator.rb +2 -1
- data/lib/hubspot/codegen/files/models/import_from_url_input.rb +13 -4
- data/lib/hubspot/codegen/files/models/import_from_url_task_locator.rb +2 -1
- data/lib/hubspot/codegen/files/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/files/models/paging.rb +1 -1
- data/lib/hubspot/codegen/files/models/previous_page.rb +1 -1
- data/lib/hubspot/codegen/files/models/signed_url.rb +18 -17
- data/lib/hubspot/codegen/files/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +7 -3
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +13 -5
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +5 -1
- data/lib/hubspot/codegen/oauth/api_client.rb +2 -2
- data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
- data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
- data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/error.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/error_detail.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/token_response_if.rb +4 -4
- data/lib/hubspot/discovery/cms/client.rb +0 -1
- data/lib/hubspot/discovery/crm/companies/client.rb +0 -1
- data/lib/hubspot/discovery/crm/contacts/client.rb +0 -2
- data/lib/hubspot/discovery/crm/deals/client.rb +0 -1
- data/lib/hubspot/discovery/crm/tickets/client.rb +0 -1
- data/lib/hubspot/discovery/oauth/api/access_tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/api/tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/client.rb +1 -1
- data/lib/hubspot/helpers/camel_case.rb +0 -4
- data/lib/hubspot/version.rb +1 -1
- data/spec/discovery/cms/client_spec.rb +0 -1
- data/spec/discovery/crm/companies/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/contacts/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/deals/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/tickets/basic_api_spec.rb +1 -0
- data/spec/discovery/files/files_api_spec.rb +2 -1
- data/spec/discovery/files/folders_api_spec.rb +1 -0
- data/spec/discovery/oauth/access_tokens_api_spec.rb +1 -1
- data/spec/discovery/oauth/refresh_tokens_api_spec.rb +1 -1
- data/spec/discovery/oauth/tokens_api_spec.rb +1 -1
- metadata +17 -42
- data/lib/hubspot/codegen/cms/performance/api/public_performance_api.rb +0 -188
- data/lib/hubspot/codegen/cms/performance/api_client.rb +0 -410
- data/lib/hubspot/codegen/cms/performance/api_error.rb +0 -61
- data/lib/hubspot/codegen/cms/performance/configuration.rb +0 -287
- data/lib/hubspot/codegen/cms/performance/models/error.rb +0 -305
- data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +0 -271
- data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +0 -526
- data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +0 -345
- data/lib/hubspot/codegen/crm/companies/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +0 -94
- data/lib/hubspot/codegen/crm/contacts/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/deals/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/tickets/api/merge_api.rb +0 -92
- data/lib/hubspot/discovery/cms/performance/api/public_performance_api.rb +0 -13
- data/lib/hubspot/discovery/cms/performance/client.rb +0 -19
- data/lib/hubspot/discovery/crm/companies/api/merge_api.rb +0 -13
- data/lib/hubspot/discovery/crm/contacts/api/gdpr_api.rb +0 -13
- data/lib/hubspot/discovery/crm/contacts/api/merge_api.rb +0 -13
- data/lib/hubspot/discovery/crm/deals/api/merge_api.rb +0 -13
- data/lib/hubspot/discovery/crm/tickets/api/merge_api.rb +0 -13
- data/spec/discovery/cms/performance/public_performance_api_spec.rb +0 -8
- data/spec/discovery/crm/companies/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/contacts/gdpr_api_spec.rb +0 -7
- data/spec/discovery/crm/contacts/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/deals/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/tickets/merge_api_spec.rb +0 -7
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -20,8 +20,8 @@ module Hubspot
|
|
20
20
|
def initialize(api_client = ApiClient.default)
|
21
21
|
@api_client = api_client
|
22
22
|
end
|
23
|
-
# Delete file
|
24
23
|
# Delete file by ID
|
24
|
+
# Delete a file by ID
|
25
25
|
# @param file_id [String] FileId to delete
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [nil]
|
@@ -30,8 +30,8 @@ module Hubspot
|
|
30
30
|
nil
|
31
31
|
end
|
32
32
|
|
33
|
-
# Delete file
|
34
33
|
# Delete file by ID
|
34
|
+
# Delete a file by ID
|
35
35
|
# @param file_id [String] FileId to delete
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
37
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -88,36 +88,31 @@ module Hubspot
|
|
88
88
|
return data, status_code, headers
|
89
89
|
end
|
90
90
|
|
91
|
-
#
|
92
|
-
#
|
93
|
-
# @param
|
91
|
+
# Check import status
|
92
|
+
# Check the status of requested import.
|
93
|
+
# @param task_id [String] Import by URL task ID
|
94
94
|
# @param [Hash] opts the optional parameters
|
95
|
-
# @return [
|
96
|
-
def
|
97
|
-
|
98
|
-
|
95
|
+
# @return [FileActionResponse]
|
96
|
+
def check_import(task_id, opts = {})
|
97
|
+
data, _status_code, _headers = check_import_with_http_info(task_id, opts)
|
98
|
+
data
|
99
99
|
end
|
100
100
|
|
101
|
-
#
|
102
|
-
#
|
103
|
-
# @param
|
101
|
+
# Check import status
|
102
|
+
# Check the status of requested import.
|
103
|
+
# @param task_id [String] Import by URL task ID
|
104
104
|
# @param [Hash] opts the optional parameters
|
105
|
-
# @return [Array<(
|
106
|
-
def
|
105
|
+
# @return [Array<(FileActionResponse, Integer, Hash)>] FileActionResponse data, response status code and response headers
|
106
|
+
def check_import_with_http_info(task_id, opts = {})
|
107
107
|
if @api_client.config.debugging
|
108
|
-
@api_client.config.logger.debug 'Calling API: FilesApi.
|
109
|
-
end
|
110
|
-
# verify the required parameter 'file_id' is set
|
111
|
-
if @api_client.config.client_side_validation && file_id.nil?
|
112
|
-
fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.archive_gdpr"
|
108
|
+
@api_client.config.logger.debug 'Calling API: FilesApi.check_import ...'
|
113
109
|
end
|
114
|
-
|
115
|
-
if @api_client.config.client_side_validation &&
|
116
|
-
fail ArgumentError, "
|
110
|
+
# verify the required parameter 'task_id' is set
|
111
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling FilesApi.check_import"
|
117
113
|
end
|
118
|
-
|
119
114
|
# resource path
|
120
|
-
local_var_path = '/files/v3/files/{
|
115
|
+
local_var_path = '/files/v3/files/import-from-url/async/tasks/{taskId}/status'.sub('{' + 'taskId' + '}', CGI.escape(task_id.to_s))
|
121
116
|
|
122
117
|
# query parameters
|
123
118
|
query_params = opts[:query_params] || {}
|
@@ -125,7 +120,7 @@ module Hubspot
|
|
125
120
|
# header parameters
|
126
121
|
header_params = opts[:header_params] || {}
|
127
122
|
# HTTP header 'Accept' (if needed)
|
128
|
-
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
129
124
|
|
130
125
|
# form parameters
|
131
126
|
form_params = opts[:form_params] || {}
|
@@ -134,13 +129,13 @@ module Hubspot
|
|
134
129
|
post_body = opts[:debug_body]
|
135
130
|
|
136
131
|
# return_type
|
137
|
-
return_type = opts[:debug_return_type]
|
132
|
+
return_type = opts[:debug_return_type] || 'FileActionResponse'
|
138
133
|
|
139
134
|
# auth_names
|
140
135
|
auth_names = opts[:debug_auth_names] || ['oauth2']
|
141
136
|
|
142
137
|
new_options = opts.merge(
|
143
|
-
:operation => :"FilesApi.
|
138
|
+
:operation => :"FilesApi.check_import",
|
144
139
|
:header_params => header_params,
|
145
140
|
:query_params => query_params,
|
146
141
|
:form_params => form_params,
|
@@ -149,38 +144,43 @@ module Hubspot
|
|
149
144
|
:return_type => return_type
|
150
145
|
)
|
151
146
|
|
152
|
-
data, status_code, headers = @api_client.call_api(:
|
147
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
148
|
if @api_client.config.debugging
|
154
|
-
@api_client.config.logger.debug "API called: FilesApi#
|
149
|
+
@api_client.config.logger.debug "API called: FilesApi#check_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
150
|
end
|
156
151
|
return data, status_code, headers
|
157
152
|
end
|
158
153
|
|
159
|
-
#
|
160
|
-
#
|
161
|
-
# @param
|
154
|
+
# GDPR-delete file
|
155
|
+
# Delete a file in accordance with GDPR regulations.
|
156
|
+
# @param file_id [String] ID of file to GDPR delete
|
162
157
|
# @param [Hash] opts the optional parameters
|
163
|
-
# @return [
|
164
|
-
def
|
165
|
-
|
166
|
-
|
158
|
+
# @return [nil]
|
159
|
+
def delete(file_id, opts = {})
|
160
|
+
delete_with_http_info(file_id, opts)
|
161
|
+
nil
|
167
162
|
end
|
168
163
|
|
169
|
-
#
|
170
|
-
#
|
171
|
-
# @param
|
164
|
+
# GDPR-delete file
|
165
|
+
# Delete a file in accordance with GDPR regulations.
|
166
|
+
# @param file_id [String] ID of file to GDPR delete
|
172
167
|
# @param [Hash] opts the optional parameters
|
173
|
-
# @return [Array<(
|
174
|
-
def
|
168
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
169
|
+
def delete_with_http_info(file_id, opts = {})
|
175
170
|
if @api_client.config.debugging
|
176
|
-
@api_client.config.logger.debug 'Calling API: FilesApi.
|
171
|
+
@api_client.config.logger.debug 'Calling API: FilesApi.delete ...'
|
177
172
|
end
|
178
|
-
# verify the required parameter '
|
179
|
-
if @api_client.config.client_side_validation &&
|
180
|
-
fail ArgumentError, "Missing the required parameter '
|
173
|
+
# verify the required parameter 'file_id' is set
|
174
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
175
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling FilesApi.delete"
|
181
176
|
end
|
177
|
+
pattern = Regexp.new(/\d+/)
|
178
|
+
if @api_client.config.client_side_validation && file_id !~ pattern
|
179
|
+
fail ArgumentError, "invalid value for 'file_id' when calling FilesApi.delete, must conform to the pattern #{pattern}."
|
180
|
+
end
|
181
|
+
|
182
182
|
# resource path
|
183
|
-
local_var_path = '/files/v3/files/
|
183
|
+
local_var_path = '/files/v3/files/{fileId}/gdpr-delete'.sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
184
184
|
|
185
185
|
# query parameters
|
186
186
|
query_params = opts[:query_params] || {}
|
@@ -188,7 +188,7 @@ module Hubspot
|
|
188
188
|
# header parameters
|
189
189
|
header_params = opts[:header_params] || {}
|
190
190
|
# HTTP header 'Accept' (if needed)
|
191
|
-
header_params['Accept'] = @api_client.select_header_accept(['
|
191
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
192
192
|
|
193
193
|
# form parameters
|
194
194
|
form_params = opts[:form_params] || {}
|
@@ -197,13 +197,13 @@ module Hubspot
|
|
197
197
|
post_body = opts[:debug_body]
|
198
198
|
|
199
199
|
# return_type
|
200
|
-
return_type = opts[:debug_return_type]
|
200
|
+
return_type = opts[:debug_return_type]
|
201
201
|
|
202
202
|
# auth_names
|
203
203
|
auth_names = opts[:debug_auth_names] || ['oauth2']
|
204
204
|
|
205
205
|
new_options = opts.merge(
|
206
|
-
:operation => :"FilesApi.
|
206
|
+
:operation => :"FilesApi.delete",
|
207
207
|
:header_params => header_params,
|
208
208
|
:query_params => query_params,
|
209
209
|
:form_params => form_params,
|
@@ -212,9 +212,9 @@ module Hubspot
|
|
212
212
|
:return_type => return_type
|
213
213
|
)
|
214
214
|
|
215
|
-
data, status_code, headers = @api_client.call_api(:
|
215
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
216
216
|
if @api_client.config.debugging
|
217
|
-
@api_client.config.logger.debug "API called: FilesApi#
|
217
|
+
@api_client.config.logger.debug "API called: FilesApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
218
218
|
end
|
219
219
|
return data, status_code, headers
|
220
220
|
end
|
@@ -222,30 +222,42 @@ module Hubspot
|
|
222
222
|
# Search files
|
223
223
|
# Search through files in the file manager. Does not display hidden or archived files.
|
224
224
|
# @param [Hash] opts the optional parameters
|
225
|
-
# @option opts [Array<String>] :properties
|
226
|
-
# @option opts [String] :after The maximum offset of items for a given search is
|
225
|
+
# @option opts [Array<String>] :properties A list of file properties to return.
|
226
|
+
# @option opts [String] :after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit.
|
227
227
|
# @option opts [String] :before
|
228
|
-
# @option opts [Integer] :limit Number of items to return.
|
228
|
+
# @option opts [Integer] :limit Number of items to return. Default limit is 10, maximum limit is 100.
|
229
229
|
# @option opts [Array<String>] :sort Sort files by a given field.
|
230
|
-
# @option opts [
|
230
|
+
# @option opts [Array<Integer>] :ids Search by a list of file IDs.
|
231
|
+
# @option opts [Integer] :id_lte
|
232
|
+
# @option opts [Integer] :id_gte
|
231
233
|
# @option opts [Time] :created_at Search files by time of creation.
|
232
|
-
# @option opts [Time] :created_at_lte
|
233
|
-
# @option opts [Time] :created_at_gte
|
234
|
+
# @option opts [Time] :created_at_lte Search files by less than or equal to time of creation. Can be used with `createdAtGte` to create a range.
|
235
|
+
# @option opts [Time] :created_at_gte Search files by greater than or equal to time of creation. Can be used with `createdAtLte` to create a range.
|
234
236
|
# @option opts [Time] :updated_at Search files by time of latest updated.
|
235
|
-
# @option opts [Time] :updated_at_lte
|
236
|
-
# @option opts [Time] :updated_at_gte
|
237
|
+
# @option opts [Time] :updated_at_lte Search files by less than or equal to time of latest update. Can be used with `updatedAtGte` to create a range.
|
238
|
+
# @option opts [Time] :updated_at_gte Search files by greater than or equal to time of latest update. Can be used with `updatedAtLte` to create a range.
|
237
239
|
# @option opts [String] :name Search for files containing the given name.
|
238
240
|
# @option opts [String] :path Search files by path.
|
239
|
-
# @option opts [Integer] :
|
240
|
-
# @option opts [Integer] :size
|
241
|
+
# @option opts [Array<Integer>] :parent_folder_ids Search files within given `folderId`.
|
242
|
+
# @option opts [Integer] :size Search files by exact file size in bytes.
|
243
|
+
# @option opts [Integer] :size_lte Search files by less than or equal to file size. Can be used with `sizeGte` to create a range.
|
244
|
+
# @option opts [Integer] :size_gte Search files by greater than or equal to file size. Can be used with `sizeLte` to create a range.
|
241
245
|
# @option opts [Integer] :height Search files by height of image or video.
|
246
|
+
# @option opts [Integer] :height_lte Search files by less than or equal to height of image or video. Can be used with `heightGte` to create a range.
|
247
|
+
# @option opts [Integer] :height_gte Search files by greater than or equal to height of image or video. Can be used with `heightLte` to create a range.
|
242
248
|
# @option opts [Integer] :width Search files by width of image or video.
|
243
|
-
# @option opts [
|
249
|
+
# @option opts [Integer] :width_lte Search files by less than or equal to width of image or video. Can be used with `widthGte` to create a range.
|
250
|
+
# @option opts [Integer] :width_gte Search files by greater than or equal to width of image or video. Can be used with `widthLte` to create a range.
|
251
|
+
# @option opts [String] :encoding Search files by specified encoding.
|
244
252
|
# @option opts [String] :type Filter by provided file type.
|
245
253
|
# @option opts [String] :extension Search files by given extension.
|
246
|
-
# @option opts [String] :url Search
|
247
|
-
# @option opts [Boolean] :is_usable_in_content If true shows files that have been marked to be used in new content.
|
248
|
-
# @option opts [Boolean] :allows_anonymous_access If &#
|
254
|
+
# @option opts [String] :url Search by file URL.
|
255
|
+
# @option opts [Boolean] :is_usable_in_content If `true`, shows files that have been marked to be used in new content. If `false`, shows files that should not be used in new content.
|
256
|
+
# @option opts [Boolean] :allows_anonymous_access Search files by access. If `true`, will show only public files. If `false`, will show only private files.
|
257
|
+
# @option opts [String] :file_md5 Search files by a specific md5 hash.
|
258
|
+
# @option opts [Time] :expires_at Search files by exact expires time. Time must be epoch time in milliseconds.
|
259
|
+
# @option opts [Time] :expires_at_lte Search files by less than or equal to expires time. Can be used with `expiresAtGte` to create a range.
|
260
|
+
# @option opts [Time] :expires_at_gte Search files by greater than or equal to expires time. Can be used with `expiresAtLte` to create a range.
|
249
261
|
# @return [CollectionResponseFile]
|
250
262
|
def do_search(opts = {})
|
251
263
|
data, _status_code, _headers = do_search_with_http_info(opts)
|
@@ -255,30 +267,42 @@ module Hubspot
|
|
255
267
|
# Search files
|
256
268
|
# Search through files in the file manager. Does not display hidden or archived files.
|
257
269
|
# @param [Hash] opts the optional parameters
|
258
|
-
# @option opts [Array<String>] :properties
|
259
|
-
# @option opts [String] :after The maximum offset of items for a given search is
|
270
|
+
# @option opts [Array<String>] :properties A list of file properties to return.
|
271
|
+
# @option opts [String] :after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit.
|
260
272
|
# @option opts [String] :before
|
261
|
-
# @option opts [Integer] :limit Number of items to return.
|
273
|
+
# @option opts [Integer] :limit Number of items to return. Default limit is 10, maximum limit is 100.
|
262
274
|
# @option opts [Array<String>] :sort Sort files by a given field.
|
263
|
-
# @option opts [
|
275
|
+
# @option opts [Array<Integer>] :ids Search by a list of file IDs.
|
276
|
+
# @option opts [Integer] :id_lte
|
277
|
+
# @option opts [Integer] :id_gte
|
264
278
|
# @option opts [Time] :created_at Search files by time of creation.
|
265
|
-
# @option opts [Time] :created_at_lte
|
266
|
-
# @option opts [Time] :created_at_gte
|
279
|
+
# @option opts [Time] :created_at_lte Search files by less than or equal to time of creation. Can be used with `createdAtGte` to create a range.
|
280
|
+
# @option opts [Time] :created_at_gte Search files by greater than or equal to time of creation. Can be used with `createdAtLte` to create a range.
|
267
281
|
# @option opts [Time] :updated_at Search files by time of latest updated.
|
268
|
-
# @option opts [Time] :updated_at_lte
|
269
|
-
# @option opts [Time] :updated_at_gte
|
282
|
+
# @option opts [Time] :updated_at_lte Search files by less than or equal to time of latest update. Can be used with `updatedAtGte` to create a range.
|
283
|
+
# @option opts [Time] :updated_at_gte Search files by greater than or equal to time of latest update. Can be used with `updatedAtLte` to create a range.
|
270
284
|
# @option opts [String] :name Search for files containing the given name.
|
271
285
|
# @option opts [String] :path Search files by path.
|
272
|
-
# @option opts [Integer] :
|
273
|
-
# @option opts [Integer] :size
|
286
|
+
# @option opts [Array<Integer>] :parent_folder_ids Search files within given `folderId`.
|
287
|
+
# @option opts [Integer] :size Search files by exact file size in bytes.
|
288
|
+
# @option opts [Integer] :size_lte Search files by less than or equal to file size. Can be used with `sizeGte` to create a range.
|
289
|
+
# @option opts [Integer] :size_gte Search files by greater than or equal to file size. Can be used with `sizeLte` to create a range.
|
274
290
|
# @option opts [Integer] :height Search files by height of image or video.
|
291
|
+
# @option opts [Integer] :height_lte Search files by less than or equal to height of image or video. Can be used with `heightGte` to create a range.
|
292
|
+
# @option opts [Integer] :height_gte Search files by greater than or equal to height of image or video. Can be used with `heightLte` to create a range.
|
275
293
|
# @option opts [Integer] :width Search files by width of image or video.
|
276
|
-
# @option opts [
|
294
|
+
# @option opts [Integer] :width_lte Search files by less than or equal to width of image or video. Can be used with `widthGte` to create a range.
|
295
|
+
# @option opts [Integer] :width_gte Search files by greater than or equal to width of image or video. Can be used with `widthLte` to create a range.
|
296
|
+
# @option opts [String] :encoding Search files by specified encoding.
|
277
297
|
# @option opts [String] :type Filter by provided file type.
|
278
298
|
# @option opts [String] :extension Search files by given extension.
|
279
|
-
# @option opts [String] :url Search
|
280
|
-
# @option opts [Boolean] :is_usable_in_content If true shows files that have been marked to be used in new content.
|
281
|
-
# @option opts [Boolean] :allows_anonymous_access If &#
|
299
|
+
# @option opts [String] :url Search by file URL.
|
300
|
+
# @option opts [Boolean] :is_usable_in_content If `true`, shows files that have been marked to be used in new content. If `false`, shows files that should not be used in new content.
|
301
|
+
# @option opts [Boolean] :allows_anonymous_access Search files by access. If `true`, will show only public files. If `false`, will show only private files.
|
302
|
+
# @option opts [String] :file_md5 Search files by a specific md5 hash.
|
303
|
+
# @option opts [Time] :expires_at Search files by exact expires time. Time must be epoch time in milliseconds.
|
304
|
+
# @option opts [Time] :expires_at_lte Search files by less than or equal to expires time. Can be used with `expiresAtGte` to create a range.
|
305
|
+
# @option opts [Time] :expires_at_gte Search files by greater than or equal to expires time. Can be used with `expiresAtLte` to create a range.
|
282
306
|
# @return [Array<(CollectionResponseFile, Integer, Hash)>] CollectionResponseFile data, response status code and response headers
|
283
307
|
def do_search_with_http_info(opts = {})
|
284
308
|
if @api_client.config.debugging
|
@@ -294,7 +318,9 @@ module Hubspot
|
|
294
318
|
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
295
319
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
296
320
|
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
297
|
-
query_params[:'
|
321
|
+
query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
|
322
|
+
query_params[:'idLte'] = opts[:'id_lte'] if !opts[:'id_lte'].nil?
|
323
|
+
query_params[:'idGte'] = opts[:'id_gte'] if !opts[:'id_gte'].nil?
|
298
324
|
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
299
325
|
query_params[:'createdAtLte'] = opts[:'created_at_lte'] if !opts[:'created_at_lte'].nil?
|
300
326
|
query_params[:'createdAtGte'] = opts[:'created_at_gte'] if !opts[:'created_at_gte'].nil?
|
@@ -303,16 +329,26 @@ module Hubspot
|
|
303
329
|
query_params[:'updatedAtGte'] = opts[:'updated_at_gte'] if !opts[:'updated_at_gte'].nil?
|
304
330
|
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
305
331
|
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
306
|
-
query_params[:'
|
332
|
+
query_params[:'parentFolderIds'] = @api_client.build_collection_param(opts[:'parent_folder_ids'], :multi) if !opts[:'parent_folder_ids'].nil?
|
307
333
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
334
|
+
query_params[:'sizeLte'] = opts[:'size_lte'] if !opts[:'size_lte'].nil?
|
335
|
+
query_params[:'sizeGte'] = opts[:'size_gte'] if !opts[:'size_gte'].nil?
|
308
336
|
query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
|
337
|
+
query_params[:'heightLte'] = opts[:'height_lte'] if !opts[:'height_lte'].nil?
|
338
|
+
query_params[:'heightGte'] = opts[:'height_gte'] if !opts[:'height_gte'].nil?
|
309
339
|
query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
|
340
|
+
query_params[:'widthLte'] = opts[:'width_lte'] if !opts[:'width_lte'].nil?
|
341
|
+
query_params[:'widthGte'] = opts[:'width_gte'] if !opts[:'width_gte'].nil?
|
310
342
|
query_params[:'encoding'] = opts[:'encoding'] if !opts[:'encoding'].nil?
|
311
343
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
312
344
|
query_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?
|
313
345
|
query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
|
314
346
|
query_params[:'isUsableInContent'] = opts[:'is_usable_in_content'] if !opts[:'is_usable_in_content'].nil?
|
315
347
|
query_params[:'allowsAnonymousAccess'] = opts[:'allows_anonymous_access'] if !opts[:'allows_anonymous_access'].nil?
|
348
|
+
query_params[:'fileMd5'] = opts[:'file_md5'] if !opts[:'file_md5'].nil?
|
349
|
+
query_params[:'expiresAt'] = opts[:'expires_at'] if !opts[:'expires_at'].nil?
|
350
|
+
query_params[:'expiresAtLte'] = opts[:'expires_at_lte'] if !opts[:'expires_at_lte'].nil?
|
351
|
+
query_params[:'expiresAtGte'] = opts[:'expires_at_gte'] if !opts[:'expires_at_gte'].nil?
|
316
352
|
|
317
353
|
# header parameters
|
318
354
|
header_params = opts[:header_params] || {}
|
@@ -348,22 +384,22 @@ module Hubspot
|
|
348
384
|
return data, status_code, headers
|
349
385
|
end
|
350
386
|
|
351
|
-
#
|
352
|
-
#
|
387
|
+
# Retrieve file by ID
|
388
|
+
# Retrieve a file by its ID.
|
353
389
|
# @param file_id [String] ID of the desired file.
|
354
390
|
# @param [Hash] opts the optional parameters
|
355
|
-
# @option opts [Array<String>] :properties
|
391
|
+
# @option opts [Array<String>] :properties null
|
356
392
|
# @return [File]
|
357
393
|
def get_by_id(file_id, opts = {})
|
358
394
|
data, _status_code, _headers = get_by_id_with_http_info(file_id, opts)
|
359
395
|
data
|
360
396
|
end
|
361
397
|
|
362
|
-
#
|
363
|
-
#
|
398
|
+
# Retrieve file by ID
|
399
|
+
# Retrieve a file by its ID.
|
364
400
|
# @param file_id [String] ID of the desired file.
|
365
401
|
# @param [Hash] opts the optional parameters
|
366
|
-
# @option opts [Array<String>] :properties
|
402
|
+
# @option opts [Array<String>] :properties null
|
367
403
|
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
368
404
|
def get_by_id_with_http_info(file_id, opts = {})
|
369
405
|
if @api_client.config.debugging
|
@@ -419,18 +455,22 @@ module Hubspot
|
|
419
455
|
return data, status_code, headers
|
420
456
|
end
|
421
457
|
|
422
|
-
#
|
458
|
+
# Retrieve file by path
|
459
|
+
# Retrieve a file by its path.
|
460
|
+
# @param path [String] The path of the file.
|
423
461
|
# @param [Hash] opts the optional parameters
|
424
|
-
# @option opts [Array<String>] :properties
|
462
|
+
# @option opts [Array<String>] :properties Properties to return in the response.
|
425
463
|
# @return [FileStat]
|
426
464
|
def get_metadata(path, opts = {})
|
427
465
|
data, _status_code, _headers = get_metadata_with_http_info(path, opts)
|
428
466
|
data
|
429
467
|
end
|
430
468
|
|
431
|
-
#
|
469
|
+
# Retrieve file by path
|
470
|
+
# Retrieve a file by its path.
|
471
|
+
# @param path [String] The path of the file.
|
432
472
|
# @param [Hash] opts the optional parameters
|
433
|
-
# @option opts [Array<String>] :properties
|
473
|
+
# @option opts [Array<String>] :properties Properties to return in the response.
|
434
474
|
# @return [Array<(FileStat, Integer, Hash)>] FileStat data, response status code and response headers
|
435
475
|
def get_metadata_with_http_info(path, opts = {})
|
436
476
|
if @api_client.config.debugging
|
@@ -486,7 +526,7 @@ module Hubspot
|
|
486
526
|
return data, status_code, headers
|
487
527
|
end
|
488
528
|
|
489
|
-
# Get signed URL to access private file
|
529
|
+
# Get signed URL to access private file
|
490
530
|
# Generates signed URL that allows temporary access to a private file.
|
491
531
|
# @param file_id [String] ID of file.
|
492
532
|
# @param [Hash] opts the optional parameters
|
@@ -499,7 +539,7 @@ module Hubspot
|
|
499
539
|
data
|
500
540
|
end
|
501
541
|
|
502
|
-
# Get signed URL to access private file
|
542
|
+
# Get signed URL to access private file
|
503
543
|
# Generates signed URL that allows temporary access to a private file.
|
504
544
|
# @param file_id [String] ID of file.
|
505
545
|
# @param [Hash] opts the optional parameters
|
@@ -567,7 +607,7 @@ module Hubspot
|
|
567
607
|
return data, status_code, headers
|
568
608
|
end
|
569
609
|
|
570
|
-
# Import
|
610
|
+
# Import file from URL
|
571
611
|
# Asynchronously imports the file at the given URL into the file manager.
|
572
612
|
# @param import_from_url_input [ImportFromUrlInput]
|
573
613
|
# @param [Hash] opts the optional parameters
|
@@ -577,7 +617,7 @@ module Hubspot
|
|
577
617
|
data
|
578
618
|
end
|
579
619
|
|
580
|
-
# Import
|
620
|
+
# Import file from URL
|
581
621
|
# Asynchronously imports the file at the given URL into the file manager.
|
582
622
|
# @param import_from_url_input [ImportFromUrlInput]
|
583
623
|
# @param [Hash] opts the optional parameters
|
@@ -635,26 +675,26 @@ module Hubspot
|
|
635
675
|
return data, status_code, headers
|
636
676
|
end
|
637
677
|
|
638
|
-
# Replace file
|
678
|
+
# Replace file
|
639
679
|
# Replace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references.
|
640
680
|
# @param file_id [String] ID of the desired file.
|
641
681
|
# @param [Hash] opts the optional parameters
|
642
682
|
# @option opts [File] :file File data that will replace existing file in the file manager.
|
643
683
|
# @option opts [String] :charset_hunch Character set of given file data.
|
644
|
-
# @option opts [String] :options JSON
|
684
|
+
# @option opts [String] :options JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced.
|
645
685
|
# @return [File]
|
646
686
|
def replace(file_id, opts = {})
|
647
687
|
data, _status_code, _headers = replace_with_http_info(file_id, opts)
|
648
688
|
data
|
649
689
|
end
|
650
690
|
|
651
|
-
# Replace file
|
691
|
+
# Replace file
|
652
692
|
# Replace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references.
|
653
693
|
# @param file_id [String] ID of the desired file.
|
654
694
|
# @param [Hash] opts the optional parameters
|
655
695
|
# @option opts [File] :file File data that will replace existing file in the file manager.
|
656
696
|
# @option opts [String] :charset_hunch Character set of given file data.
|
657
|
-
# @option opts [String] :options JSON
|
697
|
+
# @option opts [String] :options JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced.
|
658
698
|
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
659
699
|
def replace_with_http_info(file_id, opts = {})
|
660
700
|
if @api_client.config.debugging
|
@@ -717,10 +757,10 @@ module Hubspot
|
|
717
757
|
return data, status_code, headers
|
718
758
|
end
|
719
759
|
|
720
|
-
#
|
760
|
+
# Update file properties
|
721
761
|
# Update properties of file by ID.
|
722
762
|
# @param file_id [String] ID of file to update
|
723
|
-
# @param file_update_input [FileUpdateInput]
|
763
|
+
# @param file_update_input [FileUpdateInput]
|
724
764
|
# @param [Hash] opts the optional parameters
|
725
765
|
# @return [File]
|
726
766
|
def update_properties(file_id, file_update_input, opts = {})
|
@@ -728,10 +768,10 @@ module Hubspot
|
|
728
768
|
data
|
729
769
|
end
|
730
770
|
|
731
|
-
#
|
771
|
+
# Update file properties
|
732
772
|
# Update properties of file by ID.
|
733
773
|
# @param file_id [String] ID of file to update
|
734
|
-
# @param file_update_input [FileUpdateInput]
|
774
|
+
# @param file_update_input [FileUpdateInput]
|
735
775
|
# @param [Hash] opts the optional parameters
|
736
776
|
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
737
777
|
def update_properties_with_http_info(file_id, file_update_input, opts = {})
|