hubspot-api-client 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/hubspot-api-client.rb +3 -2
  4. data/lib/hubspot/codegen/crm/associations/api/batch_api.rb +3 -3
  5. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +94 -0
  6. data/lib/hubspot/codegen/crm/associations/api_client.rb +1 -0
  7. data/lib/hubspot/codegen/crm/associations/models/associated_id.rb +229 -0
  8. data/lib/hubspot/codegen/crm/associations/models/batch_input_public_object_id.rb +1 -1
  9. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association.rb +0 -5
  10. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi.rb +0 -5
  11. data/lib/hubspot/codegen/crm/associations/models/collection_response_public_association_definiton.rb +226 -0
  12. data/lib/hubspot/codegen/crm/associations/models/error.rb +12 -2
  13. data/lib/hubspot/codegen/crm/associations/models/error_detail.rb +20 -23
  14. data/lib/hubspot/codegen/crm/associations/models/next_page.rb +224 -0
  15. data/lib/hubspot/codegen/crm/associations/models/paging.rb +210 -0
  16. data/lib/hubspot/codegen/crm/associations/models/public_association.rb +19 -5
  17. data/lib/hubspot/codegen/crm/associations/models/public_association_definiton.rb +229 -0
  18. data/lib/hubspot/codegen/crm/associations/models/public_association_multi.rb +2 -2
  19. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +42 -30
  20. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +8 -5
  21. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +2 -2
  22. data/lib/hubspot/codegen/crm/companies/api_client.rb +1 -0
  23. data/lib/hubspot/codegen/crm/companies/models/associated_id.rb +229 -0
  24. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +11 -2
  25. data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object.rb +1 -6
  26. data/lib/hubspot/codegen/crm/companies/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  27. data/lib/hubspot/codegen/crm/companies/models/error.rb +12 -2
  28. data/lib/hubspot/codegen/crm/companies/models/error_detail.rb +20 -23
  29. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +2 -12
  30. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +1 -1
  31. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +42 -30
  32. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +8 -5
  33. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +2 -2
  34. data/lib/hubspot/codegen/crm/contacts/api_client.rb +1 -0
  35. data/lib/hubspot/codegen/crm/contacts/models/associated_id.rb +229 -0
  36. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +11 -2
  37. data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object.rb +1 -6
  38. data/lib/hubspot/codegen/crm/contacts/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  39. data/lib/hubspot/codegen/crm/contacts/models/error.rb +12 -2
  40. data/lib/hubspot/codegen/crm/contacts/models/error_detail.rb +20 -23
  41. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -3
  42. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +2 -12
  43. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +42 -30
  44. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +8 -5
  45. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +2 -2
  46. data/lib/hubspot/codegen/crm/deals/api_client.rb +1 -0
  47. data/lib/hubspot/codegen/crm/deals/models/associated_id.rb +229 -0
  48. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +11 -2
  49. data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object.rb +1 -6
  50. data/lib/hubspot/codegen/crm/deals/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  51. data/lib/hubspot/codegen/crm/deals/models/error.rb +12 -2
  52. data/lib/hubspot/codegen/crm/deals/models/error_detail.rb +20 -23
  53. data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -3
  54. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +2 -12
  55. data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +36 -36
  56. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +1 -0
  57. data/lib/hubspot/codegen/crm/extensions/cards/models/card_actions.rb +5 -3
  58. data/lib/hubspot/codegen/crm/extensions/cards/models/card_create_request.rb +5 -3
  59. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_body.rb +5 -3
  60. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_property.rb +8 -3
  61. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body.rb +6 -3
  62. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body_patch.rb +7 -4
  63. data/lib/hubspot/codegen/crm/extensions/cards/models/card_list_response.rb +5 -3
  64. data/lib/hubspot/codegen/crm/extensions/cards/models/card_object_type_body.rb +5 -3
  65. data/lib/hubspot/codegen/crm/extensions/cards/models/card_patch_request.rb +5 -3
  66. data/lib/hubspot/codegen/crm/extensions/cards/models/card_response.rb +8 -3
  67. data/lib/hubspot/codegen/crm/extensions/cards/models/display_option.rb +7 -3
  68. data/lib/hubspot/codegen/crm/extensions/cards/models/error.rb +12 -2
  69. data/lib/hubspot/codegen/crm/extensions/cards/models/error_detail.rb +24 -4
  70. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +42 -30
  71. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +8 -5
  72. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +2 -2
  73. data/lib/hubspot/codegen/crm/line_items/api_client.rb +1 -0
  74. data/lib/hubspot/codegen/crm/line_items/models/associated_id.rb +229 -0
  75. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +11 -2
  76. data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object.rb +1 -6
  77. data/lib/hubspot/codegen/crm/line_items/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  78. data/lib/hubspot/codegen/crm/line_items/models/error.rb +12 -2
  79. data/lib/hubspot/codegen/crm/line_items/models/error_detail.rb +20 -23
  80. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -3
  81. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +2 -12
  82. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +2 -2
  83. data/lib/hubspot/codegen/crm/owners/api_client.rb +1 -0
  84. data/lib/hubspot/codegen/crm/owners/models/collection_response_public_owner.rb +1 -1
  85. data/lib/hubspot/codegen/crm/owners/models/error.rb +12 -2
  86. data/lib/hubspot/codegen/crm/owners/models/error_detail.rb +22 -2
  87. data/lib/hubspot/codegen/crm/owners/models/public_owner.rb +1 -6
  88. data/lib/hubspot/codegen/crm/pipelines/api/pipeline_stages_api.rb +6 -6
  89. data/lib/hubspot/codegen/crm/pipelines/api/pipelines_api.rb +7 -7
  90. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +1 -0
  91. data/lib/hubspot/codegen/crm/pipelines/models/error.rb +12 -2
  92. data/lib/hubspot/codegen/crm/pipelines/models/error_detail.rb +22 -2
  93. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +43 -31
  94. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +9 -6
  95. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +3 -3
  96. data/lib/hubspot/codegen/crm/products/api_client.rb +1 -0
  97. data/lib/hubspot/codegen/crm/products/models/associated_id.rb +229 -0
  98. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +11 -2
  99. data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object.rb +1 -6
  100. data/lib/hubspot/codegen/crm/products/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  101. data/lib/hubspot/codegen/crm/products/models/error.rb +12 -2
  102. data/lib/hubspot/codegen/crm/products/models/error_detail.rb +20 -23
  103. data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -3
  104. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +2 -12
  105. data/lib/hubspot/codegen/crm/products/models/simple_public_object_id.rb +1 -1
  106. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -1
  107. data/lib/hubspot/codegen/crm/properties/api/batch_api.rb +4 -4
  108. data/lib/hubspot/codegen/crm/properties/api/core_api.rb +6 -6
  109. data/lib/hubspot/codegen/crm/properties/api/groups_api.rb +6 -6
  110. data/lib/hubspot/codegen/crm/properties/api_client.rb +1 -0
  111. data/lib/hubspot/codegen/crm/properties/models/error.rb +12 -2
  112. data/lib/hubspot/codegen/crm/properties/models/error_detail.rb +20 -23
  113. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +43 -31
  114. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +9 -6
  115. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +3 -3
  116. data/lib/hubspot/codegen/crm/quotes/api_client.rb +1 -0
  117. data/lib/hubspot/codegen/crm/quotes/models/associated_id.rb +229 -0
  118. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +11 -2
  119. data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object.rb +1 -6
  120. data/lib/hubspot/codegen/crm/quotes/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
  121. data/lib/hubspot/codegen/crm/quotes/models/error.rb +12 -2
  122. data/lib/hubspot/codegen/crm/quotes/models/error_detail.rb +20 -23
  123. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +4 -4
  124. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +2 -12
  125. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +43 -31
  126. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +9 -6
  127. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +3 -3
  128. data/lib/hubspot/codegen/crm/tickets/api_client.rb +1 -0
  129. data/lib/hubspot/codegen/crm/tickets/models/associated_id.rb +229 -0
  130. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +11 -2
  131. data/lib/hubspot/codegen/crm/tickets/models/batch_response_simple_public_object.rb +1 -6
  132. data/lib/hubspot/codegen/crm/tickets/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +6 -6
  133. data/lib/hubspot/codegen/crm/tickets/models/error.rb +12 -2
  134. data/lib/hubspot/codegen/crm/tickets/models/error_detail.rb +20 -23
  135. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -3
  136. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +2 -12
  137. data/lib/hubspot/codegen/crm/timeline/api/events_api.rb +353 -0
  138. data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +362 -0
  139. data/lib/hubspot/codegen/crm/timeline/api/tokens_api.rb +250 -0
  140. data/lib/hubspot/codegen/crm/{objects → timeline}/api_client.rb +6 -5
  141. data/lib/hubspot/codegen/crm/{objects → timeline}/api_error.rb +4 -4
  142. data/lib/hubspot/codegen/crm/{objects → timeline}/configuration.rb +6 -6
  143. data/lib/hubspot/codegen/crm/timeline/models/add_numbers.rb +280 -0
  144. data/lib/hubspot/codegen/crm/timeline/models/batch_input_timeline_event.rb +219 -0
  145. data/lib/hubspot/codegen/crm/{objects/models/batch_response_simple_public_object.rb → timeline/models/batch_response_timeline_event_response.rb} +17 -14
  146. data/lib/hubspot/codegen/crm/timeline/models/begins_with.rb +294 -0
  147. data/lib/hubspot/codegen/crm/timeline/models/boolean_property_variable.rb +280 -0
  148. data/lib/hubspot/codegen/crm/timeline/models/collection_response_timeline_event_template.rb +228 -0
  149. data/lib/hubspot/codegen/crm/timeline/models/concat_strings.rb +280 -0
  150. data/lib/hubspot/codegen/crm/timeline/models/constant_boolean.rb +280 -0
  151. data/lib/hubspot/codegen/crm/timeline/models/constant_number.rb +280 -0
  152. data/lib/hubspot/codegen/crm/timeline/models/constant_string.rb +280 -0
  153. data/lib/hubspot/codegen/crm/timeline/models/contains.rb +294 -0
  154. data/lib/hubspot/codegen/crm/timeline/models/date.rb +280 -0
  155. data/lib/hubspot/codegen/crm/timeline/models/divide_numbers.rb +280 -0
  156. data/lib/hubspot/codegen/crm/{objects → timeline}/models/error.rb +18 -8
  157. data/lib/hubspot/codegen/crm/{objects → timeline}/models/error_detail.rb +26 -29
  158. data/lib/hubspot/codegen/crm/timeline/models/event_detail.rb +217 -0
  159. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_html.rb +280 -0
  160. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_text.rb +280 -0
  161. data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_plain_text_email_reply.rb +280 -0
  162. data/lib/hubspot/codegen/crm/timeline/models/fetch_exchange_rate.rb +280 -0
  163. data/lib/hubspot/codegen/crm/{objects/models/batch_input_simple_public_object_input.rb → timeline/models/has_email_reply.rb} +78 -15
  164. data/lib/hubspot/codegen/crm/timeline/models/has_plain_text_email_reply.rb +280 -0
  165. data/lib/hubspot/codegen/crm/timeline/models/if_boolean.rb +303 -0
  166. data/lib/hubspot/codegen/crm/timeline/models/if_number.rb +303 -0
  167. data/lib/hubspot/codegen/crm/timeline/models/if_string.rb +303 -0
  168. data/lib/hubspot/codegen/crm/timeline/models/is_present.rb +294 -0
  169. data/lib/hubspot/codegen/crm/timeline/models/less_than.rb +280 -0
  170. data/lib/hubspot/codegen/crm/timeline/models/less_than_or_equal.rb +280 -0
  171. data/lib/hubspot/codegen/crm/timeline/models/lower_case.rb +280 -0
  172. data/lib/hubspot/codegen/crm/timeline/models/max_numbers.rb +280 -0
  173. data/lib/hubspot/codegen/crm/timeline/models/min_numbers.rb +280 -0
  174. data/lib/hubspot/codegen/crm/timeline/models/model_and.rb +280 -0
  175. data/lib/hubspot/codegen/crm/timeline/models/model_not.rb +280 -0
  176. data/lib/hubspot/codegen/crm/timeline/models/model_or.rb +280 -0
  177. data/lib/hubspot/codegen/crm/{objects/models/filter.rb → timeline/models/month.rb} +36 -28
  178. data/lib/hubspot/codegen/crm/timeline/models/more_than.rb +280 -0
  179. data/lib/hubspot/codegen/crm/timeline/models/more_than_or_equal.rb +280 -0
  180. data/lib/hubspot/codegen/crm/timeline/models/multiply_numbers.rb +280 -0
  181. data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +224 -0
  182. data/lib/hubspot/codegen/crm/{objects/models/batch_input_simple_public_object_id.rb → timeline/models/now.rb} +78 -15
  183. data/lib/hubspot/codegen/crm/timeline/models/number_equals.rb +280 -0
  184. data/lib/hubspot/codegen/crm/timeline/models/number_property_variable.rb +280 -0
  185. data/lib/hubspot/codegen/crm/timeline/models/number_to_string.rb +280 -0
  186. data/lib/hubspot/codegen/crm/timeline/models/paging.rb +210 -0
  187. data/lib/hubspot/codegen/crm/timeline/models/parse_number.rb +280 -0
  188. data/lib/hubspot/codegen/crm/timeline/models/period_to_months.rb +280 -0
  189. data/lib/hubspot/codegen/crm/timeline/models/pipeline_probability.rb +280 -0
  190. data/lib/hubspot/codegen/crm/timeline/models/round_down_numbers.rb +280 -0
  191. data/lib/hubspot/codegen/crm/timeline/models/round_up_numbers.rb +280 -0
  192. data/lib/hubspot/codegen/crm/timeline/models/string_equals.rb +280 -0
  193. data/lib/hubspot/codegen/crm/timeline/models/string_property_variable.rb +280 -0
  194. data/lib/hubspot/codegen/crm/timeline/models/subtract_numbers.rb +280 -0
  195. data/lib/hubspot/codegen/crm/timeline/models/time_between.rb +280 -0
  196. data/lib/hubspot/codegen/crm/{objects/models/public_object_search_request.rb → timeline/models/timeline_event.rb} +101 -69
  197. data/lib/hubspot/codegen/crm/{objects/models/simple_public_object_id.rb → timeline/models/timeline_event_i_frame.rb} +79 -18
  198. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_response.rb +342 -0
  199. data/lib/hubspot/codegen/crm/{objects/models/simple_public_object.rb → timeline/models/timeline_event_template.rb} +62 -56
  200. data/lib/hubspot/codegen/crm/{objects/models/batch_read_input_simple_public_object_id.rb → timeline/models/timeline_event_template_create_request.rb} +63 -36
  201. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token.rb +328 -0
  202. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_option.rb +229 -0
  203. data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_update_request.rb +244 -0
  204. data/lib/hubspot/codegen/crm/{objects/models/simple_public_object_batch_input.rb → timeline/models/timeline_event_template_update_request.rb} +57 -19
  205. data/lib/hubspot/codegen/crm/timeline/models/upper_case.rb +280 -0
  206. data/lib/hubspot/codegen/crm/timeline/models/xor.rb +280 -0
  207. data/lib/hubspot/codegen/crm/timeline/models/year.rb +280 -0
  208. data/lib/hubspot/codegen/oauth/api/default_api.rb +270 -0
  209. data/lib/hubspot/codegen/oauth/api_client.rb +3 -4
  210. data/lib/hubspot/codegen/oauth/configuration.rb +3 -3
  211. data/lib/hubspot/codegen/oauth/models/error.rb +14 -25
  212. data/lib/hubspot/codegen/oauth/models/error_detail.rb +26 -6
  213. data/lib/hubspot/codegen/oauth/models/{refresh_token.rb → token_response_if.rb} +33 -47
  214. data/lib/hubspot/codegen/webhooks/api/settings_api.rb +214 -0
  215. data/lib/hubspot/codegen/webhooks/api/subscriptions_api.rb +360 -0
  216. data/lib/hubspot/codegen/webhooks/api_client.rb +420 -0
  217. data/lib/hubspot/codegen/webhooks/api_error.rb +59 -0
  218. data/lib/hubspot/codegen/webhooks/configuration.rb +256 -0
  219. data/lib/hubspot/codegen/webhooks/models/error.rb +290 -0
  220. data/lib/hubspot/codegen/webhooks/models/error_detail.rb +256 -0
  221. data/lib/hubspot/codegen/webhooks/models/settings_change_request.rb +229 -0
  222. data/lib/hubspot/codegen/webhooks/models/settings_response.rb +254 -0
  223. data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +268 -0
  224. data/lib/hubspot/codegen/webhooks/models/subscription_list_response.rb +217 -0
  225. data/lib/hubspot/codegen/webhooks/models/subscription_patch_request.rb +210 -0
  226. data/lib/hubspot/codegen/{oauth/models/json_node.rb → webhooks/models/subscription_response.rb} +75 -189
  227. data/lib/hubspot/codegen/webhooks/models/throttling_settings.rb +264 -0
  228. data/lib/hubspot/version.rb +1 -1
  229. data/sample-apps/companies-app/Gemfile.lock +2 -2
  230. data/sample-apps/companies-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  231. data/sample-apps/companies-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  232. data/sample-apps/companies-app/app/lib/services/hubspot/associations/create.rb +3 -2
  233. data/sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb +3 -2
  234. data/sample-apps/contacts-app/Gemfile.lock +2 -2
  235. data/sample-apps/contacts-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  236. data/sample-apps/contacts-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  237. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/create.rb +1 -1
  238. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb +1 -1
  239. data/sample-apps/contacts-app/app/views/contacts/show.html.erb +1 -0
  240. data/sample-apps/leaky-bucket-app/Gemfile.lock +2 -2
  241. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  242. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  243. data/sample-apps/oauth-app/Gemfile.lock +2 -2
  244. data/sample-apps/oauth-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  245. data/sample-apps/oauth-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  246. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/create.rb +1 -1
  247. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb +1 -1
  248. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  249. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  250. data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/generate.rb +2 -2
  251. data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
  252. metadata +170 -90
  253. data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +0 -254
  254. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +0 -389
  255. data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -293
  256. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -92
  257. data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_batch_input.rb +0 -217
  258. data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object.rb +0 -226
  259. data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object_id.rb +0 -226
  260. data/lib/hubspot/codegen/crm/objects/models/collection_response_with_total_simple_public_object.rb +0 -241
  261. data/lib/hubspot/codegen/crm/objects/models/filter_group.rb +0 -217
  262. data/lib/hubspot/codegen/crm/objects/models/next_page.rb +0 -224
  263. data/lib/hubspot/codegen/crm/objects/models/paging.rb +0 -210
  264. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_input.rb +0 -217
  265. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +0 -84
  266. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +0 -336
  267. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +0 -98
  268. data/spec/objects/api/associations_api_spec.rb +0 -76
  269. data/spec/objects/api/basic_api_spec.rb +0 -108
  270. data/spec/objects/api/batch_api_spec.rb +0 -88
  271. data/spec/objects/api/search_api_spec.rb +0 -48
  272. data/spec/objects/api_client_spec.rb +0 -226
  273. data/spec/objects/configuration_spec.rb +0 -42
  274. data/spec/objects/models/batch_input_simple_public_object_batch_input_spec.rb +0 -41
  275. data/spec/objects/models/batch_input_simple_public_object_id_spec.rb +0 -41
  276. data/spec/objects/models/batch_input_simple_public_object_input_spec.rb +0 -41
  277. data/spec/objects/models/batch_read_input_simple_public_object_id_spec.rb +0 -47
  278. data/spec/objects/models/batch_response_simple_public_object_spec.rb +0 -81
  279. data/spec/objects/models/collection_response_simple_public_object_id_spec.rb +0 -47
  280. data/spec/objects/models/collection_response_simple_public_object_spec.rb +0 -47
  281. data/spec/objects/models/collection_response_with_total_simple_public_object_spec.rb +0 -53
  282. data/spec/objects/models/error_detail_spec.rb +0 -65
  283. data/spec/objects/models/error_spec.rb +0 -71
  284. data/spec/objects/models/filter_group_spec.rb +0 -41
  285. data/spec/objects/models/filter_spec.rb +0 -57
  286. data/spec/objects/models/next_page_spec.rb +0 -47
  287. data/spec/objects/models/paging_spec.rb +0 -41
  288. data/spec/objects/models/public_object_search_request_spec.rb +0 -71
  289. data/spec/objects/models/simple_public_object_batch_input_spec.rb +0 -47
  290. data/spec/objects/models/simple_public_object_id_spec.rb +0 -41
  291. data/spec/objects/models/simple_public_object_input_spec.rb +0 -41
  292. data/spec/objects/models/simple_public_object_spec.rb +0 -77
@@ -1,76 +0,0 @@
1
- =begin
2
- #CRM Objects
3
-
4
- #CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Hubspot::Crm::Objects::AssociationsApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'AssociationsApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Hubspot::Crm::Objects::AssociationsApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of AssociationsApi' do
30
- it 'should create an instance of AssociationsApi' do
31
- expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::AssociationsApi)
32
- end
33
- end
34
-
35
- # unit tests for archive_association
36
- # Remove an association between two objects
37
- # @param object_type
38
- # @param object_id
39
- # @param associated_object_type
40
- # @param to_object_id
41
- # @param [Hash] opts the optional parameters
42
- # @return [nil]
43
- describe 'archive_association test' do
44
- it 'should work' do
45
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
46
- end
47
- end
48
-
49
- # unit tests for create_association
50
- # Associate two objects
51
- # @param object_type
52
- # @param object_id
53
- # @param associated_object_type
54
- # @param to_object_id
55
- # @param [Hash] opts the optional parameters
56
- # @return [SimplePublicObject]
57
- describe 'create_association test' do
58
- it 'should work' do
59
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
- end
61
- end
62
-
63
- # unit tests for get_associations
64
- # List associations of an object by type
65
- # @param object_type
66
- # @param object_id
67
- # @param associated_object_type
68
- # @param [Hash] opts the optional parameters
69
- # @return [CollectionResponseSimplePublicObjectId]
70
- describe 'get_associations test' do
71
- it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
73
- end
74
- end
75
-
76
- end
@@ -1,108 +0,0 @@
1
- =begin
2
- #CRM Objects
3
-
4
- #CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Hubspot::Crm::Objects::BasicApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'BasicApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Hubspot::Crm::Objects::BasicApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of BasicApi' do
30
- it 'should create an instance of BasicApi' do
31
- expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::BasicApi)
32
- end
33
- end
34
-
35
- # unit tests for archive
36
- # Archive
37
- # Move an Object identified by `{objectId}` to the recycling bin.
38
- # @param object_type
39
- # @param object_id
40
- # @param [Hash] opts the optional parameters
41
- # @return [nil]
42
- describe 'archive test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for create
49
- # Create
50
- # Create a CRM object with the given properties and return a copy of the object, including the ID. Documentation and examples for creating native objects is provided.
51
- # @param object_type
52
- # @param [Hash] opts the optional parameters
53
- # @option opts [SimplePublicObjectInput] :body
54
- # @return [SimplePublicObject]
55
- describe 'create test' do
56
- it 'should work' do
57
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
- end
59
- end
60
-
61
- # unit tests for get_by_id
62
- # Read
63
- # Read an Object identified by `{objectId}`. Control what is returned via the `properties` query param.
64
- # @param object_type
65
- # @param object_id
66
- # @param [Hash] opts the optional parameters
67
- # @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
68
- # @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
69
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
70
- # @return [SimplePublicObject]
71
- describe 'get_by_id test' do
72
- it 'should work' do
73
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
- end
75
- end
76
-
77
- # unit tests for get_page
78
- # List
79
- # Read a page of objects. Control what is returned via the &#x60;properties&#x60; query param.
80
- # @param object_type
81
- # @param [Hash] opts the optional parameters
82
- # @option opts [Integer] :limit The maximum number of results to display per page.
83
- # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
84
- # @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
85
- # @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
86
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
87
- # @return [CollectionResponseSimplePublicObject]
88
- describe 'get_page test' do
89
- it 'should work' do
90
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
- end
92
- end
93
-
94
- # unit tests for update
95
- # Update
96
- # Perform a partial update of an Object identified by &#x60;{objectId}&#x60;. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string.
97
- # @param object_type
98
- # @param object_id
99
- # @param [Hash] opts the optional parameters
100
- # @option opts [SimplePublicObjectInput] :body
101
- # @return [SimplePublicObject]
102
- describe 'update test' do
103
- it 'should work' do
104
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
105
- end
106
- end
107
-
108
- end
@@ -1,88 +0,0 @@
1
- =begin
2
- #CRM Objects
3
-
4
- #CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Hubspot::Crm::Objects::BatchApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'BatchApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Hubspot::Crm::Objects::BatchApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of BatchApi' do
30
- it 'should create an instance of BatchApi' do
31
- expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::BatchApi)
32
- end
33
- end
34
-
35
- # unit tests for archive_batch
36
- # Archive a batch of objects by ID
37
- # Archive a list of objects given a collection of IDs. This method will return a &#x60;204 No Content&#x60; response on success regardless of the initial state of the object (e.g. active, already archived, non-existent).
38
- # @param object_type
39
- # @param [Hash] opts the optional parameters
40
- # @option opts [BatchInputSimplePublicObjectId] :body
41
- # @return [nil]
42
- describe 'archive_batch test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for create_batch
49
- # Create a batch of objects
50
- # Create a batch of objects. This follows the same rules as creating an individual object.
51
- # @param object_type
52
- # @param [Hash] opts the optional parameters
53
- # @option opts [BatchInputSimplePublicObjectInput] :body
54
- # @return [BatchResponseSimplePublicObject]
55
- describe 'create_batch test' do
56
- it 'should work' do
57
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
- end
59
- end
60
-
61
- # unit tests for read_batch
62
- # Read a batch of objects by ID
63
- # Read a list of objects given a collection of IDs. Use the &#x60;properties&#x60; request body property to control which properties are returned.
64
- # @param object_type
65
- # @param [Hash] opts the optional parameters
66
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
67
- # @option opts [BatchReadInputSimplePublicObjectId] :body
68
- # @return [BatchResponseSimplePublicObject]
69
- describe 'read_batch test' do
70
- it 'should work' do
71
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
- end
73
- end
74
-
75
- # unit tests for update_batch
76
- # Update a batch of objects
77
- # Perform a partial upate on a batch of objects. This follows the same rules as performing partial updates on an individual object.
78
- # @param object_type
79
- # @param [Hash] opts the optional parameters
80
- # @option opts [BatchInputSimplePublicObjectBatchInput] :body
81
- # @return [BatchResponseSimplePublicObject]
82
- describe 'update_batch test' do
83
- it 'should work' do
84
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
85
- end
86
- end
87
-
88
- end
@@ -1,48 +0,0 @@
1
- =begin
2
- #CRM Objects
3
-
4
- #CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Hubspot::Crm::Objects::SearchApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'SearchApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Hubspot::Crm::Objects::SearchApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of SearchApi' do
30
- it 'should create an instance of SearchApi' do
31
- expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::SearchApi)
32
- end
33
- end
34
-
35
- # unit tests for do_search
36
- # Filter, Sort, and Search CRM Objects
37
- # # Filter, Sort, and Search CRM Objects The CRM Search API is a powerful API that allows developers to filter, sort, and search across all CRM object types, including contacts, deals, companies and tickets. Using this API, developers can more efficiently retrieve a subset of data they are looking for to better suit their business needs. Common use cases this API allows for include, but are not limited to the following: &lt;ul&gt; &lt;li&gt;Getting a list of contacts for a specific account&lt;/li&gt; &lt;li&gt;Retrieving a list of all open deals&lt;/li&gt; &lt;li&gt;Searching for contacts by custom properties&lt;/li&gt; &lt;li&gt;&amp; more&lt;/li&gt; &lt;/ul&gt; Prerequisite for using this API: To use the CRM Search API with an OAuth token, your app must request and be granted access to the contacts scope. &lt;br /&gt; &#x60;engagements&#x60; including &#x60;tasks&#x60;, &#x60;calls&#x60;, &#x60;emails&#x60;, and &#x60;notes&#x60; are not supported. &lt;br /&gt; ## Filter Use &#x60;filterGroups&#x60; in the request body to limit results to specific CRM objects. *Example*: Find all contacts with a first name of \&quot;Alice\&quot; &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;filterGroups\&quot;:[ { \&quot;filters\&quot;:[ { \&quot;propertyName\&quot;: \&quot;firstname\&quot;, \&quot;operator\&quot;: \&quot;EQ\&quot;, \&quot;value\&quot;: \&quot;Alice\&quot; } ] }] }&#39; &#x60;&#x60;&#x60; When multiple &#x60;filters&#x60; are provided within a &#x60;filterGroup&#x60;, they will be combined using a logical &#x60;AND&#x60; operator. When multiple &#x60;filterGroup&#x60;s are provided, they will be combined using a logical &#x60;OR&#x60; operator. The system supports a maximum of three &#x60;filterGroups&#x60; with up to three &#x60;filters&#x60; per &#x60;filterGroup&#x60;. *Example*: Find all contacts with (a first name of \&quot;Alice\&quot; &#x60;AND&#x60; a last name that is not \&quot;Smith\&quot;) OR has the property \&quot;enum1\&quot; &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;filterGroups\&quot;:[ { \&quot;filters\&quot;: [ { \&quot;propertyName\&quot;: \&quot;firstname\&quot;, \&quot;operator\&quot;: \&quot;EQ\&quot;, \&quot;value\&quot;: \&quot;Alice\&quot; }, { \&quot;propertyName\&quot;: \&quot;lastname\&quot;, \&quot;operator\&quot;: \&quot;NEQ\&quot;, \&quot;value\&quot;: \&quot;Smith\&quot; } ] }, { \&quot;filters\&quot;: [ { \&quot;property\&quot;: \&quot;enum1\&quot;, \&quot;operator\&quot;: \&quot;HAS_PROPERTY\&quot; } ] }] }&#39; &#x60;&#x60;&#x60; &lt;br /&gt; ### Operators Supported operators include: |Operator|Description| |--|--| |&#x60;EQ&#x60;| equal to | |&#x60;NEQ&#x60;| not equal to | |&#x60;LT&#x60;| less than | |&#x60;LTE&#x60;| less than or equal to | |&#x60;GT&#x60;| greater than | |&#x60;GTE&#x60;| greater than or equal to | |&#x60;HAS_PROPERTY&#x60;| has the property | |&#x60;NOT_HAS_PROPERTY&#x60;| does not have the property | |&#x60;CONTAINS_TOKEN&#x60;| contains token, strings only | |&#x60;NOT_CONTAINS_TOKEN&#x60;| not contains token, strings only | &lt;br /&gt; ### Associations You can find objects associated with a different object type by ID using the &#x60;associations.{objectType}&#x60; psuedo-property. Support for this is limited to &#x60;deals&#x60; and &#x60;tickets&#x60;. Supported association filters: |Object Type |Filter &#x60;propertyName&#x60; | |--|--| | &#x60;deals&#x60; | &#x60;associations.company&#x60;, &#x60;associations.contact&#x60;, &#x60;associations.ticket&#x60; | | &#x60;tickets&#x60; | &#x60;associations.company&#x60;, &#x60;associations.contact&#x60;, &#x60;associations.deal&#x60; | *Example*: Find all tickets associated with the contact using ID \&quot;123\&quot; &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/tickets/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;filters\&quot;: [ { \&quot;propertyName\&quot;: \&quot;associations.contact\&quot;, \&quot;operator\&quot;: \&quot;EQ\&quot;, \&quot;value\&quot;: \&quot;123\&quot; } ] }&#39; &#x60;&#x60;&#x60; &lt;br /&gt; ## Sort Use &#x60;sorts&#x60;, which contain a property name and a direction, to sort the returned collection. *Example*: List all contacts with most recently created first &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;sorts\&quot;: [ { \&quot;propertyName\&quot;: \&quot;createdate\&quot;, \&quot;direction\&quot;: \&quot;DESCENDING\&quot; } ] }&#39; &#x60;&#x60;&#x60; The system supports a single sort. &lt;br /&gt; ## Search Perform a text search against all property values for an object type. By default, the results will be returned in order of object creation (oldest first) but this can be overridden using &#x60;sorts&#x60;. *Example*: Find all contacts with a property value containing the letter &#x60;x&#x60; &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;query\&quot;: \&quot;x\&quot; }&#39; &#x60;&#x60;&#x60; &lt;br /&gt; ## Controlling returned properties Each object type is returned with a default set of properties. You can override this by providing an array of property names in the &#x60;properties&#x60; property of the request body. *Example*: Return all contacts and include their email and mailing address state &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;properties\&quot;: [ \&quot;email\&quot;, \&quot;state\&quot; ] }&#39; &#x60;&#x60;&#x60; &lt;br /&gt; ## Paging through results By default, the Search API returns results containing 10 objects per page. The system supports a maximum of 100 results per page. *Example*: Get pages of size 20 &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;limit\&quot;: 20 } &#x60;&#x60;&#x60; In order to access the next page of results, you must pass the &#x60;after&#x60; parameter that was provided in the previous response in the &#x60;paging.next.after&#x60; property. If no &#x60;paging.next.after&#x60; property is provided, no additional results will be shown. Note that the after parameter is expected to be a string. *Example*: Get the next page of results &#x60;&#x60;&#x60; curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey&#x3D;demo \\ --header \&quot;Content-Type: application/json\&quot; \\ --data &#39;{ \&quot;after\&quot;: \&quot;20\&quot; }&#39; &#x60;&#x60;&#x60; &lt;br /&gt; ## Sample Response (Success) &#x60;&#x60;&#x60; { \&quot;results\&quot;: [ { \&quot;id\&quot;: \&quot;174\&quot;, \&quot;properties\&quot;: { \&quot;firstname\&quot;: \&quot;Brantley\&quot;, \&quot;lastname\&quot;: \&quot;Forrest\&quot;, \&quot;email\&quot;: \&quot;bforrest8@acme.com\&quot; }, \&quot;createdAt\&quot;:\&quot;2019-10-30T03:30:17.883Z\&quot;, \&quot;updatedAt\&quot;: \&quot;1569516907T16:50:06.678Z\&quot;, \&quot;archived\&quot;: false }, ... ], \&quot;paging\&quot;: { \&quot;next\&quot;: { \&quot;after\&quot;: \&quot;10\&quot; } } } &#x60;&#x60;&#x60; &lt;br /&gt; ## Limitations 1. It can take a few moments between creating or updating a CRM object in HubSpot and seeing it in CRM Search API results. 2. CRM objects in an archived state will not be available in the Search API. 3. The Search API is rate limited to 1 request per second per authentication token, which is more stringent than our general rate limits. The &#x60;X-HubSpot-RateLimit-*&#x60; headers will not reflect this during the beta period. Read more about [rate limits](https://developers.hubspot.com/docs/faq/working-within-the-hubspot-api-rate-limits). &lt;br /&gt; ## Error Handling Read our [error documentation](https://developers.hubspot.com/docs/faq/api-error-responses).
38
- # @param object_type
39
- # @param [Hash] opts the optional parameters
40
- # @option opts [PublicObjectSearchRequest] :body
41
- # @return [CollectionResponseWithTotalSimplePublicObject]
42
- describe 'do_search test' do
43
- it 'should work' do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- end
@@ -1,226 +0,0 @@
1
- =begin
2
- #CRM Objects
3
-
4
- #CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
-
15
- describe Hubspot::Crm::Objects::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- Hubspot.configure { |c| c.host = 'http://example.com' }
21
- expect(Hubspot::Crm::Objects::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- Hubspot.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(Hubspot::Crm::Objects::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- Hubspot.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(Hubspot::Crm::Objects::Configuration.default.host).to eq('hobo.com')
32
- end
33
- end
34
-
35
- context 'base_path' do
36
- it "prepends a slash to base_path" do
37
- Hubspot.configure { |c| c.base_path = 'v4/dog' }
38
- expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('/v4/dog')
39
- end
40
-
41
- it "doesn't prepend a slash if one is already there" do
42
- Hubspot.configure { |c| c.base_path = '/v4/dog' }
43
- expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- Hubspot.configure { |c| c.base_path = nil }
48
- expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('')
49
- end
50
- end
51
- end
52
- end
53
-
54
- describe 'params_encoding in #build_request' do
55
- let(:config) { Hubspot::Crm::Objects::Configuration.new }
56
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new(config) }
57
-
58
- it 'defaults to nil' do
59
- expect(Hubspot::Crm::Objects::Configuration.default.params_encoding).to eq(nil)
60
- expect(config.params_encoding).to eq(nil)
61
-
62
- request = api_client.build_request(:get, '/test')
63
- expect(request.options[:params_encoding]).to eq(nil)
64
- end
65
-
66
- it 'can be customized' do
67
- config.params_encoding = :multi
68
- request = api_client.build_request(:get, '/test')
69
- expect(request.options[:params_encoding]).to eq(:multi)
70
- end
71
- end
72
-
73
- describe 'timeout in #build_request' do
74
- let(:config) { Hubspot::Crm::Objects::Configuration.new }
75
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new(config) }
76
-
77
- it 'defaults to 0' do
78
- expect(Hubspot::Crm::Objects::Configuration.default.timeout).to eq(0)
79
- expect(config.timeout).to eq(0)
80
-
81
- request = api_client.build_request(:get, '/test')
82
- expect(request.options[:timeout]).to eq(0)
83
- end
84
-
85
- it 'can be customized' do
86
- config.timeout = 100
87
- request = api_client.build_request(:get, '/test')
88
- expect(request.options[:timeout]).to eq(100)
89
- end
90
- end
91
-
92
- describe '#deserialize' do
93
- it "handles Array<Integer>" do
94
- api_client = Hubspot::Crm::Objects::ApiClient.new
95
- headers = { 'Content-Type' => 'application/json' }
96
- response = double('response', headers: headers, body: '[12, 34]')
97
- data = api_client.deserialize(response, 'Array<Integer>')
98
- expect(data).to be_instance_of(Array)
99
- expect(data).to eq([12, 34])
100
- end
101
-
102
- it 'handles Array<Array<Integer>>' do
103
- api_client = Hubspot::Crm::Objects::ApiClient.new
104
- headers = { 'Content-Type' => 'application/json' }
105
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
- expect(data).to be_instance_of(Array)
108
- expect(data).to eq([[12, 34], [56]])
109
- end
110
-
111
- it 'handles Hash<String, String>' do
112
- api_client = Hubspot::Crm::Objects::ApiClient.new
113
- headers = { 'Content-Type' => 'application/json' }
114
- response = double('response', headers: headers, body: '{"message": "Hello"}')
115
- data = api_client.deserialize(response, 'Hash<String, String>')
116
- expect(data).to be_instance_of(Hash)
117
- expect(data).to eq(:message => 'Hello')
118
- end
119
- end
120
-
121
- describe "#object_to_hash" do
122
- it 'ignores nils and includes empty arrays' do
123
- # uncomment below to test object_to_hash for model
124
- # api_client = Hubspot::Crm::Objects::ApiClient.new
125
- # _model = Hubspot::Crm::Objects::ModelName.new
126
- # update the model attribute below
127
- # _model.id = 1
128
- # update the expected value (hash) below
129
- # expected = {id: 1, name: '', tags: []}
130
- # expect(api_client.object_to_hash(_model)).to eq(expected)
131
- end
132
- end
133
-
134
- describe '#build_collection_param' do
135
- let(:param) { ['aa', 'bb', 'cc'] }
136
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
137
-
138
- it 'works for csv' do
139
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
- end
141
-
142
- it 'works for ssv' do
143
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
- end
145
-
146
- it 'works for tsv' do
147
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
- end
149
-
150
- it 'works for pipes' do
151
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
- end
153
-
154
- it 'works for multi' do
155
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
- end
157
-
158
- it 'fails for invalid collection format' do
159
- expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
- end
161
- end
162
-
163
- describe '#json_mime?' do
164
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
165
-
166
- it 'works' do
167
- expect(api_client.json_mime?(nil)).to eq false
168
- expect(api_client.json_mime?('')).to eq false
169
-
170
- expect(api_client.json_mime?('application/json')).to eq true
171
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
-
174
- expect(api_client.json_mime?('application/xml')).to eq false
175
- expect(api_client.json_mime?('text/plain')).to eq false
176
- expect(api_client.json_mime?('application/jsonp')).to eq false
177
- end
178
- end
179
-
180
- describe '#select_header_accept' do
181
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
182
-
183
- it 'works' do
184
- expect(api_client.select_header_accept(nil)).to be_nil
185
- expect(api_client.select_header_accept([])).to be_nil
186
-
187
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
-
191
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
- end
194
- end
195
-
196
- describe '#select_header_content_type' do
197
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
198
-
199
- it 'works' do
200
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
201
- expect(api_client.select_header_content_type([])).to eq('application/json')
202
-
203
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
- end
209
- end
210
-
211
- describe '#sanitize_filename' do
212
- let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
213
-
214
- it 'works' do
215
- expect(api_client.sanitize_filename('sun')).to eq('sun')
216
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
- end
225
- end
226
- end