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,331 @@
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 PublicFormSubmissionOnPageFilter
20
+ attr_accessor :filter_type
21
+
22
+ attr_accessor :form_id
23
+
24
+ attr_accessor :pruning_refine_by
25
+
26
+ attr_accessor :coalescing_refine_by
27
+
28
+ attr_accessor :operator
29
+
30
+ attr_accessor :page_id
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'filter_type' => :'filterType',
58
+ :'form_id' => :'formId',
59
+ :'pruning_refine_by' => :'pruningRefineBy',
60
+ :'coalescing_refine_by' => :'coalescingRefineBy',
61
+ :'operator' => :'operator',
62
+ :'page_id' => :'pageId'
63
+ }
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'filter_type' => :'String',
75
+ :'form_id' => :'String',
76
+ :'pruning_refine_by' => :'PublicEventAnalyticsFilterCoalescingRefineBy',
77
+ :'coalescing_refine_by' => :'PublicEventAnalyticsFilterCoalescingRefineBy',
78
+ :'operator' => :'String',
79
+ :'page_id' => :'String'
80
+ }
81
+ end
82
+
83
+ # List of attributes with nullable: true
84
+ def self.openapi_nullable
85
+ Set.new([
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Lists::PublicFormSubmissionOnPageFilter` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!self.class.attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Lists::PublicFormSubmissionOnPageFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'filter_type')
105
+ self.filter_type = attributes[:'filter_type']
106
+ else
107
+ self.filter_type = 'FORM_SUBMISSION_ON_PAGE'
108
+ end
109
+
110
+ if attributes.key?(:'form_id')
111
+ self.form_id = attributes[:'form_id']
112
+ end
113
+
114
+ if attributes.key?(:'pruning_refine_by')
115
+ self.pruning_refine_by = attributes[:'pruning_refine_by']
116
+ end
117
+
118
+ if attributes.key?(:'coalescing_refine_by')
119
+ self.coalescing_refine_by = attributes[:'coalescing_refine_by']
120
+ end
121
+
122
+ if attributes.key?(:'operator')
123
+ self.operator = attributes[:'operator']
124
+ end
125
+
126
+ if attributes.key?(:'page_id')
127
+ self.page_id = attributes[:'page_id']
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ invalid_properties = Array.new
135
+ if @filter_type.nil?
136
+ invalid_properties.push('invalid value for "filter_type", filter_type cannot be nil.')
137
+ end
138
+
139
+ if @operator.nil?
140
+ invalid_properties.push('invalid value for "operator", operator cannot be nil.')
141
+ end
142
+
143
+ if @page_id.nil?
144
+ invalid_properties.push('invalid value for "page_id", page_id cannot be nil.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ return false if @filter_type.nil?
154
+ filter_type_validator = EnumAttributeValidator.new('String', ["FORM_SUBMISSION_ON_PAGE"])
155
+ return false unless filter_type_validator.valid?(@filter_type)
156
+ return false if @operator.nil?
157
+ operator_validator = EnumAttributeValidator.new('String', ["FILLED_OUT", "NOT_FILLED_OUT"])
158
+ return false unless operator_validator.valid?(@operator)
159
+ return false if @page_id.nil?
160
+ true
161
+ end
162
+
163
+ # Custom attribute writer method checking allowed values (enum).
164
+ # @param [Object] filter_type Object to be assigned
165
+ def filter_type=(filter_type)
166
+ validator = EnumAttributeValidator.new('String', ["FORM_SUBMISSION_ON_PAGE"])
167
+ unless validator.valid?(filter_type)
168
+ fail ArgumentError, "invalid value for \"filter_type\", must be one of #{validator.allowable_values}."
169
+ end
170
+ @filter_type = filter_type
171
+ end
172
+
173
+ # Custom attribute writer method checking allowed values (enum).
174
+ # @param [Object] operator Object to be assigned
175
+ def operator=(operator)
176
+ validator = EnumAttributeValidator.new('String', ["FILLED_OUT", "NOT_FILLED_OUT"])
177
+ unless validator.valid?(operator)
178
+ fail ArgumentError, "invalid value for \"operator\", must be one of #{validator.allowable_values}."
179
+ end
180
+ @operator = operator
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ filter_type == o.filter_type &&
189
+ form_id == o.form_id &&
190
+ pruning_refine_by == o.pruning_refine_by &&
191
+ coalescing_refine_by == o.coalescing_refine_by &&
192
+ operator == o.operator &&
193
+ page_id == o.page_id
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [filter_type, form_id, pruning_refine_by, coalescing_refine_by, operator, page_id].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ new.build_from_hash(attributes)
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ self.class.openapi_types.each_pair do |key, type|
222
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
223
+ self.send("#{key}=", nil)
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
226
+ # is documented as an array but the input is not
227
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
228
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
229
+ end
230
+ elsif !attributes[self.class.attribute_map[key]].nil?
231
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
232
+ end
233
+ end
234
+
235
+ self
236
+ end
237
+
238
+ # Deserializes the data based on type
239
+ # @param string type Data type
240
+ # @param string value Value to be deserialized
241
+ # @return [Object] Deserialized data
242
+ def _deserialize(type, value)
243
+ case type.to_sym
244
+ when :Time
245
+ Time.parse(value)
246
+ when :Date
247
+ Date.parse(value)
248
+ when :String
249
+ value.to_s
250
+ when :Integer
251
+ value.to_i
252
+ when :Float
253
+ value.to_f
254
+ when :Boolean
255
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
256
+ true
257
+ else
258
+ false
259
+ end
260
+ when :Object
261
+ # generic object (usually a Hash), return directly
262
+ value
263
+ when /\AArray<(?<inner_type>.+)>\z/
264
+ inner_type = Regexp.last_match[:inner_type]
265
+ value.map { |v| _deserialize(inner_type, v) }
266
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
267
+ k_type = Regexp.last_match[:k_type]
268
+ v_type = Regexp.last_match[:v_type]
269
+ {}.tap do |hash|
270
+ value.each do |k, v|
271
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
272
+ end
273
+ end
274
+ else # model
275
+ # models (e.g. Pet) or oneOf
276
+ klass = Hubspot::Crm::Lists.const_get(type)
277
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
278
+ end
279
+ end
280
+
281
+ # Returns the string representation of the object
282
+ # @return [String] String presentation of the object
283
+ def to_s
284
+ to_hash.to_s
285
+ end
286
+
287
+ # to_body is an alias to to_hash (backward compatibility)
288
+ # @return [Hash] Returns the object in the form of hash
289
+ def to_body
290
+ to_hash
291
+ end
292
+
293
+ # Returns the object in the form of hash
294
+ # @return [Hash] Returns the object in the form of hash
295
+ def to_hash
296
+ hash = {}
297
+ self.class.attribute_map.each_pair do |attr, param|
298
+ value = self.send(attr)
299
+ if value.nil?
300
+ is_nullable = self.class.openapi_nullable.include?(attr)
301
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
302
+ end
303
+
304
+ hash[param] = _to_hash(value)
305
+ end
306
+ hash
307
+ end
308
+
309
+ # Outputs non-array value in the form of hash
310
+ # For object, use to_hash. Otherwise, just return the value
311
+ # @param [Object] value Any valid value
312
+ # @return [Hash] Returns the value in the form of hash
313
+ def _to_hash(value)
314
+ if value.is_a?(Array)
315
+ value.compact.map { |v| _to_hash(v) }
316
+ elsif value.is_a?(Hash)
317
+ {}.tap do |hash|
318
+ value.each { |k, v| hash[k] = _to_hash(v) }
319
+ end
320
+ elsif value.respond_to? :to_hash
321
+ value.to_hash
322
+ else
323
+ value
324
+ end
325
+ end
326
+
327
+ end
328
+
329
+ end
330
+ end
331
+ end
@@ -0,0 +1,301 @@
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 PublicInListFilter
20
+ attr_accessor :filter_type
21
+
22
+ attr_accessor :list_id
23
+
24
+ attr_accessor :metadata
25
+
26
+ attr_accessor :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_type' => :'filterType',
54
+ :'list_id' => :'listId',
55
+ :'metadata' => :'metadata',
56
+ :'operator' => :'operator'
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_type' => :'String',
69
+ :'list_id' => :'Integer',
70
+ :'metadata' => :'PublicInListFilterMetadata',
71
+ :'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::PublicInListFilter` 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::PublicInListFilter`. 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_type')
97
+ self.filter_type = attributes[:'filter_type']
98
+ else
99
+ self.filter_type = 'IN_LIST'
100
+ end
101
+
102
+ if attributes.key?(:'list_id')
103
+ self.list_id = attributes[:'list_id']
104
+ end
105
+
106
+ if attributes.key?(:'metadata')
107
+ self.metadata = attributes[:'metadata']
108
+ end
109
+
110
+ if attributes.key?(:'operator')
111
+ self.operator = attributes[:'operator']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ invalid_properties = Array.new
119
+ if @filter_type.nil?
120
+ invalid_properties.push('invalid value for "filter_type", filter_type cannot be nil.')
121
+ end
122
+
123
+ if @list_id.nil?
124
+ invalid_properties.push('invalid value for "list_id", list_id cannot be nil.')
125
+ end
126
+
127
+ if @operator.nil?
128
+ invalid_properties.push('invalid value for "operator", operator cannot be nil.')
129
+ end
130
+
131
+ invalid_properties
132
+ end
133
+
134
+ # Check to see if the all the properties in the model are valid
135
+ # @return true if the model is valid
136
+ def valid?
137
+ return false if @filter_type.nil?
138
+ filter_type_validator = EnumAttributeValidator.new('String', ["IN_LIST"])
139
+ return false unless filter_type_validator.valid?(@filter_type)
140
+ return false if @list_id.nil?
141
+ return false if @operator.nil?
142
+ true
143
+ end
144
+
145
+ # Custom attribute writer method checking allowed values (enum).
146
+ # @param [Object] filter_type Object to be assigned
147
+ def filter_type=(filter_type)
148
+ validator = EnumAttributeValidator.new('String', ["IN_LIST"])
149
+ unless validator.valid?(filter_type)
150
+ fail ArgumentError, "invalid value for \"filter_type\", must be one of #{validator.allowable_values}."
151
+ end
152
+ @filter_type = filter_type
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ filter_type == o.filter_type &&
161
+ list_id == o.list_id &&
162
+ metadata == o.metadata &&
163
+ operator == o.operator
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Integer] Hash code
174
+ def hash
175
+ [filter_type, list_id, metadata, operator].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def self.build_from_hash(attributes)
182
+ new.build_from_hash(attributes)
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def build_from_hash(attributes)
189
+ return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
191
+ self.class.openapi_types.each_pair do |key, type|
192
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
+ self.send("#{key}=", nil)
194
+ elsif type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
198
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
199
+ end
200
+ elsif !attributes[self.class.attribute_map[key]].nil?
201
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ end
203
+ end
204
+
205
+ self
206
+ end
207
+
208
+ # Deserializes the data based on type
209
+ # @param string type Data type
210
+ # @param string value Value to be deserialized
211
+ # @return [Object] Deserialized data
212
+ def _deserialize(type, value)
213
+ case type.to_sym
214
+ when :Time
215
+ Time.parse(value)
216
+ when :Date
217
+ Date.parse(value)
218
+ when :String
219
+ value.to_s
220
+ when :Integer
221
+ value.to_i
222
+ when :Float
223
+ value.to_f
224
+ when :Boolean
225
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
226
+ true
227
+ else
228
+ false
229
+ end
230
+ when :Object
231
+ # generic object (usually a Hash), return directly
232
+ value
233
+ when /\AArray<(?<inner_type>.+)>\z/
234
+ inner_type = Regexp.last_match[:inner_type]
235
+ value.map { |v| _deserialize(inner_type, v) }
236
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
237
+ k_type = Regexp.last_match[:k_type]
238
+ v_type = Regexp.last_match[:v_type]
239
+ {}.tap do |hash|
240
+ value.each do |k, v|
241
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
242
+ end
243
+ end
244
+ else # model
245
+ # models (e.g. Pet) or oneOf
246
+ klass = Hubspot::Crm::Lists.const_get(type)
247
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
+ end
249
+ end
250
+
251
+ # Returns the string representation of the object
252
+ # @return [String] String presentation of the object
253
+ def to_s
254
+ to_hash.to_s
255
+ end
256
+
257
+ # to_body is an alias to to_hash (backward compatibility)
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_body
260
+ to_hash
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+
297
+ end
298
+
299
+ end
300
+ end
301
+ end