hubspot-api-client 10.0.0 → 11.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +3 -3
  4. data/README.md +4 -0
  5. data/lib/hubspot/codegen/automation/actions/api_client.rb +12 -12
  6. data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
  7. data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +12 -12
  8. data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
  9. data/lib/hubspot/codegen/cms/blogs/authors/api_client.rb +12 -12
  10. data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
  11. data/lib/hubspot/codegen/cms/blogs/blog-posts/api_client.rb +12 -12
  12. data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
  13. data/lib/hubspot/codegen/cms/blogs/tags/api_client.rb +12 -12
  14. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
  15. data/lib/hubspot/codegen/cms/domains/api_client.rb +12 -12
  16. data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
  17. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
  18. data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
  19. data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
  20. data/lib/hubspot/codegen/cms/hubdb/api_client.rb +13 -13
  21. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  22. data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
  23. data/lib/hubspot/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3.rb → batch_input_hub_db_table_row_v3_request.rb} +5 -5
  24. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
  25. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
  26. data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
  27. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
  28. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
  29. data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
  30. data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
  31. data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
  32. data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
  33. data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
  34. data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
  35. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
  36. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
  37. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
  38. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
  39. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
  40. data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
  41. data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
  42. data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
  43. data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
  44. data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
  45. data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
  46. data/lib/hubspot/codegen/cms/performance/api_client.rb +12 -12
  47. data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
  48. data/lib/hubspot/codegen/cms/site-search/api_client.rb +12 -12
  49. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
  50. data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +12 -12
  51. data/lib/hubspot/codegen/communication_preferences/api/definition_api.rb +80 -0
  52. data/lib/hubspot/codegen/communication_preferences/api/status_api.rb +214 -0
  53. data/lib/hubspot/codegen/communication_preferences/api_client.rb +404 -0
  54. data/lib/hubspot/codegen/communication_preferences/api_error.rb +59 -0
  55. data/lib/hubspot/codegen/communication_preferences/configuration.rb +254 -0
  56. data/lib/hubspot/codegen/communication_preferences/models/error.rb +290 -0
  57. data/lib/hubspot/codegen/communication_preferences/models/error_detail.rb +256 -0
  58. data/lib/hubspot/codegen/communication_preferences/models/public_subscription_status.rb +372 -0
  59. data/lib/hubspot/codegen/communication_preferences/models/public_subscription_statuses_response.rb +231 -0
  60. data/lib/hubspot/codegen/communication_preferences/models/public_update_subscription_status_request.rb +283 -0
  61. data/lib/hubspot/codegen/communication_preferences/models/subscription_definition.rb +339 -0
  62. data/lib/hubspot/codegen/communication_preferences/models/subscription_definitions_response.rb +216 -0
  63. data/lib/hubspot/codegen/conversations/visitor-identification/api_client.rb +12 -12
  64. data/lib/hubspot/codegen/crm/associations/api_client.rb +12 -12
  65. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
  66. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
  67. data/lib/hubspot/codegen/crm/companies/api_client.rb +12 -12
  68. data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
  69. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
  70. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
  71. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
  72. data/lib/hubspot/codegen/crm/contacts/api_client.rb +12 -12
  73. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
  74. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
  75. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
  76. data/lib/hubspot/codegen/crm/deals/api_client.rb +12 -12
  77. data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
  78. data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +12 -12
  79. data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +24 -16
  80. data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +12 -12
  81. data/lib/hubspot/codegen/crm/extensions/calling/configuration.rb +1 -1
  82. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +14 -4
  83. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +14 -4
  84. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +16 -1
  85. data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +25 -17
  86. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +12 -12
  87. data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +1 -1
  88. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +12 -12
  89. data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
  90. data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
  91. data/lib/hubspot/codegen/crm/imports/api_client.rb +12 -12
  92. data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
  93. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
  94. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
  95. data/lib/hubspot/codegen/crm/line_items/api_client.rb +12 -12
  96. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
  97. data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
  98. data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
  99. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
  100. data/lib/hubspot/codegen/crm/objects/api_client.rb +12 -12
  101. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
  102. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
  103. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +12 -12
  104. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
  105. data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
  106. data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
  107. data/lib/hubspot/codegen/crm/owners/api_client.rb +12 -12
  108. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +12 -12
  109. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
  110. data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
  111. data/lib/hubspot/codegen/crm/products/api_client.rb +12 -12
  112. data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
  113. data/lib/hubspot/codegen/crm/properties/api_client.rb +12 -12
  114. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
  115. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
  116. data/lib/hubspot/codegen/crm/quotes/api_client.rb +12 -12
  117. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
  118. data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
  119. data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
  120. data/lib/hubspot/codegen/crm/schemas/api_client.rb +12 -12
  121. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
  122. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
  123. data/lib/hubspot/codegen/crm/tickets/api_client.rb +12 -12
  124. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
  125. data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
  126. data/lib/hubspot/codegen/crm/timeline/api_client.rb +12 -12
  127. data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
  128. data/lib/hubspot/codegen/events/api_client.rb +12 -12
  129. data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
  130. data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
  131. data/lib/hubspot/codegen/files/files/api_client.rb +12 -12
  132. data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
  133. data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
  134. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
  135. data/lib/hubspot/codegen/marketing/transactional/api_client.rb +12 -12
  136. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
  137. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
  138. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
  139. data/lib/hubspot/codegen/oauth/api_client.rb +12 -12
  140. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
  141. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
  142. data/lib/hubspot/codegen/webhooks/api_client.rb +12 -12
  143. data/lib/hubspot/version.rb +1 -1
  144. data/lib/hubspot-api-client.rb +16 -3
  145. data/pkg/hubspot-api-client-10.1.1.gem +0 -0
  146. data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
  147. data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
  148. data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
  149. data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
  150. data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
  151. data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
  152. data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
  153. data/spec/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3_spec.rb → batch_input_hub_db_table_row_v3_request_spec.rb} +7 -7
  154. data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
  155. data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
  156. data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
  157. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
  158. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
  159. data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
  160. data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
  161. data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
  162. data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
  163. data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
  164. data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
  165. data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
  166. data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
  167. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
  168. data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
  169. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
  170. data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
  171. data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
  172. data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
  173. data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
  174. data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
  175. data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
  176. data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
  177. data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
  178. data/spec/codegen/communication_preferences/api/definition_api_spec.rb +46 -0
  179. data/spec/codegen/communication_preferences/api/status_api_spec.rb +71 -0
  180. data/spec/codegen/communication_preferences/models/error_detail_spec.rb +65 -0
  181. data/spec/codegen/communication_preferences/models/error_spec.rb +77 -0
  182. data/spec/codegen/communication_preferences/models/public_subscription_status_spec.rb +101 -0
  183. data/spec/codegen/communication_preferences/models/public_subscription_statuses_response_spec.rb +47 -0
  184. data/spec/codegen/communication_preferences/models/public_update_subscription_status_request_spec.rb +63 -0
  185. data/spec/codegen/communication_preferences/models/subscription_definition_spec.rb +95 -0
  186. data/spec/codegen/communication_preferences/models/subscription_definitions_response_spec.rb +41 -0
  187. data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
  188. data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
  189. data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
  190. data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
  191. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
  192. data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
  193. data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
  194. data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
  195. data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
  196. data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
  197. data/spec/codegen/crm/extensions/calling/api/settings_api_spec.rb +2 -2
  198. data/spec/codegen/crm/extensions/calling/models/settings_patch_request_spec.rb +6 -0
  199. data/spec/codegen/crm/extensions/calling/models/settings_request_spec.rb +6 -0
  200. data/spec/codegen/crm/extensions/calling/models/settings_response_spec.rb +6 -0
  201. data/spec/codegen/crm/extensions/cards/api/cards_api_spec.rb +2 -2
  202. data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
  203. data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
  204. data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
  205. data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
  206. data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
  207. data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
  208. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
  209. data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
  210. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
  211. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
  212. data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
  213. data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
  214. data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
  215. data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
  216. data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
  217. data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
  218. data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
  219. data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
  220. data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
  221. data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
  222. data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
  223. data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
  224. data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
  225. data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
  226. data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
  227. data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
  228. data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
  229. data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
  230. data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
  231. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
  232. data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
  233. data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
  234. data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
  235. data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
  236. data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
  237. data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
  238. data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
  239. data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
  240. data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
  241. data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
  242. data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
  243. data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
  244. data/spec/features/communication_preferences/definition_api_spec.rb +7 -0
  245. data/spec/features/communication_preferences/status_api_spec.rb +9 -0
  246. data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
  247. data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
  248. data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
  249. data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
  250. data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
  251. data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
  252. data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
  253. data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
  254. data/spec/features/oauth/tokens_api_spec.rb +7 -0
  255. metadata +130 -82
  256. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
  257. data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
  258. data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
  259. data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
  260. data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
  261. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
  262. data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
  263. data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
  264. data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
  265. data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
  266. data/spec/features/crm/schemas/default_api_spec.rb +0 -7
  267. data/spec/features/oauth/default_api_spec.rb +0 -10
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #HubDB endpoints
3
3
 
4
- #HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `live` versions and you can publish and unpublish the live version. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, pushed to live version, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
4
+ #HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
5
5
 
6
6
  The version of the OpenAPI document: v3
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #HubDB endpoints
3
3
 
4
- #HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `live` versions and you can publish and unpublish the live version. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, pushed to live version, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
4
+ #HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
5
5
 
6
6
  The version of the OpenAPI document: v3
7
7
 
@@ -15,7 +15,7 @@ require 'cgi'
15
15
  module Hubspot
16
16
  module Cms
17
17
  module Performance
18
- class DefaultApi
18
+ class PublicPerformanceApi
19
19
  attr_accessor :api_client
20
20
 
21
21
  def initialize(api_client = ApiClient.default)
@@ -52,7 +52,7 @@ module Hubspot
52
52
  # @return [Array<(PublicPerformanceResponse, Integer, Hash)>] PublicPerformanceResponse data, response status code and response headers
53
53
  def get_page_with_http_info(opts = {})
54
54
  if @api_client.config.debugging
55
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_page ...'
55
+ @api_client.config.logger.debug 'Calling API: PublicPerformanceApi.get_page ...'
56
56
  end
57
57
  # resource path
58
58
  local_var_path = '/cms/v3/performance/'
@@ -96,7 +96,7 @@ module Hubspot
96
96
 
97
97
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
98
98
  if @api_client.config.debugging
99
- @api_client.config.logger.debug "API called: DefaultApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ @api_client.config.logger.debug "API called: PublicPerformanceApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
100
  end
101
101
  return data, status_code, headers
102
102
  end
@@ -132,7 +132,7 @@ module Hubspot
132
132
  # @return [Array<(PublicPerformanceResponse, Integer, Hash)>] PublicPerformanceResponse data, response status code and response headers
133
133
  def get_uptime_with_http_info(opts = {})
134
134
  if @api_client.config.debugging
135
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_uptime ...'
135
+ @api_client.config.logger.debug 'Calling API: PublicPerformanceApi.get_uptime ...'
136
136
  end
137
137
  # resource path
138
138
  local_var_path = '/cms/v3/performance/uptime'
@@ -176,7 +176,7 @@ module Hubspot
176
176
 
177
177
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
178
178
  if @api_client.config.debugging
179
- @api_client.config.logger.debug "API called: DefaultApi#get_uptime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ @api_client.config.logger.debug "API called: PublicPerformanceApi#get_uptime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
180
180
  end
181
181
  return data, status_code, headers
182
182
  end
@@ -55,21 +55,21 @@ module Hubspot
55
55
  @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
56
56
  end
57
57
 
58
- unless response.success?
59
- if config.error_handler.any?
60
- config.error_handler.each do |statuses, opts|
61
- statuses = statuses.is_a?(Integer) ? [statuses] : statuses
62
-
63
- retries = opts[:max_retries] || 5
64
- while retries > 0 && statuses.include?(response.code)
65
- sleep opts[:seconds_delay] if opts[:seconds_delay]
66
- response = request.run
67
- opts[:retry_block].call if opts[:retry_block]
68
- retries -= 1
69
- end
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
70
68
  end
71
69
  end
70
+ end
72
71
 
72
+ unless response.success?
73
73
  if response.timed_out?
74
74
  fail ApiError.new('Connection timed out')
75
75
  elsif response.code == 0
@@ -15,7 +15,7 @@ require 'cgi'
15
15
  module Hubspot
16
16
  module Cms
17
17
  module SiteSearch
18
- class DefaultApi
18
+ class PublicApi
19
19
  attr_accessor :api_client
20
20
 
21
21
  def initialize(api_client = ApiClient.default)
@@ -40,15 +40,15 @@ module Hubspot
40
40
  # @return [Array<(IndexedData, Integer, Hash)>] IndexedData data, response status code and response headers
41
41
  def get_by_id_with_http_info(content_id, opts = {})
42
42
  if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_by_id ...'
43
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_by_id ...'
44
44
  end
45
45
  # verify the required parameter 'content_id' is set
46
46
  if @api_client.config.client_side_validation && content_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'content_id' when calling DefaultApi.get_by_id"
47
+ fail ArgumentError, "Missing the required parameter 'content_id' when calling PublicApi.get_by_id"
48
48
  end
49
49
  pattern = Regexp.new(/.*/)
50
50
  if @api_client.config.client_side_validation && content_id !~ pattern
51
- fail ArgumentError, "invalid value for 'content_id' when calling DefaultApi.get_by_id, must conform to the pattern #{pattern}."
51
+ fail ArgumentError, "invalid value for 'content_id' when calling PublicApi.get_by_id, must conform to the pattern #{pattern}."
52
52
  end
53
53
 
54
54
  allowable_values = ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"]
@@ -90,7 +90,7 @@ module Hubspot
90
90
 
91
91
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
92
92
  if @api_client.config.debugging
93
- @api_client.config.logger.debug "API called: DefaultApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ @api_client.config.logger.debug "API called: PublicApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
94
  end
95
95
  return data, status_code, headers
96
96
  end
@@ -146,7 +146,7 @@ module Hubspot
146
146
  # @return [Array<(PublicSearchResults, Integer, Hash)>] PublicSearchResults data, response status code and response headers
147
147
  def search_with_http_info(opts = {})
148
148
  if @api_client.config.debugging
149
- @api_client.config.logger.debug 'Calling API: DefaultApi.search ...'
149
+ @api_client.config.logger.debug 'Calling API: PublicApi.search ...'
150
150
  end
151
151
  allowable_values = ["af", "af-na", "af-za", "agq", "agq-cm", "ak", "ak-gh", "am", "am-et", "ar", "ar-001", "ar-ae", "ar-bh", "ar-dj", "ar-dz", "ar-eg", "ar-eh", "ar-er", "ar-il", "ar-iq", "ar-jo", "ar-km", "ar-kw", "ar-lb", "ar-ly", "ar-ma", "ar-mr", "ar-om", "ar-ps", "ar-qa", "ar-sa", "ar-sd", "ar-so", "ar-ss", "ar-sy", "ar-td", "ar-tn", "ar-ye", "as", "as-in", "asa", "asa-tz", "ast", "ast-es", "az", "az-az", "bas", "bas-cm", "be", "be-by", "bem", "bem-zm", "bez", "bez-tz", "bg", "bg-bg", "bm", "bm-ml", "bn", "bn-bd", "bn-in", "bo", "bo-cn", "bo-in", "br", "br-fr", "brx", "brx-in", "bs", "bs-ba", "ca", "ca-ad", "ca-es", "ca-fr", "ca-it", "ccp", "ccp-bd", "ccp-in", "ce", "ce-ru", "cgg", "cgg-ug", "chr", "chr-us", "ckb", "ckb-iq", "ckb-ir", "cs", "cs-cz", "cu", "cu-ru", "cy", "cy-gb", "da", "da-dk", "da-gl", "dav", "dav-ke", "de", "de-at", "de-be", "de-ch", "de-de", "de-gr", "de-it", "de-li", "de-lu", "dje", "dje-ne", "dsb", "dsb-de", "dua", "dua-cm", "dyo", "dyo-sn", "dz", "dz-bt", "ebu", "ebu-ke", "ee", "ee-gh", "ee-tg", "el", "el-cy", "el-gr", "en", "en-001", "en-150", "en-ag", "en-ai", "en-as", "en-at", "en-au", "en-bb", "en-be", "en-bi", "en-bm", "en-bs", "en-bw", "en-bz", "en-ca", "en-cc", "en-ch", "en-ck", "en-cm", "en-cx", "en-cy", "en-de", "en-dg", "en-dk", "en-dm", "en-er", "en-fi", "en-fj", "en-fk", "en-fm", "en-gb", "en-gd", "en-gg", "en-gh", "en-gi", "en-gm", "en-gu", "en-gy", "en-hk", "en-ie", "en-il", "en-im", "en-in", "en-io", "en-je", "en-jm", "en-ke", "en-ki", "en-kn", "en-ky", "en-lc", "en-lr", "en-ls", "en-mg", "en-mh", "en-mo", "en-mp", "en-ms", "en-mt", "en-mu", "en-mw", "en-my", "en-na", "en-nf", "en-ng", "en-nl", "en-nr", "en-nu", "en-nz", "en-pg", "en-ph", "en-pk", "en-pn", "en-pr", "en-pw", "en-rw", "en-sb", "en-sc", "en-sd", "en-se", "en-sg", "en-sh", "en-si", "en-sl", "en-ss", "en-sx", "en-sz", "en-tc", "en-tk", "en-to", "en-tt", "en-tv", "en-tz", "en-ug", "en-um", "en-us", "en-vc", "en-vg", "en-vi", "en-vu", "en-ws", "en-za", "en-zm", "en-zw", "eo", "eo-001", "es", "es-419", "es-ar", "es-bo", "es-br", "es-bz", "es-cl", "es-co", "es-cr", "es-cu", "es-do", "es-ea", "es-ec", "es-es", "es-gq", "es-gt", "es-hn", "es-ic", "es-mx", "es-ni", "es-pa", "es-pe", "es-ph", "es-pr", "es-py", "es-sv", "es-us", "es-uy", "es-ve", "et", "et-ee", "eu", "eu-es", "ewo", "ewo-cm", "fa", "fa-af", "fa-ir", "ff", "ff-cm", "ff-gn", "ff-mr", "ff-sn", "fi", "fi-fi", "fil", "fil-ph", "fo", "fo-dk", "fo-fo", "fr", "fr-be", "fr-bf", "fr-bi", "fr-bj", "fr-bl", "fr-ca", "fr-cd", "fr-cf", "fr-cg", "fr-ch", "fr-ci", "fr-cm", "fr-dj", "fr-dz", "fr-fr", "fr-ga", "fr-gf", "fr-gn", "fr-gp", "fr-gq", "fr-ht", "fr-km", "fr-lu", "fr-ma", "fr-mc", "fr-mf", "fr-mg", "fr-ml", "fr-mq", "fr-mr", "fr-mu", "fr-nc", "fr-ne", "fr-pf", "fr-pm", "fr-re", "fr-rw", "fr-sc", "fr-sn", "fr-sy", "fr-td", "fr-tg", "fr-tn", "fr-vu", "fr-wf", "fr-yt", "fur", "fur-it", "fy", "fy-nl", "ga", "ga-ie", "gd", "gd-gb", "gl", "gl-es", "gsw", "gsw-ch", "gsw-fr", "gsw-li", "gu", "gu-in", "guz", "guz-ke", "gv", "gv-im", "ha", "ha-gh", "ha-ne", "ha-ng", "haw", "haw-us", "he", "hi", "hi-in", "hr", "hr-ba", "hr-hr", "hsb", "hsb-de", "hu", "hu-hu", "hy", "hy-am", "id", "ig", "ig-ng", "ii", "ii-cn", "id-id", "is", "is-is", "it", "it-ch", "it-it", "it-sm", "it-va", "he-il", "ja", "ja-jp", "jgo", "jgo-cm", "yi", "yi-001", "jmc", "jmc-tz", "ka", "ka-ge", "kab", "kab-dz", "kam", "kam-ke", "kde", "kde-tz", "kea", "kea-cv", "khq", "khq-ml", "ki", "ki-ke", "kk", "kk-kz", "kkj", "kkj-cm", "kl", "kl-gl", "kln", "kln-ke", "km", "km-kh", "kn", "kn-in", "ko", "ko-kp", "ko-kr", "kok", "kok-in", "ks", "ks-in", "ksb", "ksb-tz", "ksf", "ksf-cm", "ksh", "ksh-de", "kw", "kw-gb", "ky", "ky-kg", "lag", "lag-tz", "lb", "lb-lu", "lg", "lg-ug", "lkt", "lkt-us", "ln", "ln-ao", "ln-cd", "ln-cf", "ln-cg", "lo", "lo-la", "lrc", "lrc-iq", "lrc-ir", "lt", "lt-lt", "lu", "lu-cd", "luo", "luo-ke", "luy", "luy-ke", "lv", "lv-lv", "mas", "mas-ke", "mas-tz", "mer", "mer-ke", "mfe", "mfe-mu", "mg", "mg-mg", "mgh", "mgh-mz", "mgo", "mgo-cm", "mk", "mk-mk", "ml", "ml-in", "mn", "mn-mn", "mr", "mr-in", "ms", "ms-bn", "ms-my", "ms-sg", "mt", "mt-mt", "mua", "mua-cm", "my", "my-mm", "mzn", "mzn-ir", "naq", "naq-na", "nb", "nb-no", "nb-sj", "nd", "nd-zw", "nds", "nds-de", "nds-nl", "ne", "ne-in", "ne-np", "nl", "nl-aw", "nl-be", "nl-bq", "nl-cw", "nl-nl", "nl-sr", "nl-sx", "nmg", "nmg-cm", "nn", "nn-no", "nnh", "nnh-cm", "no", "no-no", "nus", "nus-ss", "nyn", "nyn-ug", "om", "om-et", "om-ke", "or", "or-in", "os", "os-ge", "os-ru", "pa", "pa-in", "pa-pk", "pl", "pl-pl", "prg", "prg-001", "ps", "ps-af", "pt", "pt-ao", "pt-br", "pt-ch", "pt-cv", "pt-gq", "pt-gw", "pt-lu", "pt-mo", "pt-mz", "pt-pt", "pt-st", "pt-tl", "qu", "qu-bo", "qu-ec", "qu-pe", "rm", "rm-ch", "rn", "rn-bi", "ro", "ro-md", "ro-ro", "rof", "rof-tz", "ru", "ru-by", "ru-kg", "ru-kz", "ru-md", "ru-ru", "ru-ua", "rw", "rw-rw", "rwk", "rwk-tz", "sa", "sah", "sah-ru", "saq", "saq-ke", "sbp", "sbp-tz", "sd", "sd-pk", "se", "se-fi", "se-no", "se-se", "seh", "seh-mz", "ses", "ses-ml", "sg", "sg-cf", "shi", "shi-ma", "si", "si-lk", "sk", "sk-sk", "sl", "sl-si", "smn", "smn-fi", "sn", "sn-zw", "so", "so-dj", "so-et", "so-ke", "so-so", "sq", "sq-al", "sq-mk", "sq-xk", "sr", "sr-ba", "sr-cs", "sr-me", "sr-rs", "sr-xk", "sv", "sv-ax", "sv-fi", "sv-se", "sw", "sw-cd", "sw-ke", "sw-tz", "sw-ug", "sy", "ta", "ta-in", "ta-lk", "ta-my", "ta-sg", "te", "te-in", "teo", "teo-ke", "teo-ug", "tg", "tg-tj", "th", "th-th", "ti", "ti-er", "ti-et", "tk", "tk-tm", "to", "to-to", "tr", "tr-cy", "tr-tr", "tt", "tt-ru", "twq", "twq-ne", "tzm", "tzm-ma", "ug", "ug-cn", "uk", "uk-ua", "ur", "ur-in", "ur-pk", "uz", "uz-af", "uz-uz", "vai", "vai-lr", "vi", "vi-vn", "vo", "vo-001", "vun", "vun-tz", "wae", "wae-ch", "wo", "wo-sn", "xog", "xog-ug", "yav", "yav-cm", "yo", "yo-bj", "yo-ng", "yue", "yue-cn", "yue-hk", "zgh", "zgh-ma", "zh", "zh-cn", "zh-hk", "zh-mo", "zh-sg", "zh-tw", "zh-hans", "zh-hant", "zu", "zu-za"]
152
152
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
@@ -212,7 +212,7 @@ module Hubspot
212
212
 
213
213
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
214
214
  if @api_client.config.debugging
215
- @api_client.config.logger.debug "API called: DefaultApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ @api_client.config.logger.debug "API called: PublicApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
216
  end
217
217
  return data, status_code, headers
218
218
  end
@@ -55,21 +55,21 @@ module Hubspot
55
55
  @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
56
56
  end
57
57
 
58
- unless response.success?
59
- if config.error_handler.any?
60
- config.error_handler.each do |statuses, opts|
61
- statuses = statuses.is_a?(Integer) ? [statuses] : statuses
62
-
63
- retries = opts[:max_retries] || 5
64
- while retries > 0 && statuses.include?(response.code)
65
- sleep opts[:seconds_delay] if opts[:seconds_delay]
66
- response = request.run
67
- opts[:retry_block].call if opts[:retry_block]
68
- retries -= 1
69
- end
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
70
68
  end
71
69
  end
70
+ end
72
71
 
72
+ unless response.success?
73
73
  if response.timed_out?
74
74
  fail ApiError.new('Connection timed out')
75
75
  elsif response.code == 0
@@ -16,10 +16,10 @@ module Hubspot
16
16
  module Cms
17
17
  module SiteSearch
18
18
  class SearchHitField
19
- attr_accessor :values
20
-
21
19
  attr_accessor :metadata_field
22
20
 
21
+ attr_accessor :values
22
+
23
23
  attr_accessor :name
24
24
 
25
25
  attr_accessor :value
@@ -27,8 +27,8 @@ module Hubspot
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
28
28
  def self.attribute_map
29
29
  {
30
- :'values' => :'values',
31
30
  :'metadata_field' => :'metadataField',
31
+ :'values' => :'values',
32
32
  :'name' => :'name',
33
33
  :'value' => :'value'
34
34
  }
@@ -37,8 +37,8 @@ module Hubspot
37
37
  # Attribute type mapping.
38
38
  def self.openapi_types
39
39
  {
40
- :'values' => :'Array<Object>',
41
40
  :'metadata_field' => :'Boolean',
41
+ :'values' => :'Array<Object>',
42
42
  :'name' => :'String',
43
43
  :'value' => :'Object'
44
44
  }
@@ -65,16 +65,16 @@ module Hubspot
65
65
  h[k.to_sym] = v
66
66
  }
67
67
 
68
+ if attributes.key?(:'metadata_field')
69
+ self.metadata_field = attributes[:'metadata_field']
70
+ end
71
+
68
72
  if attributes.key?(:'values')
69
73
  if (value = attributes[:'values']).is_a?(Array)
70
74
  self.values = value
71
75
  end
72
76
  end
73
77
 
74
- if attributes.key?(:'metadata_field')
75
- self.metadata_field = attributes[:'metadata_field']
76
- end
77
-
78
78
  if attributes.key?(:'name')
79
79
  self.name = attributes[:'name']
80
80
  end
@@ -88,14 +88,14 @@ module Hubspot
88
88
  # @return Array for valid properties with the reasons
89
89
  def list_invalid_properties
90
90
  invalid_properties = Array.new
91
- if @values.nil?
92
- invalid_properties.push('invalid value for "values", values cannot be nil.')
93
- end
94
-
95
91
  if @metadata_field.nil?
96
92
  invalid_properties.push('invalid value for "metadata_field", metadata_field cannot be nil.')
97
93
  end
98
94
 
95
+ if @values.nil?
96
+ invalid_properties.push('invalid value for "values", values cannot be nil.')
97
+ end
98
+
99
99
  if @name.nil?
100
100
  invalid_properties.push('invalid value for "name", name cannot be nil.')
101
101
  end
@@ -110,8 +110,8 @@ module Hubspot
110
110
  # Check to see if the all the properties in the model are valid
111
111
  # @return true if the model is valid
112
112
  def valid?
113
- return false if @values.nil?
114
113
  return false if @metadata_field.nil?
114
+ return false if @values.nil?
115
115
  return false if @name.nil?
116
116
  return false if @value.nil?
117
117
  true
@@ -122,8 +122,8 @@ module Hubspot
122
122
  def ==(o)
123
123
  return true if self.equal?(o)
124
124
  self.class == o.class &&
125
- values == o.values &&
126
125
  metadata_field == o.metadata_field &&
126
+ values == o.values &&
127
127
  name == o.name &&
128
128
  value == o.value
129
129
  end
@@ -137,7 +137,7 @@ module Hubspot
137
137
  # Calculates hash code according to all attributes.
138
138
  # @return [Integer] Hash code
139
139
  def hash
140
- [values, metadata_field, name, value].hash
140
+ [metadata_field, values, name, value].hash
141
141
  end
142
142
 
143
143
  # Builds the object from hash
@@ -55,21 +55,21 @@ module Hubspot
55
55
  @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
56
56
  end
57
57
 
58
- unless response.success?
59
- if config.error_handler.any?
60
- config.error_handler.each do |statuses, opts|
61
- statuses = statuses.is_a?(Integer) ? [statuses] : statuses
62
-
63
- retries = opts[:max_retries] || 5
64
- while retries > 0 && statuses.include?(response.code)
65
- sleep opts[:seconds_delay] if opts[:seconds_delay]
66
- response = request.run
67
- opts[:retry_block].call if opts[:retry_block]
68
- retries -= 1
69
- end
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
70
68
  end
71
69
  end
70
+ end
72
71
 
72
+ unless response.success?
73
73
  if response.timed_out?
74
74
  fail ApiError.new('Connection timed out')
75
75
  elsif response.code == 0
@@ -0,0 +1,80 @@
1
+ =begin
2
+ #Subscriptions
3
+
4
+ #Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
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 'cgi'
14
+
15
+ module Hubspot
16
+ module CommunicationPreferences
17
+ class DefinitionApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client = ApiClient.default)
21
+ @api_client = api_client
22
+ end
23
+ # Get subscription definitions
24
+ # Get a list of all subscription definitions for the portal
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [SubscriptionDefinitionsResponse]
27
+ def get_page(opts = {})
28
+ data, _status_code, _headers = get_page_with_http_info(opts)
29
+ data
30
+ end
31
+
32
+ # Get subscription definitions
33
+ # Get a list of all subscription definitions for the portal
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(SubscriptionDefinitionsResponse, Integer, Hash)>] SubscriptionDefinitionsResponse data, response status code and response headers
36
+ def get_page_with_http_info(opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: DefinitionApi.get_page ...'
39
+ end
40
+ # resource path
41
+ local_var_path = '/communication-preferences/v3/definitions'
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ # return_type
58
+ return_type = opts[:return_type] || 'SubscriptionDefinitionsResponse'
59
+
60
+ # auth_names
61
+ auth_names = opts[:auth_names] || ['hapikey']
62
+
63
+ new_options = opts.merge(
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: DefinitionApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,214 @@
1
+ =begin
2
+ #Subscriptions
3
+
4
+ #Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
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 'cgi'
14
+
15
+ module Hubspot
16
+ module CommunicationPreferences
17
+ class StatusApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client = ApiClient.default)
21
+ @api_client = api_client
22
+ end
23
+ # Get subscription statuses for a contact
24
+ # Returns a list of subscriptions and their status for a given contact.
25
+ # @param email_address [String]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [PublicSubscriptionStatusesResponse]
28
+ def get_email_status(email_address, opts = {})
29
+ data, _status_code, _headers = get_email_status_with_http_info(email_address, opts)
30
+ data
31
+ end
32
+
33
+ # Get subscription statuses for a contact
34
+ # Returns a list of subscriptions and their status for a given contact.
35
+ # @param email_address [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(PublicSubscriptionStatusesResponse, Integer, Hash)>] PublicSubscriptionStatusesResponse data, response status code and response headers
38
+ def get_email_status_with_http_info(email_address, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: StatusApi.get_email_status ...'
41
+ end
42
+ # verify the required parameter 'email_address' is set
43
+ if @api_client.config.client_side_validation && email_address.nil?
44
+ fail ArgumentError, "Missing the required parameter 'email_address' when calling StatusApi.get_email_status"
45
+ end
46
+ # resource path
47
+ local_var_path = '/communication-preferences/v3/status/email/{emailAddress}'.sub('{' + 'emailAddress' + '}', CGI.escape(email_address.to_s))
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:body]
62
+
63
+ # return_type
64
+ return_type = opts[:return_type] || 'PublicSubscriptionStatusesResponse'
65
+
66
+ # auth_names
67
+ auth_names = opts[:auth_names] || ['hapikey']
68
+
69
+ new_options = opts.merge(
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: StatusApi#get_email_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Subscribe a contact
86
+ # Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
87
+ # @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [PublicSubscriptionStatus]
90
+ def subscribe(public_update_subscription_status_request, opts = {})
91
+ data, _status_code, _headers = subscribe_with_http_info(public_update_subscription_status_request, opts)
92
+ data
93
+ end
94
+
95
+ # Subscribe a contact
96
+ # Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
97
+ # @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
100
+ def subscribe_with_http_info(public_update_subscription_status_request, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: StatusApi.subscribe ...'
103
+ end
104
+ # verify the required parameter 'public_update_subscription_status_request' is set
105
+ if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
106
+ fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.subscribe"
107
+ end
108
+ # resource path
109
+ local_var_path = '/communication-preferences/v3/subscribe'
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
118
+ # HTTP header 'Content-Type'
119
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
120
+
121
+ # form parameters
122
+ form_params = opts[:form_params] || {}
123
+
124
+ # http body (model)
125
+ post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
126
+
127
+ # return_type
128
+ return_type = opts[:return_type] || 'PublicSubscriptionStatus'
129
+
130
+ # auth_names
131
+ auth_names = opts[:auth_names] || ['hapikey']
132
+
133
+ new_options = opts.merge(
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: StatusApi#subscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Unsubscribe a contact
150
+ # Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
151
+ # @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [PublicSubscriptionStatus]
154
+ def unsubscribe(public_update_subscription_status_request, opts = {})
155
+ data, _status_code, _headers = unsubscribe_with_http_info(public_update_subscription_status_request, opts)
156
+ data
157
+ end
158
+
159
+ # Unsubscribe a contact
160
+ # Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
161
+ # @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
162
+ # @param [Hash] opts the optional parameters
163
+ # @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
164
+ def unsubscribe_with_http_info(public_update_subscription_status_request, opts = {})
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug 'Calling API: StatusApi.unsubscribe ...'
167
+ end
168
+ # verify the required parameter 'public_update_subscription_status_request' is set
169
+ if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
170
+ fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.unsubscribe"
171
+ end
172
+ # resource path
173
+ local_var_path = '/communication-preferences/v3/unsubscribe'
174
+
175
+ # query parameters
176
+ query_params = opts[:query_params] || {}
177
+
178
+ # header parameters
179
+ header_params = opts[:header_params] || {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
182
+ # HTTP header 'Content-Type'
183
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
184
+
185
+ # form parameters
186
+ form_params = opts[:form_params] || {}
187
+
188
+ # http body (model)
189
+ post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
190
+
191
+ # return_type
192
+ return_type = opts[:return_type] || 'PublicSubscriptionStatus'
193
+
194
+ # auth_names
195
+ auth_names = opts[:auth_names] || ['hapikey']
196
+
197
+ new_options = opts.merge(
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type
204
+ )
205
+
206
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
207
+ if @api_client.config.debugging
208
+ @api_client.config.logger.debug "API called: StatusApi#unsubscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ end
210
+ return data, status_code, headers
211
+ end
212
+ end
213
+ end
214
+ end