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.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -1
  3. data/Gemfile.lock +2 -2
  4. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +91 -22
  5. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +25 -17
  6. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +4 -0
  7. data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +12 -0
  8. 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
  9. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -0
  10. data/lib/hubspot/codegen/crm/companies/models/public_associations_for_object.rb +10 -0
  11. data/lib/hubspot/codegen/crm/companies/models/public_merge_input.rb +2 -0
  12. data/lib/hubspot/codegen/crm/companies/models/public_object_id.rb +6 -0
  13. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +10 -1
  14. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +4 -0
  15. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_for_create.rb +250 -0
  16. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_upsert.rb +4 -0
  17. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +2 -10
  18. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input_for_create.rb +2 -10
  19. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +10 -1
  20. data/lib/hubspot/codegen/crm/companies/models/simple_public_upsert_object.rb +10 -1
  21. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +163 -26
  22. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +27 -19
  23. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +4 -0
  24. data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +10 -0
  25. 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
  26. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -0
  27. data/lib/hubspot/codegen/crm/contacts/models/public_associations_for_object.rb +10 -0
  28. data/lib/hubspot/codegen/crm/contacts/models/public_gdpr_delete_input.rb +2 -0
  29. data/lib/hubspot/codegen/crm/contacts/models/public_object_id.rb +5 -0
  30. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +10 -1
  31. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -0
  32. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_for_create.rb +250 -0
  33. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_upsert.rb +1 -0
  34. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +1 -10
  35. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input_for_create.rb +1 -10
  36. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +13 -1
  37. data/lib/hubspot/codegen/crm/contacts/models/simple_public_upsert_object.rb +10 -1
  38. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +67 -0
  39. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +11 -9
  40. data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +10 -0
  41. 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
  42. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -0
  43. data/lib/hubspot/codegen/crm/deals/models/public_associations_for_object.rb +10 -0
  44. data/lib/hubspot/codegen/crm/deals/models/public_object_id.rb +5 -0
  45. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +10 -1
  46. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -0
  47. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_for_create.rb +250 -0
  48. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_upsert.rb +1 -0
  49. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +1 -10
  50. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input_for_create.rb +1 -10
  51. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +10 -1
  52. data/lib/hubspot/codegen/crm/deals/models/simple_public_upsert_object.rb +10 -1
  53. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +3 -2
  54. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +2 -0
  55. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +1 -0
  56. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +10 -1
  57. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +10 -1
  58. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +1 -0
  59. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +11 -9
  60. 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
  61. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +1 -0
  62. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +10 -1
  63. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +2 -0
  64. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_for_create.rb +252 -0
  65. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_upsert.rb +1 -0
  66. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +1 -10
  67. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +1 -15
  68. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +10 -1
  69. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_upsert_object.rb +10 -1
  70. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +5 -4
  71. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +11 -9
  72. 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
  73. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +10 -1
  75. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input_for_create.rb +250 -0
  76. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -10
  77. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input_for_create.rb +6 -10
  78. data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +10 -1
  79. data/lib/hubspot/codegen/crm/products/models/simple_public_upsert_object.rb +10 -1
  80. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +73 -4
  81. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +17 -9
  82. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +4 -0
  83. data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +10 -0
  84. 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
  85. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +1 -0
  86. data/lib/hubspot/codegen/crm/tickets/models/public_associations_for_object.rb +10 -0
  87. data/lib/hubspot/codegen/crm/tickets/models/public_object_id.rb +5 -0
  88. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +10 -1
  89. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +2 -0
  90. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_for_create.rb +250 -0
  91. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_upsert.rb +1 -0
  92. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +1 -10
  93. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input_for_create.rb +1 -10
  94. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +10 -1
  95. data/lib/hubspot/codegen/crm/tickets/models/simple_public_upsert_object.rb +10 -1
  96. data/lib/hubspot/codegen/files/api/files_api.rb +144 -104
  97. data/lib/hubspot/codegen/files/api/folders_api.rb +142 -57
  98. data/lib/hubspot/codegen/files/api_client.rb +1 -1
  99. data/lib/hubspot/codegen/files/api_error.rb +1 -1
  100. data/lib/hubspot/codegen/files/configuration.rb +1 -1
  101. data/lib/hubspot/codegen/files/models/collection_response_file.rb +2 -1
  102. data/lib/hubspot/codegen/files/models/collection_response_folder.rb +1 -1
  103. data/lib/hubspot/codegen/files/models/error.rb +1 -1
  104. data/lib/hubspot/codegen/files/models/error_detail.rb +1 -1
  105. data/lib/hubspot/codegen/files/models/file.rb +33 -14
  106. data/lib/hubspot/codegen/files/models/file_action_response.rb +1 -1
  107. data/lib/hubspot/codegen/files/models/file_stat.rb +1 -1
  108. data/lib/hubspot/codegen/files/models/file_update_input.rb +15 -5
  109. data/lib/hubspot/codegen/files/models/folder.rb +12 -12
  110. data/lib/hubspot/codegen/files/models/folder_action_response.rb +1 -1
  111. data/lib/hubspot/codegen/files/models/folder_input.rb +2 -1
  112. data/lib/hubspot/codegen/files/models/folder_update_input.rb +6 -20
  113. data/lib/hubspot/codegen/files/models/folder_update_input_with_id.rb +244 -0
  114. data/lib/hubspot/codegen/files/models/folder_update_task_locator.rb +2 -1
  115. data/lib/hubspot/codegen/files/models/import_from_url_input.rb +13 -4
  116. data/lib/hubspot/codegen/files/models/import_from_url_task_locator.rb +2 -1
  117. data/lib/hubspot/codegen/files/models/next_page.rb +1 -1
  118. data/lib/hubspot/codegen/files/models/paging.rb +1 -1
  119. data/lib/hubspot/codegen/files/models/previous_page.rb +1 -1
  120. data/lib/hubspot/codegen/files/models/signed_url.rb +18 -17
  121. data/lib/hubspot/codegen/files/models/standard_error.rb +1 -1
  122. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +7 -3
  123. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +13 -5
  124. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +5 -1
  125. data/lib/hubspot/codegen/oauth/api_client.rb +2 -2
  126. data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
  127. data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
  128. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +4 -4
  129. data/lib/hubspot/codegen/oauth/models/error.rb +4 -4
  130. data/lib/hubspot/codegen/oauth/models/error_detail.rb +4 -4
  131. data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +4 -4
  132. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +4 -4
  133. data/lib/hubspot/discovery/cms/client.rb +0 -1
  134. data/lib/hubspot/discovery/crm/companies/client.rb +0 -1
  135. data/lib/hubspot/discovery/crm/contacts/client.rb +0 -2
  136. data/lib/hubspot/discovery/crm/deals/client.rb +0 -1
  137. data/lib/hubspot/discovery/crm/tickets/client.rb +0 -1
  138. data/lib/hubspot/discovery/oauth/api/access_tokens_api.rb +1 -1
  139. data/lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb +1 -1
  140. data/lib/hubspot/discovery/oauth/api/tokens_api.rb +1 -1
  141. data/lib/hubspot/discovery/oauth/client.rb +1 -1
  142. data/lib/hubspot/helpers/camel_case.rb +0 -4
  143. data/lib/hubspot/version.rb +1 -1
  144. data/spec/discovery/cms/client_spec.rb +0 -1
  145. data/spec/discovery/crm/companies/basic_api_spec.rb +1 -0
  146. data/spec/discovery/crm/contacts/basic_api_spec.rb +1 -0
  147. data/spec/discovery/crm/deals/basic_api_spec.rb +1 -0
  148. data/spec/discovery/crm/tickets/basic_api_spec.rb +1 -0
  149. data/spec/discovery/files/files_api_spec.rb +2 -1
  150. data/spec/discovery/files/folders_api_spec.rb +1 -0
  151. data/spec/discovery/oauth/access_tokens_api_spec.rb +1 -1
  152. data/spec/discovery/oauth/refresh_tokens_api_spec.rb +1 -1
  153. data/spec/discovery/oauth/tokens_api_spec.rb +1 -1
  154. metadata +17 -42
  155. data/lib/hubspot/codegen/cms/performance/api/public_performance_api.rb +0 -188
  156. data/lib/hubspot/codegen/cms/performance/api_client.rb +0 -410
  157. data/lib/hubspot/codegen/cms/performance/api_error.rb +0 -61
  158. data/lib/hubspot/codegen/cms/performance/configuration.rb +0 -287
  159. data/lib/hubspot/codegen/cms/performance/models/error.rb +0 -305
  160. data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +0 -271
  161. data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +0 -526
  162. data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +0 -345
  163. data/lib/hubspot/codegen/crm/companies/api/merge_api.rb +0 -92
  164. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +0 -94
  165. data/lib/hubspot/codegen/crm/contacts/api/merge_api.rb +0 -92
  166. data/lib/hubspot/codegen/crm/deals/api/merge_api.rb +0 -92
  167. data/lib/hubspot/codegen/crm/tickets/api/merge_api.rb +0 -92
  168. data/lib/hubspot/discovery/cms/performance/api/public_performance_api.rb +0 -13
  169. data/lib/hubspot/discovery/cms/performance/client.rb +0 -19
  170. data/lib/hubspot/discovery/crm/companies/api/merge_api.rb +0 -13
  171. data/lib/hubspot/discovery/crm/contacts/api/gdpr_api.rb +0 -13
  172. data/lib/hubspot/discovery/crm/contacts/api/merge_api.rb +0 -13
  173. data/lib/hubspot/discovery/crm/deals/api/merge_api.rb +0 -13
  174. data/lib/hubspot/discovery/crm/tickets/api/merge_api.rb +0 -13
  175. data/spec/discovery/cms/performance/public_performance_api_spec.rb +0 -8
  176. data/spec/discovery/crm/companies/merge_api_spec.rb +0 -7
  177. data/spec/discovery/crm/contacts/gdpr_api_spec.rb +0 -7
  178. data/spec/discovery/crm/contacts/merge_api_spec.rb +0 -7
  179. data/spec/discovery/crm/deals/merge_api_spec.rb +0 -7
  180. data/spec/discovery/crm/tickets/merge_api_spec.rb +0 -7
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Files 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, expires_at, url, height].hash
198
+ [extension, size, name, width, type, url, expires_at, height].hash
198
199
  end
199
200
 
200
201
  # Builds the object from hash
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #Files Files
2
+ #Files
3
3
 
4
4
  #Upload and manage files.
5
5
 
@@ -13,14 +13,16 @@ OpenAPI Generator version: 6.2.1
13
13
  require 'cgi'
14
14
 
15
15
  module Hubspot
16
- module OAuth
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
- # @param token [String]
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
- # @param token [String]
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 OAuth
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
- # @param token [String]
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
- # @param token [String]
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
- # @param token [String]
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
- # @param token [String]
96
+ # Retrieve refresh token metadata
97
+ # Retrieve a refresh token&#39;s metadata, including the email address of the user that the token was created for and the ID of the account it&#39;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 OAuth
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 &#x60;expires_in&#x60; 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&#39;s encoded in them changes over time. It&#39;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 OAuth
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::OAuth.const_get(return_type)
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
@@ -11,7 +11,7 @@ OpenAPI Generator version: 6.2.1
11
11
  =end
12
12
 
13
13
  module Hubspot
14
- module OAuth
14
+ module Oauth
15
15
  class ApiError < ::StandardError
16
16
  attr_reader :code, :response_headers, :response_body
17
17
 
@@ -11,7 +11,7 @@ OpenAPI Generator version: 6.2.1
11
11
  =end
12
12
 
13
13
  module Hubspot
14
- module OAuth
14
+ module Oauth
15
15
  class Configuration
16
16
  # Defines url scheme
17
17
  attr_accessor :scheme
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Hubspot
17
- module OAuth
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::OAuth::AccessTokenInfoResponse` initialize method"
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::OAuth::AccessTokenInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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::OAuth.const_get(type)
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 OAuth
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::OAuth::Error` initialize method"
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::OAuth::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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::OAuth.const_get(type)
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 OAuth
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::OAuth::ErrorDetail` initialize method"
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::OAuth::ErrorDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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::OAuth.const_get(type)
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 OAuth
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::OAuth::RefreshTokenInfoResponse` initialize method"
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::OAuth::RefreshTokenInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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::OAuth.const_get(type)
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 OAuth
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::OAuth::TokenResponseIF` initialize method"
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::OAuth::TokenResponseIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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::OAuth.const_get(type)
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
@@ -13,7 +13,6 @@ module Hubspot
13
13
  domains
14
14
  hubdb
15
15
  pages
16
- performance
17
16
  site_search
18
17
  source_code
19
18
  url_redirects
@@ -11,7 +11,6 @@ module Hubspot
11
11
  %i[
12
12
  basic
13
13
  batch
14
- merge
15
14
  search
16
15
  ].freeze
17
16
  end
@@ -11,8 +11,6 @@ module Hubspot
11
11
  %i[
12
12
  basic
13
13
  batch
14
- gdpr
15
- merge
16
14
  search
17
15
  ].freeze
18
16
  end
@@ -11,7 +11,6 @@ module Hubspot
11
11
  %i[
12
12
  basic
13
13
  batch
14
- merge
15
14
  search
16
15
  ].freeze
17
16
  end
@@ -11,7 +11,6 @@ module Hubspot
11
11
  %i[
12
12
  basic
13
13
  batch
14
- merge
15
14
  search
16
15
  ].freeze
17
16
  end
@@ -2,7 +2,7 @@ require_relative '../../base_api_client'
2
2
 
3
3
  module Hubspot
4
4
  module Discovery
5
- module OAuth
5
+ module Oauth
6
6
  class AccessTokensApi
7
7
  include Hubspot::Discovery::BaseApiClient
8
8
  end
@@ -2,7 +2,7 @@ require_relative '../../base_api_client'
2
2
 
3
3
  module Hubspot
4
4
  module Discovery
5
- module OAuth
5
+ module Oauth
6
6
  class RefreshTokensApi
7
7
  include Hubspot::Discovery::BaseApiClient
8
8
  end
@@ -2,7 +2,7 @@ require_relative '../../base_api_client'
2
2
 
3
3
  module Hubspot
4
4
  module Discovery
5
- module OAuth
5
+ module Oauth
6
6
  class TokensApi
7
7
  include Hubspot::Discovery::BaseApiClient
8
8
  end
@@ -2,7 +2,7 @@ require_relative '../base_module_client'
2
2
 
3
3
  module Hubspot
4
4
  module Discovery
5
- module OAuth
5
+ module Oauth
6
6
  class Client
7
7
  include Hubspot::Discovery::BaseModuleClient
8
8
 
@@ -3,10 +3,6 @@ module Hubspot
3
3
  class CamelCase
4
4
  def format(string)
5
5
  case string
6
- when 'oauth'
7
- 'OAuth'
8
- when 'gdpr_api'
9
- 'GDPRApi'
10
6
  when 'public_smtp_tokens_api'
11
7
  'PublicSMTPTokensApi'
12
8
  else
@@ -1,3 +1,3 @@
1
1
  module Hubspot
2
- VERSION = '20.0.0-beta.1'
2
+ VERSION = '20.0.0'
3
3
  end
@@ -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::OAuth::AccessTokensApi' do
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::OAuth::RefreshTokensApi' do
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) }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe 'Hubspot::Discovery::OAuth::TokensApi' do
3
+ describe 'Hubspot::Discovery::Oauth::TokensApi' do
4
4
  subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.tokens_api }
5
5
 
6
6
  it { is_expected.to respond_to(:create) }