hubspot-api-client 9.6.0 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +3 -3
  4. data/lib/hubspot/codegen/automation/actions/api_client.rb +14 -0
  5. data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +14 -0
  6. data/lib/hubspot/codegen/cms/blogs/authors/api/default_api.rb +2 -2
  7. data/lib/hubspot/codegen/cms/blogs/authors/api_client.rb +14 -0
  8. data/lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb +2 -2
  9. data/lib/hubspot/codegen/cms/blogs/blog-posts/api_client.rb +14 -0
  10. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/blog_post.rb +108 -102
  11. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/layout_section.rb +4 -2
  12. data/lib/hubspot/codegen/cms/blogs/tags/api/default_api.rb +2 -2
  13. data/lib/hubspot/codegen/cms/blogs/tags/api_client.rb +14 -0
  14. data/lib/hubspot/codegen/cms/domains/api_client.rb +14 -0
  15. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +1 -1
  16. data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +1 -1
  17. data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +1 -1
  18. data/lib/hubspot/codegen/cms/hubdb/api_client.rb +15 -1
  19. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  20. data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
  21. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3.rb +1 -1
  22. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
  23. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
  24. data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
  25. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
  26. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
  27. data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
  28. data/lib/hubspot/codegen/cms/hubdb/models/column_input.rb +1 -1
  29. data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
  30. data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
  31. data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
  32. data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
  33. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +1 -1
  34. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +5 -3
  35. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input.rb +1 -1
  36. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
  37. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_input.rb +1 -1
  38. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +1 -1
  39. data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
  40. data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
  41. data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
  42. data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
  43. data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
  44. data/lib/hubspot/codegen/cms/performance/api_client.rb +14 -0
  45. data/lib/hubspot/codegen/cms/site-search/api/default_api.rb +2 -5
  46. data/lib/hubspot/codegen/cms/site-search/api_client.rb +14 -0
  47. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +19 -2
  48. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +5 -2
  49. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +17 -15
  50. data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +14 -0
  51. data/lib/hubspot/codegen/conversations/visitor-identification/api_client.rb +14 -0
  52. data/lib/hubspot/codegen/crm/associations/api_client.rb +14 -0
  53. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +6 -12
  54. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +11 -14
  55. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +3 -3
  56. data/lib/hubspot/codegen/crm/companies/api_client.rb +14 -0
  57. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +20 -20
  58. data/lib/hubspot/codegen/crm/companies/models/collection_response_associated_id_forward_paging.rb +226 -0
  59. data/lib/hubspot/codegen/crm/companies/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  60. data/lib/hubspot/codegen/crm/companies/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  61. data/lib/hubspot/codegen/crm/companies/models/forward_paging.rb +210 -0
  62. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +1 -12
  63. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +288 -0
  64. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +6 -12
  65. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +11 -14
  66. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +3 -3
  67. data/lib/hubspot/codegen/crm/contacts/api_client.rb +14 -0
  68. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +20 -20
  69. data/lib/hubspot/codegen/crm/contacts/models/collection_response_associated_id_forward_paging.rb +226 -0
  70. data/lib/hubspot/codegen/crm/contacts/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  71. data/lib/hubspot/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  72. data/lib/hubspot/codegen/crm/contacts/models/forward_paging.rb +210 -0
  73. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +1 -12
  74. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +288 -0
  75. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +6 -12
  76. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +11 -14
  77. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +3 -3
  78. data/lib/hubspot/codegen/crm/deals/api_client.rb +14 -0
  79. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +20 -20
  80. data/lib/hubspot/codegen/crm/deals/models/collection_response_associated_id_forward_paging.rb +226 -0
  81. data/lib/hubspot/codegen/crm/deals/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  82. data/lib/hubspot/codegen/crm/deals/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  83. data/lib/hubspot/codegen/crm/deals/models/forward_paging.rb +210 -0
  84. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +1 -12
  85. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +288 -0
  86. data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +14 -0
  87. data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +14 -0
  88. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +14 -0
  89. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +14 -0
  90. data/lib/hubspot/codegen/crm/imports/api/default_api.rb +90 -0
  91. data/lib/hubspot/codegen/crm/imports/api_client.rb +14 -0
  92. data/lib/hubspot/codegen/crm/imports/models/collection_response_public_import_error_forward_paging.rb +226 -0
  93. data/lib/hubspot/codegen/crm/{schemas/models/paging.rb → imports/models/forward_paging.rb} +11 -20
  94. data/lib/hubspot/codegen/crm/imports/models/import_row_core.rb +238 -0
  95. data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +353 -0
  96. data/lib/hubspot/codegen/crm/imports/models/public_import_response.rb +2 -2
  97. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +6 -12
  98. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +11 -14
  99. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +3 -3
  100. data/lib/hubspot/codegen/crm/line_items/api_client.rb +14 -0
  101. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +20 -20
  102. data/lib/hubspot/codegen/crm/line_items/models/collection_response_associated_id_forward_paging.rb +226 -0
  103. data/lib/hubspot/codegen/crm/line_items/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  104. data/lib/hubspot/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  105. data/lib/hubspot/codegen/crm/line_items/models/forward_paging.rb +210 -0
  106. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +1 -12
  107. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_with_associations.rb +288 -0
  108. data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +6 -12
  109. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +11 -14
  110. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +10 -10
  111. data/lib/hubspot/codegen/crm/objects/api_client.rb +14 -0
  112. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +3 -6
  113. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +6 -12
  114. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +3 -3
  115. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +14 -0
  116. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +20 -20
  117. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object.rb → collection_response_associated_id_forward_paging.rb} +5 -5
  118. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object_with_associations_forward_paging.rb +228 -0
  119. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  120. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/forward_paging.rb +212 -0
  121. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +1 -12
  122. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +290 -0
  123. data/lib/hubspot/codegen/crm/objects/models/batch_read_input_simple_public_object_id.rb +20 -20
  124. data/lib/hubspot/codegen/crm/objects/models/collection_response_associated_id_forward_paging.rb +226 -0
  125. data/lib/hubspot/codegen/crm/objects/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  126. data/lib/hubspot/codegen/crm/objects/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  127. data/lib/hubspot/codegen/crm/objects/models/forward_paging.rb +210 -0
  128. data/lib/hubspot/codegen/crm/objects/models/simple_public_object.rb +1 -12
  129. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_with_associations.rb +288 -0
  130. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +9 -3
  131. data/lib/hubspot/codegen/crm/owners/api_client.rb +14 -0
  132. data/lib/hubspot/codegen/crm/owners/models/{collection_response_public_owner.rb → collection_response_public_owner_forward_paging.rb} +4 -4
  133. data/lib/hubspot/codegen/crm/owners/models/{paging.rb → forward_paging.rb} +3 -3
  134. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +14 -0
  135. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +6 -12
  136. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +11 -14
  137. data/lib/hubspot/codegen/crm/products/api/search_api.rb +3 -3
  138. data/lib/hubspot/codegen/crm/products/api_client.rb +14 -0
  139. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +20 -20
  140. data/lib/hubspot/codegen/crm/products/models/collection_response_associated_id_forward_paging.rb +226 -0
  141. data/lib/hubspot/codegen/crm/products/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  142. data/lib/hubspot/codegen/crm/products/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  143. data/lib/hubspot/codegen/crm/products/models/forward_paging.rb +210 -0
  144. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +1 -12
  145. data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +288 -0
  146. data/lib/hubspot/codegen/crm/properties/api_client.rb +14 -0
  147. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +3 -6
  148. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +6 -12
  149. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +3 -3
  150. data/lib/hubspot/codegen/crm/quotes/api_client.rb +14 -0
  151. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +20 -20
  152. data/lib/hubspot/codegen/crm/quotes/models/collection_response_associated_id_forward_paging.rb +226 -0
  153. data/lib/hubspot/codegen/crm/quotes/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  154. data/lib/hubspot/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  155. data/lib/hubspot/codegen/crm/{schemas/models/previous_page.rb → quotes/models/forward_paging.rb} +14 -28
  156. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +1 -12
  157. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_with_associations.rb +288 -0
  158. data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +23 -17
  159. data/lib/hubspot/codegen/crm/schemas/api_client.rb +14 -0
  160. data/lib/hubspot/codegen/crm/schemas/models/association_definition.rb +1 -75
  161. data/lib/hubspot/codegen/crm/schemas/models/association_definition_egg.rb +4 -78
  162. data/lib/hubspot/codegen/crm/schemas/models/{collection_response_object_schema.rb → collection_response_object_schema_no_paging.rb} +7 -16
  163. data/lib/hubspot/codegen/crm/schemas/models/object_schema.rb +15 -1
  164. data/lib/hubspot/codegen/crm/schemas/models/object_type_definition.rb +15 -1
  165. data/lib/hubspot/codegen/crm/schemas/models/object_type_property_create.rb +2 -2
  166. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +6 -12
  167. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +11 -14
  168. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +3 -3
  169. data/lib/hubspot/codegen/crm/tickets/api_client.rb +14 -0
  170. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +20 -20
  171. data/lib/hubspot/codegen/crm/tickets/models/collection_response_associated_id_forward_paging.rb +226 -0
  172. data/lib/hubspot/codegen/crm/tickets/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
  173. data/lib/hubspot/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
  174. data/lib/hubspot/codegen/crm/tickets/models/forward_paging.rb +210 -0
  175. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +1 -12
  176. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +288 -0
  177. data/lib/hubspot/codegen/crm/timeline/api_client.rb +14 -0
  178. data/lib/hubspot/codegen/events/api_client.rb +14 -0
  179. data/lib/hubspot/codegen/files/files/api_client.rb +14 -0
  180. data/lib/hubspot/codegen/marketing/transactional/api/default_api.rb +60 -60
  181. data/lib/hubspot/codegen/marketing/transactional/api_client.rb +14 -0
  182. data/lib/hubspot/codegen/oauth/api_client.rb +14 -0
  183. data/lib/hubspot/codegen/webhooks/api_client.rb +14 -0
  184. data/lib/hubspot/version.rb +1 -1
  185. data/spec/codegen/cms/blogs/authors/api/default_api_spec.rb +24 -24
  186. data/spec/codegen/cms/blogs/blog-posts/api/default_api_spec.rb +26 -26
  187. data/spec/codegen/cms/blogs/blog-posts/models/blog_post_spec.rb +14 -14
  188. data/spec/codegen/cms/blogs/tags/api/default_api_spec.rb +24 -24
  189. data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +1 -1
  190. data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +1 -1
  191. data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +1 -1
  192. data/spec/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3_spec.rb +1 -1
  193. data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
  194. data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
  195. data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
  196. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
  197. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
  198. data/spec/codegen/cms/hubdb/models/column_input_spec.rb +1 -1
  199. data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
  200. data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
  201. data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
  202. data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
  203. data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
  204. data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
  205. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_input_spec.rb +1 -1
  206. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +1 -1
  207. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_input_spec.rb +1 -1
  208. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +1 -1
  209. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
  210. data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
  211. data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
  212. data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
  213. data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
  214. data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
  215. data/spec/codegen/cms/site-search/api/default_api_spec.rb +0 -1
  216. data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
  217. data/spec/codegen/cms/site-search/models/indexed_data_spec.rb +1 -1
  218. data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
  219. data/spec/codegen/crm/companies/api/associations_api_spec.rb +2 -4
  220. data/spec/codegen/crm/companies/api/basic_api_spec.rb +4 -5
  221. data/spec/codegen/crm/companies/api/search_api_spec.rb +1 -1
  222. data/spec/codegen/crm/companies/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  223. data/spec/codegen/crm/companies/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  224. data/spec/codegen/crm/companies/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  225. data/spec/codegen/crm/companies/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  226. data/spec/codegen/crm/companies/models/forward_paging_spec.rb +41 -0
  227. data/spec/codegen/crm/companies/models/simple_public_object_spec.rb +0 -6
  228. data/spec/codegen/crm/companies/models/simple_public_object_with_associations_spec.rb +77 -0
  229. data/spec/codegen/crm/contacts/api/associations_api_spec.rb +2 -4
  230. data/spec/codegen/crm/contacts/api/basic_api_spec.rb +4 -5
  231. data/spec/codegen/crm/contacts/api/search_api_spec.rb +1 -1
  232. data/spec/codegen/crm/contacts/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  233. data/spec/codegen/crm/contacts/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  234. data/spec/codegen/crm/contacts/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  235. data/spec/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  236. data/spec/codegen/crm/contacts/models/forward_paging_spec.rb +41 -0
  237. data/spec/codegen/crm/contacts/models/simple_public_object_spec.rb +0 -6
  238. data/spec/codegen/crm/contacts/models/simple_public_object_with_associations_spec.rb +77 -0
  239. data/spec/codegen/crm/deals/api/associations_api_spec.rb +2 -4
  240. data/spec/codegen/crm/deals/api/basic_api_spec.rb +4 -5
  241. data/spec/codegen/crm/deals/api/search_api_spec.rb +1 -1
  242. data/spec/codegen/crm/deals/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  243. data/spec/codegen/crm/deals/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  244. data/spec/codegen/crm/deals/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  245. data/spec/codegen/crm/deals/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  246. data/spec/codegen/crm/deals/models/forward_paging_spec.rb +41 -0
  247. data/spec/codegen/crm/deals/models/simple_public_object_spec.rb +0 -6
  248. data/spec/codegen/crm/deals/models/simple_public_object_with_associations_spec.rb +77 -0
  249. data/spec/codegen/crm/imports/api/default_api_spec.rb +47 -0
  250. data/spec/codegen/crm/imports/models/collection_response_public_import_error_forward_paging_spec.rb +47 -0
  251. data/spec/codegen/crm/imports/models/forward_paging_spec.rb +41 -0
  252. data/spec/codegen/crm/imports/models/import_row_core_spec.rb +53 -0
  253. data/spec/codegen/crm/imports/models/public_import_error_spec.rb +97 -0
  254. data/spec/codegen/crm/imports/models/public_import_response_spec.rb +1 -1
  255. data/spec/codegen/crm/line_items/api/associations_api_spec.rb +2 -4
  256. data/spec/codegen/crm/line_items/api/basic_api_spec.rb +4 -5
  257. data/spec/codegen/crm/line_items/api/search_api_spec.rb +1 -1
  258. data/spec/codegen/crm/line_items/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  259. data/spec/codegen/crm/line_items/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  260. data/spec/codegen/crm/line_items/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  261. data/spec/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  262. data/spec/codegen/crm/line_items/models/forward_paging_spec.rb +41 -0
  263. data/spec/codegen/crm/line_items/models/simple_public_object_spec.rb +0 -6
  264. data/spec/codegen/crm/line_items/models/simple_public_object_with_associations_spec.rb +77 -0
  265. data/spec/codegen/crm/objects/api/associations_api_spec.rb +2 -4
  266. data/spec/codegen/crm/objects/api/basic_api_spec.rb +4 -5
  267. data/spec/codegen/crm/objects/api/search_api_spec.rb +3 -3
  268. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +1 -2
  269. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +2 -4
  270. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +1 -1
  271. data/spec/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  272. data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  273. data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  274. data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  275. data/spec/codegen/crm/objects/feedback_submissions/models/forward_paging_spec.rb +41 -0
  276. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_spec.rb +0 -6
  277. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations_spec.rb +77 -0
  278. data/spec/codegen/crm/objects/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  279. data/spec/codegen/crm/objects/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  280. data/spec/codegen/crm/objects/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  281. data/spec/codegen/crm/objects/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  282. data/spec/codegen/crm/objects/models/forward_paging_spec.rb +41 -0
  283. data/spec/codegen/crm/objects/models/simple_public_object_spec.rb +0 -6
  284. data/spec/codegen/crm/objects/models/simple_public_object_with_associations_spec.rb +77 -0
  285. data/spec/codegen/crm/owners/api/default_api_spec.rb +3 -1
  286. data/spec/codegen/crm/owners/models/{collection_response_public_owner_spec.rb → collection_response_public_owner_forward_paging_spec.rb} +6 -6
  287. data/spec/codegen/crm/owners/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  288. data/spec/codegen/crm/products/api/associations_api_spec.rb +2 -4
  289. data/spec/codegen/crm/products/api/basic_api_spec.rb +4 -5
  290. data/spec/codegen/crm/products/api/search_api_spec.rb +1 -1
  291. data/spec/codegen/crm/products/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  292. data/spec/codegen/crm/products/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  293. data/spec/codegen/crm/products/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  294. data/spec/codegen/crm/products/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  295. data/spec/codegen/crm/products/models/forward_paging_spec.rb +41 -0
  296. data/spec/codegen/crm/products/models/simple_public_object_spec.rb +0 -6
  297. data/spec/codegen/crm/products/models/simple_public_object_with_associations_spec.rb +77 -0
  298. data/spec/codegen/crm/quotes/api/associations_api_spec.rb +1 -2
  299. data/spec/codegen/crm/quotes/api/basic_api_spec.rb +2 -4
  300. data/spec/codegen/crm/quotes/api/search_api_spec.rb +1 -1
  301. data/spec/codegen/crm/quotes/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  302. data/spec/codegen/crm/quotes/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  303. data/spec/codegen/crm/quotes/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  304. data/spec/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  305. data/spec/codegen/crm/quotes/models/forward_paging_spec.rb +41 -0
  306. data/spec/codegen/crm/quotes/models/simple_public_object_spec.rb +0 -6
  307. data/spec/codegen/crm/quotes/models/simple_public_object_with_associations_spec.rb +77 -0
  308. data/spec/codegen/crm/schemas/api/core_api_spec.rb +10 -8
  309. data/spec/codegen/crm/schemas/models/association_definition_egg_spec.rb +0 -20
  310. data/spec/codegen/crm/schemas/models/association_definition_spec.rb +0 -20
  311. data/spec/codegen/crm/schemas/models/{collection_response_object_schema_spec.rb → collection_response_object_schema_no_paging_spec.rb} +6 -12
  312. data/spec/codegen/crm/schemas/models/object_schema_spec.rb +6 -0
  313. data/spec/codegen/crm/schemas/models/object_type_definition_spec.rb +6 -0
  314. data/spec/codegen/crm/schemas/models/object_type_property_create_spec.rb +1 -1
  315. data/spec/codegen/crm/tickets/api/associations_api_spec.rb +2 -4
  316. data/spec/codegen/crm/tickets/api/basic_api_spec.rb +4 -5
  317. data/spec/codegen/crm/tickets/api/search_api_spec.rb +1 -1
  318. data/spec/codegen/crm/tickets/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  319. data/spec/codegen/crm/tickets/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
  320. data/spec/codegen/crm/tickets/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
  321. data/spec/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
  322. data/spec/codegen/crm/tickets/models/forward_paging_spec.rb +41 -0
  323. data/spec/codegen/crm/tickets/models/simple_public_object_spec.rb +0 -6
  324. data/spec/codegen/crm/tickets/models/simple_public_object_with_associations_spec.rb +77 -0
  325. data/spec/codegen/files/files/api/files_api_spec.rb +2 -2
  326. data/spec/codegen/files/files/models/file_update_input_spec.rb +1 -1
  327. data/spec/codegen/files/files/models/import_from_url_input_spec.rb +1 -1
  328. data/spec/codegen/marketing/transactional/api/default_api_spec.rb +12 -12
  329. data/spec/features/crm/objects/search_api_spec.rb +1 -1
  330. metadata +161 -74
  331. data/lib/hubspot/codegen/crm/schemas/models/next_page.rb +0 -224
  332. data/spec/codegen/crm/schemas/models/next_page_spec.rb +0 -47
  333. data/spec/codegen/crm/schemas/models/paging_spec.rb +0 -47
  334. data/spec/codegen/crm/schemas/models/previous_page_spec.rb +0 -47
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #CRM Imports
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Hubspot
16
+ module Crm
17
+ module Imports
18
+ class ImportRowCore
19
+ attr_accessor :file_id
20
+
21
+ attr_accessor :page_name
22
+
23
+ attr_accessor :line_number
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'file_id' => :'fileId',
29
+ :'page_name' => :'pageName',
30
+ :'line_number' => :'lineNumber'
31
+ }
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'file_id' => :'Integer',
38
+ :'page_name' => :'String',
39
+ :'line_number' => :'Integer'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Imports::ImportRowCore` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Imports::ImportRowCore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'file_id')
65
+ self.file_id = attributes[:'file_id']
66
+ end
67
+
68
+ if attributes.key?(:'page_name')
69
+ self.page_name = attributes[:'page_name']
70
+ end
71
+
72
+ if attributes.key?(:'line_number')
73
+ self.line_number = attributes[:'line_number']
74
+ end
75
+ end
76
+
77
+ # Show invalid properties with the reasons. Usually used together with valid?
78
+ # @return Array for valid properties with the reasons
79
+ def list_invalid_properties
80
+ invalid_properties = Array.new
81
+ if @file_id.nil?
82
+ invalid_properties.push('invalid value for "file_id", file_id cannot be nil.')
83
+ end
84
+
85
+ if @line_number.nil?
86
+ invalid_properties.push('invalid value for "line_number", line_number cannot be nil.')
87
+ end
88
+
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ return false if @file_id.nil?
96
+ return false if @line_number.nil?
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ file_id == o.file_id &&
106
+ page_name == o.page_name &&
107
+ line_number == o.line_number
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ def hash
119
+ [file_id, page_name, line_number].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def self.build_from_hash(attributes)
126
+ new.build_from_hash(attributes)
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.openapi_types.each_pair do |key, type|
135
+ if type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ Hubspot::Crm::Imports.const_get(type).build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
@@ -0,0 +1,353 @@
1
+ =begin
2
+ #CRM Imports
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Hubspot
16
+ module Crm
17
+ module Imports
18
+ class PublicImportError
19
+ attr_accessor :error_type
20
+
21
+ attr_accessor :object_type
22
+
23
+ attr_accessor :invalid_value
24
+
25
+ attr_accessor :extra_context
26
+
27
+ attr_accessor :object_type_id
28
+
29
+ attr_accessor :known_column_number
30
+
31
+ attr_accessor :source_data
32
+
33
+ attr_accessor :created_at
34
+
35
+ attr_accessor :id
36
+
37
+ class EnumAttributeValidator
38
+ attr_reader :datatype
39
+ attr_reader :allowable_values
40
+
41
+ def initialize(datatype, allowable_values)
42
+ @allowable_values = allowable_values.map do |value|
43
+ case datatype.to_s
44
+ when /Integer/i
45
+ value.to_i
46
+ when /Float/i
47
+ value.to_f
48
+ else
49
+ value
50
+ end
51
+ end
52
+ end
53
+
54
+ def valid?(value)
55
+ !value || allowable_values.include?(value)
56
+ end
57
+ end
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'error_type' => :'errorType',
63
+ :'object_type' => :'objectType',
64
+ :'invalid_value' => :'invalidValue',
65
+ :'extra_context' => :'extraContext',
66
+ :'object_type_id' => :'objectTypeId',
67
+ :'known_column_number' => :'knownColumnNumber',
68
+ :'source_data' => :'sourceData',
69
+ :'created_at' => :'createdAt',
70
+ :'id' => :'id'
71
+ }
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'error_type' => :'String',
78
+ :'object_type' => :'String',
79
+ :'invalid_value' => :'String',
80
+ :'extra_context' => :'String',
81
+ :'object_type_id' => :'String',
82
+ :'known_column_number' => :'Integer',
83
+ :'source_data' => :'ImportRowCore',
84
+ :'created_at' => :'Integer',
85
+ :'id' => :'String'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ ])
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Imports::PublicImportError` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!self.class.attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Imports::PublicImportError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'error_type')
111
+ self.error_type = attributes[:'error_type']
112
+ end
113
+
114
+ if attributes.key?(:'object_type')
115
+ self.object_type = attributes[:'object_type']
116
+ end
117
+
118
+ if attributes.key?(:'invalid_value')
119
+ self.invalid_value = attributes[:'invalid_value']
120
+ end
121
+
122
+ if attributes.key?(:'extra_context')
123
+ self.extra_context = attributes[:'extra_context']
124
+ end
125
+
126
+ if attributes.key?(:'object_type_id')
127
+ self.object_type_id = attributes[:'object_type_id']
128
+ end
129
+
130
+ if attributes.key?(:'known_column_number')
131
+ self.known_column_number = attributes[:'known_column_number']
132
+ end
133
+
134
+ if attributes.key?(:'source_data')
135
+ self.source_data = attributes[:'source_data']
136
+ end
137
+
138
+ if attributes.key?(:'created_at')
139
+ self.created_at = attributes[:'created_at']
140
+ end
141
+
142
+ if attributes.key?(:'id')
143
+ self.id = attributes[:'id']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ invalid_properties = Array.new
151
+ if @error_type.nil?
152
+ invalid_properties.push('invalid value for "error_type", error_type cannot be nil.')
153
+ end
154
+
155
+ if @known_column_number.nil?
156
+ invalid_properties.push('invalid value for "known_column_number", known_column_number cannot be nil.')
157
+ end
158
+
159
+ if @source_data.nil?
160
+ invalid_properties.push('invalid value for "source_data", source_data cannot be nil.')
161
+ end
162
+
163
+ if @created_at.nil?
164
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
165
+ end
166
+
167
+ if @id.nil?
168
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
169
+ end
170
+
171
+ invalid_properties
172
+ end
173
+
174
+ # Check to see if the all the properties in the model are valid
175
+ # @return true if the model is valid
176
+ def valid?
177
+ return false if @error_type.nil?
178
+ error_type_validator = EnumAttributeValidator.new('String', ["INCORRECT_NUMBER_OF_COLUMNS", "INVALID_OBJECT_ID", "INVALID_ASSOCIATION_IDENTIFIER", "NO_OBJECT_ID_FROM_ASSOCIATION_IDENTIFIER", "MULTIPLE_COMPANIES_WITH_THIS_DOMAIN", "PROPERTY_DEFINITION_NOT_FOUND", "PROPERTY_VALUE_NOT_FOUND", "COULD_NOT_FIND_OWNER", "MULTIPLE_OWNERS_FOUND", "COULD_NOT_PARSE_NUMBER", "COULD_NOT_PARSE_DATE", "COULD_NOT_PARSE_TERM", "OUTSIDE_VALID_TIME_RANGE", "OUTSIDE_VALID_TERM_RANGE", "COULD_NOT_PARSE_ROW", "INVALID_ENUMERATION_OPTION", "AMBIGUOUS_ENUMERATION_OPTION", "FAILED_VALIDATION", "FAILED_TO_CREATE_ASSOCIATION", "FILE_NOT_FOUND", "INVALID_FILE_TYPE", "INVALID_SPREADSHEET", "INVALID_SHEET_COUNT", "FAILED_TO_PROCESS_OBJECT_WITH_EMPTY_PROPERTY_VALUES", "UNKNOWN_BAD_REQUEST", "GDPR_BLACKLISTED_EMAIL", "DUPLICATE_ASSOCIATION_ID", "LIMIT_EXCEEDED", "INVALID_ALTERNATE_ID", "DUPLICATE_ROW_CONTENT", "INVALID_NUMBER_SIZE", "UNKNOWN_ERROR", "FAILED_TO_OPT_OUT_CONTACT", "INVALID_REQUIRED_PROPERTY", "DUPLICATE_ALTERNATE_ID", "DUPLICATE_OBJECT_ID", "DUPLICATE_UNIQUE_PROPERTY_VALUE"])
179
+ return false unless error_type_validator.valid?(@error_type)
180
+ object_type_validator = EnumAttributeValidator.new('String', ["CONTACT", "COMPANY", "DEAL", "ENGAGEMENT", "TICKET", "OWNER", "PRODUCT", "LINE_ITEM", "BET_DELIVERABLE_SERVICE", "CONTENT", "CONVERSATION", "BET_ALERT", "PORTAL", "QUOTE", "FORM_SUBMISSION_INBOUNDDB", "QUOTA", "UNSUBSCRIBE", "COMMUNICATION", "FEEDBACK_SUBMISSION", "ATTRIBUTION", "SALESFORCE_SYNC_ERROR", "RESTORABLE_CRM_OBJECT", "HUB", "LANDING_PAGE", "PRODUCT_OR_FOLDER", "TASK", "FORM", "MARKETING_EMAIL", "AD_ACCOUNT", "AD_CAMPAIGN", "AD_GROUP", "AD", "KEYWORD", "CAMPAIGN", "SOCIAL_CHANNEL", "SOCIAL_POST", "SITE_PAGE", "BLOG_POST", "IMPORT", "EXPORT", "CTA", "TASK_TEMPLATE", "AUTOMATION_PLATFORM_FLOW", "OBJECT_LIST", "NOTE", "MEETING_EVENT", "CALL", "EMAIL", "PUBLISHING_TASK", "CONVERSATION_SESSION", "CONTACT_CREATE_ATTRIBUTION", "INVOICE", "MARKETING_EVENT", "CONVERSATION_INBOX", "CHATFLOW", "MEDIA_BRIDGE", "SEQUENCE", "SEQUENCE_STEP", "FORECAST", "SNIPPET", "TEMPLATE", "DEAL_CREATE_ATTRIBUTION", "QUOTE_TEMPLATE", "QUOTE_MODULE", "QUOTE_MODULE_FIELD", "QUOTE_FIELD", "SEQUENCE_ENROLLMENT", "SUBSCRIPTION", "ACCEPTANCE_TEST", "SOCIAL_BROADCAST", "DEAL_SPLIT", "DEAL_REGISTRATION", "UNKNOWN"])
181
+ return false unless object_type_validator.valid?(@object_type)
182
+ return false if @known_column_number.nil?
183
+ return false if @source_data.nil?
184
+ return false if @created_at.nil?
185
+ return false if @id.nil?
186
+ true
187
+ end
188
+
189
+ # Custom attribute writer method checking allowed values (enum).
190
+ # @param [Object] error_type Object to be assigned
191
+ def error_type=(error_type)
192
+ validator = EnumAttributeValidator.new('String', ["INCORRECT_NUMBER_OF_COLUMNS", "INVALID_OBJECT_ID", "INVALID_ASSOCIATION_IDENTIFIER", "NO_OBJECT_ID_FROM_ASSOCIATION_IDENTIFIER", "MULTIPLE_COMPANIES_WITH_THIS_DOMAIN", "PROPERTY_DEFINITION_NOT_FOUND", "PROPERTY_VALUE_NOT_FOUND", "COULD_NOT_FIND_OWNER", "MULTIPLE_OWNERS_FOUND", "COULD_NOT_PARSE_NUMBER", "COULD_NOT_PARSE_DATE", "COULD_NOT_PARSE_TERM", "OUTSIDE_VALID_TIME_RANGE", "OUTSIDE_VALID_TERM_RANGE", "COULD_NOT_PARSE_ROW", "INVALID_ENUMERATION_OPTION", "AMBIGUOUS_ENUMERATION_OPTION", "FAILED_VALIDATION", "FAILED_TO_CREATE_ASSOCIATION", "FILE_NOT_FOUND", "INVALID_FILE_TYPE", "INVALID_SPREADSHEET", "INVALID_SHEET_COUNT", "FAILED_TO_PROCESS_OBJECT_WITH_EMPTY_PROPERTY_VALUES", "UNKNOWN_BAD_REQUEST", "GDPR_BLACKLISTED_EMAIL", "DUPLICATE_ASSOCIATION_ID", "LIMIT_EXCEEDED", "INVALID_ALTERNATE_ID", "DUPLICATE_ROW_CONTENT", "INVALID_NUMBER_SIZE", "UNKNOWN_ERROR", "FAILED_TO_OPT_OUT_CONTACT", "INVALID_REQUIRED_PROPERTY", "DUPLICATE_ALTERNATE_ID", "DUPLICATE_OBJECT_ID", "DUPLICATE_UNIQUE_PROPERTY_VALUE"])
193
+ unless validator.valid?(error_type)
194
+ fail ArgumentError, "invalid value for \"error_type\", must be one of #{validator.allowable_values}."
195
+ end
196
+ @error_type = error_type
197
+ end
198
+
199
+ # Custom attribute writer method checking allowed values (enum).
200
+ # @param [Object] object_type Object to be assigned
201
+ def object_type=(object_type)
202
+ validator = EnumAttributeValidator.new('String', ["CONTACT", "COMPANY", "DEAL", "ENGAGEMENT", "TICKET", "OWNER", "PRODUCT", "LINE_ITEM", "BET_DELIVERABLE_SERVICE", "CONTENT", "CONVERSATION", "BET_ALERT", "PORTAL", "QUOTE", "FORM_SUBMISSION_INBOUNDDB", "QUOTA", "UNSUBSCRIBE", "COMMUNICATION", "FEEDBACK_SUBMISSION", "ATTRIBUTION", "SALESFORCE_SYNC_ERROR", "RESTORABLE_CRM_OBJECT", "HUB", "LANDING_PAGE", "PRODUCT_OR_FOLDER", "TASK", "FORM", "MARKETING_EMAIL", "AD_ACCOUNT", "AD_CAMPAIGN", "AD_GROUP", "AD", "KEYWORD", "CAMPAIGN", "SOCIAL_CHANNEL", "SOCIAL_POST", "SITE_PAGE", "BLOG_POST", "IMPORT", "EXPORT", "CTA", "TASK_TEMPLATE", "AUTOMATION_PLATFORM_FLOW", "OBJECT_LIST", "NOTE", "MEETING_EVENT", "CALL", "EMAIL", "PUBLISHING_TASK", "CONVERSATION_SESSION", "CONTACT_CREATE_ATTRIBUTION", "INVOICE", "MARKETING_EVENT", "CONVERSATION_INBOX", "CHATFLOW", "MEDIA_BRIDGE", "SEQUENCE", "SEQUENCE_STEP", "FORECAST", "SNIPPET", "TEMPLATE", "DEAL_CREATE_ATTRIBUTION", "QUOTE_TEMPLATE", "QUOTE_MODULE", "QUOTE_MODULE_FIELD", "QUOTE_FIELD", "SEQUENCE_ENROLLMENT", "SUBSCRIPTION", "ACCEPTANCE_TEST", "SOCIAL_BROADCAST", "DEAL_SPLIT", "DEAL_REGISTRATION", "UNKNOWN"])
203
+ unless validator.valid?(object_type)
204
+ fail ArgumentError, "invalid value for \"object_type\", must be one of #{validator.allowable_values}."
205
+ end
206
+ @object_type = object_type
207
+ end
208
+
209
+ # Checks equality by comparing each attribute.
210
+ # @param [Object] Object to be compared
211
+ def ==(o)
212
+ return true if self.equal?(o)
213
+ self.class == o.class &&
214
+ error_type == o.error_type &&
215
+ object_type == o.object_type &&
216
+ invalid_value == o.invalid_value &&
217
+ extra_context == o.extra_context &&
218
+ object_type_id == o.object_type_id &&
219
+ known_column_number == o.known_column_number &&
220
+ source_data == o.source_data &&
221
+ created_at == o.created_at &&
222
+ id == o.id
223
+ end
224
+
225
+ # @see the `==` method
226
+ # @param [Object] Object to be compared
227
+ def eql?(o)
228
+ self == o
229
+ end
230
+
231
+ # Calculates hash code according to all attributes.
232
+ # @return [Integer] Hash code
233
+ def hash
234
+ [error_type, object_type, invalid_value, extra_context, object_type_id, known_column_number, source_data, created_at, id].hash
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def self.build_from_hash(attributes)
241
+ new.build_from_hash(attributes)
242
+ end
243
+
244
+ # Builds the object from hash
245
+ # @param [Hash] attributes Model attributes in the form of hash
246
+ # @return [Object] Returns the model itself
247
+ def build_from_hash(attributes)
248
+ return nil unless attributes.is_a?(Hash)
249
+ self.class.openapi_types.each_pair do |key, type|
250
+ if type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
254
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
255
+ end
256
+ elsif !attributes[self.class.attribute_map[key]].nil?
257
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
258
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
259
+ end
260
+
261
+ self
262
+ end
263
+
264
+ # Deserializes the data based on type
265
+ # @param string type Data type
266
+ # @param string value Value to be deserialized
267
+ # @return [Object] Deserialized data
268
+ def _deserialize(type, value)
269
+ case type.to_sym
270
+ when :DateTime
271
+ DateTime.parse(value)
272
+ when :Date
273
+ Date.parse(value)
274
+ when :String
275
+ value.to_s
276
+ when :Integer
277
+ value.to_i
278
+ when :Float
279
+ value.to_f
280
+ when :Boolean
281
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
282
+ true
283
+ else
284
+ false
285
+ end
286
+ when :Object
287
+ # generic object (usually a Hash), return directly
288
+ value
289
+ when /\AArray<(?<inner_type>.+)>\z/
290
+ inner_type = Regexp.last_match[:inner_type]
291
+ value.map { |v| _deserialize(inner_type, v) }
292
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
293
+ k_type = Regexp.last_match[:k_type]
294
+ v_type = Regexp.last_match[:v_type]
295
+ {}.tap do |hash|
296
+ value.each do |k, v|
297
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
298
+ end
299
+ end
300
+ else # model
301
+ Hubspot::Crm::Imports.const_get(type).build_from_hash(value)
302
+ end
303
+ end
304
+
305
+ # Returns the string representation of the object
306
+ # @return [String] String presentation of the object
307
+ def to_s
308
+ to_hash.to_s
309
+ end
310
+
311
+ # to_body is an alias to to_hash (backward compatibility)
312
+ # @return [Hash] Returns the object in the form of hash
313
+ def to_body
314
+ to_hash
315
+ end
316
+
317
+ # Returns the object in the form of hash
318
+ # @return [Hash] Returns the object in the form of hash
319
+ def to_hash
320
+ hash = {}
321
+ self.class.attribute_map.each_pair do |attr, param|
322
+ value = self.send(attr)
323
+ if value.nil?
324
+ is_nullable = self.class.openapi_nullable.include?(attr)
325
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
326
+ end
327
+
328
+ hash[param] = _to_hash(value)
329
+ end
330
+ hash
331
+ end
332
+
333
+ # Outputs non-array value in the form of hash
334
+ # For object, use to_hash. Otherwise, just return the value
335
+ # @param [Object] value Any valid value
336
+ # @return [Hash] Returns the value in the form of hash
337
+ def _to_hash(value)
338
+ if value.is_a?(Array)
339
+ value.compact.map { |v| _to_hash(v) }
340
+ elsif value.is_a?(Hash)
341
+ {}.tap do |hash|
342
+ value.each { |k, v| hash[k] = _to_hash(v) }
343
+ end
344
+ elsif value.respond_to? :to_hash
345
+ value.to_hash
346
+ else
347
+ value
348
+ end
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end