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
|
+
# Signed Url object with optional ancillary metadata of requested file
|
18
19
|
class SignedUrl
|
19
20
|
# Extension of the requested file.
|
20
21
|
attr_accessor :extension
|
@@ -31,12 +32,12 @@ module Hubspot
|
|
31
32
|
# Type of the file. Can be IMG, DOCUMENT, AUDIO, MOVIE, or OTHER.
|
32
33
|
attr_accessor :type
|
33
34
|
|
34
|
-
# Timestamp of when the URL will no longer grant access to the file.
|
35
|
-
attr_accessor :expires_at
|
36
|
-
|
37
35
|
# Signed URL with access to the specified file. Anyone with this URL will be able to access the file until it expires.
|
38
36
|
attr_accessor :url
|
39
37
|
|
38
|
+
# Timestamp of when the URL will no longer grant access to the file.
|
39
|
+
attr_accessor :expires_at
|
40
|
+
|
40
41
|
# For image and video files. The height of the file.
|
41
42
|
attr_accessor :height
|
42
43
|
|
@@ -48,8 +49,8 @@ module Hubspot
|
|
48
49
|
:'name' => :'name',
|
49
50
|
:'width' => :'width',
|
50
51
|
:'type' => :'type',
|
51
|
-
:'expires_at' => :'expiresAt',
|
52
52
|
:'url' => :'url',
|
53
|
+
:'expires_at' => :'expiresAt',
|
53
54
|
:'height' => :'height'
|
54
55
|
}
|
55
56
|
end
|
@@ -67,8 +68,8 @@ module Hubspot
|
|
67
68
|
:'name' => :'String',
|
68
69
|
:'width' => :'Integer',
|
69
70
|
:'type' => :'String',
|
70
|
-
:'expires_at' => :'Time',
|
71
71
|
:'url' => :'String',
|
72
|
+
:'expires_at' => :'Time',
|
72
73
|
:'height' => :'Integer'
|
73
74
|
}
|
74
75
|
end
|
@@ -114,14 +115,14 @@ module Hubspot
|
|
114
115
|
self.type = attributes[:'type']
|
115
116
|
end
|
116
117
|
|
117
|
-
if attributes.key?(:'expires_at')
|
118
|
-
self.expires_at = attributes[:'expires_at']
|
119
|
-
end
|
120
|
-
|
121
118
|
if attributes.key?(:'url')
|
122
119
|
self.url = attributes[:'url']
|
123
120
|
end
|
124
121
|
|
122
|
+
if attributes.key?(:'expires_at')
|
123
|
+
self.expires_at = attributes[:'expires_at']
|
124
|
+
end
|
125
|
+
|
125
126
|
if attributes.key?(:'height')
|
126
127
|
self.height = attributes[:'height']
|
127
128
|
end
|
@@ -147,14 +148,14 @@ module Hubspot
|
|
147
148
|
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
148
149
|
end
|
149
150
|
|
150
|
-
if @expires_at.nil?
|
151
|
-
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
152
|
-
end
|
153
|
-
|
154
151
|
if @url.nil?
|
155
152
|
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
156
153
|
end
|
157
154
|
|
155
|
+
if @expires_at.nil?
|
156
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
157
|
+
end
|
158
|
+
|
158
159
|
invalid_properties
|
159
160
|
end
|
160
161
|
|
@@ -165,8 +166,8 @@ module Hubspot
|
|
165
166
|
return false if @size.nil?
|
166
167
|
return false if @name.nil?
|
167
168
|
return false if @type.nil?
|
168
|
-
return false if @expires_at.nil?
|
169
169
|
return false if @url.nil?
|
170
|
+
return false if @expires_at.nil?
|
170
171
|
true
|
171
172
|
end
|
172
173
|
|
@@ -180,8 +181,8 @@ module Hubspot
|
|
180
181
|
name == o.name &&
|
181
182
|
width == o.width &&
|
182
183
|
type == o.type &&
|
183
|
-
expires_at == o.expires_at &&
|
184
184
|
url == o.url &&
|
185
|
+
expires_at == o.expires_at &&
|
185
186
|
height == o.height
|
186
187
|
end
|
187
188
|
|
@@ -194,7 +195,7 @@ module Hubspot
|
|
194
195
|
# Calculates hash code according to all attributes.
|
195
196
|
# @return [Integer] Hash code
|
196
197
|
def hash
|
197
|
-
[extension, size, name, width, type,
|
198
|
+
[extension, size, name, width, type, url, expires_at, height].hash
|
198
199
|
end
|
199
200
|
|
200
201
|
# Builds the object from hash
|
@@ -13,14 +13,16 @@ OpenAPI Generator version: 6.2.1
|
|
13
13
|
require 'cgi'
|
14
14
|
|
15
15
|
module Hubspot
|
16
|
-
module
|
16
|
+
module Oauth
|
17
17
|
class AccessTokensApi
|
18
18
|
attr_accessor :api_client
|
19
19
|
|
20
20
|
def initialize(api_client = ApiClient.default)
|
21
21
|
@api_client = api_client
|
22
22
|
end
|
23
|
-
#
|
23
|
+
# Retrieve OAuth token metadata
|
24
|
+
# Retrieve a token's metadata, including the email address of the user that the token was created for and the ID of the account it's associated with. Note: HubSpot access tokens will fluctuate in size as the information that's encoded in them changes over time. It's recommended to allow for tokens to be up to 300 characters to account for any potential changes.
|
25
|
+
# @param token [String] The access token that you want to retrieve information about.
|
24
26
|
# @param [Hash] opts the optional parameters
|
25
27
|
# @return [AccessTokenInfoResponse]
|
26
28
|
def get(token, opts = {})
|
@@ -28,7 +30,9 @@ module Hubspot
|
|
28
30
|
data
|
29
31
|
end
|
30
32
|
|
31
|
-
#
|
33
|
+
# Retrieve OAuth token metadata
|
34
|
+
# Retrieve a token's metadata, including the email address of the user that the token was created for and the ID of the account it's associated with. Note: HubSpot access tokens will fluctuate in size as the information that's encoded in them changes over time. It's recommended to allow for tokens to be up to 300 characters to account for any potential changes.
|
35
|
+
# @param token [String] The access token that you want to retrieve information about.
|
32
36
|
# @param [Hash] opts the optional parameters
|
33
37
|
# @return [Array<(AccessTokenInfoResponse, Integer, Hash)>] AccessTokenInfoResponse data, response status code and response headers
|
34
38
|
def get_with_http_info(token, opts = {})
|
@@ -13,14 +13,16 @@ OpenAPI Generator version: 6.2.1
|
|
13
13
|
require 'cgi'
|
14
14
|
|
15
15
|
module Hubspot
|
16
|
-
module
|
16
|
+
module Oauth
|
17
17
|
class RefreshTokensApi
|
18
18
|
attr_accessor :api_client
|
19
19
|
|
20
20
|
def initialize(api_client = ApiClient.default)
|
21
21
|
@api_client = api_client
|
22
22
|
end
|
23
|
-
#
|
23
|
+
# Delete a refresh token
|
24
|
+
# Delete a refresh token, typically after a user uninstalls your app. Access tokens generated with the refresh token will not be affected. This will not uninstall the application from HubSpot or inhibit data syncing between an account and the app.
|
25
|
+
# @param token [String] The refresh token to delete.
|
24
26
|
# @param [Hash] opts the optional parameters
|
25
27
|
# @return [nil]
|
26
28
|
def archive(token, opts = {})
|
@@ -28,7 +30,9 @@ module Hubspot
|
|
28
30
|
nil
|
29
31
|
end
|
30
32
|
|
31
|
-
#
|
33
|
+
# Delete a refresh token
|
34
|
+
# Delete a refresh token, typically after a user uninstalls your app. Access tokens generated with the refresh token will not be affected. This will not uninstall the application from HubSpot or inhibit data syncing between an account and the app.
|
35
|
+
# @param token [String] The refresh token to delete.
|
32
36
|
# @param [Hash] opts the optional parameters
|
33
37
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
34
38
|
def archive_with_http_info(token, opts = {})
|
@@ -79,7 +83,9 @@ module Hubspot
|
|
79
83
|
return data, status_code, headers
|
80
84
|
end
|
81
85
|
|
82
|
-
#
|
86
|
+
# Retrieve refresh token metadata
|
87
|
+
# Retrieve a refresh token's metadata, including the email address of the user that the token was created for and the ID of the account it's associated with. Learn more about [refresh tokens](https://developers.hubspot.com/docs/guides/api/app-management/oauth-tokens#generate-initial-access-and-refresh-tokens).
|
88
|
+
# @param token [String] The refresh token to retrieve information about.
|
83
89
|
# @param [Hash] opts the optional parameters
|
84
90
|
# @return [RefreshTokenInfoResponse]
|
85
91
|
def get(token, opts = {})
|
@@ -87,7 +93,9 @@ module Hubspot
|
|
87
93
|
data
|
88
94
|
end
|
89
95
|
|
90
|
-
#
|
96
|
+
# Retrieve refresh token metadata
|
97
|
+
# Retrieve a refresh token's metadata, including the email address of the user that the token was created for and the ID of the account it's associated with. Learn more about [refresh tokens](https://developers.hubspot.com/docs/guides/api/app-management/oauth-tokens#generate-initial-access-and-refresh-tokens).
|
98
|
+
# @param token [String] The refresh token to retrieve information about.
|
91
99
|
# @param [Hash] opts the optional parameters
|
92
100
|
# @return [Array<(RefreshTokenInfoResponse, Integer, Hash)>] RefreshTokenInfoResponse data, response status code and response headers
|
93
101
|
def get_with_http_info(token, opts = {})
|
@@ -13,13 +13,15 @@ OpenAPI Generator version: 6.2.1
|
|
13
13
|
require 'cgi'
|
14
14
|
|
15
15
|
module Hubspot
|
16
|
-
module
|
16
|
+
module Oauth
|
17
17
|
class TokensApi
|
18
18
|
attr_accessor :api_client
|
19
19
|
|
20
20
|
def initialize(api_client = ApiClient.default)
|
21
21
|
@api_client = api_client
|
22
22
|
end
|
23
|
+
# Refresh an access token
|
24
|
+
# Use a [previously obtained refresh token](#get-oauth-2.0-access-and-refresh-tokens) to generate a new access token. Access tokens are short lived. You can check the `expires_in` parameter when generating an access token to determine its lifetime (in seconds). If you need offline access to HubSpot data, store the refresh token you get when [initiating your OAuth integration](https://developers.hubspot.com/docs/guides/api/app-management/oauth-tokens#initiating-oauth-access) and use it to generate a new access token once the initial one expires. Note: HubSpot access tokens will fluctuate in size as the information that's encoded in them changes over time. It's recommended to allow for tokens to be up to 300 characters to account for any potential changes.
|
23
25
|
# @param [Hash] opts the optional parameters
|
24
26
|
# @option opts [String] :grant_type
|
25
27
|
# @option opts [String] :code
|
@@ -33,6 +35,8 @@ module Hubspot
|
|
33
35
|
data
|
34
36
|
end
|
35
37
|
|
38
|
+
# Refresh an access token
|
39
|
+
# Use a [previously obtained refresh token](#get-oauth-2.0-access-and-refresh-tokens) to generate a new access token. Access tokens are short lived. You can check the `expires_in` parameter when generating an access token to determine its lifetime (in seconds). If you need offline access to HubSpot data, store the refresh token you get when [initiating your OAuth integration](https://developers.hubspot.com/docs/guides/api/app-management/oauth-tokens#initiating-oauth-access) and use it to generate a new access token once the initial one expires. Note: HubSpot access tokens will fluctuate in size as the information that's encoded in them changes over time. It's recommended to allow for tokens to be up to 300 characters to account for any potential changes.
|
36
40
|
# @param [Hash] opts the optional parameters
|
37
41
|
# @option opts [String] :grant_type
|
38
42
|
# @option opts [String] :code
|
@@ -18,7 +18,7 @@ require 'time'
|
|
18
18
|
require 'typhoeus'
|
19
19
|
|
20
20
|
module Hubspot
|
21
|
-
module
|
21
|
+
module Oauth
|
22
22
|
class ApiClient
|
23
23
|
# The Configuration object holding settings to be used in the API client.
|
24
24
|
attr_accessor :config
|
@@ -292,7 +292,7 @@ module Hubspot
|
|
292
292
|
end
|
293
293
|
else
|
294
294
|
# models (e.g. Pet) or oneOf
|
295
|
-
klass = Hubspot::
|
295
|
+
klass = Hubspot::Oauth.const_get(return_type)
|
296
296
|
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
297
297
|
end
|
298
298
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Hubspot
|
17
|
-
module
|
17
|
+
module Oauth
|
18
18
|
class AccessTokenInfoResponse
|
19
19
|
#
|
20
20
|
attr_accessor :hub_id
|
@@ -88,13 +88,13 @@ module Hubspot
|
|
88
88
|
# @param [Hash] attributes Model attributes in the form of hash
|
89
89
|
def initialize(attributes = {})
|
90
90
|
if (!attributes.is_a?(Hash))
|
91
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::AccessTokenInfoResponse` initialize method"
|
92
92
|
end
|
93
93
|
|
94
94
|
# check to see if the attribute exists and convert string to symbol for hash key
|
95
95
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
96
96
|
if (!self.class.attribute_map.key?(k.to_sym))
|
97
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::AccessTokenInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
98
98
|
end
|
99
99
|
h[k.to_sym] = v
|
100
100
|
}
|
@@ -282,7 +282,7 @@ module Hubspot
|
|
282
282
|
end
|
283
283
|
else # model
|
284
284
|
# models (e.g. Pet) or oneOf
|
285
|
-
klass = Hubspot::
|
285
|
+
klass = Hubspot::Oauth.const_get(type)
|
286
286
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
287
287
|
end
|
288
288
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Hubspot
|
17
|
-
module
|
17
|
+
module Oauth
|
18
18
|
class Error
|
19
19
|
# A specific category that contains more specific detail about the error
|
20
20
|
attr_accessor :sub_category
|
@@ -78,13 +78,13 @@ module Hubspot
|
|
78
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
79
79
|
def initialize(attributes = {})
|
80
80
|
if (!attributes.is_a?(Hash))
|
81
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::Error` initialize method"
|
82
82
|
end
|
83
83
|
|
84
84
|
# check to see if the attribute exists and convert string to symbol for hash key
|
85
85
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
86
|
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
88
|
end
|
89
89
|
h[k.to_sym] = v
|
90
90
|
}
|
@@ -246,7 +246,7 @@ module Hubspot
|
|
246
246
|
end
|
247
247
|
else # model
|
248
248
|
# models (e.g. Pet) or oneOf
|
249
|
-
klass = Hubspot::
|
249
|
+
klass = Hubspot::Oauth.const_get(type)
|
250
250
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
251
251
|
end
|
252
252
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Hubspot
|
17
|
-
module
|
17
|
+
module Oauth
|
18
18
|
class ErrorDetail
|
19
19
|
# A specific category that contains more specific detail about the error
|
20
20
|
attr_accessor :sub_category
|
@@ -68,13 +68,13 @@ module Hubspot
|
|
68
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
69
|
def initialize(attributes = {})
|
70
70
|
if (!attributes.is_a?(Hash))
|
71
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::ErrorDetail` initialize method"
|
72
72
|
end
|
73
73
|
|
74
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
75
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
76
|
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::ErrorDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
78
|
end
|
79
79
|
h[k.to_sym] = v
|
80
80
|
}
|
@@ -212,7 +212,7 @@ module Hubspot
|
|
212
212
|
end
|
213
213
|
else # model
|
214
214
|
# models (e.g. Pet) or oneOf
|
215
|
-
klass = Hubspot::
|
215
|
+
klass = Hubspot::Oauth.const_get(type)
|
216
216
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
217
217
|
end
|
218
218
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Hubspot
|
17
|
-
module
|
17
|
+
module Oauth
|
18
18
|
class RefreshTokenInfoResponse
|
19
19
|
#
|
20
20
|
attr_accessor :hub_id
|
@@ -83,13 +83,13 @@ module Hubspot
|
|
83
83
|
# @param [Hash] attributes Model attributes in the form of hash
|
84
84
|
def initialize(attributes = {})
|
85
85
|
if (!attributes.is_a?(Hash))
|
86
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::RefreshTokenInfoResponse` initialize method"
|
87
87
|
end
|
88
88
|
|
89
89
|
# check to see if the attribute exists and convert string to symbol for hash key
|
90
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
91
91
|
if (!self.class.attribute_map.key?(k.to_sym))
|
92
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::RefreshTokenInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
93
|
end
|
94
94
|
h[k.to_sym] = v
|
95
95
|
}
|
@@ -267,7 +267,7 @@ module Hubspot
|
|
267
267
|
end
|
268
268
|
else # model
|
269
269
|
# models (e.g. Pet) or oneOf
|
270
|
-
klass = Hubspot::
|
270
|
+
klass = Hubspot::Oauth.const_get(type)
|
271
271
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
272
272
|
end
|
273
273
|
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Hubspot
|
17
|
-
module
|
17
|
+
module Oauth
|
18
18
|
class TokenResponseIF
|
19
19
|
#
|
20
20
|
attr_accessor :access_token
|
@@ -68,13 +68,13 @@ module Hubspot
|
|
68
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
69
69
|
def initialize(attributes = {})
|
70
70
|
if (!attributes.is_a?(Hash))
|
71
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::TokenResponseIF` initialize method"
|
72
72
|
end
|
73
73
|
|
74
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
75
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
76
|
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::TokenResponseIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
78
|
end
|
79
79
|
h[k.to_sym] = v
|
80
80
|
}
|
@@ -225,7 +225,7 @@ module Hubspot
|
|
225
225
|
end
|
226
226
|
else # model
|
227
227
|
# models (e.g. Pet) or oneOf
|
228
|
-
klass = Hubspot::
|
228
|
+
klass = Hubspot::Oauth.const_get(type)
|
229
229
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
230
230
|
end
|
231
231
|
end
|
data/lib/hubspot/version.rb
CHANGED
@@ -8,7 +8,6 @@ describe 'Hubspot::Client' do
|
|
8
8
|
it { is_expected.to respond_to(:domains) }
|
9
9
|
it { is_expected.to respond_to(:hubdb) }
|
10
10
|
it { is_expected.to respond_to(:pages) }
|
11
|
-
it { is_expected.to respond_to(:performance) }
|
12
11
|
it { is_expected.to respond_to(:site_search) }
|
13
12
|
it { is_expected.to respond_to(:url_redirects) }
|
14
13
|
end
|
@@ -7,5 +7,6 @@ describe 'Hubspot::Discovery::Crm::Companies::BasicApi' do
|
|
7
7
|
it { is_expected.to respond_to(:create) }
|
8
8
|
it { is_expected.to respond_to(:get_by_id) }
|
9
9
|
it { is_expected.to respond_to(:get_page) }
|
10
|
+
it { is_expected.to respond_to(:merge) }
|
10
11
|
it { is_expected.to respond_to(:update) }
|
11
12
|
end
|
@@ -7,5 +7,6 @@ describe 'Hubspot::Discovery::Crm::Contacts::BasicApi' do
|
|
7
7
|
it { is_expected.to respond_to(:create) }
|
8
8
|
it { is_expected.to respond_to(:get_by_id) }
|
9
9
|
it { is_expected.to respond_to(:get_page) }
|
10
|
+
it { is_expected.to respond_to(:merge) }
|
10
11
|
it { is_expected.to respond_to(:update) }
|
11
12
|
end
|
@@ -7,5 +7,6 @@ describe 'Hubspot::Discovery::Crm::Deals::BasicApi' do
|
|
7
7
|
it { is_expected.to respond_to(:create) }
|
8
8
|
it { is_expected.to respond_to(:get_by_id) }
|
9
9
|
it { is_expected.to respond_to(:get_page) }
|
10
|
+
it { is_expected.to respond_to(:merge) }
|
10
11
|
it { is_expected.to respond_to(:update) }
|
11
12
|
end
|
@@ -7,5 +7,6 @@ describe 'Hubspot::Discovery::Crm::Tickets::BasicApi' do
|
|
7
7
|
it { is_expected.to respond_to(:create) }
|
8
8
|
it { is_expected.to respond_to(:get_by_id) }
|
9
9
|
it { is_expected.to respond_to(:get_page) }
|
10
|
+
it { is_expected.to respond_to(:merge) }
|
10
11
|
it { is_expected.to respond_to(:update) }
|
11
12
|
end
|
@@ -4,10 +4,11 @@ describe 'Hubspot::Discovery::Files::FilesApi' do
|
|
4
4
|
subject(:api) { Hubspot::Client.new(access_token: 'test').files.files_api }
|
5
5
|
|
6
6
|
it { is_expected.to respond_to(:archive) }
|
7
|
-
it { is_expected.to respond_to(:archive_gdpr) }
|
8
7
|
it { is_expected.to respond_to(:check_import) }
|
8
|
+
it { is_expected.to respond_to(:delete) }
|
9
9
|
it { is_expected.to respond_to(:do_search) }
|
10
10
|
it { is_expected.to respond_to(:get_by_id) }
|
11
|
+
it { is_expected.to respond_to(:get_metadata) }
|
11
12
|
it { is_expected.to respond_to(:get_signed_url) }
|
12
13
|
it { is_expected.to respond_to(:import_from_url) }
|
13
14
|
it { is_expected.to respond_to(:replace) }
|
@@ -11,4 +11,5 @@ describe 'Hubspot::Discovery::Files::FoldersApi' do
|
|
11
11
|
it { is_expected.to respond_to(:get_by_id) }
|
12
12
|
it { is_expected.to respond_to(:get_by_path) }
|
13
13
|
it { is_expected.to respond_to(:update_properties) }
|
14
|
+
it { is_expected.to respond_to(:update_properties_recursively) }
|
14
15
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe 'Hubspot::Discovery::
|
3
|
+
describe 'Hubspot::Discovery::Oauth::AccessTokensApi' do
|
4
4
|
subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.access_tokens_api }
|
5
5
|
|
6
6
|
it { is_expected.to respond_to(:get) }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe 'Hubspot::Discovery::
|
3
|
+
describe 'Hubspot::Discovery::Oauth::RefreshTokensApi' do
|
4
4
|
subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.refresh_tokens_api }
|
5
5
|
|
6
6
|
it { is_expected.to respond_to(:archive) }
|