hubspot-api-client 2.3.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +2 -31
  4. data/lib/hubspot-api-client.rb +176 -208
  5. data/lib/hubspot/codegen/crm/associations/api/batch_api.rb +22 -22
  6. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +8 -8
  7. data/lib/hubspot/codegen/crm/associations/api_client.rb +3 -3
  8. data/lib/hubspot/codegen/crm/associations/api_error.rb +2 -2
  9. data/lib/hubspot/codegen/crm/associations/configuration.rb +1 -1
  10. data/lib/hubspot/codegen/crm/associations/models/associated_id.rb +1 -1
  11. data/lib/hubspot/codegen/crm/associations/models/batch_input_public_association.rb +2 -2
  12. data/lib/hubspot/codegen/crm/associations/models/batch_input_public_object_id.rb +1 -1
  13. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association.rb +1 -1
  14. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi.rb +1 -1
  15. data/lib/hubspot/codegen/crm/associations/models/collection_response_public_association_definiton.rb +1 -1
  16. data/lib/hubspot/codegen/crm/associations/models/error.rb +1 -1
  17. data/lib/hubspot/codegen/crm/associations/models/error_detail.rb +1 -1
  18. data/lib/hubspot/codegen/crm/associations/models/next_page.rb +1 -1
  19. data/lib/hubspot/codegen/crm/associations/models/paging.rb +1 -1
  20. data/lib/hubspot/codegen/crm/associations/models/public_association.rb +1 -1
  21. data/lib/hubspot/codegen/crm/associations/models/public_association_definiton.rb +1 -1
  22. data/lib/hubspot/codegen/crm/associations/models/public_association_multi.rb +1 -1
  23. data/lib/hubspot/codegen/crm/associations/models/public_object_id.rb +2 -2
  24. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +26 -26
  25. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +1 -1
  26. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +21 -21
  27. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +1 -1
  28. data/lib/hubspot/codegen/crm/companies/api_client.rb +3 -3
  29. data/lib/hubspot/codegen/crm/companies/api_error.rb +2 -2
  30. data/lib/hubspot/codegen/crm/companies/configuration.rb +1 -1
  31. data/lib/hubspot/codegen/crm/companies/models/associated_id.rb +1 -1
  32. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_batch_input.rb +2 -2
  33. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_id.rb +2 -2
  34. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_input.rb +2 -2
  35. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -1
  36. data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object.rb +1 -1
  37. data/lib/hubspot/codegen/crm/companies/models/collection_response_associated_id.rb +1 -1
  38. data/lib/hubspot/codegen/crm/companies/models/collection_response_simple_public_object.rb +2 -2
  39. data/lib/hubspot/codegen/crm/companies/models/collection_response_with_total_simple_public_object.rb +2 -2
  40. data/lib/hubspot/codegen/crm/companies/models/error.rb +1 -1
  41. data/lib/hubspot/codegen/crm/companies/models/error_detail.rb +1 -1
  42. data/lib/hubspot/codegen/crm/companies/models/filter.rb +4 -4
  43. data/lib/hubspot/codegen/crm/companies/models/filter_group.rb +2 -2
  44. data/lib/hubspot/codegen/crm/companies/models/next_page.rb +2 -2
  45. data/lib/hubspot/codegen/crm/companies/models/paging.rb +2 -2
  46. data/lib/hubspot/codegen/crm/companies/models/public_object_search_request.rb +2 -2
  47. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +1 -1
  48. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +2 -2
  49. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_id.rb +2 -2
  50. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +1 -1
  51. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +26 -26
  52. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +1 -1
  53. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +21 -21
  54. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +1 -1
  55. data/lib/hubspot/codegen/crm/contacts/api_client.rb +3 -3
  56. data/lib/hubspot/codegen/crm/contacts/api_error.rb +2 -2
  57. data/lib/hubspot/codegen/crm/contacts/configuration.rb +1 -1
  58. data/lib/hubspot/codegen/crm/contacts/models/associated_id.rb +1 -1
  59. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_batch_input.rb +2 -2
  60. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_id.rb +2 -2
  61. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_input.rb +2 -2
  62. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -1
  63. data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object.rb +1 -1
  64. data/lib/hubspot/codegen/crm/contacts/models/collection_response_associated_id.rb +1 -1
  65. data/lib/hubspot/codegen/crm/contacts/models/collection_response_simple_public_object.rb +2 -2
  66. data/lib/hubspot/codegen/crm/contacts/models/collection_response_with_total_simple_public_object.rb +2 -2
  67. data/lib/hubspot/codegen/crm/contacts/models/error.rb +1 -1
  68. data/lib/hubspot/codegen/crm/contacts/models/error_detail.rb +1 -1
  69. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +1 -1
  70. data/lib/hubspot/codegen/crm/contacts/models/filter_group.rb +2 -2
  71. data/lib/hubspot/codegen/crm/contacts/models/next_page.rb +2 -2
  72. data/lib/hubspot/codegen/crm/contacts/models/paging.rb +2 -2
  73. data/lib/hubspot/codegen/crm/contacts/models/public_object_search_request.rb +2 -2
  74. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +1 -1
  75. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -2
  76. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_id.rb +2 -2
  77. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +2 -2
  78. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +26 -26
  79. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +1 -1
  80. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +21 -21
  81. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +1 -1
  82. data/lib/hubspot/codegen/crm/deals/api_client.rb +3 -3
  83. data/lib/hubspot/codegen/crm/deals/api_error.rb +2 -2
  84. data/lib/hubspot/codegen/crm/deals/configuration.rb +1 -1
  85. data/lib/hubspot/codegen/crm/deals/models/associated_id.rb +1 -1
  86. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_batch_input.rb +2 -2
  87. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_id.rb +2 -2
  88. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_input.rb +2 -2
  89. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -1
  90. data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object.rb +1 -1
  91. data/lib/hubspot/codegen/crm/deals/models/collection_response_associated_id.rb +1 -1
  92. data/lib/hubspot/codegen/crm/deals/models/collection_response_simple_public_object.rb +2 -2
  93. data/lib/hubspot/codegen/crm/deals/models/collection_response_with_total_simple_public_object.rb +2 -2
  94. data/lib/hubspot/codegen/crm/deals/models/error.rb +1 -1
  95. data/lib/hubspot/codegen/crm/deals/models/error_detail.rb +1 -1
  96. data/lib/hubspot/codegen/crm/deals/models/filter.rb +1 -1
  97. data/lib/hubspot/codegen/crm/deals/models/filter_group.rb +2 -2
  98. data/lib/hubspot/codegen/crm/deals/models/next_page.rb +2 -2
  99. data/lib/hubspot/codegen/crm/deals/models/paging.rb +2 -2
  100. data/lib/hubspot/codegen/crm/deals/models/public_object_search_request.rb +2 -2
  101. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +1 -1
  102. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -2
  103. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_id.rb +2 -2
  104. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +2 -2
  105. data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +1 -1
  106. data/lib/hubspot/codegen/crm/extensions/cards/api/sample_response_api.rb +1 -1
  107. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +2 -2
  108. data/lib/hubspot/codegen/crm/extensions/cards/api_error.rb +4 -4
  109. data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +1 -1
  110. data/lib/hubspot/codegen/crm/extensions/cards/models/action_confirmation_body.rb +1 -1
  111. data/lib/hubspot/codegen/crm/extensions/cards/models/action_hook_action_body.rb +1 -1
  112. data/lib/hubspot/codegen/crm/extensions/cards/models/card_actions.rb +1 -2
  113. data/lib/hubspot/codegen/crm/extensions/cards/models/card_create_request.rb +1 -2
  114. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_body.rb +1 -2
  115. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_property.rb +1 -2
  116. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body.rb +1 -2
  117. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body_patch.rb +0 -1
  118. data/lib/hubspot/codegen/crm/extensions/cards/models/card_list_response.rb +1 -2
  119. data/lib/hubspot/codegen/crm/extensions/cards/models/card_object_type_body.rb +1 -1
  120. data/lib/hubspot/codegen/crm/extensions/cards/models/card_patch_request.rb +1 -2
  121. data/lib/hubspot/codegen/crm/extensions/cards/models/card_response.rb +1 -2
  122. data/lib/hubspot/codegen/crm/extensions/cards/models/display_option.rb +1 -2
  123. data/lib/hubspot/codegen/crm/extensions/cards/models/error.rb +1 -1
  124. data/lib/hubspot/codegen/crm/extensions/cards/models/error_detail.rb +1 -1
  125. data/lib/hubspot/codegen/crm/extensions/cards/models/i_frame_action_body.rb +1 -1
  126. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_card_payload_response.rb +1 -2
  127. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_object_result.rb +2 -2
  128. data/lib/hubspot/codegen/crm/extensions/cards/models/object_token.rb +1 -1
  129. data/lib/hubspot/codegen/crm/extensions/cards/models/top_level_actions.rb +2 -2
  130. data/lib/hubspot/codegen/crm/imports/api/core_api.rb +279 -0
  131. data/lib/hubspot/codegen/crm/imports/api_client.rb +422 -0
  132. data/lib/hubspot/codegen/crm/imports/api_error.rb +61 -0
  133. data/lib/hubspot/codegen/crm/imports/configuration.rb +258 -0
  134. data/lib/hubspot/codegen/crm/{timeline/models/divide_numbers.rb → imports/models/action_response.rb} +54 -48
  135. data/lib/hubspot/codegen/crm/{timeline/models/now.rb → imports/models/collection_response_public_import_response.rb} +25 -79
  136. data/lib/hubspot/codegen/crm/{timeline/models/date.rb → imports/models/error.rb} +82 -70
  137. data/lib/hubspot/codegen/crm/{timeline/models/add_numbers.rb → imports/models/error_detail.rb} +51 -73
  138. data/lib/hubspot/codegen/crm/{timeline/models/model_or.rb → imports/models/next_page.rb} +24 -80
  139. data/lib/hubspot/codegen/crm/{timeline/models/month.rb → imports/models/paging.rb} +15 -85
  140. data/lib/hubspot/codegen/crm/{timeline/models/pipeline_probability.rb → imports/models/public_import_metadata.rb} +48 -76
  141. data/lib/hubspot/codegen/crm/{timeline/models/contains.rb → imports/models/public_import_response.rb} +93 -57
  142. data/lib/hubspot/codegen/crm/{timeline/models/xor.rb → imports/models/public_object_list_record.rb} +31 -80
  143. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +26 -26
  144. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +1 -1
  145. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +21 -21
  146. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +1 -1
  147. data/lib/hubspot/codegen/crm/line_items/api_client.rb +3 -3
  148. data/lib/hubspot/codegen/crm/line_items/api_error.rb +2 -2
  149. data/lib/hubspot/codegen/crm/line_items/configuration.rb +1 -1
  150. data/lib/hubspot/codegen/crm/line_items/models/associated_id.rb +1 -1
  151. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_batch_input.rb +2 -2
  152. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_id.rb +2 -2
  153. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_input.rb +2 -2
  154. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +1 -1
  155. data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object.rb +1 -1
  156. data/lib/hubspot/codegen/crm/line_items/models/collection_response_associated_id.rb +1 -1
  157. data/lib/hubspot/codegen/crm/line_items/models/collection_response_simple_public_object.rb +2 -2
  158. data/lib/hubspot/codegen/crm/line_items/models/collection_response_with_total_simple_public_object.rb +2 -2
  159. data/lib/hubspot/codegen/crm/line_items/models/error.rb +1 -1
  160. data/lib/hubspot/codegen/crm/line_items/models/error_detail.rb +1 -1
  161. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +1 -1
  162. data/lib/hubspot/codegen/crm/line_items/models/filter_group.rb +2 -2
  163. data/lib/hubspot/codegen/crm/line_items/models/next_page.rb +2 -2
  164. data/lib/hubspot/codegen/crm/line_items/models/paging.rb +2 -2
  165. data/lib/hubspot/codegen/crm/line_items/models/public_object_search_request.rb +2 -2
  166. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +1 -1
  167. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_batch_input.rb +2 -2
  168. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_id.rb +2 -2
  169. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_input.rb +2 -2
  170. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +1 -1
  171. data/lib/hubspot/codegen/crm/owners/api_client.rb +3 -3
  172. data/lib/hubspot/codegen/crm/owners/api_error.rb +2 -2
  173. data/lib/hubspot/codegen/crm/owners/configuration.rb +1 -1
  174. data/lib/hubspot/codegen/crm/owners/models/collection_response_public_owner.rb +1 -1
  175. data/lib/hubspot/codegen/crm/owners/models/error.rb +2 -2
  176. data/lib/hubspot/codegen/crm/owners/models/error_detail.rb +2 -2
  177. data/lib/hubspot/codegen/crm/owners/models/next_page.rb +3 -3
  178. data/lib/hubspot/codegen/crm/owners/models/paging.rb +3 -3
  179. data/lib/hubspot/codegen/crm/owners/models/public_owner.rb +2 -2
  180. data/lib/hubspot/codegen/crm/owners/models/public_team.rb +3 -3
  181. data/lib/hubspot/codegen/crm/pipelines/api/pipeline_stages_api.rb +2 -2
  182. data/lib/hubspot/codegen/crm/pipelines/api/pipelines_api.rb +1 -1
  183. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +3 -3
  184. data/lib/hubspot/codegen/crm/pipelines/api_error.rb +2 -2
  185. data/lib/hubspot/codegen/crm/pipelines/configuration.rb +2 -2
  186. data/lib/hubspot/codegen/crm/pipelines/models/collection_response_pipeline.rb +2 -2
  187. data/lib/hubspot/codegen/crm/pipelines/models/collection_response_pipeline_stage.rb +2 -2
  188. data/lib/hubspot/codegen/crm/pipelines/models/error.rb +1 -1
  189. data/lib/hubspot/codegen/crm/pipelines/models/error_detail.rb +1 -1
  190. data/lib/hubspot/codegen/crm/pipelines/models/next_page.rb +2 -2
  191. data/lib/hubspot/codegen/crm/pipelines/models/paging.rb +2 -2
  192. data/lib/hubspot/codegen/crm/pipelines/models/pipeline.rb +2 -3
  193. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_input.rb +2 -3
  194. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_patch_input.rb +2 -3
  195. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage.rb +2 -3
  196. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage_input.rb +2 -3
  197. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage_patch_input.rb +2 -3
  198. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +26 -26
  199. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +1 -1
  200. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +21 -21
  201. data/lib/hubspot/codegen/crm/products/api/search_api.rb +2 -2
  202. data/lib/hubspot/codegen/crm/products/api_client.rb +3 -3
  203. data/lib/hubspot/codegen/crm/products/api_error.rb +2 -2
  204. data/lib/hubspot/codegen/crm/products/configuration.rb +2 -2
  205. data/lib/hubspot/codegen/crm/products/models/associated_id.rb +1 -1
  206. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_batch_input.rb +3 -3
  207. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_id.rb +2 -2
  208. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_input.rb +2 -2
  209. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
  210. data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object.rb +1 -1
  211. data/lib/hubspot/codegen/crm/products/models/collection_response_associated_id.rb +1 -1
  212. data/lib/hubspot/codegen/crm/products/models/collection_response_simple_public_object.rb +2 -2
  213. data/lib/hubspot/codegen/crm/products/models/collection_response_with_total_simple_public_object.rb +2 -2
  214. data/lib/hubspot/codegen/crm/products/models/error.rb +1 -1
  215. data/lib/hubspot/codegen/crm/products/models/error_detail.rb +1 -1
  216. data/lib/hubspot/codegen/crm/products/models/filter.rb +1 -1
  217. data/lib/hubspot/codegen/crm/products/models/filter_group.rb +2 -2
  218. data/lib/hubspot/codegen/crm/products/models/next_page.rb +2 -2
  219. data/lib/hubspot/codegen/crm/products/models/paging.rb +2 -2
  220. data/lib/hubspot/codegen/crm/products/models/public_object_search_request.rb +2 -2
  221. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +1 -1
  222. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input.rb +2 -2
  223. data/lib/hubspot/codegen/crm/products/models/simple_public_object_id.rb +1 -1
  224. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -1
  225. data/lib/hubspot/codegen/crm/properties/api/batch_api.rb +19 -19
  226. data/lib/hubspot/codegen/crm/properties/api/core_api.rb +1 -1
  227. data/lib/hubspot/codegen/crm/properties/api/groups_api.rb +1 -1
  228. data/lib/hubspot/codegen/crm/properties/api_client.rb +3 -3
  229. data/lib/hubspot/codegen/crm/properties/api_error.rb +2 -2
  230. data/lib/hubspot/codegen/crm/properties/configuration.rb +2 -2
  231. data/lib/hubspot/codegen/crm/properties/models/batch_input_property_create.rb +2 -2
  232. data/lib/hubspot/codegen/crm/properties/models/batch_input_property_name.rb +2 -2
  233. data/lib/hubspot/codegen/crm/properties/models/batch_read_input_property_name.rb +2 -2
  234. data/lib/hubspot/codegen/crm/properties/models/batch_response_property.rb +2 -2
  235. data/lib/hubspot/codegen/crm/properties/models/collection_response_property.rb +2 -2
  236. data/lib/hubspot/codegen/crm/properties/models/collection_response_property_group.rb +2 -2
  237. data/lib/hubspot/codegen/crm/properties/models/error.rb +1 -1
  238. data/lib/hubspot/codegen/crm/properties/models/error_detail.rb +1 -1
  239. data/lib/hubspot/codegen/crm/properties/models/next_page.rb +2 -2
  240. data/lib/hubspot/codegen/crm/properties/models/option.rb +2 -2
  241. data/lib/hubspot/codegen/crm/properties/models/option_input.rb +2 -2
  242. data/lib/hubspot/codegen/crm/properties/models/paging.rb +2 -2
  243. data/lib/hubspot/codegen/crm/properties/models/property.rb +2 -2
  244. data/lib/hubspot/codegen/crm/properties/models/property_create.rb +2 -2
  245. data/lib/hubspot/codegen/crm/properties/models/property_group.rb +2 -3
  246. data/lib/hubspot/codegen/crm/properties/models/property_group_create.rb +2 -2
  247. data/lib/hubspot/codegen/crm/properties/models/property_group_update.rb +2 -2
  248. data/lib/hubspot/codegen/crm/properties/models/property_modification_metadata.rb +2 -2
  249. data/lib/hubspot/codegen/crm/properties/models/property_name.rb +2 -2
  250. data/lib/hubspot/codegen/crm/properties/models/property_update.rb +2 -2
  251. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +26 -26
  252. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +1 -1
  253. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +21 -21
  254. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +2 -2
  255. data/lib/hubspot/codegen/crm/quotes/api_client.rb +3 -3
  256. data/lib/hubspot/codegen/crm/quotes/api_error.rb +2 -2
  257. data/lib/hubspot/codegen/crm/quotes/configuration.rb +2 -2
  258. data/lib/hubspot/codegen/crm/quotes/models/associated_id.rb +1 -1
  259. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_batch_input.rb +2 -2
  260. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_id.rb +2 -2
  261. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_input.rb +2 -2
  262. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +1 -1
  263. data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object.rb +1 -1
  264. data/lib/hubspot/codegen/crm/quotes/models/collection_response_associated_id.rb +1 -1
  265. data/lib/hubspot/codegen/crm/quotes/models/collection_response_simple_public_object.rb +2 -2
  266. data/lib/hubspot/codegen/crm/quotes/models/collection_response_with_total_simple_public_object.rb +2 -2
  267. data/lib/hubspot/codegen/crm/quotes/models/error.rb +1 -1
  268. data/lib/hubspot/codegen/crm/quotes/models/error_detail.rb +1 -1
  269. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +1 -1
  270. data/lib/hubspot/codegen/crm/quotes/models/filter_group.rb +2 -2
  271. data/lib/hubspot/codegen/crm/quotes/models/next_page.rb +1 -1
  272. data/lib/hubspot/codegen/crm/quotes/models/paging.rb +1 -1
  273. data/lib/hubspot/codegen/crm/quotes/models/public_object_search_request.rb +1 -1
  274. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_batch_input.rb +1 -1
  275. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_id.rb +1 -1
  276. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_input.rb +1 -1
  277. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +25 -25
  278. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +20 -20
  279. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +1 -1
  280. data/lib/hubspot/codegen/crm/tickets/api_client.rb +2 -2
  281. data/lib/hubspot/codegen/crm/tickets/api_error.rb +1 -1
  282. data/lib/hubspot/codegen/crm/tickets/configuration.rb +2 -2
  283. data/lib/hubspot/codegen/crm/tickets/models/associated_id.rb +1 -1
  284. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_batch_input.rb +1 -1
  285. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_id.rb +1 -1
  286. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_input.rb +1 -1
  287. data/lib/hubspot/codegen/crm/tickets/models/collection_response_associated_id.rb +1 -1
  288. data/lib/hubspot/codegen/crm/tickets/models/collection_response_simple_public_object.rb +1 -1
  289. data/lib/hubspot/codegen/crm/tickets/models/collection_response_with_total_simple_public_object.rb +1 -1
  290. data/lib/hubspot/codegen/crm/tickets/models/filter_group.rb +1 -1
  291. data/lib/hubspot/codegen/crm/tickets/models/next_page.rb +1 -1
  292. data/lib/hubspot/codegen/crm/tickets/models/paging.rb +1 -1
  293. data/lib/hubspot/codegen/crm/tickets/models/public_object_search_request.rb +1 -1
  294. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +1 -1
  295. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_id.rb +2 -2
  296. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +2 -2
  297. data/lib/hubspot/codegen/crm/timeline/api/events_api.rb +1 -1
  298. data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +34 -34
  299. data/lib/hubspot/codegen/crm/timeline/api/tokens_api.rb +24 -24
  300. data/lib/hubspot/codegen/crm/timeline/api_client.rb +2 -2
  301. data/lib/hubspot/codegen/crm/timeline/api_error.rb +1 -1
  302. data/lib/hubspot/codegen/crm/timeline/configuration.rb +1 -1
  303. data/lib/hubspot/codegen/crm/timeline/models/batch_input_timeline_event.rb +1 -2
  304. data/lib/hubspot/codegen/crm/timeline/models/batch_response_timeline_event_response.rb +1 -2
  305. data/lib/hubspot/codegen/crm/timeline/models/collection_response_timeline_event_template.rb +1 -2
  306. data/lib/hubspot/codegen/crm/timeline/models/error.rb +1 -1
  307. data/lib/hubspot/codegen/crm/timeline/models/error_detail.rb +1 -1
  308. data/lib/hubspot/codegen/crm/timeline/models/event_detail.rb +1 -2
  309. data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +1 -1
  310. data/lib/hubspot/codegen/crm/timeline/models/paging.rb +1 -1
  311. data/lib/hubspot/codegen/crm/timeline/models/timeline_event.rb +1 -2
  312. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_i_frame.rb +1 -1
  313. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_response.rb +1 -2
  314. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template.rb +1 -2
  315. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_create_request.rb +1 -2
  316. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token.rb +1 -2
  317. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_option.rb +1 -1
  318. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_update_request.rb +1 -2
  319. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_update_request.rb +1 -2
  320. data/lib/hubspot/codegen/oauth/api_client.rb +3 -3
  321. data/lib/hubspot/codegen/oauth/api_error.rb +2 -2
  322. data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
  323. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +2 -2
  324. data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +2 -2
  325. data/lib/hubspot/codegen/webhooks/api/settings_api.rb +25 -21
  326. data/lib/hubspot/codegen/webhooks/api/subscriptions_api.rb +129 -55
  327. data/lib/hubspot/codegen/webhooks/api_client.rb +1 -1
  328. data/lib/hubspot/codegen/webhooks/models/batch_input_subscription_batch_update_request.rb +215 -0
  329. data/lib/hubspot/codegen/webhooks/models/batch_response_subscription_response.rb +331 -0
  330. data/lib/hubspot/codegen/webhooks/models/settings_change_request.rb +0 -1
  331. data/lib/hubspot/codegen/webhooks/models/settings_response.rb +0 -1
  332. data/lib/hubspot/codegen/webhooks/models/subscription_batch_update_request.rb +227 -0
  333. data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +0 -1
  334. data/lib/hubspot/codegen/webhooks/models/subscription_list_response.rb +0 -1
  335. data/lib/hubspot/codegen/webhooks/models/subscription_patch_request.rb +0 -1
  336. data/lib/hubspot/codegen/webhooks/models/subscription_response.rb +0 -1
  337. data/lib/hubspot/codegen/webhooks/models/throttling_settings.rb +0 -1
  338. data/lib/hubspot/exceptions.rb +11 -0
  339. data/lib/hubspot/helpers/webhooks_helper.rb +31 -0
  340. data/lib/hubspot/version.rb +1 -1
  341. data/sample-apps/imports-contacts-app/.env.template +2 -0
  342. data/sample-apps/imports-contacts-app/.env.test.template +3 -0
  343. data/sample-apps/imports-contacts-app/.gitignore +37 -0
  344. data/sample-apps/imports-contacts-app/.rspec +1 -0
  345. data/sample-apps/imports-contacts-app/.ruby-version +1 -0
  346. data/sample-apps/imports-contacts-app/Dockerfile +22 -0
  347. data/sample-apps/imports-contacts-app/Gemfile +33 -0
  348. data/sample-apps/imports-contacts-app/Gemfile.lock +271 -0
  349. data/sample-apps/imports-contacts-app/README.md +27 -0
  350. data/sample-apps/imports-contacts-app/Rakefile +6 -0
  351. data/sample-apps/imports-contacts-app/app/assets/config/manifest.js +3 -0
  352. data/sample-apps/imports-contacts-app/app/assets/images/.keep +0 -0
  353. data/sample-apps/imports-contacts-app/app/assets/javascripts/application.js +15 -0
  354. data/sample-apps/imports-contacts-app/app/assets/javascripts/cable.js +13 -0
  355. data/sample-apps/imports-contacts-app/app/assets/javascripts/channels/.keep +0 -0
  356. data/sample-apps/imports-contacts-app/app/assets/stylesheets/application.css +87 -0
  357. data/sample-apps/imports-contacts-app/app/controllers/application_controller.rb +12 -0
  358. data/sample-apps/imports-contacts-app/app/controllers/concerns/.keep +0 -0
  359. data/sample-apps/imports-contacts-app/app/controllers/concerns/exception_handler.rb +12 -0
  360. data/sample-apps/imports-contacts-app/app/controllers/imports_controller.rb +24 -0
  361. data/sample-apps/imports-contacts-app/app/controllers/oauth/authorization_controller.rb +19 -0
  362. data/sample-apps/imports-contacts-app/app/helpers/application_helper.rb +2 -0
  363. data/sample-apps/{webhooks-contacts-app → imports-contacts-app}/app/lib/services/authorization/authorize_hubspot.rb +0 -0
  364. data/sample-apps/{webhooks-contacts-app → imports-contacts-app}/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  365. data/sample-apps/{webhooks-contacts-app → imports-contacts-app}/app/lib/services/authorization/tokens/base.rb +0 -0
  366. data/sample-apps/{webhooks-contacts-app → imports-contacts-app}/app/lib/services/authorization/tokens/generate.rb +2 -2
  367. data/sample-apps/{webhooks-contacts-app → imports-contacts-app}/app/lib/services/authorization/tokens/refresh.rb +3 -4
  368. data/sample-apps/imports-contacts-app/app/lib/services/hubspot/imports/create.rb +52 -0
  369. data/sample-apps/imports-contacts-app/app/models/application_record.rb +3 -0
  370. data/sample-apps/imports-contacts-app/app/models/concerns/.keep +0 -0
  371. data/sample-apps/imports-contacts-app/app/views/imports/index.html.erb +70 -0
  372. data/sample-apps/imports-contacts-app/app/views/layouts/application.html.erb +23 -0
  373. data/sample-apps/imports-contacts-app/app/views/oauth/authorization/login.html.erb +15 -0
  374. data/sample-apps/imports-contacts-app/app/views/shared/_header.html.erb +15 -0
  375. data/sample-apps/imports-contacts-app/bin/bundle +3 -0
  376. data/sample-apps/imports-contacts-app/bin/rails +9 -0
  377. data/sample-apps/imports-contacts-app/bin/rake +9 -0
  378. data/sample-apps/imports-contacts-app/bin/setup +36 -0
  379. data/sample-apps/imports-contacts-app/bin/spring +17 -0
  380. data/sample-apps/imports-contacts-app/bin/update +31 -0
  381. data/sample-apps/imports-contacts-app/bin/yarn +11 -0
  382. data/sample-apps/imports-contacts-app/config.ru +5 -0
  383. data/sample-apps/imports-contacts-app/config/application.rb +19 -0
  384. data/sample-apps/imports-contacts-app/config/boot.rb +3 -0
  385. data/sample-apps/imports-contacts-app/config/cable.yml +10 -0
  386. data/sample-apps/imports-contacts-app/config/database.yml +25 -0
  387. data/sample-apps/imports-contacts-app/config/environment.rb +5 -0
  388. data/sample-apps/imports-contacts-app/config/environments/development.rb +61 -0
  389. data/sample-apps/imports-contacts-app/config/environments/production.rb +94 -0
  390. data/sample-apps/imports-contacts-app/config/environments/test.rb +46 -0
  391. data/sample-apps/imports-contacts-app/config/initializers/assets.rb +14 -0
  392. data/sample-apps/imports-contacts-app/config/initializers/filter_parameter_logging.rb +4 -0
  393. data/sample-apps/imports-contacts-app/config/initializers/hubspot-api-client.rb +3 -0
  394. data/sample-apps/imports-contacts-app/config/initializers/mime_types.rb +1 -0
  395. data/sample-apps/imports-contacts-app/config/initializers/wrap_parameters.rb +14 -0
  396. data/sample-apps/imports-contacts-app/config/locales/en.yml +33 -0
  397. data/sample-apps/imports-contacts-app/config/puma.rb +34 -0
  398. data/sample-apps/imports-contacts-app/config/routes.rb +11 -0
  399. data/sample-apps/imports-contacts-app/config/spring.rb +6 -0
  400. data/sample-apps/imports-contacts-app/db/seeds.rb +7 -0
  401. data/sample-apps/imports-contacts-app/docker-compose.yml +11 -0
  402. data/sample-apps/imports-contacts-app/docker-entrypoint.sh +8 -0
  403. data/sample-apps/imports-contacts-app/lib/assets/.keep +0 -0
  404. data/sample-apps/imports-contacts-app/lib/tasks/.keep +0 -0
  405. data/sample-apps/imports-contacts-app/log/.keep +0 -0
  406. data/sample-apps/imports-contacts-app/package.json +5 -0
  407. data/sample-apps/imports-contacts-app/public/404.html +67 -0
  408. data/sample-apps/imports-contacts-app/public/422.html +67 -0
  409. data/sample-apps/imports-contacts-app/public/500.html +66 -0
  410. data/sample-apps/imports-contacts-app/public/apple-touch-icon-precomposed.png +0 -0
  411. data/sample-apps/imports-contacts-app/public/apple-touch-icon.png +0 -0
  412. data/sample-apps/imports-contacts-app/public/examples/example.csv +2 -0
  413. data/sample-apps/imports-contacts-app/public/favicon.ico +0 -0
  414. data/sample-apps/imports-contacts-app/public/robots.txt +1 -0
  415. data/sample-apps/imports-contacts-app/tmp/.keep +0 -0
  416. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
  417. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
  418. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
  419. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
  420. data/sample-apps/webhooks-contacts-app/.env.template +3 -1
  421. data/sample-apps/webhooks-contacts-app/Gemfile.lock +1 -1
  422. data/sample-apps/webhooks-contacts-app/README.md +24 -21
  423. data/sample-apps/webhooks-contacts-app/app/assets/stylesheets/application.css +7 -55
  424. data/sample-apps/webhooks-contacts-app/app/controllers/events_controller.rb +8 -10
  425. data/sample-apps/webhooks-contacts-app/app/controllers/home_controller.rb +44 -0
  426. data/sample-apps/webhooks-contacts-app/app/controllers/oauth/authorization_controller.rb +6 -6
  427. data/sample-apps/webhooks-contacts-app/app/controllers/webhooks_controller.rb +1 -1
  428. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/authorize.rb +17 -0
  429. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/get_authorization_uri.rb +35 -0
  430. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/base.rb +21 -0
  431. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/generate.rb +28 -0
  432. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/authorization/tokens/refresh.rb +35 -0
  433. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/contacts/get_batch.rb +1 -1
  434. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/webhooks/configure_target_url.rb +25 -0
  435. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/webhooks/create_or_activate_subscription.rb +44 -0
  436. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/webhooks/handle.rb +13 -1
  437. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/webhooks/pause_active_subscriptions.rb +39 -0
  438. data/sample-apps/webhooks-contacts-app/app/models/event.rb +3 -0
  439. data/sample-apps/webhooks-contacts-app/app/views/events/index.html.erb +14 -16
  440. data/sample-apps/webhooks-contacts-app/app/views/home/index.html.erb +47 -0
  441. data/sample-apps/webhooks-contacts-app/app/views/oauth/authorization/login.html.erb +6 -6
  442. data/sample-apps/webhooks-contacts-app/app/views/shared/_header.html.erb +3 -0
  443. data/sample-apps/webhooks-contacts-app/config/database.yml +9 -9
  444. data/sample-apps/webhooks-contacts-app/config/routes.rb +2 -0
  445. data/sample-apps/webhooks-contacts-app/db/schema.rb +2 -5
  446. data/sample-apps/webhooks-contacts-app/docker-compose.yml +13 -10
  447. metadata +345 -196
  448. data/lib/hubspot/codegen/crm/timeline/models/begins_with.rb +0 -294
  449. data/lib/hubspot/codegen/crm/timeline/models/boolean_property_variable.rb +0 -280
  450. data/lib/hubspot/codegen/crm/timeline/models/concat_strings.rb +0 -280
  451. data/lib/hubspot/codegen/crm/timeline/models/constant_boolean.rb +0 -280
  452. data/lib/hubspot/codegen/crm/timeline/models/constant_number.rb +0 -280
  453. data/lib/hubspot/codegen/crm/timeline/models/constant_string.rb +0 -280
  454. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_html.rb +0 -280
  455. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_text.rb +0 -280
  456. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_plain_text_email_reply.rb +0 -280
  457. data/lib/hubspot/codegen/crm/timeline/models/fetch_exchange_rate.rb +0 -280
  458. data/lib/hubspot/codegen/crm/timeline/models/has_email_reply.rb +0 -280
  459. data/lib/hubspot/codegen/crm/timeline/models/has_plain_text_email_reply.rb +0 -280
  460. data/lib/hubspot/codegen/crm/timeline/models/if_boolean.rb +0 -303
  461. data/lib/hubspot/codegen/crm/timeline/models/if_number.rb +0 -303
  462. data/lib/hubspot/codegen/crm/timeline/models/if_string.rb +0 -303
  463. data/lib/hubspot/codegen/crm/timeline/models/is_present.rb +0 -294
  464. data/lib/hubspot/codegen/crm/timeline/models/less_than.rb +0 -280
  465. data/lib/hubspot/codegen/crm/timeline/models/less_than_or_equal.rb +0 -280
  466. data/lib/hubspot/codegen/crm/timeline/models/lower_case.rb +0 -280
  467. data/lib/hubspot/codegen/crm/timeline/models/max_numbers.rb +0 -280
  468. data/lib/hubspot/codegen/crm/timeline/models/min_numbers.rb +0 -280
  469. data/lib/hubspot/codegen/crm/timeline/models/model_and.rb +0 -280
  470. data/lib/hubspot/codegen/crm/timeline/models/model_not.rb +0 -280
  471. data/lib/hubspot/codegen/crm/timeline/models/more_than.rb +0 -280
  472. data/lib/hubspot/codegen/crm/timeline/models/more_than_or_equal.rb +0 -280
  473. data/lib/hubspot/codegen/crm/timeline/models/multiply_numbers.rb +0 -280
  474. data/lib/hubspot/codegen/crm/timeline/models/number_equals.rb +0 -280
  475. data/lib/hubspot/codegen/crm/timeline/models/number_property_variable.rb +0 -280
  476. data/lib/hubspot/codegen/crm/timeline/models/number_to_string.rb +0 -280
  477. data/lib/hubspot/codegen/crm/timeline/models/parse_number.rb +0 -280
  478. data/lib/hubspot/codegen/crm/timeline/models/period_to_months.rb +0 -280
  479. data/lib/hubspot/codegen/crm/timeline/models/round_down_numbers.rb +0 -280
  480. data/lib/hubspot/codegen/crm/timeline/models/round_up_numbers.rb +0 -280
  481. data/lib/hubspot/codegen/crm/timeline/models/string_equals.rb +0 -280
  482. data/lib/hubspot/codegen/crm/timeline/models/string_property_variable.rb +0 -280
  483. data/lib/hubspot/codegen/crm/timeline/models/subtract_numbers.rb +0 -280
  484. data/lib/hubspot/codegen/crm/timeline/models/time_between.rb +0 -280
  485. data/lib/hubspot/codegen/crm/timeline/models/upper_case.rb +0 -280
  486. data/lib/hubspot/codegen/crm/timeline/models/year.rb +0 -280
@@ -14,7 +14,6 @@ require 'date'
14
14
 
15
15
  module Hubspot
16
16
  module Webhooks
17
- # New webhook settings for an app.
18
17
  class SubscriptionCreateRequest
19
18
  attr_accessor :active
20
19
 
@@ -14,7 +14,6 @@ require 'date'
14
14
 
15
15
  module Hubspot
16
16
  module Webhooks
17
- # List of event subscriptions for your app
18
17
  class SubscriptionListResponse
19
18
  # List of event subscriptions for your app
20
19
  attr_accessor :results
@@ -14,7 +14,6 @@ require 'date'
14
14
 
15
15
  module Hubspot
16
16
  module Webhooks
17
- # Updated details for the subscription.
18
17
  class SubscriptionPatchRequest
19
18
  # Determines if the subscription is active or paused.
20
19
  attr_accessor :enabled
@@ -14,7 +14,6 @@ require 'date'
14
14
 
15
15
  module Hubspot
16
16
  module Webhooks
17
- # Complete details for an event subscription.
18
17
  class SubscriptionResponse
19
18
  # The unique ID of the subscription.
20
19
  attr_accessor :id
@@ -14,7 +14,6 @@ require 'date'
14
14
 
15
15
  module Hubspot
16
16
  module Webhooks
17
- # Configuration details for webhook throttling.
18
17
  class ThrottlingSettings
19
18
  # The maximum number of HTTP requests HubSpot will attempt to make to your app in a given time frame determined by `period`.
20
19
  attr_accessor :max_concurrent_requests
@@ -1,3 +1,14 @@
1
1
  module Hubspot
2
2
  class ConfigurationError < StandardError; end
3
+
4
+ class InvalidSignatureError < StandardError
5
+ def initialize(msg: nil, signature: nil, signature_version: nil, hash_result: nil)
6
+ @signature = signature
7
+ @signature_version = signature_version
8
+ @hash_result = hash_result
9
+ msg = "Invalid signature passed to request" if msg.nil?
10
+
11
+ super(msg)
12
+ end
13
+ end
3
14
  end
@@ -0,0 +1,31 @@
1
+ module Hubspot
2
+ module Helpers
3
+ class WebhooksHelper
4
+ def self.validate_signature(
5
+ signature:,
6
+ client_secret:,
7
+ http_uri:,
8
+ request_body:,
9
+ http_method: 'POST',
10
+ signature_version: 'v2'
11
+ )
12
+
13
+ if signature_version == 'v1'
14
+ source_string = client_secret + request_body.to_s
15
+ else
16
+ source_string = client_secret + http_method + http_uri + request_body.to_s
17
+ end
18
+
19
+ hash_result = Digest::SHA2.hexdigest(source_string.encode('utf-8'))
20
+
21
+ if hash_result != signature
22
+ raise InvalidSignatureError.new(
23
+ signature: signature,
24
+ signature_version: signature_version,
25
+ hash_result: hash_result
26
+ )
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,3 +1,3 @@
1
1
  module Hubspot
2
- VERSION = '2.3.2'
2
+ VERSION = '3.3.0'
3
3
  end
@@ -0,0 +1,2 @@
1
+ HUBSPOT_CLIENT_ID=
2
+ HUBSPOT_CLIENT_SECRET=
@@ -0,0 +1,3 @@
1
+ HUBSPOT_EMAIL=
2
+ HUBSPOT_PASSWORD=
3
+ HUBSPOT_USER_ID=
@@ -0,0 +1,37 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ # Ignore uploaded files in development
21
+ /storage/*
22
+ !/storage/.keep
23
+
24
+ /node_modules
25
+ /yarn-error.log
26
+
27
+ /public/assets
28
+ .byebug_history
29
+
30
+ # Ignore master key for decrypting credentials and more.
31
+ /config/master.key
32
+
33
+ .rubocop.yml
34
+ .env
35
+ .env.test
36
+
37
+ /public/uploads
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,22 @@
1
+ FROM ruby:2.6.3
2
+ RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
3
+ RUN mkdir /hubspot-api-client
4
+
5
+ COPY ./lib /hubspot-api-client/lib
6
+ COPY ./sample-apps /hubspot-api-client/sample-apps
7
+ COPY ./spec /hubspot-api-client/spec
8
+ COPY ./Gemfile /hubspot-api-client/Gemfile
9
+ COPY ./Gemfile.lock /hubspot-api-client/Gemfile.lock
10
+ COPY ./hubspot-api-client.gemspec /hubspot-api-client/hubspot-api-client.gemspec
11
+
12
+ WORKDIR /hubspot-api-client/sample-apps/imports-contacts-app
13
+ RUN bundle install
14
+
15
+ # Add a script to be executed every time the container starts.
16
+ COPY ./sample-apps/imports-contacts-app/docker-entrypoint.sh /usr/bin/
17
+ RUN chmod +x /usr/bin/docker-entrypoint.sh
18
+ ENTRYPOINT ["docker-entrypoint.sh"]
19
+ EXPOSE 3000
20
+
21
+ # Start the main process.
22
+ CMD ["rails", "server", "-b", "0.0.0.0"]
@@ -0,0 +1,33 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby '2.6.3'
5
+
6
+ gem 'rails', '~> 5.2.3'
7
+ gem 'sqlite3'
8
+ gem 'puma', '~> 4.3'
9
+ gem 'sass-rails', '~> 5.0'
10
+ gem 'uglifier', '>= 1.3.0'
11
+ gem 'jbuilder', '~> 2.5'
12
+ gem 'csv'
13
+
14
+ gem 'hubspot-api-client', path: '../../'
15
+
16
+ group :development, :test do
17
+ gem 'dotenv-rails', require: 'dotenv/rails-now'
18
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
19
+ gem 'rspec-rails', '~> 3.5'
20
+ gem 'capybara'
21
+ gem 'capybara-mechanize', '~> 1.11'
22
+ gem 'selenium-webdriver', '3.4.3'
23
+ gem 'geckodriver-helper'
24
+ gem 'pry'
25
+ gem 'pry-byebug'
26
+ end
27
+
28
+ group :development do
29
+ gem 'web-console', '>= 3.3.0'
30
+ gem 'listen', '>= 3.0.5', '< 3.2'
31
+ end
32
+
33
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
@@ -0,0 +1,271 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ hubspot-api-client (3.2.0)
5
+ faraday (>= 0.14.0)
6
+ json (~> 2.1, >= 2.1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.2.3)
12
+ actionpack (= 5.2.3)
13
+ nio4r (~> 2.0)
14
+ websocket-driver (>= 0.6.1)
15
+ actionmailer (5.2.3)
16
+ actionpack (= 5.2.3)
17
+ actionview (= 5.2.3)
18
+ activejob (= 5.2.3)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.2.3)
22
+ actionview (= 5.2.3)
23
+ activesupport (= 5.2.3)
24
+ rack (~> 2.0)
25
+ rack-test (>= 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.2.3)
29
+ activesupport (= 5.2.3)
30
+ builder (~> 3.1)
31
+ erubi (~> 1.4)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.2.3)
35
+ activesupport (= 5.2.3)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.2.3)
38
+ activesupport (= 5.2.3)
39
+ activerecord (5.2.3)
40
+ activemodel (= 5.2.3)
41
+ activesupport (= 5.2.3)
42
+ arel (>= 9.0)
43
+ activestorage (5.2.3)
44
+ actionpack (= 5.2.3)
45
+ activerecord (= 5.2.3)
46
+ marcel (~> 0.3.1)
47
+ activesupport (5.2.3)
48
+ concurrent-ruby (~> 1.0, >= 1.0.2)
49
+ i18n (>= 0.7, < 2)
50
+ minitest (~> 5.1)
51
+ tzinfo (~> 1.1)
52
+ addressable (2.7.0)
53
+ public_suffix (>= 2.0.2, < 5.0)
54
+ archive-zip (0.12.0)
55
+ io-like (~> 0.3.0)
56
+ arel (9.0.0)
57
+ bindex (0.8.1)
58
+ builder (3.2.3)
59
+ byebug (11.0.1)
60
+ capybara (3.29.0)
61
+ addressable
62
+ mini_mime (>= 0.1.3)
63
+ nokogiri (~> 1.8)
64
+ rack (>= 1.6.0)
65
+ rack-test (>= 0.6.3)
66
+ regexp_parser (~> 1.5)
67
+ xpath (~> 3.2)
68
+ capybara-mechanize (1.11.0)
69
+ capybara (>= 2.4.4, < 4)
70
+ mechanize (~> 2.7.0)
71
+ childprocess (0.9.0)
72
+ ffi (~> 1.0, >= 1.0.11)
73
+ coderay (1.1.2)
74
+ concurrent-ruby (1.1.5)
75
+ connection_pool (2.2.2)
76
+ crass (1.0.5)
77
+ csv (3.1.2)
78
+ diff-lcs (1.3)
79
+ domain_name (0.5.20190701)
80
+ unf (>= 0.0.5, < 1.0.0)
81
+ dotenv (2.7.5)
82
+ dotenv-rails (2.7.5)
83
+ dotenv (= 2.7.5)
84
+ railties (>= 3.2, < 6.1)
85
+ erubi (1.9.0)
86
+ execjs (2.7.0)
87
+ faraday (1.0.1)
88
+ multipart-post (>= 1.2, < 3)
89
+ ffi (1.11.1)
90
+ geckodriver-helper (0.24.0)
91
+ archive-zip (~> 0.7)
92
+ globalid (0.4.2)
93
+ activesupport (>= 4.2.0)
94
+ http-cookie (1.0.3)
95
+ domain_name (~> 0.5)
96
+ i18n (1.7.0)
97
+ concurrent-ruby (~> 1.0)
98
+ io-like (0.3.0)
99
+ jbuilder (2.9.1)
100
+ activesupport (>= 4.2.0)
101
+ json (2.3.0)
102
+ listen (3.1.5)
103
+ rb-fsevent (~> 0.9, >= 0.9.4)
104
+ rb-inotify (~> 0.9, >= 0.9.7)
105
+ ruby_dep (~> 1.2)
106
+ loofah (2.3.1)
107
+ crass (~> 1.0.2)
108
+ nokogiri (>= 1.5.9)
109
+ mail (2.7.1)
110
+ mini_mime (>= 0.1.1)
111
+ marcel (0.3.3)
112
+ mimemagic (~> 0.3.2)
113
+ mechanize (2.7.6)
114
+ domain_name (~> 0.5, >= 0.5.1)
115
+ http-cookie (~> 1.0)
116
+ mime-types (>= 1.17.2)
117
+ net-http-digest_auth (~> 1.1, >= 1.1.1)
118
+ net-http-persistent (>= 2.5.2)
119
+ nokogiri (~> 1.6)
120
+ ntlm-http (~> 0.1, >= 0.1.1)
121
+ webrobots (>= 0.0.9, < 0.2)
122
+ method_source (0.9.2)
123
+ mime-types (3.3)
124
+ mime-types-data (~> 3.2015)
125
+ mime-types-data (3.2019.1009)
126
+ mimemagic (0.3.3)
127
+ mini_mime (1.0.2)
128
+ mini_portile2 (2.4.0)
129
+ minitest (5.13.0)
130
+ multipart-post (2.1.1)
131
+ net-http-digest_auth (1.4.1)
132
+ net-http-persistent (3.1.0)
133
+ connection_pool (~> 2.2)
134
+ nio4r (2.5.2)
135
+ nokogiri (1.10.5)
136
+ mini_portile2 (~> 2.4.0)
137
+ ntlm-http (0.1.1)
138
+ pry (0.12.2)
139
+ coderay (~> 1.1.0)
140
+ method_source (~> 0.9.0)
141
+ pry-byebug (3.7.0)
142
+ byebug (~> 11.0)
143
+ pry (~> 0.10)
144
+ public_suffix (4.0.1)
145
+ puma (4.3.1)
146
+ nio4r (~> 2.0)
147
+ rack (2.2.2)
148
+ rack-test (1.1.0)
149
+ rack (>= 1.0, < 3)
150
+ rails (5.2.3)
151
+ actioncable (= 5.2.3)
152
+ actionmailer (= 5.2.3)
153
+ actionpack (= 5.2.3)
154
+ actionview (= 5.2.3)
155
+ activejob (= 5.2.3)
156
+ activemodel (= 5.2.3)
157
+ activerecord (= 5.2.3)
158
+ activestorage (= 5.2.3)
159
+ activesupport (= 5.2.3)
160
+ bundler (>= 1.3.0)
161
+ railties (= 5.2.3)
162
+ sprockets-rails (>= 2.0.0)
163
+ rails-dom-testing (2.0.3)
164
+ activesupport (>= 4.2.0)
165
+ nokogiri (>= 1.6)
166
+ rails-html-sanitizer (1.3.0)
167
+ loofah (~> 2.3)
168
+ railties (5.2.3)
169
+ actionpack (= 5.2.3)
170
+ activesupport (= 5.2.3)
171
+ method_source
172
+ rake (>= 0.8.7)
173
+ thor (>= 0.19.0, < 2.0)
174
+ rake (13.0.0)
175
+ rb-fsevent (0.10.3)
176
+ rb-inotify (0.10.0)
177
+ ffi (~> 1.0)
178
+ regexp_parser (1.6.0)
179
+ rspec-core (3.9.0)
180
+ rspec-support (~> 3.9.0)
181
+ rspec-expectations (3.9.0)
182
+ diff-lcs (>= 1.2.0, < 2.0)
183
+ rspec-support (~> 3.9.0)
184
+ rspec-mocks (3.9.0)
185
+ diff-lcs (>= 1.2.0, < 2.0)
186
+ rspec-support (~> 3.9.0)
187
+ rspec-rails (3.9.0)
188
+ actionpack (>= 3.0)
189
+ activesupport (>= 3.0)
190
+ railties (>= 3.0)
191
+ rspec-core (~> 3.9.0)
192
+ rspec-expectations (~> 3.9.0)
193
+ rspec-mocks (~> 3.9.0)
194
+ rspec-support (~> 3.9.0)
195
+ rspec-support (3.9.0)
196
+ ruby_dep (1.5.0)
197
+ rubyzip (1.3.0)
198
+ sass (3.7.4)
199
+ sass-listen (~> 4.0.0)
200
+ sass-listen (4.0.0)
201
+ rb-fsevent (~> 0.9, >= 0.9.4)
202
+ rb-inotify (~> 0.9, >= 0.9.7)
203
+ sass-rails (5.1.0)
204
+ railties (>= 5.2.0)
205
+ sass (~> 3.1)
206
+ sprockets (>= 2.8, < 4.0)
207
+ sprockets-rails (>= 2.0, < 4.0)
208
+ tilt (>= 1.1, < 3)
209
+ selenium-webdriver (3.4.3)
210
+ childprocess (~> 0.5)
211
+ rubyzip (~> 1.0)
212
+ sprockets (3.7.2)
213
+ concurrent-ruby (~> 1.0)
214
+ rack (> 1, < 3)
215
+ sprockets-rails (3.2.1)
216
+ actionpack (>= 4.0)
217
+ activesupport (>= 4.0)
218
+ sprockets (>= 3.0.0)
219
+ sqlite3 (1.4.1)
220
+ thor (0.20.3)
221
+ thread_safe (0.3.6)
222
+ tilt (2.0.10)
223
+ tzinfo (1.2.5)
224
+ thread_safe (~> 0.1)
225
+ uglifier (4.2.0)
226
+ execjs (>= 0.3.0, < 3)
227
+ unf (0.1.4)
228
+ unf_ext
229
+ unf_ext (0.0.7.6)
230
+ web-console (3.7.0)
231
+ actionview (>= 5.0)
232
+ activemodel (>= 5.0)
233
+ bindex (>= 0.4.0)
234
+ railties (>= 5.0)
235
+ webrobots (0.1.2)
236
+ websocket-driver (0.7.1)
237
+ websocket-extensions (>= 0.1.0)
238
+ websocket-extensions (0.1.4)
239
+ xpath (3.2.0)
240
+ nokogiri (~> 1.8)
241
+
242
+ PLATFORMS
243
+ ruby
244
+
245
+ DEPENDENCIES
246
+ byebug
247
+ capybara
248
+ capybara-mechanize (~> 1.11)
249
+ csv
250
+ dotenv-rails
251
+ geckodriver-helper
252
+ hubspot-api-client!
253
+ jbuilder (~> 2.5)
254
+ listen (>= 3.0.5, < 3.2)
255
+ pry
256
+ pry-byebug
257
+ puma (~> 4.3)
258
+ rails (~> 5.2.3)
259
+ rspec-rails (~> 3.5)
260
+ sass-rails (~> 5.0)
261
+ selenium-webdriver (= 3.4.3)
262
+ sqlite3
263
+ tzinfo-data
264
+ uglifier (>= 1.3.0)
265
+ web-console (>= 3.3.0)
266
+
267
+ RUBY VERSION
268
+ ruby 2.6.3p62
269
+
270
+ BUNDLED WITH
271
+ 1.17.3