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,61 @@
1
+ =begin
2
+ #Visitor Identification
3
+
4
+ #The Visitor Identification API allows you to pass identification information to the HubSpot chat widget for otherwise unknown visitors that were verified by your own authentication system.
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
+ module Hubspot
14
+ module Conversations
15
+ module VisitorIdentification
16
+ class ApiError < StandardError
17
+ attr_reader :code, :response_headers, :response_body
18
+
19
+ # Usage examples:
20
+ # ApiError.new
21
+ # ApiError.new("message")
22
+ # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
23
+ # ApiError.new(:code => 404, :message => "Not Found")
24
+ def initialize(arg = nil)
25
+ if arg.is_a? Hash
26
+ if arg.key?(:message) || arg.key?('message')
27
+ super(arg[:message] || arg['message'])
28
+ else
29
+ super arg
30
+ end
31
+
32
+ arg.each do |k, v|
33
+ instance_variable_set "@#{k}", v
34
+ end
35
+ else
36
+ super arg
37
+ end
38
+ end
39
+
40
+ # Override to_s to display a friendly error message
41
+ def to_s
42
+ message
43
+ end
44
+
45
+ def message
46
+ if @message.nil?
47
+ msg = "Error message: the server returns an error"
48
+ else
49
+ msg = @message
50
+ end
51
+
52
+ msg += "\nHTTP status code: #{code}" if code
53
+ msg += "\nResponse headers: #{response_headers}" if response_headers
54
+ msg += "\nResponse body: #{response_body}" if response_body
55
+
56
+ msg
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,263 @@
1
+ =begin
2
+ #Visitor Identification
3
+
4
+ #The Visitor Identification API allows you to pass identification information to the HubSpot chat widget for otherwise unknown visitors that were verified by your own authentication system.
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
+ module Hubspot
14
+ module Conversations
15
+ module VisitorIdentification
16
+ class Configuration
17
+ # Defines url scheme
18
+ attr_accessor :scheme
19
+
20
+ # Defines url host
21
+ attr_accessor :host
22
+
23
+ # Defines url base path
24
+ attr_accessor :base_path
25
+
26
+ # Defines API keys used with API Key authentications.
27
+ #
28
+ # @return [Hash] key: parameter name, value: parameter value (API key)
29
+ #
30
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
31
+ # config.api_key['api_key'] = 'xxx'
32
+ attr_accessor :api_key
33
+
34
+ # Defines API key prefixes used with API Key authentications.
35
+ #
36
+ # @return [Hash] key: parameter name, value: API key prefix
37
+ #
38
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
39
+ # config.api_key_prefix['api_key'] = 'Token'
40
+ attr_accessor :api_key_prefix
41
+
42
+ # Defines the username used with HTTP basic authentication.
43
+ #
44
+ # @return [String]
45
+ attr_accessor :username
46
+
47
+ # Defines the password used with HTTP basic authentication.
48
+ #
49
+ # @return [String]
50
+ attr_accessor :password
51
+
52
+ # Defines the access token (Bearer) used with OAuth2.
53
+ attr_accessor :access_token
54
+
55
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
56
+ # details will be logged with `logger.debug` (see the `logger` attribute).
57
+ # Default to false.
58
+ #
59
+ # @return [true, false]
60
+ attr_accessor :debugging
61
+
62
+ # Defines the logger used for debugging.
63
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
64
+ #
65
+ # @return [#debug]
66
+ attr_accessor :logger
67
+
68
+ # Defines the temporary folder to store downloaded files
69
+ # (for API endpoints that have file response).
70
+ # Default to use `Tempfile`.
71
+ #
72
+ # @return [String]
73
+ attr_accessor :temp_folder_path
74
+
75
+ # The time limit for HTTP request in seconds.
76
+ # Default to 0 (never times out).
77
+ attr_accessor :timeout
78
+
79
+ # Set this to false to skip client side validation in the operation.
80
+ # Default to true.
81
+ # @return [true, false]
82
+ attr_accessor :client_side_validation
83
+
84
+ ### TLS/SSL setting
85
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
86
+ # Default to true.
87
+ #
88
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
89
+ #
90
+ # @return [true, false]
91
+ attr_accessor :verify_ssl
92
+
93
+ ### TLS/SSL setting
94
+ # Set this to false to skip verifying SSL host name
95
+ # Default to true.
96
+ #
97
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
98
+ #
99
+ # @return [true, false]
100
+ attr_accessor :verify_ssl_host
101
+
102
+ ### TLS/SSL setting
103
+ # Set this to customize the certificate file to verify the peer.
104
+ #
105
+ # @return [String] the path to the certificate file
106
+ #
107
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
108
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
109
+ attr_accessor :ssl_ca_cert
110
+
111
+ ### TLS/SSL setting
112
+ # Client certificate file (for client certificate)
113
+ attr_accessor :cert_file
114
+
115
+ ### TLS/SSL setting
116
+ # Client private key file (for client certificate)
117
+ attr_accessor :key_file
118
+
119
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
120
+ # Default to nil.
121
+ #
122
+ # @see The params_encoding option of Ethon. Related source code:
123
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
124
+ attr_accessor :params_encoding
125
+
126
+ attr_accessor :inject_format
127
+
128
+ attr_accessor :force_ending_format
129
+
130
+ attr_accessor :error_handler
131
+
132
+ def initialize
133
+ @scheme = 'https'
134
+ @host = 'api.hubapi.com'
135
+ @base_path = ''
136
+ @api_key = {}
137
+ @api_key_prefix = {}
138
+ @timeout = 0
139
+ @client_side_validation = true
140
+ @verify_ssl = true
141
+ @verify_ssl_host = true
142
+ @params_encoding = nil
143
+ @cert_file = nil
144
+ @key_file = nil
145
+ @debugging = false
146
+ @inject_format = false
147
+ @force_ending_format = false
148
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
149
+ # error_handler params: { 'status_code': { max_retries: ..., seconds_delay: ... }, ... }
150
+ @error_handler = {}
151
+
152
+ yield(self) if block_given?
153
+ end
154
+
155
+ # The default Configuration object.
156
+ def self.default
157
+ @@default ||= Configuration.new
158
+ end
159
+
160
+ def configure
161
+ yield(self) if block_given?
162
+ end
163
+
164
+ def scheme=(scheme)
165
+ # remove :// from scheme
166
+ @scheme = scheme.sub(/:\/\//, '')
167
+ end
168
+
169
+ def host=(host)
170
+ # remove http(s):// and anything after a slash
171
+ @host = host.sub(/https?:\/\//, '').split('/').first
172
+ end
173
+
174
+ def base_path=(base_path)
175
+ # Add leading and trailing slashes to base_path
176
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
177
+ @base_path = '' if @base_path == '/'
178
+ end
179
+
180
+ def base_url
181
+ "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
182
+ end
183
+
184
+ # Gets API key (with prefix if set).
185
+ # @param [String] param_name the parameter name of API key auth
186
+ def api_key_with_prefix(param_name)
187
+ if @api_key_prefix[param_name]
188
+ "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
189
+ else
190
+ @api_key[param_name]
191
+ end
192
+ end
193
+
194
+ # Gets Basic Auth token string
195
+ def basic_auth_token
196
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
197
+ end
198
+
199
+ # Returns Auth Settings hash for api client.
200
+ def auth_settings
201
+ {
202
+ 'hapikey' =>
203
+ {
204
+ type: 'api_key',
205
+ in: 'query',
206
+ key: 'hapikey',
207
+ value: api_key_with_prefix('hapikey')
208
+ },
209
+ 'oauth2' =>
210
+ {
211
+ type: 'oauth2',
212
+ in: 'header',
213
+ key: 'Authorization',
214
+ value: "Bearer #{access_token}"
215
+ },
216
+ }
217
+ end
218
+
219
+ # Returns an array of Server setting
220
+ def server_settings
221
+ [
222
+ {
223
+ url: "https://api.hubapi.com/",
224
+ description: "No description provided",
225
+ }
226
+ ]
227
+ end
228
+
229
+ # Returns URL based on server settings
230
+ #
231
+ # @param index array index of the server settings
232
+ # @param variables hash of variable and the corresponding value
233
+ def server_url(index, variables = {})
234
+ servers = server_settings
235
+
236
+ # check array index out of bound
237
+ if (index < 0 || index >= servers.size)
238
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
239
+ end
240
+
241
+ server = servers[index]
242
+ url = server[:url]
243
+
244
+ # go through variable and assign a value
245
+ server[:variables].each do |name, variable|
246
+ if variables.key?(name)
247
+ if (server[:variables][name][:enum_values].include? variables[name])
248
+ url.gsub! "{" + name.to_s + "}", variables[name]
249
+ else
250
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
251
+ end
252
+ else
253
+ # use default value
254
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
255
+ end
256
+ end
257
+
258
+ url
259
+ end
260
+ end
261
+ end
262
+ end
263
+ end
@@ -0,0 +1,292 @@
1
+ =begin
2
+ #Visitor Identification
3
+
4
+ #The Visitor Identification API allows you to pass identification information to the HubSpot chat widget for otherwise unknown visitors that were verified by your own authentication system.
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 Conversations
17
+ module VisitorIdentification
18
+ class Error
19
+ # A human readable message describing the error along with remediation steps where appropriate
20
+ attr_accessor :message
21
+
22
+ # A unique identifier for the request. Include this value with any error reports or support tickets
23
+ attr_accessor :correlation_id
24
+
25
+ # The error category
26
+ attr_accessor :category
27
+
28
+ # A specific category that contains more specific detail about the error
29
+ attr_accessor :sub_category
30
+
31
+ # further information about the error
32
+ attr_accessor :errors
33
+
34
+ # Context about the error condition
35
+ attr_accessor :context
36
+
37
+ # A map of link names to associated URIs containing documentation about the error or recommended remediation steps
38
+ attr_accessor :links
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'message' => :'message',
44
+ :'correlation_id' => :'correlationId',
45
+ :'category' => :'category',
46
+ :'sub_category' => :'subCategory',
47
+ :'errors' => :'errors',
48
+ :'context' => :'context',
49
+ :'links' => :'links'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'message' => :'String',
57
+ :'correlation_id' => :'String',
58
+ :'category' => :'String',
59
+ :'sub_category' => :'String',
60
+ :'errors' => :'Array<ErrorDetail>',
61
+ :'context' => :'Hash<String, Array<String>>',
62
+ :'links' => :'Hash<String, String>'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Conversations::VisitorIdentification::Error` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Conversations::VisitorIdentification::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'message')
88
+ self.message = attributes[:'message']
89
+ end
90
+
91
+ if attributes.key?(:'correlation_id')
92
+ self.correlation_id = attributes[:'correlation_id']
93
+ end
94
+
95
+ if attributes.key?(:'category')
96
+ self.category = attributes[:'category']
97
+ end
98
+
99
+ if attributes.key?(:'sub_category')
100
+ self.sub_category = attributes[:'sub_category']
101
+ end
102
+
103
+ if attributes.key?(:'errors')
104
+ if (value = attributes[:'errors']).is_a?(Array)
105
+ self.errors = value
106
+ end
107
+ end
108
+
109
+ if attributes.key?(:'context')
110
+ if (value = attributes[:'context']).is_a?(Hash)
111
+ self.context = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'links')
116
+ if (value = attributes[:'links']).is_a?(Hash)
117
+ self.links = value
118
+ end
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = Array.new
126
+ if @message.nil?
127
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
128
+ end
129
+
130
+ if @correlation_id.nil?
131
+ invalid_properties.push('invalid value for "correlation_id", correlation_id cannot be nil.')
132
+ end
133
+
134
+ if @category.nil?
135
+ invalid_properties.push('invalid value for "category", category cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ return false if @message.nil?
145
+ return false if @correlation_id.nil?
146
+ return false if @category.nil?
147
+ true
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ message == o.message &&
156
+ correlation_id == o.correlation_id &&
157
+ category == o.category &&
158
+ sub_category == o.sub_category &&
159
+ errors == o.errors &&
160
+ context == o.context &&
161
+ links == o.links
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [message, correlation_id, category, sub_category, errors, context, links].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ new.build_from_hash(attributes)
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ self.class.openapi_types.each_pair do |key, type|
189
+ if type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ end
195
+ elsif !attributes[self.class.attribute_map[key]].nil?
196
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
198
+ end
199
+
200
+ self
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def _deserialize(type, value)
208
+ case type.to_sym
209
+ when :DateTime
210
+ DateTime.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ Hubspot::Conversations::VisitorIdentification.const_get(type).build_from_hash(value)
241
+ end
242
+ end
243
+
244
+ # Returns the string representation of the object
245
+ # @return [String] String presentation of the object
246
+ def to_s
247
+ to_hash.to_s
248
+ end
249
+
250
+ # to_body is an alias to to_hash (backward compatibility)
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_body
253
+ to_hash
254
+ end
255
+
256
+ # Returns the object in the form of hash
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_hash
259
+ hash = {}
260
+ self.class.attribute_map.each_pair do |attr, param|
261
+ value = self.send(attr)
262
+ if value.nil?
263
+ is_nullable = self.class.openapi_nullable.include?(attr)
264
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
265
+ end
266
+
267
+ hash[param] = _to_hash(value)
268
+ end
269
+ hash
270
+ end
271
+
272
+ # Outputs non-array value in the form of hash
273
+ # For object, use to_hash. Otherwise, just return the value
274
+ # @param [Object] value Any valid value
275
+ # @return [Hash] Returns the value in the form of hash
276
+ def _to_hash(value)
277
+ if value.is_a?(Array)
278
+ value.compact.map { |v| _to_hash(v) }
279
+ elsif value.is_a?(Hash)
280
+ {}.tap do |hash|
281
+ value.each { |k, v| hash[k] = _to_hash(v) }
282
+ end
283
+ elsif value.respond_to? :to_hash
284
+ value.to_hash
285
+ else
286
+ value
287
+ end
288
+ end
289
+ end
290
+ end
291
+ end
292
+ end