hubspot-api-client 9.4.0 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +4 -4
  4. data/LICENSE +201 -0
  5. data/README.md +1 -1
  6. data/hubspot-api-client.gemspec +1 -1
  7. data/lib/hubspot/codegen/automation/actions/api_client.rb +14 -0
  8. data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +14 -0
  9. data/lib/hubspot/codegen/cms/blogs/authors/api/default_api.rb +2 -2
  10. data/lib/hubspot/codegen/cms/blogs/authors/api_client.rb +14 -0
  11. data/lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb +2 -2
  12. data/lib/hubspot/codegen/cms/blogs/blog-posts/api_client.rb +14 -0
  13. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/blog_post.rb +108 -102
  14. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/layout_section.rb +4 -2
  15. data/lib/hubspot/codegen/cms/blogs/tags/api/default_api.rb +2 -2
  16. data/lib/hubspot/codegen/cms/blogs/tags/api_client.rb +14 -0
  17. data/lib/hubspot/codegen/cms/domains/api_client.rb +14 -0
  18. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +1 -1
  19. data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +1 -1
  20. data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +1 -1
  21. data/lib/hubspot/codegen/cms/hubdb/api_client.rb +15 -1
  22. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  23. data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
  24. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3.rb +1 -1
  25. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
  26. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
  27. data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
  28. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
  29. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
  30. data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
  31. data/lib/hubspot/codegen/cms/hubdb/models/column_input.rb +1 -1
  32. data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
  33. data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
  34. data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
  35. data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
  36. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +1 -1
  37. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +5 -3
  38. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input.rb +1 -1
  39. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
  40. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_input.rb +1 -1
  41. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +1 -1
  42. data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
  43. data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
  44. data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
  45. data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
  46. data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
  47. data/lib/hubspot/codegen/cms/performance/api_client.rb +14 -0
  48. data/lib/hubspot/codegen/cms/site-search/api/default_api.rb +2 -5
  49. data/lib/hubspot/codegen/cms/site-search/api_client.rb +14 -0
  50. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +19 -2
  51. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +5 -2
  52. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +17 -15
  53. data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +14 -0
  54. data/lib/hubspot/codegen/conversations/visitor-identification/api/generate_api.rb +90 -0
  55. data/lib/hubspot/codegen/conversations/visitor-identification/api_client.rb +406 -0
  56. data/lib/hubspot/codegen/conversations/visitor-identification/api_error.rb +61 -0
  57. data/lib/hubspot/codegen/conversations/visitor-identification/configuration.rb +263 -0
  58. data/lib/hubspot/codegen/conversations/visitor-identification/models/error.rb +292 -0
  59. data/lib/hubspot/codegen/conversations/visitor-identification/models/error_detail.rb +258 -0
  60. data/lib/hubspot/codegen/conversations/visitor-identification/models/identification_token_generation_request.rb +236 -0
  61. data/lib/hubspot/codegen/{crm/schemas/models/next_page.rb → conversations/visitor-identification/models/identification_token_response.rb} +18 -27
  62. data/lib/hubspot/codegen/crm/associations/api_client.rb +14 -0
  63. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +6 -12
  64. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +11 -14
  65. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +3 -3
  66. data/lib/hubspot/codegen/crm/companies/api_client.rb +14 -0
  67. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +20 -20
  68. data/lib/hubspot/codegen/crm/companies/models/collection_response_associated_id_forward_paging.rb +226 -0
  69. data/lib/hubspot/codegen/crm/companies/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  70. data/lib/hubspot/codegen/crm/companies/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  71. data/lib/hubspot/codegen/crm/companies/models/forward_paging.rb +210 -0
  72. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +1 -12
  73. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +288 -0
  74. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +6 -12
  75. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +11 -14
  76. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +3 -3
  77. data/lib/hubspot/codegen/crm/contacts/api_client.rb +14 -0
  78. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +20 -20
  79. data/lib/hubspot/codegen/crm/contacts/models/collection_response_associated_id_forward_paging.rb +226 -0
  80. data/lib/hubspot/codegen/crm/contacts/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  81. data/lib/hubspot/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  82. data/lib/hubspot/codegen/crm/contacts/models/forward_paging.rb +210 -0
  83. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +1 -12
  84. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +288 -0
  85. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +6 -12
  86. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +11 -14
  87. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +3 -3
  88. data/lib/hubspot/codegen/crm/deals/api_client.rb +14 -0
  89. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +20 -20
  90. data/lib/hubspot/codegen/crm/deals/models/collection_response_associated_id_forward_paging.rb +226 -0
  91. data/lib/hubspot/codegen/crm/deals/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  92. data/lib/hubspot/codegen/crm/deals/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  93. data/lib/hubspot/codegen/crm/deals/models/forward_paging.rb +210 -0
  94. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +1 -12
  95. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +288 -0
  96. data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +14 -0
  97. data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +24 -16
  98. data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +14 -0
  99. data/lib/hubspot/codegen/crm/extensions/calling/configuration.rb +1 -1
  100. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +14 -4
  101. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +14 -4
  102. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +16 -1
  103. data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +25 -17
  104. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +14 -0
  105. data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +1 -1
  106. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +14 -0
  107. data/lib/hubspot/codegen/crm/imports/api/default_api.rb +90 -0
  108. data/lib/hubspot/codegen/crm/imports/api_client.rb +14 -0
  109. data/lib/hubspot/codegen/crm/imports/models/collection_response_public_import_error_forward_paging.rb +226 -0
  110. data/lib/hubspot/codegen/crm/{schemas/models/paging.rb → imports/models/forward_paging.rb} +11 -20
  111. data/lib/hubspot/codegen/crm/imports/models/import_row_core.rb +238 -0
  112. data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +353 -0
  113. data/lib/hubspot/codegen/crm/imports/models/public_import_response.rb +2 -2
  114. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +6 -12
  115. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +11 -14
  116. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +3 -3
  117. data/lib/hubspot/codegen/crm/line_items/api_client.rb +14 -0
  118. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +20 -20
  119. data/lib/hubspot/codegen/crm/line_items/models/collection_response_associated_id_forward_paging.rb +226 -0
  120. data/lib/hubspot/codegen/crm/line_items/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  121. data/lib/hubspot/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  122. data/lib/hubspot/codegen/crm/line_items/models/forward_paging.rb +210 -0
  123. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +1 -12
  124. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_with_associations.rb +288 -0
  125. data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +6 -12
  126. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +11 -14
  127. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +10 -10
  128. data/lib/hubspot/codegen/crm/objects/api_client.rb +14 -0
  129. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +3 -6
  130. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +6 -12
  131. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +3 -3
  132. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +14 -0
  133. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +20 -20
  134. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object.rb → collection_response_associated_id_forward_paging.rb} +5 -5
  135. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object_with_associations_forward_paging.rb +228 -0
  136. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  137. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/forward_paging.rb +212 -0
  138. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +1 -12
  139. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +290 -0
  140. data/lib/hubspot/codegen/crm/objects/models/batch_read_input_simple_public_object_id.rb +20 -20
  141. data/lib/hubspot/codegen/crm/objects/models/collection_response_associated_id_forward_paging.rb +226 -0
  142. data/lib/hubspot/codegen/crm/objects/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  143. data/lib/hubspot/codegen/crm/objects/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  144. data/lib/hubspot/codegen/crm/objects/models/forward_paging.rb +210 -0
  145. data/lib/hubspot/codegen/crm/objects/models/simple_public_object.rb +1 -12
  146. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_with_associations.rb +288 -0
  147. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +9 -3
  148. data/lib/hubspot/codegen/crm/owners/api_client.rb +14 -0
  149. data/lib/hubspot/codegen/crm/owners/models/{collection_response_public_owner.rb → collection_response_public_owner_forward_paging.rb} +4 -4
  150. data/lib/hubspot/codegen/crm/owners/models/{paging.rb → forward_paging.rb} +3 -3
  151. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +14 -0
  152. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +6 -12
  153. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +11 -14
  154. data/lib/hubspot/codegen/crm/products/api/search_api.rb +3 -3
  155. data/lib/hubspot/codegen/crm/products/api_client.rb +14 -0
  156. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +20 -20
  157. data/lib/hubspot/codegen/crm/products/models/collection_response_associated_id_forward_paging.rb +226 -0
  158. data/lib/hubspot/codegen/crm/products/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  159. data/lib/hubspot/codegen/crm/products/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  160. data/lib/hubspot/codegen/crm/products/models/forward_paging.rb +210 -0
  161. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +1 -12
  162. data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +288 -0
  163. data/lib/hubspot/codegen/crm/properties/api_client.rb +14 -0
  164. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +3 -6
  165. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +6 -12
  166. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +3 -3
  167. data/lib/hubspot/codegen/crm/quotes/api_client.rb +14 -0
  168. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +20 -20
  169. data/lib/hubspot/codegen/crm/quotes/models/collection_response_associated_id_forward_paging.rb +226 -0
  170. data/lib/hubspot/codegen/crm/quotes/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  171. data/lib/hubspot/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  172. data/lib/hubspot/codegen/crm/{schemas/models/previous_page.rb → quotes/models/forward_paging.rb} +14 -28
  173. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +1 -12
  174. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_with_associations.rb +288 -0
  175. data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +23 -17
  176. data/lib/hubspot/codegen/crm/schemas/api_client.rb +14 -0
  177. data/lib/hubspot/codegen/crm/schemas/models/association_definition.rb +1 -75
  178. data/lib/hubspot/codegen/crm/schemas/models/association_definition_egg.rb +4 -78
  179. data/lib/hubspot/codegen/crm/schemas/models/{collection_response_object_schema.rb → collection_response_object_schema_no_paging.rb} +7 -16
  180. data/lib/hubspot/codegen/crm/schemas/models/object_schema.rb +15 -1
  181. data/lib/hubspot/codegen/crm/schemas/models/object_type_definition.rb +15 -1
  182. data/lib/hubspot/codegen/crm/schemas/models/object_type_property_create.rb +2 -2
  183. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +6 -12
  184. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +11 -14
  185. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +3 -3
  186. data/lib/hubspot/codegen/crm/tickets/api_client.rb +14 -0
  187. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +20 -20
  188. data/lib/hubspot/codegen/crm/tickets/models/collection_response_associated_id_forward_paging.rb +226 -0
  189. data/lib/hubspot/codegen/crm/tickets/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  190. data/lib/hubspot/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  191. data/lib/hubspot/codegen/crm/tickets/models/forward_paging.rb +210 -0
  192. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +1 -12
  193. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +288 -0
  194. data/lib/hubspot/codegen/crm/timeline/api_client.rb +14 -0
  195. data/lib/hubspot/codegen/events/api/events_api.rb +105 -0
  196. data/lib/hubspot/codegen/events/api_client.rb +404 -0
  197. data/lib/hubspot/codegen/events/api_error.rb +59 -0
  198. data/lib/hubspot/codegen/events/configuration.rb +261 -0
  199. data/lib/hubspot/codegen/events/models/collection_response_external_unified_event.rb +224 -0
  200. data/lib/hubspot/codegen/events/models/error.rb +290 -0
  201. data/lib/hubspot/codegen/events/models/error_detail.rb +256 -0
  202. data/lib/hubspot/codegen/events/models/external_unified_event.rb +290 -0
  203. data/lib/hubspot/codegen/events/models/next_page.rb +222 -0
  204. data/lib/hubspot/codegen/events/models/paging.rb +208 -0
  205. data/lib/hubspot/codegen/files/files/api/files_api.rb +8 -8
  206. data/lib/hubspot/codegen/files/files/api_client.rb +14 -0
  207. data/lib/hubspot/codegen/files/files/models/file_update_input.rb +2 -2
  208. data/lib/hubspot/codegen/files/files/models/{file.rb → hubspot_file.rb} +3 -3
  209. data/lib/hubspot/codegen/files/files/models/import_from_url_input.rb +2 -2
  210. data/lib/hubspot/codegen/marketing/transactional/api/default_api.rb +60 -60
  211. data/lib/hubspot/codegen/marketing/transactional/api_client.rb +14 -0
  212. data/lib/hubspot/codegen/oauth/api_client.rb +14 -0
  213. data/lib/hubspot/codegen/webhooks/api_client.rb +14 -0
  214. data/lib/hubspot/version.rb +1 -1
  215. data/spec/codegen/cms/blogs/authors/api/default_api_spec.rb +24 -24
  216. data/spec/codegen/cms/blogs/blog-posts/api/default_api_spec.rb +26 -26
  217. data/spec/codegen/cms/blogs/blog-posts/models/blog_post_spec.rb +14 -14
  218. data/spec/codegen/cms/blogs/tags/api/default_api_spec.rb +24 -24
  219. data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +1 -1
  220. data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +1 -1
  221. data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +1 -1
  222. data/spec/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3_spec.rb +1 -1
  223. data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
  224. data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
  225. data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
  226. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
  227. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
  228. data/spec/codegen/cms/hubdb/models/column_input_spec.rb +1 -1
  229. data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
  230. data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
  231. data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
  232. data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
  233. data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
  234. data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
  235. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_input_spec.rb +1 -1
  236. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +1 -1
  237. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_input_spec.rb +1 -1
  238. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +1 -1
  239. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
  240. data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
  241. data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
  242. data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
  243. data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
  244. data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
  245. data/spec/codegen/cms/site-search/api/default_api_spec.rb +0 -1
  246. data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
  247. data/spec/codegen/cms/site-search/models/indexed_data_spec.rb +1 -1
  248. data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
  249. data/spec/codegen/conversations/visitor-identification/api/generate_api_spec.rb +47 -0
  250. data/spec/codegen/conversations/visitor-identification/models/error_detail_spec.rb +65 -0
  251. data/spec/codegen/conversations/visitor-identification/models/error_spec.rb +77 -0
  252. data/spec/codegen/conversations/visitor-identification/models/identification_token_generation_request_spec.rb +53 -0
  253. data/spec/codegen/conversations/visitor-identification/models/identification_token_response_spec.rb +41 -0
  254. data/spec/codegen/crm/companies/api/associations_api_spec.rb +2 -4
  255. data/spec/codegen/crm/companies/api/basic_api_spec.rb +4 -5
  256. data/spec/codegen/crm/companies/api/search_api_spec.rb +1 -1
  257. data/spec/codegen/crm/companies/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  258. data/spec/codegen/crm/companies/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  259. data/spec/codegen/crm/companies/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  260. data/spec/codegen/crm/companies/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  261. data/spec/codegen/crm/companies/models/forward_paging_spec.rb +41 -0
  262. data/spec/codegen/crm/companies/models/simple_public_object_spec.rb +0 -6
  263. data/spec/codegen/crm/companies/models/simple_public_object_with_associations_spec.rb +77 -0
  264. data/spec/codegen/crm/contacts/api/associations_api_spec.rb +2 -4
  265. data/spec/codegen/crm/contacts/api/basic_api_spec.rb +4 -5
  266. data/spec/codegen/crm/contacts/api/search_api_spec.rb +1 -1
  267. data/spec/codegen/crm/contacts/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  268. data/spec/codegen/crm/contacts/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  269. data/spec/codegen/crm/contacts/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  270. data/spec/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  271. data/spec/codegen/crm/contacts/models/forward_paging_spec.rb +41 -0
  272. data/spec/codegen/crm/contacts/models/simple_public_object_spec.rb +0 -6
  273. data/spec/codegen/crm/contacts/models/simple_public_object_with_associations_spec.rb +77 -0
  274. data/spec/codegen/crm/deals/api/associations_api_spec.rb +2 -4
  275. data/spec/codegen/crm/deals/api/basic_api_spec.rb +4 -5
  276. data/spec/codegen/crm/deals/api/search_api_spec.rb +1 -1
  277. data/spec/codegen/crm/deals/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  278. data/spec/codegen/crm/deals/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  279. data/spec/codegen/crm/deals/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  280. data/spec/codegen/crm/deals/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  281. data/spec/codegen/crm/deals/models/forward_paging_spec.rb +41 -0
  282. data/spec/codegen/crm/deals/models/simple_public_object_spec.rb +0 -6
  283. data/spec/codegen/crm/deals/models/simple_public_object_with_associations_spec.rb +77 -0
  284. data/spec/codegen/crm/imports/api/default_api_spec.rb +47 -0
  285. data/spec/codegen/crm/imports/models/collection_response_public_import_error_forward_paging_spec.rb +47 -0
  286. data/spec/codegen/crm/imports/models/forward_paging_spec.rb +41 -0
  287. data/spec/codegen/crm/imports/models/import_row_core_spec.rb +53 -0
  288. data/spec/codegen/crm/imports/models/public_import_error_spec.rb +97 -0
  289. data/spec/codegen/crm/imports/models/public_import_response_spec.rb +1 -1
  290. data/spec/codegen/crm/line_items/api/associations_api_spec.rb +2 -4
  291. data/spec/codegen/crm/line_items/api/basic_api_spec.rb +4 -5
  292. data/spec/codegen/crm/line_items/api/search_api_spec.rb +1 -1
  293. data/spec/codegen/crm/line_items/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  294. data/spec/codegen/crm/line_items/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  295. data/spec/codegen/crm/line_items/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  296. data/spec/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  297. data/spec/codegen/crm/line_items/models/forward_paging_spec.rb +41 -0
  298. data/spec/codegen/crm/line_items/models/simple_public_object_spec.rb +0 -6
  299. data/spec/codegen/crm/line_items/models/simple_public_object_with_associations_spec.rb +77 -0
  300. data/spec/codegen/crm/objects/api/associations_api_spec.rb +2 -4
  301. data/spec/codegen/crm/objects/api/basic_api_spec.rb +4 -5
  302. data/spec/codegen/crm/objects/api/search_api_spec.rb +3 -3
  303. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +1 -2
  304. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +2 -4
  305. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +1 -1
  306. data/spec/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  307. data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  308. data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  309. data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  310. data/spec/codegen/crm/objects/feedback_submissions/models/forward_paging_spec.rb +41 -0
  311. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_spec.rb +0 -6
  312. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations_spec.rb +77 -0
  313. data/spec/codegen/crm/objects/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  314. data/spec/codegen/crm/objects/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  315. data/spec/codegen/crm/objects/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  316. data/spec/codegen/crm/objects/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  317. data/spec/codegen/crm/objects/models/forward_paging_spec.rb +41 -0
  318. data/spec/codegen/crm/objects/models/simple_public_object_spec.rb +0 -6
  319. data/spec/codegen/crm/objects/models/simple_public_object_with_associations_spec.rb +77 -0
  320. data/spec/codegen/crm/owners/api/default_api_spec.rb +3 -1
  321. data/spec/codegen/crm/owners/models/{collection_response_public_owner_spec.rb → collection_response_public_owner_forward_paging_spec.rb} +6 -6
  322. data/spec/codegen/crm/owners/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  323. data/spec/codegen/crm/products/api/associations_api_spec.rb +2 -4
  324. data/spec/codegen/crm/products/api/basic_api_spec.rb +4 -5
  325. data/spec/codegen/crm/products/api/search_api_spec.rb +1 -1
  326. data/spec/codegen/crm/products/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  327. data/spec/codegen/crm/products/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  328. data/spec/codegen/crm/products/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  329. data/spec/codegen/crm/products/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  330. data/spec/codegen/crm/products/models/forward_paging_spec.rb +41 -0
  331. data/spec/codegen/crm/products/models/simple_public_object_spec.rb +0 -6
  332. data/spec/codegen/crm/products/models/simple_public_object_with_associations_spec.rb +77 -0
  333. data/spec/codegen/crm/quotes/api/associations_api_spec.rb +1 -2
  334. data/spec/codegen/crm/quotes/api/basic_api_spec.rb +2 -4
  335. data/spec/codegen/crm/quotes/api/search_api_spec.rb +1 -1
  336. data/spec/codegen/crm/quotes/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  337. data/spec/codegen/crm/quotes/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  338. data/spec/codegen/crm/quotes/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  339. data/spec/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  340. data/spec/codegen/crm/quotes/models/forward_paging_spec.rb +41 -0
  341. data/spec/codegen/crm/quotes/models/simple_public_object_spec.rb +0 -6
  342. data/spec/codegen/crm/quotes/models/simple_public_object_with_associations_spec.rb +77 -0
  343. data/spec/codegen/crm/schemas/api/core_api_spec.rb +10 -8
  344. data/spec/codegen/crm/schemas/models/association_definition_egg_spec.rb +0 -20
  345. data/spec/codegen/crm/schemas/models/association_definition_spec.rb +0 -20
  346. data/spec/codegen/crm/schemas/models/{collection_response_object_schema_spec.rb → collection_response_object_schema_no_paging_spec.rb} +6 -12
  347. data/spec/codegen/crm/schemas/models/object_schema_spec.rb +6 -0
  348. data/spec/codegen/crm/schemas/models/object_type_definition_spec.rb +6 -0
  349. data/spec/codegen/crm/schemas/models/object_type_property_create_spec.rb +1 -1
  350. data/spec/codegen/crm/tickets/api/associations_api_spec.rb +2 -4
  351. data/spec/codegen/crm/tickets/api/basic_api_spec.rb +4 -5
  352. data/spec/codegen/crm/tickets/api/search_api_spec.rb +1 -1
  353. data/spec/codegen/crm/tickets/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  354. data/spec/codegen/crm/tickets/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  355. data/spec/codegen/crm/tickets/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  356. data/spec/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  357. data/spec/codegen/crm/tickets/models/forward_paging_spec.rb +41 -0
  358. data/spec/codegen/crm/tickets/models/simple_public_object_spec.rb +0 -6
  359. data/spec/codegen/crm/tickets/models/simple_public_object_with_associations_spec.rb +77 -0
  360. data/spec/codegen/events/api/events_api_spec.rb +54 -0
  361. data/spec/codegen/events/models/collection_response_external_unified_event_spec.rb +47 -0
  362. data/spec/codegen/events/models/error_detail_spec.rb +65 -0
  363. data/spec/codegen/events/models/error_spec.rb +77 -0
  364. data/spec/codegen/events/models/external_unified_event_spec.rb +71 -0
  365. data/spec/codegen/{crm/schemas → events}/models/next_page_spec.rb +5 -5
  366. data/spec/codegen/{crm/schemas → events}/models/paging_spec.rb +5 -11
  367. data/spec/codegen/files/files/api/files_api_spec.rb +2 -2
  368. data/spec/codegen/files/files/models/file_update_input_spec.rb +1 -1
  369. data/spec/codegen/files/files/models/{file_spec.rb → hubspot_file_spec.rb} +5 -5
  370. data/spec/codegen/files/files/models/import_from_url_input_spec.rb +1 -1
  371. data/spec/codegen/marketing/transactional/api/default_api_spec.rb +12 -12
  372. data/spec/features/conversations/visitor-identification/generate_api_spec.rb +7 -0
  373. data/spec/features/crm/objects/search_api_spec.rb +1 -1
  374. data/spec/features/events/events_api_spec.rb +7 -0
  375. metadata +212 -78
  376. data/spec/codegen/crm/schemas/models/previous_page_spec.rb +0 -47
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #HubSpot Events API
3
+
4
+ #API for accessing CRM object events.
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Hubspot
16
+ module Events
17
+ class Paging
18
+ attr_accessor :_next
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'_next' => :'next'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.openapi_types
29
+ {
30
+ :'_next' => :'NextPage'
31
+ }
32
+ end
33
+
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new([
37
+ ])
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ if (!attributes.is_a?(Hash))
44
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Events::Paging` initialize method"
45
+ end
46
+
47
+ # check to see if the attribute exists and convert string to symbol for hash key
48
+ attributes = attributes.each_with_object({}) { |(k, v), h|
49
+ if (!self.class.attribute_map.key?(k.to_sym))
50
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Events::Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
+ end
52
+ h[k.to_sym] = v
53
+ }
54
+
55
+ if attributes.key?(:'_next')
56
+ self._next = attributes[:'_next']
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ invalid_properties
65
+ end
66
+
67
+ # Check to see if the all the properties in the model are valid
68
+ # @return true if the model is valid
69
+ def valid?
70
+ true
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param [Object] Object to be compared
75
+ def ==(o)
76
+ return true if self.equal?(o)
77
+ self.class == o.class &&
78
+ _next == o._next
79
+ end
80
+
81
+ # @see the `==` method
82
+ # @param [Object] Object to be compared
83
+ def eql?(o)
84
+ self == o
85
+ end
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Integer] Hash code
89
+ def hash
90
+ [_next].hash
91
+ end
92
+
93
+ # Builds the object from hash
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ # @return [Object] Returns the model itself
96
+ def self.build_from_hash(attributes)
97
+ new.build_from_hash(attributes)
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.openapi_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ Hubspot::Events.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+ end
207
+ end
208
+ end
@@ -382,7 +382,7 @@ module Hubspot
382
382
  post_body = opts[:body]
383
383
 
384
384
  # return_type
385
- return_type = opts[:return_type] || 'File'
385
+ return_type = opts[:return_type] || 'HubspotFile'
386
386
 
387
387
  # auth_names
388
388
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
@@ -552,7 +552,7 @@ module Hubspot
552
552
  # @param file_id [String] Id of the desired file.
553
553
  # @param [Hash] opts the optional parameters
554
554
  # @option opts [String] :user_agent
555
- # @option opts [String] :file File data that will replace existing file in the file manager.
555
+ # @option opts [File] :file File data that will replace existing file in the file manager.
556
556
  # @option opts [String] :charset_hunch Character set of given file data.
557
557
  # @option opts [String] :options JSON String representing FileReplaceOptions
558
558
  # @return [File]
@@ -566,7 +566,7 @@ module Hubspot
566
566
  # @param file_id [String] Id of the desired file.
567
567
  # @param [Hash] opts the optional parameters
568
568
  # @option opts [String] :user_agent
569
- # @option opts [String] :file File data that will replace existing file in the file manager.
569
+ # @option opts [File] :file File data that will replace existing file in the file manager.
570
570
  # @option opts [String] :charset_hunch Character set of given file data.
571
571
  # @option opts [String] :options JSON String representing FileReplaceOptions
572
572
  # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
@@ -607,7 +607,7 @@ module Hubspot
607
607
  post_body = opts[:body]
608
608
 
609
609
  # return_type
610
- return_type = opts[:return_type] || 'File'
610
+ return_type = opts[:return_type] || 'HubspotFile'
611
611
 
612
612
  # auth_names
613
613
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
@@ -682,7 +682,7 @@ module Hubspot
682
682
  post_body = opts[:body] || @api_client.object_to_http_body(file_update_input)
683
683
 
684
684
  # return_type
685
- return_type = opts[:return_type] || 'File'
685
+ return_type = opts[:return_type] || 'HubspotFile'
686
686
 
687
687
  # auth_names
688
688
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
@@ -707,7 +707,7 @@ module Hubspot
707
707
  # Upload a single file with content specified in request body.
708
708
  # @param [Hash] opts the optional parameters
709
709
  # @option opts [String] :user_agent
710
- # @option opts [String] :file File to be uploaded.
710
+ # @option opts [File] :file File to be uploaded.
711
711
  # @option opts [String] :folder_id Either &#39;folderId&#39; or &#39;folderPath&#39; is required. folderId is the ID of the folder the file will be uploaded to.
712
712
  # @option opts [String] :folder_path Either &#39;folderPath&#39; or &#39;folderId&#39; is required. This field represents the destination folder path for the uploaded file. If a path doesn&#39;t exist, the system will try to create one.
713
713
  # @option opts [String] :file_name Desired name for the uploaded file.
@@ -723,7 +723,7 @@ module Hubspot
723
723
  # Upload a single file with content specified in request body.
724
724
  # @param [Hash] opts the optional parameters
725
725
  # @option opts [String] :user_agent
726
- # @option opts [String] :file File to be uploaded.
726
+ # @option opts [File] :file File to be uploaded.
727
727
  # @option opts [String] :folder_id Either &#39;folderId&#39; or &#39;folderPath&#39; is required. folderId is the ID of the folder the file will be uploaded to.
728
728
  # @option opts [String] :folder_path Either &#39;folderPath&#39; or &#39;folderId&#39; is required. This field represents the destination folder path for the uploaded file. If a path doesn&#39;t exist, the system will try to create one.
729
729
  # @option opts [String] :file_name Desired name for the uploaded file.
@@ -761,7 +761,7 @@ module Hubspot
761
761
  post_body = opts[:body]
762
762
 
763
763
  # return_type
764
- return_type = opts[:return_type] || 'File'
764
+ return_type = opts[:return_type] || 'HubspotFile'
765
765
 
766
766
  # auth_names
767
767
  auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
@@ -55,6 +55,20 @@ module Hubspot
55
55
  @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
56
56
  end
57
57
 
58
+ if !response.success? && config.error_handler.any?
59
+ config.error_handler.each do |statuses, opts|
60
+ statuses = statuses.is_a?(Integer) ? [statuses] : statuses
61
+
62
+ retries = opts[:max_retries] || 5
63
+ while retries > 0 && statuses.include?(response.code)
64
+ sleep opts[:seconds_delay] if opts[:seconds_delay]
65
+ response = request.run
66
+ opts[:retry_block].call if opts[:retry_block]
67
+ retries -= 1
68
+ end
69
+ end
70
+ end
71
+
58
72
  unless response.success?
59
73
  if response.timed_out?
60
74
  fail ApiError.new('Connection timed out')
@@ -127,7 +127,7 @@ module Hubspot
127
127
  # Check to see if the all the properties in the model are valid
128
128
  # @return true if the model is valid
129
129
  def valid?
130
- access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
130
+ access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
131
131
  return false unless access_validator.valid?(@access)
132
132
  true
133
133
  end
@@ -135,7 +135,7 @@ module Hubspot
135
135
  # Custom attribute writer method checking allowed values (enum).
136
136
  # @param [Object] access Object to be assigned
137
137
  def access=(access)
138
- validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
138
+ validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
139
139
  unless validator.valid?(access)
140
140
  fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
141
141
  end
@@ -15,7 +15,7 @@ require 'date'
15
15
  module Hubspot
16
16
  module Files
17
17
  module Files
18
- class File
18
+ class HubspotFile
19
19
  # File ID.
20
20
  attr_accessor :id
21
21
 
@@ -269,7 +269,7 @@ module Hubspot
269
269
  return false if @updated_at.nil?
270
270
  return false if @archived.nil?
271
271
  return false if @access.nil?
272
- access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
272
+ access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
273
273
  return false unless access_validator.valid?(@access)
274
274
  true
275
275
  end
@@ -277,7 +277,7 @@ module Hubspot
277
277
  # Custom attribute writer method checking allowed values (enum).
278
278
  # @param [Object] access Object to be assigned
279
279
  def access=(access)
280
- validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
280
+ validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
281
281
  unless validator.valid?(access)
282
282
  fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
283
283
  end
@@ -184,7 +184,7 @@ module Hubspot
184
184
  # @return true if the model is valid
185
185
  def valid?
186
186
  return false if @access.nil?
187
- access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
187
+ access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
188
188
  return false unless access_validator.valid?(@access)
189
189
  return false if @url.nil?
190
190
  return false if @duplicate_validation_strategy.nil?
@@ -200,7 +200,7 @@ module Hubspot
200
200
  # Custom attribute writer method checking allowed values (enum).
201
201
  # @param [Object] access Object to be assigned
202
202
  def access=(access)
203
- validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
203
+ validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
204
204
  unless validator.valid?(access)
205
205
  fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
206
206
  end
@@ -83,6 +83,66 @@ module Hubspot
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
+ # Create a SMTP API token.
87
+ # Create a SMTP API token.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
90
+ # @return [SmtpApiTokenView]
91
+ def create_token(opts = {})
92
+ data, _status_code, _headers = create_token_with_http_info(opts)
93
+ data
94
+ end
95
+
96
+ # Create a SMTP API token.
97
+ # Create a SMTP API token.
98
+ # @param [Hash] opts the optional parameters
99
+ # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
100
+ # @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
101
+ def create_token_with_http_info(opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
104
+ end
105
+ # resource path
106
+ local_var_path = '/marketing/v3/transactional/smtp-tokens'
107
+
108
+ # query parameters
109
+ query_params = opts[:query_params] || {}
110
+
111
+ # header parameters
112
+ header_params = opts[:header_params] || {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'smtp_api_token_request_egg'])
123
+
124
+ # return_type
125
+ return_type = opts[:return_type] || 'SmtpApiTokenView'
126
+
127
+ # auth_names
128
+ auth_names = opts[:auth_names] || ['hapikey']
129
+
130
+ new_options = opts.merge(
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: DefaultApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
86
146
  # Query a single token by ID.
87
147
  # Query a single token by ID.
88
148
  # @param token_id [String] Identifier generated when a token is created.
@@ -213,66 +273,6 @@ module Hubspot
213
273
  return data, status_code, headers
214
274
  end
215
275
 
216
- # Create a SMTP API token.
217
- # Create a SMTP API token.
218
- # @param [Hash] opts the optional parameters
219
- # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
220
- # @return [SmtpApiTokenView]
221
- def create_token(opts = {})
222
- data, _status_code, _headers = create_token_with_http_info(opts)
223
- data
224
- end
225
-
226
- # Create a SMTP API token.
227
- # Create a SMTP API token.
228
- # @param [Hash] opts the optional parameters
229
- # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
230
- # @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
231
- def create_token_with_http_info(opts = {})
232
- if @api_client.config.debugging
233
- @api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
234
- end
235
- # resource path
236
- local_var_path = '/marketing/v3/transactional/smtp-tokens'
237
-
238
- # query parameters
239
- query_params = opts[:query_params] || {}
240
-
241
- # header parameters
242
- header_params = opts[:header_params] || {}
243
- # HTTP header 'Accept' (if needed)
244
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
245
- # HTTP header 'Content-Type'
246
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
247
-
248
- # form parameters
249
- form_params = opts[:form_params] || {}
250
-
251
- # http body (model)
252
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'smtp_api_token_request_egg'])
253
-
254
- # return_type
255
- return_type = opts[:return_type] || 'SmtpApiTokenView'
256
-
257
- # auth_names
258
- auth_names = opts[:auth_names] || ['hapikey']
259
-
260
- new_options = opts.merge(
261
- :header_params => header_params,
262
- :query_params => query_params,
263
- :form_params => form_params,
264
- :body => post_body,
265
- :auth_names => auth_names,
266
- :return_type => return_type
267
- )
268
-
269
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
270
- if @api_client.config.debugging
271
- @api_client.config.logger.debug "API called: DefaultApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
- end
273
- return data, status_code, headers
274
- end
275
-
276
276
  # Reset the password of an existing token.
277
277
  # Allows the creation of a replacement password for a given token. Once the password is successfully reset, the old password for the token will be invalid.
278
278
  # @param token_id [String] Identifier generated when a token is created.