hubspot-api-client 17.1.1 → 17.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/cms/pages/api/landing_pages_api.rb +2754 -0
  5. data/lib/hubspot/codegen/cms/pages/api/site_pages_api.rb +1896 -0
  6. data/lib/hubspot/codegen/cms/pages/api_client.rb +410 -0
  7. data/lib/hubspot/codegen/cms/pages/api_error.rb +61 -0
  8. data/lib/hubspot/codegen/cms/pages/configuration.rb +287 -0
  9. data/lib/hubspot/codegen/cms/pages/models/ab_test_create_request_v_next.rb +244 -0
  10. data/lib/hubspot/codegen/cms/pages/models/ab_test_end_request_v_next.rb +244 -0
  11. data/lib/hubspot/codegen/cms/pages/models/ab_test_rerun_request_v_next.rb +244 -0
  12. data/lib/hubspot/codegen/cms/pages/models/angle.rb +244 -0
  13. data/lib/hubspot/codegen/cms/pages/models/attach_to_lang_primary_request_v_next.rb +269 -0
  14. data/lib/hubspot/codegen/cms/pages/models/background_image.rb +259 -0
  15. data/lib/hubspot/codegen/cms/pages/models/batch_input_content_folder.rb +231 -0
  16. data/lib/hubspot/codegen/cms/pages/models/batch_input_json_node.rb +231 -0
  17. data/lib/hubspot/codegen/cms/pages/models/batch_input_page.rb +231 -0
  18. data/lib/hubspot/codegen/cms/pages/models/batch_input_string.rb +231 -0
  19. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder.rb +326 -0
  20. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder_with_errors.rb +354 -0
  21. data/lib/hubspot/codegen/cms/pages/models/batch_response_page.rb +326 -0
  22. data/lib/hubspot/codegen/cms/pages/models/batch_response_page_with_errors.rb +354 -0
  23. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_content_folder_forward_paging.rb +255 -0
  24. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_page_forward_paging.rb +255 -0
  25. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_content_folder.rb +255 -0
  26. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_page.rb +255 -0
  27. data/lib/hubspot/codegen/cms/pages/models/color_stop.rb +228 -0
  28. data/lib/hubspot/codegen/cms/pages/models/content_clone_request_v_next.rb +239 -0
  29. data/lib/hubspot/codegen/cms/pages/models/content_folder.rb +317 -0
  30. data/lib/hubspot/codegen/cms/pages/models/content_language_clone_request_v_next.rb +249 -0
  31. data/lib/hubspot/codegen/cms/pages/models/content_language_variation.rb +409 -0
  32. data/lib/hubspot/codegen/cms/pages/models/content_schedule_request_v_next.rb +244 -0
  33. data/lib/hubspot/codegen/cms/pages/models/detach_from_lang_group_request_v_next.rb +229 -0
  34. data/lib/hubspot/codegen/cms/pages/models/error.rb +305 -0
  35. data/lib/hubspot/codegen/cms/pages/models/error_detail.rb +271 -0
  36. data/lib/hubspot/codegen/cms/pages/models/forward_paging.rb +223 -0
  37. data/lib/hubspot/codegen/cms/pages/models/gradient.rb +259 -0
  38. data/lib/hubspot/codegen/cms/pages/models/layout_section.rb +416 -0
  39. data/lib/hubspot/codegen/cms/pages/models/next_page.rb +239 -0
  40. data/lib/hubspot/codegen/cms/pages/models/page.rb +1165 -0
  41. data/lib/hubspot/codegen/cms/pages/models/paging.rb +232 -0
  42. data/lib/hubspot/codegen/cms/pages/models/previous_page.rb +239 -0
  43. data/lib/hubspot/codegen/cms/pages/models/rgba_color.rb +274 -0
  44. data/lib/hubspot/codegen/cms/pages/models/row_meta_data.rb +243 -0
  45. data/lib/hubspot/codegen/cms/pages/models/set_new_language_primary_request_v_next.rb +229 -0
  46. data/lib/hubspot/codegen/cms/pages/models/side_or_corner.rb +244 -0
  47. data/lib/hubspot/codegen/cms/pages/models/standard_error.rb +330 -0
  48. data/lib/hubspot/codegen/cms/pages/models/styles.rb +316 -0
  49. data/lib/hubspot/codegen/cms/pages/models/update_languages_request_v_next.rb +246 -0
  50. data/lib/hubspot/codegen/cms/pages/models/version_content_folder.rb +271 -0
  51. data/lib/hubspot/codegen/cms/pages/models/version_page.rb +271 -0
  52. data/lib/hubspot/codegen/cms/pages/models/version_user.rb +259 -0
  53. data/lib/hubspot/codegen/crm/lists/api/lists_api.rb +635 -0
  54. data/lib/hubspot/codegen/crm/lists/api/memberships_api.rb +452 -0
  55. data/lib/hubspot/codegen/crm/lists/api_client.rb +410 -0
  56. data/lib/hubspot/codegen/crm/lists/api_error.rb +61 -0
  57. data/lib/hubspot/codegen/crm/lists/configuration.rb +287 -0
  58. data/lib/hubspot/codegen/crm/lists/models/collection_response_long.rb +240 -0
  59. data/lib/hubspot/codegen/crm/lists/models/error.rb +305 -0
  60. data/lib/hubspot/codegen/crm/lists/models/error_detail.rb +271 -0
  61. data/lib/hubspot/codegen/crm/lists/models/list_create_request.rb +278 -0
  62. data/lib/hubspot/codegen/crm/lists/models/list_create_response.rb +228 -0
  63. data/lib/hubspot/codegen/crm/lists/models/list_fetch_response.rb +228 -0
  64. data/lib/hubspot/codegen/crm/lists/models/list_filter_update_request.rb +228 -0
  65. data/lib/hubspot/codegen/crm/lists/models/list_search_request.rb +266 -0
  66. data/lib/hubspot/codegen/crm/lists/models/list_search_response.rb +276 -0
  67. data/lib/hubspot/codegen/crm/lists/models/list_update_response.rb +223 -0
  68. data/lib/hubspot/codegen/crm/lists/models/lists_by_id_response.rb +231 -0
  69. data/lib/hubspot/codegen/crm/lists/models/membership_change_request.rb +248 -0
  70. data/lib/hubspot/codegen/crm/lists/models/memberships_update_response.rb +264 -0
  71. data/lib/hubspot/codegen/crm/lists/models/next_page.rb +239 -0
  72. data/lib/hubspot/codegen/crm/lists/models/paging.rb +232 -0
  73. data/lib/hubspot/codegen/crm/lists/models/previous_page.rb +239 -0
  74. data/lib/hubspot/codegen/crm/lists/models/public_absolute_comparative_timestamp_refine_by.rb +292 -0
  75. data/lib/hubspot/codegen/crm/lists/models/public_absolute_ranged_timestamp_refine_by.rb +306 -0
  76. data/lib/hubspot/codegen/crm/lists/models/public_ads_search_filter.rb +336 -0
  77. data/lib/hubspot/codegen/crm/lists/models/public_ads_time_filter.rb +278 -0
  78. data/lib/hubspot/codegen/crm/lists/models/public_all_history_refine_by.rb +264 -0
  79. data/lib/hubspot/codegen/crm/lists/models/public_all_property_types_operation.rb +292 -0
  80. data/lib/hubspot/codegen/crm/lists/models/public_and_filter_branch.rb +310 -0
  81. data/lib/hubspot/codegen/crm/lists/models/public_association_filter_branch.rb +366 -0
  82. data/lib/hubspot/codegen/crm/lists/models/public_association_in_list_filter.rb +352 -0
  83. data/lib/hubspot/codegen/crm/lists/models/public_bool_property_operation.rb +306 -0
  84. data/lib/hubspot/codegen/crm/lists/models/public_calendar_date_property_operation.rb +345 -0
  85. data/lib/hubspot/codegen/crm/lists/models/public_campaign_influenced_filter.rb +278 -0
  86. data/lib/hubspot/codegen/crm/lists/models/public_communication_subscription_filter.rb +333 -0
  87. data/lib/hubspot/codegen/crm/lists/models/public_comparative_date_property_operation.rb +315 -0
  88. data/lib/hubspot/codegen/crm/lists/models/public_comparative_property_updated_operation.rb +315 -0
  89. data/lib/hubspot/codegen/crm/lists/models/public_constant_filter.rb +287 -0
  90. data/lib/hubspot/codegen/crm/lists/models/public_cta_analytics_filter.rb +310 -0
  91. data/lib/hubspot/codegen/crm/lists/models/public_date_point.rb +365 -0
  92. data/lib/hubspot/codegen/crm/lists/models/public_date_property_operation.rb +334 -0
  93. data/lib/hubspot/codegen/crm/lists/models/public_date_time_property_operation.rb +320 -0
  94. data/lib/hubspot/codegen/crm/lists/models/public_email_event_filter.rb +350 -0
  95. data/lib/hubspot/codegen/crm/lists/models/public_email_subscription_filter.rb +305 -0
  96. data/lib/hubspot/codegen/crm/lists/models/public_enumeration_property_operation.rb +308 -0
  97. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter.rb +310 -0
  98. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter_coalescing_refine_by.rb +115 -0
  99. data/lib/hubspot/codegen/crm/lists/models/public_event_filter_metadata.rb +242 -0
  100. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_quarter_reference.rb +328 -0
  101. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_year_reference.rb +328 -0
  102. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_filter.rb +317 -0
  103. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_on_page_filter.rb +331 -0
  104. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter.rb +301 -0
  105. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter_metadata.rb +242 -0
  106. data/lib/hubspot/codegen/crm/lists/models/public_index_offset.rb +295 -0
  107. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point.rb +310 -0
  108. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point_index_reference.rb +114 -0
  109. data/lib/hubspot/codegen/crm/lists/models/public_integration_event_filter.rb +294 -0
  110. data/lib/hubspot/codegen/crm/lists/models/public_month_reference.rb +314 -0
  111. data/lib/hubspot/codegen/crm/lists/models/public_multi_string_property_operation.rb +308 -0
  112. data/lib/hubspot/codegen/crm/lists/models/public_not_all_filter_branch.rb +310 -0
  113. data/lib/hubspot/codegen/crm/lists/models/public_not_any_filter_branch.rb +310 -0
  114. data/lib/hubspot/codegen/crm/lists/models/public_now_reference.rb +300 -0
  115. data/lib/hubspot/codegen/crm/lists/models/public_num_associations_filter.rb +306 -0
  116. data/lib/hubspot/codegen/crm/lists/models/public_num_occurrences_refine_by.rb +282 -0
  117. data/lib/hubspot/codegen/crm/lists/models/public_number_property_operation.rb +306 -0
  118. data/lib/hubspot/codegen/crm/lists/models/public_object_list.rb +373 -0
  119. data/lib/hubspot/codegen/crm/lists/models/public_object_list_search_result.rb +381 -0
  120. data/lib/hubspot/codegen/crm/lists/models/public_or_filter_branch.rb +310 -0
  121. data/lib/hubspot/codegen/crm/lists/models/public_page_view_analytics_filter.rb +319 -0
  122. data/lib/hubspot/codegen/crm/lists/models/public_privacy_analytics_filter.rb +292 -0
  123. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch.rb +352 -0
  124. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filter_branches_inner.rb +114 -0
  125. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filters_inner.rb +130 -0
  126. data/lib/hubspot/codegen/crm/lists/models/public_property_association_in_list_filter.rb +329 -0
  127. data/lib/hubspot/codegen/crm/lists/models/public_property_filter.rb +292 -0
  128. data/lib/hubspot/codegen/crm/lists/models/public_property_filter_operation.rb +123 -0
  129. data/lib/hubspot/codegen/crm/lists/models/public_property_referenced_time.rb +315 -0
  130. data/lib/hubspot/codegen/crm/lists/models/public_quarter_reference.rb +328 -0
  131. data/lib/hubspot/codegen/crm/lists/models/public_ranged_date_property_operation.rb +334 -0
  132. data/lib/hubspot/codegen/crm/lists/models/public_ranged_number_property_operation.rb +320 -0
  133. data/lib/hubspot/codegen/crm/lists/models/public_ranged_time_operation.rb +361 -0
  134. data/lib/hubspot/codegen/crm/lists/models/public_relative_comparative_timestamp_refine_by.rb +292 -0
  135. data/lib/hubspot/codegen/crm/lists/models/public_relative_ranged_timestamp_refine_by.rb +306 -0
  136. data/lib/hubspot/codegen/crm/lists/models/public_restricted_filter_branch.rb +310 -0
  137. data/lib/hubspot/codegen/crm/lists/models/public_rolling_date_range_property_operation.rb +320 -0
  138. data/lib/hubspot/codegen/crm/lists/models/public_rolling_property_updated_operation.rb +306 -0
  139. data/lib/hubspot/codegen/crm/lists/models/public_set_occurrences_refine_by.rb +278 -0
  140. data/lib/hubspot/codegen/crm/lists/models/public_string_property_operation.rb +306 -0
  141. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_filter.rb +292 -0
  142. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_value_filter.rb +338 -0
  143. data/lib/hubspot/codegen/crm/lists/models/public_time_offset.rb +256 -0
  144. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation.rb +338 -0
  145. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation_time_point.rb +109 -0
  146. data/lib/hubspot/codegen/crm/lists/models/public_today_reference.rb +300 -0
  147. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter.rb +307 -0
  148. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter_branch.rb +350 -0
  149. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_in_list_filter.rb +310 -0
  150. data/lib/hubspot/codegen/crm/lists/models/public_webinar_filter.rb +287 -0
  151. data/lib/hubspot/codegen/crm/lists/models/public_week_reference.rb +326 -0
  152. data/lib/hubspot/codegen/crm/lists/models/public_year_reference.rb +328 -0
  153. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +391 -0
  154. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +295 -0
  155. data/lib/hubspot/codegen/crm/objects/goals/api/gdpr_api.rb +96 -0
  156. data/lib/hubspot/codegen/crm/objects/goals/api/public_object_api.rb +94 -0
  157. data/lib/hubspot/codegen/crm/objects/goals/api/search_api.rb +92 -0
  158. data/lib/hubspot/codegen/crm/objects/goals/api_client.rb +412 -0
  159. data/lib/hubspot/codegen/crm/objects/goals/api_error.rb +63 -0
  160. data/lib/hubspot/codegen/crm/objects/goals/configuration.rb +289 -0
  161. data/lib/hubspot/codegen/crm/objects/goals/models/associated_id.rb +244 -0
  162. data/lib/hubspot/codegen/crm/objects/goals/models/association_spec.rb +278 -0
  163. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_batch_input.rb +232 -0
  164. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_id.rb +232 -0
  165. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  166. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +273 -0
  167. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object.rb +328 -0
  168. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object_with_errors.rb +348 -0
  169. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_associated_id.rb +241 -0
  170. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  171. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  172. data/lib/hubspot/codegen/crm/objects/goals/models/error.rb +307 -0
  173. data/lib/hubspot/codegen/crm/objects/goals/models/error_detail.rb +273 -0
  174. data/lib/hubspot/codegen/crm/objects/goals/models/filter.rb +308 -0
  175. data/lib/hubspot/codegen/crm/objects/goals/models/filter_group.rb +232 -0
  176. data/lib/hubspot/codegen/crm/objects/goals/models/forward_paging.rb +225 -0
  177. data/lib/hubspot/codegen/crm/objects/goals/models/next_page.rb +239 -0
  178. data/lib/hubspot/codegen/crm/objects/goals/models/paging.rb +234 -0
  179. data/lib/hubspot/codegen/crm/objects/goals/models/previous_page.rb +239 -0
  180. data/lib/hubspot/codegen/crm/objects/goals/models/public_associations_for_object.rb +246 -0
  181. data/lib/hubspot/codegen/crm/objects/goals/models/public_gdpr_delete_input.rb +239 -0
  182. data/lib/hubspot/codegen/crm/objects/goals/models/public_merge_input.rb +244 -0
  183. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_id.rb +230 -0
  184. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_search_request.rb +301 -0
  185. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +303 -0
  186. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +246 -0
  187. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_id.rb +230 -0
  188. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +232 -0
  189. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +248 -0
  190. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +314 -0
  191. data/lib/hubspot/codegen/crm/objects/goals/models/standard_error.rb +324 -0
  192. data/lib/hubspot/codegen/crm/objects/goals/models/value_with_timestamp.rb +285 -0
  193. data/lib/hubspot/codegen/crm/objects/taxes/api/basic_api.rb +391 -0
  194. data/lib/hubspot/codegen/crm/objects/taxes/api/batch_api.rb +295 -0
  195. data/lib/hubspot/codegen/crm/objects/taxes/api/gdpr_api.rb +96 -0
  196. data/lib/hubspot/codegen/crm/objects/taxes/api/public_object_api.rb +94 -0
  197. data/lib/hubspot/codegen/crm/objects/taxes/api/search_api.rb +92 -0
  198. data/lib/hubspot/codegen/crm/objects/taxes/api_client.rb +412 -0
  199. data/lib/hubspot/codegen/crm/objects/taxes/api_error.rb +63 -0
  200. data/lib/hubspot/codegen/crm/objects/taxes/configuration.rb +289 -0
  201. data/lib/hubspot/codegen/crm/objects/taxes/models/associated_id.rb +244 -0
  202. data/lib/hubspot/codegen/crm/objects/taxes/models/association_spec.rb +278 -0
  203. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_batch_input.rb +232 -0
  204. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_id.rb +232 -0
  205. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  206. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_read_input_simple_public_object_id.rb +273 -0
  207. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object.rb +328 -0
  208. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object_with_errors.rb +348 -0
  209. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_associated_id.rb +241 -0
  210. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  211. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  212. data/lib/hubspot/codegen/crm/objects/taxes/models/error.rb +307 -0
  213. data/lib/hubspot/codegen/crm/objects/taxes/models/error_detail.rb +273 -0
  214. data/lib/hubspot/codegen/crm/objects/taxes/models/filter.rb +308 -0
  215. data/lib/hubspot/codegen/crm/objects/taxes/models/filter_group.rb +232 -0
  216. data/lib/hubspot/codegen/crm/objects/taxes/models/forward_paging.rb +225 -0
  217. data/lib/hubspot/codegen/crm/objects/taxes/models/next_page.rb +239 -0
  218. data/lib/hubspot/codegen/crm/objects/taxes/models/paging.rb +234 -0
  219. data/lib/hubspot/codegen/crm/objects/taxes/models/previous_page.rb +239 -0
  220. data/lib/hubspot/codegen/crm/objects/taxes/models/public_associations_for_object.rb +246 -0
  221. data/lib/hubspot/codegen/crm/objects/taxes/models/public_gdpr_delete_input.rb +239 -0
  222. data/lib/hubspot/codegen/crm/objects/taxes/models/public_merge_input.rb +244 -0
  223. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_id.rb +230 -0
  224. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_search_request.rb +301 -0
  225. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object.rb +303 -0
  226. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_batch_input.rb +246 -0
  227. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_id.rb +230 -0
  228. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input.rb +232 -0
  229. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input_for_create.rb +248 -0
  230. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_with_associations.rb +314 -0
  231. data/lib/hubspot/codegen/crm/objects/taxes/models/standard_error.rb +324 -0
  232. data/lib/hubspot/codegen/crm/objects/taxes/models/value_with_timestamp.rb +285 -0
  233. data/lib/hubspot/codegen/events/send/api/behavioral_events_tracking_api.rb +94 -0
  234. data/lib/hubspot/codegen/events/send/api_client.rb +410 -0
  235. data/lib/hubspot/codegen/events/send/api_error.rb +61 -0
  236. data/lib/hubspot/codegen/events/send/configuration.rb +287 -0
  237. data/lib/hubspot/codegen/events/send/models/behavioral_event_http_completion_request.rb +290 -0
  238. data/lib/hubspot/codegen/events/send/models/error.rb +305 -0
  239. data/lib/hubspot/codegen/events/send/models/error_detail.rb +271 -0
  240. data/lib/hubspot/codegen/settings/business_units/api/business_unit_api.rb +95 -0
  241. data/lib/hubspot/codegen/settings/business_units/api_client.rb +410 -0
  242. data/lib/hubspot/codegen/settings/business_units/api_error.rb +61 -0
  243. data/lib/hubspot/codegen/settings/business_units/configuration.rb +287 -0
  244. data/lib/hubspot/codegen/settings/business_units/models/collection_response_public_business_unit_no_paging.rb +232 -0
  245. data/lib/hubspot/codegen/settings/business_units/models/error.rb +305 -0
  246. data/lib/hubspot/codegen/settings/business_units/models/error_detail.rb +271 -0
  247. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit.rb +254 -0
  248. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit_logo_metadata.rb +245 -0
  249. data/lib/hubspot/discovery/cms/client.rb +1 -0
  250. data/lib/hubspot/discovery/cms/pages/api/landing_pages_api.rb +13 -0
  251. data/lib/hubspot/discovery/cms/pages/api/site_pages_api.rb +13 -0
  252. data/lib/hubspot/discovery/cms/pages/client.rb +20 -0
  253. data/lib/hubspot/discovery/crm/client.rb +1 -0
  254. data/lib/hubspot/discovery/crm/lists/api/lists_api.rb +13 -0
  255. data/lib/hubspot/discovery/crm/lists/api/memberships_api.rb +13 -0
  256. data/lib/hubspot/discovery/crm/lists/client.rb +20 -0
  257. data/lib/hubspot/discovery/crm/objects/client.rb +2 -0
  258. data/lib/hubspot/discovery/crm/objects/goals/api/basic_api.rb +15 -0
  259. data/lib/hubspot/discovery/crm/objects/goals/api/batch_api.rb +15 -0
  260. data/lib/hubspot/discovery/crm/objects/goals/api/gdpr_api.rb +15 -0
  261. data/lib/hubspot/discovery/crm/objects/goals/api/public_object_api.rb +15 -0
  262. data/lib/hubspot/discovery/crm/objects/goals/api/search_api.rb +15 -0
  263. data/lib/hubspot/discovery/crm/objects/goals/client.rb +25 -0
  264. data/lib/hubspot/discovery/crm/objects/taxes/api/basic_api.rb +15 -0
  265. data/lib/hubspot/discovery/crm/objects/taxes/api/batch_api.rb +15 -0
  266. data/lib/hubspot/discovery/crm/objects/taxes/api/gdpr_api.rb +15 -0
  267. data/lib/hubspot/discovery/crm/objects/taxes/api/public_object_api.rb +15 -0
  268. data/lib/hubspot/discovery/crm/objects/taxes/api/search_api.rb +15 -0
  269. data/lib/hubspot/discovery/crm/objects/taxes/client.rb +25 -0
  270. data/lib/hubspot/discovery/events/client.rb +6 -0
  271. data/lib/hubspot/discovery/events/send/api/behavioral_events_tracking_api.rb +13 -0
  272. data/lib/hubspot/discovery/events/send/client.rb +19 -0
  273. data/lib/hubspot/discovery/settings/business_units/api/business_unit_api.rb +13 -0
  274. data/lib/hubspot/discovery/settings/business_units/client.rb +19 -0
  275. data/lib/hubspot/discovery/settings/client.rb +1 -0
  276. data/lib/hubspot/version.rb +1 -1
  277. data/spec/discovery/client_spec.rb +1 -0
  278. data/spec/discovery/cms/client_spec.rb +1 -0
  279. data/spec/discovery/cms/pages/landing_pages_api_spec.rb +45 -0
  280. data/spec/discovery/cms/pages/site_pages_api_spec.rb +33 -0
  281. data/spec/discovery/crm/lists/lists_api_spec.rb +15 -0
  282. data/spec/discovery/crm/lists/memberships_api_spec.rb +12 -0
  283. data/spec/discovery/crm/objects/goals/basic_api_spec.rb +11 -0
  284. data/spec/discovery/crm/objects/goals/batch_api_spec.rb +10 -0
  285. data/spec/discovery/crm/objects/goals/gdpr_api_spec.rb +7 -0
  286. data/spec/discovery/crm/objects/goals/public_object_api_spec.rb +7 -0
  287. data/spec/discovery/crm/objects/goals/search_api_spec.rb +7 -0
  288. data/spec/discovery/crm/objects/taxes/basic_api_spec.rb +11 -0
  289. data/spec/discovery/crm/objects/taxes/batch_api_spec.rb +10 -0
  290. data/spec/discovery/crm/objects/taxes/gdpr_api_spec.rb +7 -0
  291. data/spec/discovery/crm/objects/taxes/public_object_api_spec.rb +7 -0
  292. data/spec/discovery/crm/objects/taxes/search_api_spec.rb +7 -0
  293. data/spec/discovery/events/send/behavioral_events_tracking_api_spec.rb +7 -0
  294. data/spec/discovery/settings/businnes_units/business_unit_api_spec.rb +7 -0
  295. data/spec/integration/contacts_spec.rb +85 -0
  296. metadata +303 -2
@@ -0,0 +1,381 @@
1
+ =begin
2
+ #Lists
3
+
4
+ #CRUD operations to manage lists and list memberships
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Crm
18
+ module Lists
19
+ class PublicObjectListSearchResult
20
+ # The processing type of the list.
21
+ attr_accessor :processing_type
22
+
23
+ # The object type of the list.
24
+ attr_accessor :object_type_id
25
+
26
+ # The ID of the user that last updated the list.
27
+ attr_accessor :updated_by_id
28
+
29
+ # The time when the filters for this list were last updated.
30
+ attr_accessor :filters_updated_at
31
+
32
+ # The **ILS ID** of the list.
33
+ attr_accessor :list_id
34
+
35
+ # The time when the list was created.
36
+ attr_accessor :created_at
37
+
38
+ # The processing status of the list.
39
+ attr_accessor :processing_status
40
+
41
+ # The time when the list was deleted.
42
+ attr_accessor :deleted_at
43
+
44
+ # The version of the list.
45
+ attr_accessor :list_version
46
+
47
+ # The name of the list.
48
+ attr_accessor :name
49
+
50
+ # The name and value of any additional properties that exist for this list and that were included in the search request.
51
+ attr_accessor :additional_properties
52
+
53
+ # The ID of the user that created the list.
54
+ attr_accessor :created_by_id
55
+
56
+ # The time the list was last updated.
57
+ attr_accessor :updated_at
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'processing_type' => :'processingType',
63
+ :'object_type_id' => :'objectTypeId',
64
+ :'updated_by_id' => :'updatedById',
65
+ :'filters_updated_at' => :'filtersUpdatedAt',
66
+ :'list_id' => :'listId',
67
+ :'created_at' => :'createdAt',
68
+ :'processing_status' => :'processingStatus',
69
+ :'deleted_at' => :'deletedAt',
70
+ :'list_version' => :'listVersion',
71
+ :'name' => :'name',
72
+ :'additional_properties' => :'additionalProperties',
73
+ :'created_by_id' => :'createdById',
74
+ :'updated_at' => :'updatedAt'
75
+ }
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'processing_type' => :'String',
87
+ :'object_type_id' => :'String',
88
+ :'updated_by_id' => :'Integer',
89
+ :'filters_updated_at' => :'Time',
90
+ :'list_id' => :'Integer',
91
+ :'created_at' => :'Time',
92
+ :'processing_status' => :'String',
93
+ :'deleted_at' => :'Time',
94
+ :'list_version' => :'Integer',
95
+ :'name' => :'String',
96
+ :'additional_properties' => :'Hash<String, String>',
97
+ :'created_by_id' => :'Integer',
98
+ :'updated_at' => :'Time'
99
+ }
100
+ end
101
+
102
+ # List of attributes with nullable: true
103
+ def self.openapi_nullable
104
+ Set.new([
105
+ ])
106
+ end
107
+
108
+ # Initializes the object
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ def initialize(attributes = {})
111
+ if (!attributes.is_a?(Hash))
112
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Lists::PublicObjectListSearchResult` initialize method"
113
+ end
114
+
115
+ # check to see if the attribute exists and convert string to symbol for hash key
116
+ attributes = attributes.each_with_object({}) { |(k, v), h|
117
+ if (!self.class.attribute_map.key?(k.to_sym))
118
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Lists::PublicObjectListSearchResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
119
+ end
120
+ h[k.to_sym] = v
121
+ }
122
+
123
+ if attributes.key?(:'processing_type')
124
+ self.processing_type = attributes[:'processing_type']
125
+ end
126
+
127
+ if attributes.key?(:'object_type_id')
128
+ self.object_type_id = attributes[:'object_type_id']
129
+ end
130
+
131
+ if attributes.key?(:'updated_by_id')
132
+ self.updated_by_id = attributes[:'updated_by_id']
133
+ end
134
+
135
+ if attributes.key?(:'filters_updated_at')
136
+ self.filters_updated_at = attributes[:'filters_updated_at']
137
+ end
138
+
139
+ if attributes.key?(:'list_id')
140
+ self.list_id = attributes[:'list_id']
141
+ end
142
+
143
+ if attributes.key?(:'created_at')
144
+ self.created_at = attributes[:'created_at']
145
+ end
146
+
147
+ if attributes.key?(:'processing_status')
148
+ self.processing_status = attributes[:'processing_status']
149
+ end
150
+
151
+ if attributes.key?(:'deleted_at')
152
+ self.deleted_at = attributes[:'deleted_at']
153
+ end
154
+
155
+ if attributes.key?(:'list_version')
156
+ self.list_version = attributes[:'list_version']
157
+ end
158
+
159
+ if attributes.key?(:'name')
160
+ self.name = attributes[:'name']
161
+ end
162
+
163
+ if attributes.key?(:'additional_properties')
164
+ if (value = attributes[:'additional_properties']).is_a?(Hash)
165
+ self.additional_properties = value
166
+ end
167
+ end
168
+
169
+ if attributes.key?(:'created_by_id')
170
+ self.created_by_id = attributes[:'created_by_id']
171
+ end
172
+
173
+ if attributes.key?(:'updated_at')
174
+ self.updated_at = attributes[:'updated_at']
175
+ end
176
+ end
177
+
178
+ # Show invalid properties with the reasons. Usually used together with valid?
179
+ # @return Array for valid properties with the reasons
180
+ def list_invalid_properties
181
+ invalid_properties = Array.new
182
+ if @processing_type.nil?
183
+ invalid_properties.push('invalid value for "processing_type", processing_type cannot be nil.')
184
+ end
185
+
186
+ if @object_type_id.nil?
187
+ invalid_properties.push('invalid value for "object_type_id", object_type_id cannot be nil.')
188
+ end
189
+
190
+ if @list_id.nil?
191
+ invalid_properties.push('invalid value for "list_id", list_id cannot be nil.')
192
+ end
193
+
194
+ if @processing_status.nil?
195
+ invalid_properties.push('invalid value for "processing_status", processing_status cannot be nil.')
196
+ end
197
+
198
+ if @list_version.nil?
199
+ invalid_properties.push('invalid value for "list_version", list_version cannot be nil.')
200
+ end
201
+
202
+ if @name.nil?
203
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
204
+ end
205
+
206
+ if @additional_properties.nil?
207
+ invalid_properties.push('invalid value for "additional_properties", additional_properties cannot be nil.')
208
+ end
209
+
210
+ invalid_properties
211
+ end
212
+
213
+ # Check to see if the all the properties in the model are valid
214
+ # @return true if the model is valid
215
+ def valid?
216
+ return false if @processing_type.nil?
217
+ return false if @object_type_id.nil?
218
+ return false if @list_id.nil?
219
+ return false if @processing_status.nil?
220
+ return false if @list_version.nil?
221
+ return false if @name.nil?
222
+ return false if @additional_properties.nil?
223
+ true
224
+ end
225
+
226
+ # Checks equality by comparing each attribute.
227
+ # @param [Object] Object to be compared
228
+ def ==(o)
229
+ return true if self.equal?(o)
230
+ self.class == o.class &&
231
+ processing_type == o.processing_type &&
232
+ object_type_id == o.object_type_id &&
233
+ updated_by_id == o.updated_by_id &&
234
+ filters_updated_at == o.filters_updated_at &&
235
+ list_id == o.list_id &&
236
+ created_at == o.created_at &&
237
+ processing_status == o.processing_status &&
238
+ deleted_at == o.deleted_at &&
239
+ list_version == o.list_version &&
240
+ name == o.name &&
241
+ additional_properties == o.additional_properties &&
242
+ created_by_id == o.created_by_id &&
243
+ updated_at == o.updated_at
244
+ end
245
+
246
+ # @see the `==` method
247
+ # @param [Object] Object to be compared
248
+ def eql?(o)
249
+ self == o
250
+ end
251
+
252
+ # Calculates hash code according to all attributes.
253
+ # @return [Integer] Hash code
254
+ def hash
255
+ [processing_type, object_type_id, updated_by_id, filters_updated_at, list_id, created_at, processing_status, deleted_at, list_version, name, additional_properties, created_by_id, updated_at].hash
256
+ end
257
+
258
+ # Builds the object from hash
259
+ # @param [Hash] attributes Model attributes in the form of hash
260
+ # @return [Object] Returns the model itself
261
+ def self.build_from_hash(attributes)
262
+ new.build_from_hash(attributes)
263
+ end
264
+
265
+ # Builds the object from hash
266
+ # @param [Hash] attributes Model attributes in the form of hash
267
+ # @return [Object] Returns the model itself
268
+ def build_from_hash(attributes)
269
+ return nil unless attributes.is_a?(Hash)
270
+ attributes = attributes.transform_keys(&:to_sym)
271
+ self.class.openapi_types.each_pair do |key, type|
272
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
273
+ self.send("#{key}=", nil)
274
+ elsif type =~ /\AArray<(.*)>/i
275
+ # check to ensure the input is an array given that the attribute
276
+ # is documented as an array but the input is not
277
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
278
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
279
+ end
280
+ elsif !attributes[self.class.attribute_map[key]].nil?
281
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
282
+ end
283
+ end
284
+
285
+ self
286
+ end
287
+
288
+ # Deserializes the data based on type
289
+ # @param string type Data type
290
+ # @param string value Value to be deserialized
291
+ # @return [Object] Deserialized data
292
+ def _deserialize(type, value)
293
+ case type.to_sym
294
+ when :Time
295
+ Time.parse(value)
296
+ when :Date
297
+ Date.parse(value)
298
+ when :String
299
+ value.to_s
300
+ when :Integer
301
+ value.to_i
302
+ when :Float
303
+ value.to_f
304
+ when :Boolean
305
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
306
+ true
307
+ else
308
+ false
309
+ end
310
+ when :Object
311
+ # generic object (usually a Hash), return directly
312
+ value
313
+ when /\AArray<(?<inner_type>.+)>\z/
314
+ inner_type = Regexp.last_match[:inner_type]
315
+ value.map { |v| _deserialize(inner_type, v) }
316
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
317
+ k_type = Regexp.last_match[:k_type]
318
+ v_type = Regexp.last_match[:v_type]
319
+ {}.tap do |hash|
320
+ value.each do |k, v|
321
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
322
+ end
323
+ end
324
+ else # model
325
+ # models (e.g. Pet) or oneOf
326
+ klass = Hubspot::Crm::Lists.const_get(type)
327
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
328
+ end
329
+ end
330
+
331
+ # Returns the string representation of the object
332
+ # @return [String] String presentation of the object
333
+ def to_s
334
+ to_hash.to_s
335
+ end
336
+
337
+ # to_body is an alias to to_hash (backward compatibility)
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_body
340
+ to_hash
341
+ end
342
+
343
+ # Returns the object in the form of hash
344
+ # @return [Hash] Returns the object in the form of hash
345
+ def to_hash
346
+ hash = {}
347
+ self.class.attribute_map.each_pair do |attr, param|
348
+ value = self.send(attr)
349
+ if value.nil?
350
+ is_nullable = self.class.openapi_nullable.include?(attr)
351
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
352
+ end
353
+
354
+ hash[param] = _to_hash(value)
355
+ end
356
+ hash
357
+ end
358
+
359
+ # Outputs non-array value in the form of hash
360
+ # For object, use to_hash. Otherwise, just return the value
361
+ # @param [Object] value Any valid value
362
+ # @return [Hash] Returns the value in the form of hash
363
+ def _to_hash(value)
364
+ if value.is_a?(Array)
365
+ value.compact.map { |v| _to_hash(v) }
366
+ elsif value.is_a?(Hash)
367
+ {}.tap do |hash|
368
+ value.each { |k, v| hash[k] = _to_hash(v) }
369
+ end
370
+ elsif value.respond_to? :to_hash
371
+ value.to_hash
372
+ else
373
+ value
374
+ end
375
+ end
376
+
377
+ end
378
+
379
+ end
380
+ end
381
+ end
@@ -0,0 +1,310 @@
1
+ =begin
2
+ #Lists
3
+
4
+ #CRUD operations to manage lists and list memberships
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Crm
18
+ module Lists
19
+ class PublicOrFilterBranch
20
+ attr_accessor :filter_branch_type
21
+
22
+ attr_accessor :filter_branches
23
+
24
+ attr_accessor :filters
25
+
26
+ attr_accessor :filter_branch_operator
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'filter_branch_type' => :'filterBranchType',
54
+ :'filter_branches' => :'filterBranches',
55
+ :'filters' => :'filters',
56
+ :'filter_branch_operator' => :'filterBranchOperator'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'filter_branch_type' => :'String',
69
+ :'filter_branches' => :'Array<PublicPropertyAssociationFilterBranchFilterBranchesInner>',
70
+ :'filters' => :'Array<PublicPropertyAssociationFilterBranchFiltersInner>',
71
+ :'filter_branch_operator' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Lists::PublicOrFilterBranch` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Lists::PublicOrFilterBranch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'filter_branch_type')
97
+ self.filter_branch_type = attributes[:'filter_branch_type']
98
+ else
99
+ self.filter_branch_type = 'OR'
100
+ end
101
+
102
+ if attributes.key?(:'filter_branches')
103
+ if (value = attributes[:'filter_branches']).is_a?(Array)
104
+ self.filter_branches = value
105
+ end
106
+ end
107
+
108
+ if attributes.key?(:'filters')
109
+ if (value = attributes[:'filters']).is_a?(Array)
110
+ self.filters = value
111
+ end
112
+ end
113
+
114
+ if attributes.key?(:'filter_branch_operator')
115
+ self.filter_branch_operator = attributes[:'filter_branch_operator']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ invalid_properties = Array.new
123
+ if @filter_branch_type.nil?
124
+ invalid_properties.push('invalid value for "filter_branch_type", filter_branch_type cannot be nil.')
125
+ end
126
+
127
+ if @filter_branches.nil?
128
+ invalid_properties.push('invalid value for "filter_branches", filter_branches cannot be nil.')
129
+ end
130
+
131
+ if @filters.nil?
132
+ invalid_properties.push('invalid value for "filters", filters cannot be nil.')
133
+ end
134
+
135
+ if @filter_branch_operator.nil?
136
+ invalid_properties.push('invalid value for "filter_branch_operator", filter_branch_operator cannot be nil.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ return false if @filter_branch_type.nil?
146
+ filter_branch_type_validator = EnumAttributeValidator.new('String', ["OR"])
147
+ return false unless filter_branch_type_validator.valid?(@filter_branch_type)
148
+ return false if @filter_branches.nil?
149
+ return false if @filters.nil?
150
+ return false if @filter_branch_operator.nil?
151
+ true
152
+ end
153
+
154
+ # Custom attribute writer method checking allowed values (enum).
155
+ # @param [Object] filter_branch_type Object to be assigned
156
+ def filter_branch_type=(filter_branch_type)
157
+ validator = EnumAttributeValidator.new('String', ["OR"])
158
+ unless validator.valid?(filter_branch_type)
159
+ fail ArgumentError, "invalid value for \"filter_branch_type\", must be one of #{validator.allowable_values}."
160
+ end
161
+ @filter_branch_type = filter_branch_type
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ filter_branch_type == o.filter_branch_type &&
170
+ filter_branches == o.filter_branches &&
171
+ filters == o.filters &&
172
+ filter_branch_operator == o.filter_branch_operator
173
+ end
174
+
175
+ # @see the `==` method
176
+ # @param [Object] Object to be compared
177
+ def eql?(o)
178
+ self == o
179
+ end
180
+
181
+ # Calculates hash code according to all attributes.
182
+ # @return [Integer] Hash code
183
+ def hash
184
+ [filter_branch_type, filter_branches, filters, filter_branch_operator].hash
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def self.build_from_hash(attributes)
191
+ new.build_from_hash(attributes)
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ attributes = attributes.transform_keys(&:to_sym)
200
+ self.class.openapi_types.each_pair do |key, type|
201
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
202
+ self.send("#{key}=", nil)
203
+ elsif type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
207
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
208
+ end
209
+ elsif !attributes[self.class.attribute_map[key]].nil?
210
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
211
+ end
212
+ end
213
+
214
+ self
215
+ end
216
+
217
+ # Deserializes the data based on type
218
+ # @param string type Data type
219
+ # @param string value Value to be deserialized
220
+ # @return [Object] Deserialized data
221
+ def _deserialize(type, value)
222
+ case type.to_sym
223
+ when :Time
224
+ Time.parse(value)
225
+ when :Date
226
+ Date.parse(value)
227
+ when :String
228
+ value.to_s
229
+ when :Integer
230
+ value.to_i
231
+ when :Float
232
+ value.to_f
233
+ when :Boolean
234
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
235
+ true
236
+ else
237
+ false
238
+ end
239
+ when :Object
240
+ # generic object (usually a Hash), return directly
241
+ value
242
+ when /\AArray<(?<inner_type>.+)>\z/
243
+ inner_type = Regexp.last_match[:inner_type]
244
+ value.map { |v| _deserialize(inner_type, v) }
245
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
246
+ k_type = Regexp.last_match[:k_type]
247
+ v_type = Regexp.last_match[:v_type]
248
+ {}.tap do |hash|
249
+ value.each do |k, v|
250
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
251
+ end
252
+ end
253
+ else # model
254
+ # models (e.g. Pet) or oneOf
255
+ klass = Hubspot::Crm::Lists.const_get(type)
256
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
257
+ end
258
+ end
259
+
260
+ # Returns the string representation of the object
261
+ # @return [String] String presentation of the object
262
+ def to_s
263
+ to_hash.to_s
264
+ end
265
+
266
+ # to_body is an alias to to_hash (backward compatibility)
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_body
269
+ to_hash
270
+ end
271
+
272
+ # Returns the object in the form of hash
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_hash
275
+ hash = {}
276
+ self.class.attribute_map.each_pair do |attr, param|
277
+ value = self.send(attr)
278
+ if value.nil?
279
+ is_nullable = self.class.openapi_nullable.include?(attr)
280
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
281
+ end
282
+
283
+ hash[param] = _to_hash(value)
284
+ end
285
+ hash
286
+ end
287
+
288
+ # Outputs non-array value in the form of hash
289
+ # For object, use to_hash. Otherwise, just return the value
290
+ # @param [Object] value Any valid value
291
+ # @return [Hash] Returns the value in the form of hash
292
+ def _to_hash(value)
293
+ if value.is_a?(Array)
294
+ value.compact.map { |v| _to_hash(v) }
295
+ elsif value.is_a?(Hash)
296
+ {}.tap do |hash|
297
+ value.each { |k, v| hash[k] = _to_hash(v) }
298
+ end
299
+ elsif value.respond_to? :to_hash
300
+ value.to_hash
301
+ else
302
+ value
303
+ end
304
+ end
305
+
306
+ end
307
+
308
+ end
309
+ end
310
+ end