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
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Hubspot
|
17
17
|
module Files
|
18
|
+
# Object for updating files.
|
18
19
|
class FileUpdateInput
|
19
20
|
# NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead.
|
20
21
|
attr_accessor :access
|
@@ -28,6 +29,8 @@ module Hubspot
|
|
28
29
|
# Folder path where the file should be moved to. folderId and folderPath parameters cannot be set at the same time.
|
29
30
|
attr_accessor :parent_folder_path
|
30
31
|
|
32
|
+
attr_accessor :clear_expires
|
33
|
+
|
31
34
|
# Mark whether the file should be used in new content or not.
|
32
35
|
attr_accessor :is_usable_in_content
|
33
36
|
|
@@ -62,6 +65,7 @@ module Hubspot
|
|
62
65
|
:'parent_folder_id' => :'parentFolderId',
|
63
66
|
:'name' => :'name',
|
64
67
|
:'parent_folder_path' => :'parentFolderPath',
|
68
|
+
:'clear_expires' => :'clearExpires',
|
65
69
|
:'is_usable_in_content' => :'isUsableInContent',
|
66
70
|
:'expires_at' => :'expiresAt'
|
67
71
|
}
|
@@ -79,8 +83,9 @@ module Hubspot
|
|
79
83
|
:'parent_folder_id' => :'String',
|
80
84
|
:'name' => :'String',
|
81
85
|
:'parent_folder_path' => :'String',
|
86
|
+
:'clear_expires' => :'Boolean',
|
82
87
|
:'is_usable_in_content' => :'Boolean',
|
83
|
-
:'expires_at' => :'
|
88
|
+
:'expires_at' => :'Time'
|
84
89
|
}
|
85
90
|
end
|
86
91
|
|
@@ -121,6 +126,10 @@ module Hubspot
|
|
121
126
|
self.parent_folder_path = attributes[:'parent_folder_path']
|
122
127
|
end
|
123
128
|
|
129
|
+
if attributes.key?(:'clear_expires')
|
130
|
+
self.clear_expires = attributes[:'clear_expires']
|
131
|
+
end
|
132
|
+
|
124
133
|
if attributes.key?(:'is_usable_in_content')
|
125
134
|
self.is_usable_in_content = attributes[:'is_usable_in_content']
|
126
135
|
end
|
@@ -140,7 +149,7 @@ module Hubspot
|
|
140
149
|
# Check to see if the all the properties in the model are valid
|
141
150
|
# @return true if the model is valid
|
142
151
|
def valid?
|
143
|
-
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
152
|
+
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE", "HIDDEN_SENSITIVE", "SENSITIVE"])
|
144
153
|
return false unless access_validator.valid?(@access)
|
145
154
|
true
|
146
155
|
end
|
@@ -148,7 +157,7 @@ module Hubspot
|
|
148
157
|
# Custom attribute writer method checking allowed values (enum).
|
149
158
|
# @param [Object] access Object to be assigned
|
150
159
|
def access=(access)
|
151
|
-
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
160
|
+
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE", "HIDDEN_SENSITIVE", "SENSITIVE"])
|
152
161
|
unless validator.valid?(access)
|
153
162
|
fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
|
154
163
|
end
|
@@ -164,6 +173,7 @@ module Hubspot
|
|
164
173
|
parent_folder_id == o.parent_folder_id &&
|
165
174
|
name == o.name &&
|
166
175
|
parent_folder_path == o.parent_folder_path &&
|
176
|
+
clear_expires == o.clear_expires &&
|
167
177
|
is_usable_in_content == o.is_usable_in_content &&
|
168
178
|
expires_at == o.expires_at
|
169
179
|
end
|
@@ -177,7 +187,7 @@ module Hubspot
|
|
177
187
|
# Calculates hash code according to all attributes.
|
178
188
|
# @return [Integer] Hash code
|
179
189
|
def hash
|
180
|
-
[access, parent_folder_id, name, parent_folder_path, is_usable_in_content, expires_at].hash
|
190
|
+
[access, parent_folder_id, name, parent_folder_path, clear_expires, is_usable_in_content, expires_at].hash
|
181
191
|
end
|
182
192
|
|
183
193
|
# Builds the object from hash
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -22,12 +22,12 @@ module Hubspot
|
|
22
22
|
# Timestamp of folder deletion.
|
23
23
|
attr_accessor :archived_at
|
24
24
|
|
25
|
-
# Marks whether the folder is deleted or not.
|
26
|
-
attr_accessor :archived
|
27
|
-
|
28
25
|
# Path of the folder in the file manager.
|
29
26
|
attr_accessor :path
|
30
27
|
|
28
|
+
# Marks whether the folder is deleted or not.
|
29
|
+
attr_accessor :archived
|
30
|
+
|
31
31
|
# ID of the parent folder.
|
32
32
|
attr_accessor :parent_folder_id
|
33
33
|
|
@@ -45,8 +45,8 @@ module Hubspot
|
|
45
45
|
{
|
46
46
|
:'created_at' => :'createdAt',
|
47
47
|
:'archived_at' => :'archivedAt',
|
48
|
-
:'archived' => :'archived',
|
49
48
|
:'path' => :'path',
|
49
|
+
:'archived' => :'archived',
|
50
50
|
:'parent_folder_id' => :'parentFolderId',
|
51
51
|
:'name' => :'name',
|
52
52
|
:'id' => :'id',
|
@@ -64,8 +64,8 @@ module Hubspot
|
|
64
64
|
{
|
65
65
|
:'created_at' => :'Time',
|
66
66
|
:'archived_at' => :'Time',
|
67
|
-
:'archived' => :'Boolean',
|
68
67
|
:'path' => :'String',
|
68
|
+
:'archived' => :'Boolean',
|
69
69
|
:'parent_folder_id' => :'String',
|
70
70
|
:'name' => :'String',
|
71
71
|
:'id' => :'String',
|
@@ -102,14 +102,14 @@ module Hubspot
|
|
102
102
|
self.archived_at = attributes[:'archived_at']
|
103
103
|
end
|
104
104
|
|
105
|
-
if attributes.key?(:'archived')
|
106
|
-
self.archived = attributes[:'archived']
|
107
|
-
end
|
108
|
-
|
109
105
|
if attributes.key?(:'path')
|
110
106
|
self.path = attributes[:'path']
|
111
107
|
end
|
112
108
|
|
109
|
+
if attributes.key?(:'archived')
|
110
|
+
self.archived = attributes[:'archived']
|
111
|
+
end
|
112
|
+
|
113
113
|
if attributes.key?(:'parent_folder_id')
|
114
114
|
self.parent_folder_id = attributes[:'parent_folder_id']
|
115
115
|
end
|
@@ -167,8 +167,8 @@ module Hubspot
|
|
167
167
|
self.class == o.class &&
|
168
168
|
created_at == o.created_at &&
|
169
169
|
archived_at == o.archived_at &&
|
170
|
-
archived == o.archived &&
|
171
170
|
path == o.path &&
|
171
|
+
archived == o.archived &&
|
172
172
|
parent_folder_id == o.parent_folder_id &&
|
173
173
|
name == o.name &&
|
174
174
|
id == o.id &&
|
@@ -184,7 +184,7 @@ module Hubspot
|
|
184
184
|
# Calculates hash code according to all attributes.
|
185
185
|
# @return [Integer] Hash code
|
186
186
|
def hash
|
187
|
-
[created_at, archived_at,
|
187
|
+
[created_at, archived_at, path, archived, parent_folder_id, name, id, updated_at].hash
|
188
188
|
end
|
189
189
|
|
190
190
|
# Builds the object from hash
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Hubspot
|
17
17
|
module Files
|
18
|
+
# Object for creating a folder.
|
18
19
|
class FolderInput
|
19
20
|
# FolderId of the parent of the created folder. If not specified, the folder will be created at the root level. parentFolderId and parentFolderPath cannot be set at the same time.
|
20
21
|
attr_accessor :parent_folder_id
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Hubspot
|
17
17
|
module Files
|
18
|
+
# Object for updating folders.
|
18
19
|
class FolderUpdateInput
|
19
20
|
# New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time.
|
20
21
|
attr_accessor :parent_folder_id
|
@@ -22,15 +23,11 @@ module Hubspot
|
|
22
23
|
# New name. If specified the folder's name and fullPath will change. All children of the folder will be updated accordingly.
|
23
24
|
attr_accessor :name
|
24
25
|
|
25
|
-
# ID of the folder to change.
|
26
|
-
attr_accessor :id
|
27
|
-
|
28
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
29
27
|
def self.attribute_map
|
30
28
|
{
|
31
29
|
:'parent_folder_id' => :'parentFolderId',
|
32
|
-
:'name' => :'name'
|
33
|
-
:'id' => :'id'
|
30
|
+
:'name' => :'name'
|
34
31
|
}
|
35
32
|
end
|
36
33
|
|
@@ -43,8 +40,7 @@ module Hubspot
|
|
43
40
|
def self.openapi_types
|
44
41
|
{
|
45
42
|
:'parent_folder_id' => :'Integer',
|
46
|
-
:'name' => :'String'
|
47
|
-
:'id' => :'String'
|
43
|
+
:'name' => :'String'
|
48
44
|
}
|
49
45
|
end
|
50
46
|
|
@@ -76,27 +72,18 @@ module Hubspot
|
|
76
72
|
if attributes.key?(:'name')
|
77
73
|
self.name = attributes[:'name']
|
78
74
|
end
|
79
|
-
|
80
|
-
if attributes.key?(:'id')
|
81
|
-
self.id = attributes[:'id']
|
82
|
-
end
|
83
75
|
end
|
84
76
|
|
85
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
86
78
|
# @return Array for valid properties with the reasons
|
87
79
|
def list_invalid_properties
|
88
80
|
invalid_properties = Array.new
|
89
|
-
if @id.nil?
|
90
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
91
|
-
end
|
92
|
-
|
93
81
|
invalid_properties
|
94
82
|
end
|
95
83
|
|
96
84
|
# Check to see if the all the properties in the model are valid
|
97
85
|
# @return true if the model is valid
|
98
86
|
def valid?
|
99
|
-
return false if @id.nil?
|
100
87
|
true
|
101
88
|
end
|
102
89
|
|
@@ -106,8 +93,7 @@ module Hubspot
|
|
106
93
|
return true if self.equal?(o)
|
107
94
|
self.class == o.class &&
|
108
95
|
parent_folder_id == o.parent_folder_id &&
|
109
|
-
name == o.name
|
110
|
-
id == o.id
|
96
|
+
name == o.name
|
111
97
|
end
|
112
98
|
|
113
99
|
# @see the `==` method
|
@@ -119,7 +105,7 @@ module Hubspot
|
|
119
105
|
# Calculates hash code according to all attributes.
|
120
106
|
# @return [Integer] Hash code
|
121
107
|
def hash
|
122
|
-
[parent_folder_id, name
|
108
|
+
[parent_folder_id, name].hash
|
123
109
|
end
|
124
110
|
|
125
111
|
# Builds the object from hash
|
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Files
|
3
|
+
|
4
|
+
#Upload and manage files.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Hubspot
|
17
|
+
module Files
|
18
|
+
class FolderUpdateInputWithId
|
19
|
+
attr_accessor :parent_folder_id
|
20
|
+
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'parent_folder_id' => :'parentFolderId',
|
29
|
+
:'name' => :'name',
|
30
|
+
:'id' => :'id'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'parent_folder_id' => :'Integer',
|
43
|
+
:'name' => :'String',
|
44
|
+
:'id' => :'String'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# List of attributes with nullable: true
|
49
|
+
def self.openapi_nullable
|
50
|
+
Set.new([
|
51
|
+
])
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
if (!attributes.is_a?(Hash))
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Files::FolderUpdateInputWithId` initialize method"
|
59
|
+
end
|
60
|
+
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Files::FolderUpdateInputWithId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
|
+
end
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'parent_folder_id')
|
70
|
+
self.parent_folder_id = attributes[:'parent_folder_id']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'name')
|
74
|
+
self.name = attributes[:'name']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'id')
|
78
|
+
self.id = attributes[:'id']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
if @id.nil?
|
87
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
88
|
+
end
|
89
|
+
|
90
|
+
invalid_properties
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
return false if @id.nil?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
parent_folder_id == o.parent_folder_id &&
|
106
|
+
name == o.name &&
|
107
|
+
id == o.id
|
108
|
+
end
|
109
|
+
|
110
|
+
# @see the `==` method
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def eql?(o)
|
113
|
+
self == o
|
114
|
+
end
|
115
|
+
|
116
|
+
# Calculates hash code according to all attributes.
|
117
|
+
# @return [Integer] Hash code
|
118
|
+
def hash
|
119
|
+
[parent_folder_id, name, id].hash
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def self.build_from_hash(attributes)
|
126
|
+
new.build_from_hash(attributes)
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def build_from_hash(attributes)
|
133
|
+
return nil unless attributes.is_a?(Hash)
|
134
|
+
attributes = attributes.transform_keys(&:to_sym)
|
135
|
+
self.class.openapi_types.each_pair do |key, type|
|
136
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
137
|
+
self.send("#{key}=", nil)
|
138
|
+
elsif type =~ /\AArray<(.*)>/i
|
139
|
+
# check to ensure the input is an array given that the attribute
|
140
|
+
# is documented as an array but the input is not
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
142
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
143
|
+
end
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# Deserializes the data based on type
|
153
|
+
# @param string type Data type
|
154
|
+
# @param string value Value to be deserialized
|
155
|
+
# @return [Object] Deserialized data
|
156
|
+
def _deserialize(type, value)
|
157
|
+
case type.to_sym
|
158
|
+
when :Time
|
159
|
+
Time.parse(value)
|
160
|
+
when :Date
|
161
|
+
Date.parse(value)
|
162
|
+
when :String
|
163
|
+
value.to_s
|
164
|
+
when :Integer
|
165
|
+
value.to_i
|
166
|
+
when :Float
|
167
|
+
value.to_f
|
168
|
+
when :Boolean
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
170
|
+
true
|
171
|
+
else
|
172
|
+
false
|
173
|
+
end
|
174
|
+
when :Object
|
175
|
+
# generic object (usually a Hash), return directly
|
176
|
+
value
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
183
|
+
{}.tap do |hash|
|
184
|
+
value.each do |k, v|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
else # model
|
189
|
+
# models (e.g. Pet) or oneOf
|
190
|
+
klass = Hubspot::Files.const_get(type)
|
191
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the string representation of the object
|
196
|
+
# @return [String] String presentation of the object
|
197
|
+
def to_s
|
198
|
+
to_hash.to_s
|
199
|
+
end
|
200
|
+
|
201
|
+
# to_body is an alias to to_hash (backward compatibility)
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_body
|
204
|
+
to_hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the object in the form of hash
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
209
|
+
def to_hash
|
210
|
+
hash = {}
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
212
|
+
value = self.send(attr)
|
213
|
+
if value.nil?
|
214
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
216
|
+
end
|
217
|
+
|
218
|
+
hash[param] = _to_hash(value)
|
219
|
+
end
|
220
|
+
hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Outputs non-array value in the form of hash
|
224
|
+
# For object, use to_hash. Otherwise, just return the value
|
225
|
+
# @param [Object] value Any valid value
|
226
|
+
# @return [Hash] Returns the value in the form of hash
|
227
|
+
def _to_hash(value)
|
228
|
+
if value.is_a?(Array)
|
229
|
+
value.compact.map { |v| _to_hash(v) }
|
230
|
+
elsif value.is_a?(Hash)
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
233
|
+
end
|
234
|
+
elsif value.respond_to? :to_hash
|
235
|
+
value.to_hash
|
236
|
+
else
|
237
|
+
value
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Hubspot
|
17
17
|
module Files
|
18
|
+
# Information on the task that has been started, and where to check it's status.
|
18
19
|
class FolderUpdateTaskLocator
|
19
20
|
# Links for where to check information related to the task. The `status` link gives the URL for where to check the status of the task.
|
20
21
|
attr_accessor :links
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -37,6 +37,8 @@ module Hubspot
|
|
37
37
|
# If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension
|
38
38
|
attr_accessor :overwrite
|
39
39
|
|
40
|
+
attr_accessor :expires_at
|
41
|
+
|
40
42
|
# URL to download the new file from.
|
41
43
|
attr_accessor :url
|
42
44
|
|
@@ -75,6 +77,7 @@ module Hubspot
|
|
75
77
|
:'duplicate_validation_strategy' => :'duplicateValidationStrategy',
|
76
78
|
:'ttl' => :'ttl',
|
77
79
|
:'overwrite' => :'overwrite',
|
80
|
+
:'expires_at' => :'expiresAt',
|
78
81
|
:'url' => :'url',
|
79
82
|
:'folder_id' => :'folderId'
|
80
83
|
}
|
@@ -95,6 +98,7 @@ module Hubspot
|
|
95
98
|
:'duplicate_validation_strategy' => :'String',
|
96
99
|
:'ttl' => :'String',
|
97
100
|
:'overwrite' => :'Boolean',
|
101
|
+
:'expires_at' => :'Time',
|
98
102
|
:'url' => :'String',
|
99
103
|
:'folder_id' => :'String'
|
100
104
|
}
|
@@ -149,6 +153,10 @@ module Hubspot
|
|
149
153
|
self.overwrite = attributes[:'overwrite']
|
150
154
|
end
|
151
155
|
|
156
|
+
if attributes.key?(:'expires_at')
|
157
|
+
self.expires_at = attributes[:'expires_at']
|
158
|
+
end
|
159
|
+
|
152
160
|
if attributes.key?(:'url')
|
153
161
|
self.url = attributes[:'url']
|
154
162
|
end
|
@@ -177,7 +185,7 @@ module Hubspot
|
|
177
185
|
# @return true if the model is valid
|
178
186
|
def valid?
|
179
187
|
return false if @access.nil?
|
180
|
-
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
188
|
+
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE", "HIDDEN_SENSITIVE", "SENSITIVE"])
|
181
189
|
return false unless access_validator.valid?(@access)
|
182
190
|
duplicate_validation_scope_validator = EnumAttributeValidator.new('String', ["ENTIRE_PORTAL", "EXACT_FOLDER"])
|
183
191
|
return false unless duplicate_validation_scope_validator.valid?(@duplicate_validation_scope)
|
@@ -190,7 +198,7 @@ module Hubspot
|
|
190
198
|
# Custom attribute writer method checking allowed values (enum).
|
191
199
|
# @param [Object] access Object to be assigned
|
192
200
|
def access=(access)
|
193
|
-
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
201
|
+
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE", "HIDDEN_SENSITIVE", "SENSITIVE"])
|
194
202
|
unless validator.valid?(access)
|
195
203
|
fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
|
196
204
|
end
|
@@ -229,6 +237,7 @@ module Hubspot
|
|
229
237
|
duplicate_validation_strategy == o.duplicate_validation_strategy &&
|
230
238
|
ttl == o.ttl &&
|
231
239
|
overwrite == o.overwrite &&
|
240
|
+
expires_at == o.expires_at &&
|
232
241
|
url == o.url &&
|
233
242
|
folder_id == o.folder_id
|
234
243
|
end
|
@@ -242,7 +251,7 @@ module Hubspot
|
|
242
251
|
# Calculates hash code according to all attributes.
|
243
252
|
# @return [Integer] Hash code
|
244
253
|
def hash
|
245
|
-
[folder_path, access, duplicate_validation_scope, name, duplicate_validation_strategy, ttl, overwrite, url, folder_id].hash
|
254
|
+
[folder_path, access, duplicate_validation_scope, name, duplicate_validation_strategy, ttl, overwrite, expires_at, url, folder_id].hash
|
246
255
|
end
|
247
256
|
|
248
257
|
# Builds the object from hash
|
@@ -1,5 +1,5 @@
|
|
1
1
|
=begin
|
2
|
-
#Files
|
2
|
+
#Files
|
3
3
|
|
4
4
|
#Upload and manage files.
|
5
5
|
|
@@ -15,6 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Hubspot
|
17
17
|
module Files
|
18
|
+
# Information on the task that has been started, and where to check it's status.
|
18
19
|
class ImportFromUrlTaskLocator
|
19
20
|
# Links for where to check information related to the task. The `status` link gives the URL for where to check the status of the task.
|
20
21
|
attr_accessor :links
|