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,254 +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 'cgi'
14
-
15
- module Hubspot
16
- module Crm
17
- module Objects
18
- class AssociationsApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # Remove an association between two objects
25
- # @param object_type [String]
26
- # @param object_id [String]
27
- # @param associated_object_type [String]
28
- # @param to_object_id [String]
29
- # @param [Hash] opts the optional parameters
30
- # @return [nil]
31
- def archive_association(object_type, object_id, associated_object_type, to_object_id, opts = {})
32
- archive_association_with_http_info(object_type, object_id, associated_object_type, to_object_id, opts)
33
- nil
34
- end
35
-
36
- # Remove an association between two objects
37
- # @param object_type [String]
38
- # @param object_id [String]
39
- # @param associated_object_type [String]
40
- # @param to_object_id [String]
41
- # @param [Hash] opts the optional parameters
42
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
43
- def archive_association_with_http_info(object_type, object_id, associated_object_type, to_object_id, opts = {})
44
- if @api_client.config.debugging
45
- @api_client.config.logger.debug 'Calling API: AssociationsApi.archive_association ...'
46
- end
47
- # verify the required parameter 'object_type' is set
48
- if @api_client.config.client_side_validation && object_type.nil?
49
- fail ArgumentError, "Missing the required parameter 'object_type' when calling AssociationsApi.archive_association"
50
- end
51
- # verify the required parameter 'object_id' is set
52
- if @api_client.config.client_side_validation && object_id.nil?
53
- fail ArgumentError, "Missing the required parameter 'object_id' when calling AssociationsApi.archive_association"
54
- end
55
- # verify the required parameter 'associated_object_type' is set
56
- if @api_client.config.client_side_validation && associated_object_type.nil?
57
- fail ArgumentError, "Missing the required parameter 'associated_object_type' when calling AssociationsApi.archive_association"
58
- end
59
- # verify the required parameter 'to_object_id' is set
60
- if @api_client.config.client_side_validation && to_object_id.nil?
61
- fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.archive_association"
62
- end
63
- # resource path
64
- local_var_path = '/{objectType}/{objectId}/associations/{associatedObjectType}/{toObjectId}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/')).sub('{' + 'associatedObjectType' + '}', CGI.escape(associated_object_type.to_s).gsub('%2F', '/')).sub('{' + 'toObjectId' + '}', CGI.escape(to_object_id.to_s).gsub('%2F', '/'))
65
-
66
- # query parameters
67
- query_params = opts[:query_params] || {}
68
-
69
- # header parameters
70
- header_params = opts[:header_params] || {}
71
- # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
73
-
74
- # form parameters
75
- form_params = opts[:form_params] || {}
76
-
77
- # http body (model)
78
- post_body = opts[:body]
79
-
80
- # return_type
81
- return_type = opts[:return_type]
82
-
83
- # auth_names
84
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
85
-
86
- new_options = opts.merge(
87
- :header_params => header_params,
88
- :query_params => query_params,
89
- :form_params => form_params,
90
- :body => post_body,
91
- :auth_names => auth_names,
92
- :return_type => return_type
93
- )
94
-
95
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
96
- if @api_client.config.debugging
97
- @api_client.config.logger.debug "API called: AssociationsApi#archive_association\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
- end
99
- return data, status_code, headers
100
- end
101
-
102
- # Associate two objects
103
- # @param object_type [String]
104
- # @param object_id [String]
105
- # @param associated_object_type [String]
106
- # @param to_object_id [String]
107
- # @param [Hash] opts the optional parameters
108
- # @return [SimplePublicObject]
109
- def create_association(object_type, object_id, associated_object_type, to_object_id, opts = {})
110
- data, _status_code, _headers = create_association_with_http_info(object_type, object_id, associated_object_type, to_object_id, opts)
111
- data
112
- end
113
-
114
- # Associate two objects
115
- # @param object_type [String]
116
- # @param object_id [String]
117
- # @param associated_object_type [String]
118
- # @param to_object_id [String]
119
- # @param [Hash] opts the optional parameters
120
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
121
- def create_association_with_http_info(object_type, object_id, associated_object_type, to_object_id, opts = {})
122
- if @api_client.config.debugging
123
- @api_client.config.logger.debug 'Calling API: AssociationsApi.create_association ...'
124
- end
125
- # verify the required parameter 'object_type' is set
126
- if @api_client.config.client_side_validation && object_type.nil?
127
- fail ArgumentError, "Missing the required parameter 'object_type' when calling AssociationsApi.create_association"
128
- end
129
- # verify the required parameter 'object_id' is set
130
- if @api_client.config.client_side_validation && object_id.nil?
131
- fail ArgumentError, "Missing the required parameter 'object_id' when calling AssociationsApi.create_association"
132
- end
133
- # verify the required parameter 'associated_object_type' is set
134
- if @api_client.config.client_side_validation && associated_object_type.nil?
135
- fail ArgumentError, "Missing the required parameter 'associated_object_type' when calling AssociationsApi.create_association"
136
- end
137
- # verify the required parameter 'to_object_id' is set
138
- if @api_client.config.client_side_validation && to_object_id.nil?
139
- fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.create_association"
140
- end
141
- # resource path
142
- local_var_path = '/{objectType}/{objectId}/associations/{associatedObjectType}/{toObjectId}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/')).sub('{' + 'associatedObjectType' + '}', CGI.escape(associated_object_type.to_s).gsub('%2F', '/')).sub('{' + 'toObjectId' + '}', CGI.escape(to_object_id.to_s).gsub('%2F', '/'))
143
-
144
- # query parameters
145
- query_params = opts[:query_params] || {}
146
-
147
- # header parameters
148
- header_params = opts[:header_params] || {}
149
- # HTTP header 'Accept' (if needed)
150
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
-
152
- # form parameters
153
- form_params = opts[:form_params] || {}
154
-
155
- # http body (model)
156
- post_body = opts[:body]
157
-
158
- # return_type
159
- return_type = opts[:return_type] || 'SimplePublicObject'
160
-
161
- # auth_names
162
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
163
-
164
- new_options = opts.merge(
165
- :header_params => header_params,
166
- :query_params => query_params,
167
- :form_params => form_params,
168
- :body => post_body,
169
- :auth_names => auth_names,
170
- :return_type => return_type
171
- )
172
-
173
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
174
- if @api_client.config.debugging
175
- @api_client.config.logger.debug "API called: AssociationsApi#create_association\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
- end
177
- return data, status_code, headers
178
- end
179
-
180
- # List associations of an object by type
181
- # @param object_type [String]
182
- # @param object_id [String]
183
- # @param associated_object_type [String]
184
- # @param [Hash] opts the optional parameters
185
- # @return [CollectionResponseSimplePublicObjectId]
186
- def get_associations(object_type, object_id, associated_object_type, opts = {})
187
- data, _status_code, _headers = get_associations_with_http_info(object_type, object_id, associated_object_type, opts)
188
- data
189
- end
190
-
191
- # List associations of an object by type
192
- # @param object_type [String]
193
- # @param object_id [String]
194
- # @param associated_object_type [String]
195
- # @param [Hash] opts the optional parameters
196
- # @return [Array<(CollectionResponseSimplePublicObjectId, Integer, Hash)>] CollectionResponseSimplePublicObjectId data, response status code and response headers
197
- def get_associations_with_http_info(object_type, object_id, associated_object_type, opts = {})
198
- if @api_client.config.debugging
199
- @api_client.config.logger.debug 'Calling API: AssociationsApi.get_associations ...'
200
- end
201
- # verify the required parameter 'object_type' is set
202
- if @api_client.config.client_side_validation && object_type.nil?
203
- fail ArgumentError, "Missing the required parameter 'object_type' when calling AssociationsApi.get_associations"
204
- end
205
- # verify the required parameter 'object_id' is set
206
- if @api_client.config.client_side_validation && object_id.nil?
207
- fail ArgumentError, "Missing the required parameter 'object_id' when calling AssociationsApi.get_associations"
208
- end
209
- # verify the required parameter 'associated_object_type' is set
210
- if @api_client.config.client_side_validation && associated_object_type.nil?
211
- fail ArgumentError, "Missing the required parameter 'associated_object_type' when calling AssociationsApi.get_associations"
212
- end
213
- # resource path
214
- local_var_path = '/{objectType}/{objectId}/associations/{associatedObjectType}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/')).sub('{' + 'associatedObjectType' + '}', CGI.escape(associated_object_type.to_s).gsub('%2F', '/'))
215
-
216
- # query parameters
217
- query_params = opts[:query_params] || {}
218
-
219
- # header parameters
220
- header_params = opts[:header_params] || {}
221
- # HTTP header 'Accept' (if needed)
222
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
223
-
224
- # form parameters
225
- form_params = opts[:form_params] || {}
226
-
227
- # http body (model)
228
- post_body = opts[:body]
229
-
230
- # return_type
231
- return_type = opts[:return_type] || 'CollectionResponseSimplePublicObjectId'
232
-
233
- # auth_names
234
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
235
-
236
- new_options = opts.merge(
237
- :header_params => header_params,
238
- :query_params => query_params,
239
- :form_params => form_params,
240
- :body => post_body,
241
- :auth_names => auth_names,
242
- :return_type => return_type
243
- )
244
-
245
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
246
- if @api_client.config.debugging
247
- @api_client.config.logger.debug "API called: AssociationsApi#get_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
248
- end
249
- return data, status_code, headers
250
- end
251
- end
252
- end
253
- end
254
- end
@@ -1,389 +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 'cgi'
14
-
15
- module Hubspot
16
- module Crm
17
- module Objects
18
- class BasicApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # Archive
25
- # Move an Object identified by `{objectId}` to the recycling bin.
26
- # @param object_type [String]
27
- # @param object_id [String]
28
- # @param [Hash] opts the optional parameters
29
- # @return [nil]
30
- def archive(object_type, object_id, opts = {})
31
- archive_with_http_info(object_type, object_id, opts)
32
- nil
33
- end
34
-
35
- # Archive
36
- # Move an Object identified by &#x60;{objectId}&#x60; to the recycling bin.
37
- # @param object_type [String]
38
- # @param object_id [String]
39
- # @param [Hash] opts the optional parameters
40
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
- def archive_with_http_info(object_type, object_id, opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: BasicApi.archive ...'
44
- end
45
- # verify the required parameter 'object_type' is set
46
- if @api_client.config.client_side_validation && object_type.nil?
47
- fail ArgumentError, "Missing the required parameter 'object_type' when calling BasicApi.archive"
48
- end
49
- # verify the required parameter 'object_id' is set
50
- if @api_client.config.client_side_validation && object_id.nil?
51
- fail ArgumentError, "Missing the required parameter 'object_id' when calling BasicApi.archive"
52
- end
53
- # resource path
54
- local_var_path = '/{objectType}/{objectId}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/'))
55
-
56
- # query parameters
57
- query_params = opts[:query_params] || {}
58
-
59
- # header parameters
60
- header_params = opts[:header_params] || {}
61
- # HTTP header 'Accept' (if needed)
62
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
-
64
- # form parameters
65
- form_params = opts[:form_params] || {}
66
-
67
- # http body (model)
68
- post_body = opts[:body]
69
-
70
- # return_type
71
- return_type = opts[:return_type]
72
-
73
- # auth_names
74
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
75
-
76
- new_options = opts.merge(
77
- :header_params => header_params,
78
- :query_params => query_params,
79
- :form_params => form_params,
80
- :body => post_body,
81
- :auth_names => auth_names,
82
- :return_type => return_type
83
- )
84
-
85
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
86
- if @api_client.config.debugging
87
- @api_client.config.logger.debug "API called: BasicApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
- end
89
- return data, status_code, headers
90
- end
91
-
92
- # Create
93
- # 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.
94
- # @param object_type [String]
95
- # @param [Hash] opts the optional parameters
96
- # @option opts [SimplePublicObjectInput] :body
97
- # @return [SimplePublicObject]
98
- def create(object_type, opts = {})
99
- data, _status_code, _headers = create_with_http_info(object_type, opts)
100
- data
101
- end
102
-
103
- # Create
104
- # 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.
105
- # @param object_type [String]
106
- # @param [Hash] opts the optional parameters
107
- # @option opts [SimplePublicObjectInput] :body
108
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
109
- def create_with_http_info(object_type, opts = {})
110
- if @api_client.config.debugging
111
- @api_client.config.logger.debug 'Calling API: BasicApi.create ...'
112
- end
113
- # verify the required parameter 'object_type' is set
114
- if @api_client.config.client_side_validation && object_type.nil?
115
- fail ArgumentError, "Missing the required parameter 'object_type' when calling BasicApi.create"
116
- end
117
- # resource path
118
- local_var_path = '/{objectType}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/'))
119
-
120
- # query parameters
121
- query_params = opts[:query_params] || {}
122
-
123
- # header parameters
124
- header_params = opts[:header_params] || {}
125
- # HTTP header 'Accept' (if needed)
126
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
- # HTTP header 'Content-Type'
128
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
-
130
- # form parameters
131
- form_params = opts[:form_params] || {}
132
-
133
- # http body (model)
134
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
135
-
136
- # return_type
137
- return_type = opts[:return_type] || 'SimplePublicObject'
138
-
139
- # auth_names
140
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
141
-
142
- new_options = opts.merge(
143
- :header_params => header_params,
144
- :query_params => query_params,
145
- :form_params => form_params,
146
- :body => post_body,
147
- :auth_names => auth_names,
148
- :return_type => return_type
149
- )
150
-
151
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
- if @api_client.config.debugging
153
- @api_client.config.logger.debug "API called: BasicApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
- end
155
- return data, status_code, headers
156
- end
157
-
158
- # Read
159
- # Read an Object identified by `{objectId}`. `{objectId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param.
160
- # @param object_type [String]
161
- # @param object_id [String]
162
- # @param [Hash] opts the optional parameters
163
- # @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.
164
- # @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.
165
- # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
166
- # @option opts [String] :id_property The name of a property whose values are unique for this object type
167
- # @return [SimplePublicObject]
168
- def get_by_id(object_type, object_id, opts = {})
169
- data, _status_code, _headers = get_by_id_with_http_info(object_type, object_id, opts)
170
- data
171
- end
172
-
173
- # Read
174
- # Read an Object identified by &#x60;{objectId}&#x60;. &#x60;{objectId}&#x60; refers to the internal object ID by default, or optionally any unique property value as specified by the &#x60;idProperty&#x60; query param. Control what is returned via the &#x60;properties&#x60; query param.
175
- # @param object_type [String]
176
- # @param object_id [String]
177
- # @param [Hash] opts the optional parameters
178
- # @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.
179
- # @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.
180
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
181
- # @option opts [String] :id_property The name of a property whose values are unique for this object type
182
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
183
- def get_by_id_with_http_info(object_type, object_id, opts = {})
184
- if @api_client.config.debugging
185
- @api_client.config.logger.debug 'Calling API: BasicApi.get_by_id ...'
186
- end
187
- # verify the required parameter 'object_type' is set
188
- if @api_client.config.client_side_validation && object_type.nil?
189
- fail ArgumentError, "Missing the required parameter 'object_type' when calling BasicApi.get_by_id"
190
- end
191
- # verify the required parameter 'object_id' is set
192
- if @api_client.config.client_side_validation && object_id.nil?
193
- fail ArgumentError, "Missing the required parameter 'object_id' when calling BasicApi.get_by_id"
194
- end
195
- # resource path
196
- local_var_path = '/{objectType}/{objectId}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/'))
197
-
198
- # query parameters
199
- query_params = opts[:query_params] || {}
200
- query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :multi) if !opts[:'properties'].nil?
201
- query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
202
- query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
203
- query_params[:'idProperty'] = opts[:'id_property'] if !opts[:'id_property'].nil?
204
-
205
- # header parameters
206
- header_params = opts[:header_params] || {}
207
- # HTTP header 'Accept' (if needed)
208
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
209
-
210
- # form parameters
211
- form_params = opts[:form_params] || {}
212
-
213
- # http body (model)
214
- post_body = opts[:body]
215
-
216
- # return_type
217
- return_type = opts[:return_type] || 'SimplePublicObject'
218
-
219
- # auth_names
220
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
221
-
222
- new_options = opts.merge(
223
- :header_params => header_params,
224
- :query_params => query_params,
225
- :form_params => form_params,
226
- :body => post_body,
227
- :auth_names => auth_names,
228
- :return_type => return_type
229
- )
230
-
231
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
- if @api_client.config.debugging
233
- @api_client.config.logger.debug "API called: BasicApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
- end
235
- return data, status_code, headers
236
- end
237
-
238
- # List
239
- # Read a page of objects. Control what is returned via the `properties` query param.
240
- # @param object_type [String]
241
- # @param [Hash] opts the optional parameters
242
- # @option opts [Integer] :limit The maximum number of results to display per page. (default to 10)
243
- # @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.
244
- # @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.
245
- # @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.
246
- # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
247
- # @return [CollectionResponseSimplePublicObject]
248
- def get_page(object_type, opts = {})
249
- data, _status_code, _headers = get_page_with_http_info(object_type, opts)
250
- data
251
- end
252
-
253
- # List
254
- # Read a page of objects. Control what is returned via the &#x60;properties&#x60; query param.
255
- # @param object_type [String]
256
- # @param [Hash] opts the optional parameters
257
- # @option opts [Integer] :limit The maximum number of results to display per page.
258
- # @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.
259
- # @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.
260
- # @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.
261
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
262
- # @return [Array<(CollectionResponseSimplePublicObject, Integer, Hash)>] CollectionResponseSimplePublicObject data, response status code and response headers
263
- def get_page_with_http_info(object_type, opts = {})
264
- if @api_client.config.debugging
265
- @api_client.config.logger.debug 'Calling API: BasicApi.get_page ...'
266
- end
267
- # verify the required parameter 'object_type' is set
268
- if @api_client.config.client_side_validation && object_type.nil?
269
- fail ArgumentError, "Missing the required parameter 'object_type' when calling BasicApi.get_page"
270
- end
271
- # resource path
272
- local_var_path = '/{objectType}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/'))
273
-
274
- # query parameters
275
- query_params = opts[:query_params] || {}
276
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
277
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
278
- query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :multi) if !opts[:'properties'].nil?
279
- query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
280
- query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
281
-
282
- # header parameters
283
- header_params = opts[:header_params] || {}
284
- # HTTP header 'Accept' (if needed)
285
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
286
-
287
- # form parameters
288
- form_params = opts[:form_params] || {}
289
-
290
- # http body (model)
291
- post_body = opts[:body]
292
-
293
- # return_type
294
- return_type = opts[:return_type] || 'CollectionResponseSimplePublicObject'
295
-
296
- # auth_names
297
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
298
-
299
- new_options = opts.merge(
300
- :header_params => header_params,
301
- :query_params => query_params,
302
- :form_params => form_params,
303
- :body => post_body,
304
- :auth_names => auth_names,
305
- :return_type => return_type
306
- )
307
-
308
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
309
- if @api_client.config.debugging
310
- @api_client.config.logger.debug "API called: BasicApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
- end
312
- return data, status_code, headers
313
- end
314
-
315
- # Update
316
- # Perform a partial update of an Object identified by `{objectId}`. 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.
317
- # @param object_type [String]
318
- # @param object_id [String]
319
- # @param [Hash] opts the optional parameters
320
- # @option opts [SimplePublicObjectInput] :body
321
- # @return [SimplePublicObject]
322
- def update(object_type, object_id, opts = {})
323
- data, _status_code, _headers = update_with_http_info(object_type, object_id, opts)
324
- data
325
- end
326
-
327
- # Update
328
- # 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.
329
- # @param object_type [String]
330
- # @param object_id [String]
331
- # @param [Hash] opts the optional parameters
332
- # @option opts [SimplePublicObjectInput] :body
333
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
334
- def update_with_http_info(object_type, object_id, opts = {})
335
- if @api_client.config.debugging
336
- @api_client.config.logger.debug 'Calling API: BasicApi.update ...'
337
- end
338
- # verify the required parameter 'object_type' is set
339
- if @api_client.config.client_side_validation && object_type.nil?
340
- fail ArgumentError, "Missing the required parameter 'object_type' when calling BasicApi.update"
341
- end
342
- # verify the required parameter 'object_id' is set
343
- if @api_client.config.client_side_validation && object_id.nil?
344
- fail ArgumentError, "Missing the required parameter 'object_id' when calling BasicApi.update"
345
- end
346
- # resource path
347
- local_var_path = '/{objectType}/{objectId}'.sub('{' + 'objectType' + '}', CGI.escape(object_type.to_s).gsub('%2F', '/')).sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s).gsub('%2F', '/'))
348
-
349
- # query parameters
350
- query_params = opts[:query_params] || {}
351
-
352
- # header parameters
353
- header_params = opts[:header_params] || {}
354
- # HTTP header 'Accept' (if needed)
355
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
356
- # HTTP header 'Content-Type'
357
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
358
-
359
- # form parameters
360
- form_params = opts[:form_params] || {}
361
-
362
- # http body (model)
363
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
364
-
365
- # return_type
366
- return_type = opts[:return_type] || 'SimplePublicObject'
367
-
368
- # auth_names
369
- auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
370
-
371
- new_options = opts.merge(
372
- :header_params => header_params,
373
- :query_params => query_params,
374
- :form_params => form_params,
375
- :body => post_body,
376
- :auth_names => auth_names,
377
- :return_type => return_type
378
- )
379
-
380
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
381
- if @api_client.config.debugging
382
- @api_client.config.logger.debug "API called: BasicApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
383
- end
384
- return data, status_code, headers
385
- end
386
- end
387
- end
388
- end
389
- end