hubspot-api-client 9.3.0 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +3 -1
  4. data/hubspot-api-client.gemspec +1 -0
  5. data/lib/hubspot-api-client.rb +5 -664
  6. data/lib/hubspot/codegen/crm/extensions/accounting/api/callbacks_api.rb +728 -0
  7. data/lib/hubspot/codegen/crm/extensions/accounting/api/invoice_api.rb +247 -0
  8. data/lib/hubspot/codegen/crm/extensions/accounting/api/settings_api.rb +160 -0
  9. data/lib/hubspot/codegen/crm/extensions/accounting/api/sync_api.rb +168 -0
  10. data/lib/hubspot/codegen/crm/extensions/accounting/api/user_accounts_api.rb +154 -0
  11. data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +394 -0
  12. data/lib/hubspot/codegen/crm/extensions/accounting/api_error.rb +63 -0
  13. data/lib/hubspot/codegen/crm/extensions/accounting/configuration.rb +265 -0
  14. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_settings.rb +241 -0
  15. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_urls.rb +381 -0
  16. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_customer.rb +262 -0
  17. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_invoice.rb +357 -0
  18. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_term.rb +253 -0
  19. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_features.rb +248 -0
  20. data/lib/hubspot/codegen/crm/extensions/accounting/models/action_response.rb +299 -0
  21. data/lib/hubspot/codegen/crm/extensions/accounting/models/address.rb +253 -0
  22. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_feature.rb +232 -0
  23. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_sub_features.rb +293 -0
  24. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_user_account_request_external.rb +248 -0
  25. data/lib/hubspot/codegen/crm/extensions/accounting/models/customer_search_response_external.rb +269 -0
  26. data/lib/hubspot/codegen/crm/extensions/accounting/models/error.rb +294 -0
  27. data/lib/hubspot/codegen/crm/extensions/accounting/models/error_detail.rb +260 -0
  28. data/lib/hubspot/codegen/crm/extensions/accounting/models/exchange_rate_response.rb +297 -0
  29. data/lib/hubspot/codegen/crm/extensions/accounting/models/import_invoice_feature.rb +218 -0
  30. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_create_payment_request.rb +263 -0
  31. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_pdf_response.rb +283 -0
  32. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_read_response.rb +455 -0
  33. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_search_response.rb +264 -0
  34. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_update_request.rb +281 -0
  35. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_update_response.rb +441 -0
  36. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoices_response_external.rb +264 -0
  37. data/lib/hubspot/codegen/crm/extensions/accounting/models/object_sync_feature.rb +218 -0
  38. data/lib/hubspot/codegen/crm/extensions/accounting/models/product.rb +281 -0
  39. data/lib/hubspot/codegen/crm/extensions/accounting/models/product_search_response.rb +264 -0
  40. data/lib/hubspot/codegen/crm/extensions/accounting/models/result_id_accounting_response.rb +267 -0
  41. data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_contacts_request.rb +235 -0
  42. data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_products_request.rb +235 -0
  43. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax.rb +248 -0
  44. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_search_response.rb +264 -0
  45. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_type.rb +228 -0
  46. data/lib/hubspot/codegen/crm/extensions/accounting/models/terms_response.rb +264 -0
  47. data/lib/hubspot/codegen/crm/extensions/accounting/models/unit_price.rb +228 -0
  48. data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_contact.rb +319 -0
  49. data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_product.rb +324 -0
  50. data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +284 -0
  51. data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +394 -0
  52. data/lib/hubspot/codegen/crm/extensions/calling/api_error.rb +63 -0
  53. data/lib/hubspot/codegen/crm/extensions/calling/configuration.rb +258 -0
  54. data/lib/hubspot/codegen/crm/extensions/calling/models/error.rb +294 -0
  55. data/lib/hubspot/codegen/crm/extensions/calling/models/error_detail.rb +260 -0
  56. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +253 -0
  57. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +263 -0
  58. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +308 -0
  59. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api/settings_api.rb +222 -0
  60. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +394 -0
  61. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_error.rb +63 -0
  62. data/lib/hubspot/codegen/crm/extensions/videoconferencing/configuration.rb +258 -0
  63. data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/error.rb +294 -0
  64. data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/error_detail.rb +260 -0
  65. data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/external_settings.rb +248 -0
  66. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +103 -0
  67. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +181 -0
  68. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +95 -0
  69. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +92 -0
  70. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +394 -0
  71. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_error.rb +63 -0
  72. data/lib/hubspot/codegen/crm/objects/feedback_submissions/configuration.rb +258 -0
  73. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/associated_id.rb +231 -0
  74. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_batch_input.rb +219 -0
  75. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_id.rb +219 -0
  76. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_input.rb +219 -0
  77. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +244 -0
  78. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object.rb +315 -0
  79. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_with_errors.rb +335 -0
  80. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id.rb +228 -0
  81. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object.rb +228 -0
  82. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_with_total_simple_public_object.rb +243 -0
  83. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error.rb +294 -0
  84. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error_category.rb +265 -0
  85. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error_detail.rb +260 -0
  86. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +274 -0
  87. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter_group.rb +219 -0
  88. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/next_page.rb +226 -0
  89. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/paging.rb +221 -0
  90. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/previous_page.rb +226 -0
  91. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/public_object_search_request.rb +288 -0
  92. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +290 -0
  93. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_batch_input.rb +233 -0
  94. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_id.rb +217 -0
  95. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_input.rb +219 -0
  96. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/standard_error.rb +311 -0
  97. data/lib/hubspot/codegen/files/files/api/files_api.rb +787 -0
  98. data/lib/hubspot/codegen/files/files/api/folders_api.rb +579 -0
  99. data/lib/hubspot/codegen/files/files/api_client.rb +392 -0
  100. data/lib/hubspot/codegen/files/files/api_error.rb +61 -0
  101. data/lib/hubspot/codegen/files/files/configuration.rb +263 -0
  102. data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +226 -0
  103. data/lib/hubspot/codegen/files/files/models/collection_response_folder.rb +226 -0
  104. data/lib/hubspot/codegen/files/files/models/error.rb +292 -0
  105. data/lib/hubspot/codegen/files/files/models/error_category.rb +263 -0
  106. data/lib/hubspot/codegen/files/files/models/error_detail.rb +258 -0
  107. data/lib/hubspot/codegen/files/files/models/file.rb +440 -0
  108. data/lib/hubspot/codegen/files/files/models/file_action_response.rb +348 -0
  109. data/lib/hubspot/codegen/files/files/models/file_update_input.rb +285 -0
  110. data/lib/hubspot/codegen/files/files/models/folder.rb +301 -0
  111. data/lib/hubspot/codegen/files/files/models/folder_action_response.rb +348 -0
  112. data/lib/hubspot/codegen/files/files/models/folder_input.rb +236 -0
  113. data/lib/hubspot/codegen/files/files/models/folder_update_input.rb +236 -0
  114. data/lib/hubspot/codegen/files/files/models/folder_update_task_locator.rb +228 -0
  115. data/lib/hubspot/codegen/files/files/models/import_from_url_input.rb +374 -0
  116. data/lib/hubspot/codegen/files/files/models/import_from_url_task_locator.rb +228 -0
  117. data/lib/hubspot/codegen/files/files/models/next_page.rb +224 -0
  118. data/lib/hubspot/codegen/files/files/models/paging.rb +219 -0
  119. data/lib/hubspot/codegen/files/files/models/previous_page.rb +224 -0
  120. data/lib/hubspot/codegen/files/files/models/signed_url.rb +311 -0
  121. data/lib/hubspot/codegen/files/files/models/standard_error.rb +309 -0
  122. data/lib/hubspot/codegen/marketing/transactional/api/default_api.rb +400 -0
  123. data/lib/hubspot/codegen/marketing/transactional/api_client.rb +392 -0
  124. data/lib/hubspot/codegen/marketing/transactional/api_error.rb +61 -0
  125. data/lib/hubspot/codegen/marketing/transactional/configuration.rb +263 -0
  126. data/lib/hubspot/codegen/marketing/transactional/models/collection_response_smtp_api_token_view.rb +227 -0
  127. data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +326 -0
  128. data/lib/hubspot/codegen/marketing/transactional/models/error.rb +292 -0
  129. data/lib/hubspot/codegen/marketing/transactional/models/error_detail.rb +258 -0
  130. data/lib/hubspot/codegen/marketing/transactional/models/event_id_view.rb +231 -0
  131. data/lib/hubspot/codegen/marketing/transactional/models/next_page.rb +224 -0
  132. data/lib/hubspot/codegen/marketing/transactional/models/paging.rb +210 -0
  133. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +282 -0
  134. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +262 -0
  135. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +231 -0
  136. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +301 -0
  137. data/lib/hubspot/version.rb +1 -1
  138. data/spec/codegen/crm/extensions/accounting/api/callbacks_api_spec.rb +165 -0
  139. data/spec/codegen/crm/extensions/accounting/api/invoice_api_spec.rb +76 -0
  140. data/spec/codegen/crm/extensions/accounting/api/settings_api_spec.rb +60 -0
  141. data/spec/codegen/crm/extensions/accounting/api/sync_api_spec.rb +61 -0
  142. data/spec/codegen/crm/extensions/accounting/api/user_accounts_api_spec.rb +59 -0
  143. data/spec/codegen/crm/extensions/accounting/models/accounting_app_settings_spec.rb +53 -0
  144. data/spec/codegen/crm/extensions/accounting/models/accounting_app_urls_spec.rb +125 -0
  145. data/spec/codegen/crm/extensions/accounting/models/accounting_extension_customer_spec.rb +65 -0
  146. data/spec/codegen/crm/extensions/accounting/models/accounting_extension_invoice_spec.rb +93 -0
  147. data/spec/codegen/crm/extensions/accounting/models/accounting_extension_term_spec.rb +59 -0
  148. data/spec/codegen/crm/extensions/accounting/models/accounting_features_spec.rb +53 -0
  149. data/spec/codegen/crm/extensions/accounting/models/action_response_spec.rb +69 -0
  150. data/spec/codegen/crm/extensions/accounting/models/address_spec.rb +65 -0
  151. data/spec/codegen/crm/extensions/accounting/models/create_invoice_feature_spec.rb +47 -0
  152. data/spec/codegen/crm/extensions/accounting/models/create_invoice_sub_features_spec.rb +71 -0
  153. data/spec/codegen/crm/extensions/accounting/models/create_user_account_request_external_spec.rb +53 -0
  154. data/spec/codegen/crm/extensions/accounting/models/customer_search_response_external_spec.rb +51 -0
  155. data/spec/codegen/crm/extensions/accounting/models/error_detail_spec.rb +65 -0
  156. data/spec/codegen/crm/extensions/accounting/models/error_spec.rb +77 -0
  157. data/spec/codegen/crm/extensions/accounting/models/exchange_rate_response_spec.rb +63 -0
  158. data/spec/codegen/crm/extensions/accounting/models/import_invoice_feature_spec.rb +41 -0
  159. data/spec/codegen/crm/extensions/accounting/models/invoice_create_payment_request_spec.rb +59 -0
  160. data/spec/codegen/crm/extensions/accounting/models/invoice_pdf_response_spec.rb +51 -0
  161. data/spec/codegen/crm/extensions/accounting/models/invoice_read_response_spec.rb +135 -0
  162. data/spec/codegen/crm/extensions/accounting/models/invoice_search_response_spec.rb +51 -0
  163. data/spec/codegen/crm/extensions/accounting/models/invoice_update_request_spec.rb +83 -0
  164. data/spec/codegen/crm/extensions/accounting/models/invoice_update_response_spec.rb +135 -0
  165. data/spec/codegen/crm/extensions/accounting/models/invoices_response_external_spec.rb +51 -0
  166. data/spec/codegen/crm/extensions/accounting/models/object_sync_feature_spec.rb +41 -0
  167. data/spec/codegen/crm/extensions/accounting/models/product_search_response_spec.rb +51 -0
  168. data/spec/codegen/crm/extensions/accounting/models/product_spec.rb +71 -0
  169. data/spec/codegen/crm/extensions/accounting/models/result_id_accounting_response_spec.rb +51 -0
  170. data/spec/codegen/crm/extensions/accounting/models/sync_contacts_request_spec.rb +47 -0
  171. data/spec/codegen/crm/extensions/accounting/models/sync_products_request_spec.rb +47 -0
  172. data/spec/codegen/crm/extensions/accounting/models/tax_search_response_spec.rb +51 -0
  173. data/spec/codegen/crm/extensions/accounting/models/tax_spec.rb +53 -0
  174. data/spec/codegen/crm/extensions/accounting/models/tax_type_spec.rb +47 -0
  175. data/spec/codegen/crm/extensions/accounting/models/terms_response_spec.rb +51 -0
  176. data/spec/codegen/crm/extensions/accounting/models/unit_price_spec.rb +47 -0
  177. data/spec/codegen/crm/extensions/accounting/models/updated_contact_spec.rb +73 -0
  178. data/spec/codegen/crm/extensions/accounting/models/updated_product_spec.rb +75 -0
  179. data/spec/codegen/crm/extensions/calling/api/settings_api_spec.rb +85 -0
  180. data/spec/codegen/crm/extensions/calling/models/error_detail_spec.rb +65 -0
  181. data/spec/codegen/crm/extensions/calling/models/error_spec.rb +77 -0
  182. data/spec/codegen/crm/extensions/calling/models/settings_patch_request_spec.rb +65 -0
  183. data/spec/codegen/crm/extensions/calling/models/settings_request_spec.rb +65 -0
  184. data/spec/codegen/crm/extensions/calling/models/settings_response_spec.rb +77 -0
  185. data/spec/codegen/crm/extensions/videoconferencing/api/settings_api_spec.rb +72 -0
  186. data/spec/codegen/crm/extensions/videoconferencing/models/error_detail_spec.rb +65 -0
  187. data/spec/codegen/crm/extensions/videoconferencing/models/error_spec.rb +77 -0
  188. data/spec/codegen/crm/extensions/videoconferencing/models/external_settings_spec.rb +59 -0
  189. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +50 -0
  190. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +69 -0
  191. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +48 -0
  192. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +47 -0
  193. data/spec/codegen/crm/objects/feedback_submissions/models/associated_id_spec.rb +47 -0
  194. data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_batch_input_spec.rb +41 -0
  195. data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_id_spec.rb +41 -0
  196. data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_input_spec.rb +41 -0
  197. data/spec/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id_spec.rb +53 -0
  198. data/spec/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_spec.rb +75 -0
  199. data/spec/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_with_errors_spec.rb +87 -0
  200. data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id_spec.rb +47 -0
  201. data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object_spec.rb +47 -0
  202. data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_with_total_simple_public_object_spec.rb +53 -0
  203. data/spec/codegen/crm/objects/feedback_submissions/models/error_category_spec.rb +51 -0
  204. data/spec/codegen/crm/objects/feedback_submissions/models/error_detail_spec.rb +65 -0
  205. data/spec/codegen/crm/objects/feedback_submissions/models/error_spec.rb +77 -0
  206. data/spec/codegen/crm/objects/feedback_submissions/models/filter_group_spec.rb +41 -0
  207. data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +57 -0
  208. data/spec/codegen/crm/objects/feedback_submissions/models/next_page_spec.rb +47 -0
  209. data/spec/codegen/crm/objects/feedback_submissions/models/paging_spec.rb +47 -0
  210. data/spec/codegen/crm/objects/feedback_submissions/models/previous_page_spec.rb +47 -0
  211. data/spec/codegen/crm/objects/feedback_submissions/models/public_object_search_request_spec.rb +71 -0
  212. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_batch_input_spec.rb +47 -0
  213. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_id_spec.rb +41 -0
  214. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_input_spec.rb +41 -0
  215. data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_spec.rb +77 -0
  216. data/spec/codegen/crm/objects/feedback_submissions/models/standard_error_spec.rb +83 -0
  217. data/spec/codegen/files/files/api/files_api_spec.rb +189 -0
  218. data/spec/codegen/files/files/api/folders_api_spec.rb +143 -0
  219. data/spec/codegen/files/files/models/collection_response_file_spec.rb +47 -0
  220. data/spec/codegen/files/files/models/collection_response_folder_spec.rb +47 -0
  221. data/spec/codegen/files/files/models/error_category_spec.rb +51 -0
  222. data/spec/codegen/files/files/models/error_detail_spec.rb +65 -0
  223. data/spec/codegen/files/files/models/error_spec.rb +77 -0
  224. data/spec/codegen/files/files/models/file_action_response_spec.rb +93 -0
  225. data/spec/codegen/files/files/models/file_spec.rb +147 -0
  226. data/spec/codegen/files/files/models/file_update_input_spec.rb +69 -0
  227. data/spec/codegen/files/files/models/folder_action_response_spec.rb +93 -0
  228. data/spec/codegen/files/files/models/folder_input_spec.rb +53 -0
  229. data/spec/codegen/files/files/models/folder_spec.rb +83 -0
  230. data/spec/codegen/files/files/models/folder_update_input_spec.rb +53 -0
  231. data/spec/codegen/files/files/models/folder_update_task_locator_spec.rb +47 -0
  232. data/spec/codegen/files/files/models/import_from_url_input_spec.rb +101 -0
  233. data/spec/codegen/files/files/models/import_from_url_task_locator_spec.rb +47 -0
  234. data/spec/codegen/files/files/models/next_page_spec.rb +47 -0
  235. data/spec/codegen/files/files/models/paging_spec.rb +47 -0
  236. data/spec/codegen/files/files/models/previous_page_spec.rb +47 -0
  237. data/spec/codegen/files/files/models/signed_url_spec.rb +83 -0
  238. data/spec/codegen/files/files/models/standard_error_spec.rb +83 -0
  239. data/spec/codegen/marketing/transactional/api/default_api_spec.rb +110 -0
  240. data/spec/codegen/marketing/transactional/models/collection_response_smtp_api_token_view_spec.rb +47 -0
  241. data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +85 -0
  242. data/spec/codegen/marketing/transactional/models/error_detail_spec.rb +65 -0
  243. data/spec/codegen/marketing/transactional/models/error_spec.rb +77 -0
  244. data/spec/codegen/marketing/transactional/models/event_id_view_spec.rb +47 -0
  245. data/spec/codegen/marketing/transactional/models/next_page_spec.rb +47 -0
  246. data/spec/codegen/marketing/transactional/models/paging_spec.rb +41 -0
  247. data/spec/codegen/marketing/transactional/models/public_single_send_email_spec.rb +71 -0
  248. data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +59 -0
  249. data/spec/codegen/marketing/transactional/models/smtp_api_token_request_egg_spec.rb +47 -0
  250. data/spec/codegen/marketing/transactional/models/smtp_api_token_view_spec.rb +77 -0
  251. data/spec/features/crm/extensions/accounting/callbacks_api_spec.rb +16 -0
  252. data/spec/features/crm/extensions/accounting/invoice_api_spec.rb +9 -0
  253. data/spec/features/crm/extensions/accounting/settings_api_spec.rb +8 -0
  254. data/spec/features/crm/extensions/accounting/sync_api_spec.rb +8 -0
  255. data/spec/features/crm/extensions/accounting/user_accounts_api_spec.rb +8 -0
  256. data/spec/features/crm/extensions/calling/settings_api_spec.rb +10 -0
  257. data/spec/features/crm/extensions/videoconferencing/settings_api_spec.rb +9 -0
  258. data/spec/features/crm/objects/feedback_submissions/associations_api_spec.rb +7 -0
  259. data/spec/features/crm/objects/feedback_submissions/basic_api_spec.rb +8 -0
  260. data/spec/features/crm/objects/feedback_submissions/batch_api_spec.rb +7 -0
  261. data/spec/features/crm/objects/feedback_submissions/search_api_spec.rb +7 -0
  262. data/spec/features/files/files/files_api_spec.rb +16 -0
  263. data/spec/features/files/files/folders_api_spec.rb +14 -0
  264. data/spec/features/marketing/transactional/default_api_spec.rb +12 -0
  265. metadata +401 -2
@@ -0,0 +1,381 @@
1
+ =begin
2
+ #Accounting Extension
3
+
4
+ #These APIs allow you to interact with HubSpot's Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot
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 Extensions
18
+ module Accounting
19
+ class AccountingAppUrls
20
+ # A URL that specifies the endpoint where invoices can be retrieved.
21
+ attr_accessor :get_invoice_url
22
+
23
+ # A URL that specifies the endpoint where a customer search can be performed.
24
+ attr_accessor :search_customer_url
25
+
26
+ # A URL that specifies the endpoint where an invoice PDF can be retrieved.
27
+ attr_accessor :get_invoice_pdf_url
28
+
29
+ # A template URL that indicates the endpoint where a customer can be fetched by ID. Note that ${CUSTOMER_ID} in this URL will be replaced by the actual customer ID. For example: https://myapp.com/api/customers/${CUSTOMER_ID}
30
+ attr_accessor :customer_url_template
31
+
32
+ # A template URL that indicates the endpoint where a product can be fetched by ID. Note that ${PRODUCT_ID} in this URL will be replaced by the actual product ID. For example: https://myapp.com/api/products/${PRODUCT_ID}
33
+ attr_accessor :product_url_template
34
+
35
+ # A template URL that indicates the endpoint where an invoice can be fetched by ID. Note that ${INVOICE_ID} in this URL will be replaced by the actual invoice ID. For example: https://myapp.com/api/invoices/${INVOICE_ID}
36
+ attr_accessor :invoice_url_template
37
+
38
+ # A URL that specifies the endpoint where an invoices can be created.
39
+ attr_accessor :create_invoice_url
40
+
41
+ # A URL that specifies the endpoint where an invoice search can be performed.
42
+ attr_accessor :search_invoice_url
43
+
44
+ # A URL that specifies the endpoint where a product search can be performed.
45
+ attr_accessor :search_product_url
46
+
47
+ # A URL that specifies the endpoint where payment terms can be retrieved.
48
+ attr_accessor :get_terms_url
49
+
50
+ # A URL that specifies the endpoint where a new customer can be created.
51
+ attr_accessor :create_customer_url
52
+
53
+ # A URL that specifies the endpoint where a tax search can be performed.
54
+ attr_accessor :search_tax_url
55
+
56
+ # A URL that specifies the endpoint where exchange rates can be queried.
57
+ attr_accessor :exchange_rate_url
58
+
59
+ attr_accessor :search_url
60
+
61
+ attr_accessor :search_count_url
62
+
63
+ # Attribute mapping from ruby-style variable name to JSON key.
64
+ def self.attribute_map
65
+ {
66
+ :'get_invoice_url' => :'getInvoiceUrl',
67
+ :'search_customer_url' => :'searchCustomerUrl',
68
+ :'get_invoice_pdf_url' => :'getInvoicePdfUrl',
69
+ :'customer_url_template' => :'customerUrlTemplate',
70
+ :'product_url_template' => :'productUrlTemplate',
71
+ :'invoice_url_template' => :'invoiceUrlTemplate',
72
+ :'create_invoice_url' => :'createInvoiceUrl',
73
+ :'search_invoice_url' => :'searchInvoiceUrl',
74
+ :'search_product_url' => :'searchProductUrl',
75
+ :'get_terms_url' => :'getTermsUrl',
76
+ :'create_customer_url' => :'createCustomerUrl',
77
+ :'search_tax_url' => :'searchTaxUrl',
78
+ :'exchange_rate_url' => :'exchangeRateUrl',
79
+ :'search_url' => :'searchUrl',
80
+ :'search_count_url' => :'searchCountUrl'
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.openapi_types
86
+ {
87
+ :'get_invoice_url' => :'String',
88
+ :'search_customer_url' => :'String',
89
+ :'get_invoice_pdf_url' => :'String',
90
+ :'customer_url_template' => :'String',
91
+ :'product_url_template' => :'String',
92
+ :'invoice_url_template' => :'String',
93
+ :'create_invoice_url' => :'String',
94
+ :'search_invoice_url' => :'String',
95
+ :'search_product_url' => :'String',
96
+ :'get_terms_url' => :'String',
97
+ :'create_customer_url' => :'String',
98
+ :'search_tax_url' => :'String',
99
+ :'exchange_rate_url' => :'String',
100
+ :'search_url' => :'String',
101
+ :'search_count_url' => :'String'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Extensions::Accounting::AccountingAppUrls` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Extensions::Accounting::AccountingAppUrls`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'get_invoice_url')
127
+ self.get_invoice_url = attributes[:'get_invoice_url']
128
+ end
129
+
130
+ if attributes.key?(:'search_customer_url')
131
+ self.search_customer_url = attributes[:'search_customer_url']
132
+ end
133
+
134
+ if attributes.key?(:'get_invoice_pdf_url')
135
+ self.get_invoice_pdf_url = attributes[:'get_invoice_pdf_url']
136
+ end
137
+
138
+ if attributes.key?(:'customer_url_template')
139
+ self.customer_url_template = attributes[:'customer_url_template']
140
+ end
141
+
142
+ if attributes.key?(:'product_url_template')
143
+ self.product_url_template = attributes[:'product_url_template']
144
+ end
145
+
146
+ if attributes.key?(:'invoice_url_template')
147
+ self.invoice_url_template = attributes[:'invoice_url_template']
148
+ end
149
+
150
+ if attributes.key?(:'create_invoice_url')
151
+ self.create_invoice_url = attributes[:'create_invoice_url']
152
+ end
153
+
154
+ if attributes.key?(:'search_invoice_url')
155
+ self.search_invoice_url = attributes[:'search_invoice_url']
156
+ end
157
+
158
+ if attributes.key?(:'search_product_url')
159
+ self.search_product_url = attributes[:'search_product_url']
160
+ end
161
+
162
+ if attributes.key?(:'get_terms_url')
163
+ self.get_terms_url = attributes[:'get_terms_url']
164
+ end
165
+
166
+ if attributes.key?(:'create_customer_url')
167
+ self.create_customer_url = attributes[:'create_customer_url']
168
+ end
169
+
170
+ if attributes.key?(:'search_tax_url')
171
+ self.search_tax_url = attributes[:'search_tax_url']
172
+ end
173
+
174
+ if attributes.key?(:'exchange_rate_url')
175
+ self.exchange_rate_url = attributes[:'exchange_rate_url']
176
+ end
177
+
178
+ if attributes.key?(:'search_url')
179
+ self.search_url = attributes[:'search_url']
180
+ end
181
+
182
+ if attributes.key?(:'search_count_url')
183
+ self.search_count_url = attributes[:'search_count_url']
184
+ end
185
+ end
186
+
187
+ # Show invalid properties with the reasons. Usually used together with valid?
188
+ # @return Array for valid properties with the reasons
189
+ def list_invalid_properties
190
+ invalid_properties = Array.new
191
+ if @get_invoice_url.nil?
192
+ invalid_properties.push('invalid value for "get_invoice_url", get_invoice_url cannot be nil.')
193
+ end
194
+
195
+ if @search_customer_url.nil?
196
+ invalid_properties.push('invalid value for "search_customer_url", search_customer_url cannot be nil.')
197
+ end
198
+
199
+ if @get_invoice_pdf_url.nil?
200
+ invalid_properties.push('invalid value for "get_invoice_pdf_url", get_invoice_pdf_url cannot be nil.')
201
+ end
202
+
203
+ if @customer_url_template.nil?
204
+ invalid_properties.push('invalid value for "customer_url_template", customer_url_template cannot be nil.')
205
+ end
206
+
207
+ if @product_url_template.nil?
208
+ invalid_properties.push('invalid value for "product_url_template", product_url_template cannot be nil.')
209
+ end
210
+
211
+ if @invoice_url_template.nil?
212
+ invalid_properties.push('invalid value for "invoice_url_template", invoice_url_template cannot be nil.')
213
+ end
214
+
215
+ invalid_properties
216
+ end
217
+
218
+ # Check to see if the all the properties in the model are valid
219
+ # @return true if the model is valid
220
+ def valid?
221
+ return false if @get_invoice_url.nil?
222
+ return false if @search_customer_url.nil?
223
+ return false if @get_invoice_pdf_url.nil?
224
+ return false if @customer_url_template.nil?
225
+ return false if @product_url_template.nil?
226
+ return false if @invoice_url_template.nil?
227
+ true
228
+ end
229
+
230
+ # Checks equality by comparing each attribute.
231
+ # @param [Object] Object to be compared
232
+ def ==(o)
233
+ return true if self.equal?(o)
234
+ self.class == o.class &&
235
+ get_invoice_url == o.get_invoice_url &&
236
+ search_customer_url == o.search_customer_url &&
237
+ get_invoice_pdf_url == o.get_invoice_pdf_url &&
238
+ customer_url_template == o.customer_url_template &&
239
+ product_url_template == o.product_url_template &&
240
+ invoice_url_template == o.invoice_url_template &&
241
+ create_invoice_url == o.create_invoice_url &&
242
+ search_invoice_url == o.search_invoice_url &&
243
+ search_product_url == o.search_product_url &&
244
+ get_terms_url == o.get_terms_url &&
245
+ create_customer_url == o.create_customer_url &&
246
+ search_tax_url == o.search_tax_url &&
247
+ exchange_rate_url == o.exchange_rate_url &&
248
+ search_url == o.search_url &&
249
+ search_count_url == o.search_count_url
250
+ end
251
+
252
+ # @see the `==` method
253
+ # @param [Object] Object to be compared
254
+ def eql?(o)
255
+ self == o
256
+ end
257
+
258
+ # Calculates hash code according to all attributes.
259
+ # @return [Integer] Hash code
260
+ def hash
261
+ [get_invoice_url, search_customer_url, get_invoice_pdf_url, customer_url_template, product_url_template, invoice_url_template, create_invoice_url, search_invoice_url, search_product_url, get_terms_url, create_customer_url, search_tax_url, exchange_rate_url, search_url, search_count_url].hash
262
+ end
263
+
264
+ # Builds the object from hash
265
+ # @param [Hash] attributes Model attributes in the form of hash
266
+ # @return [Object] Returns the model itself
267
+ def self.build_from_hash(attributes)
268
+ new.build_from_hash(attributes)
269
+ end
270
+
271
+ # Builds the object from hash
272
+ # @param [Hash] attributes Model attributes in the form of hash
273
+ # @return [Object] Returns the model itself
274
+ def build_from_hash(attributes)
275
+ return nil unless attributes.is_a?(Hash)
276
+ self.class.openapi_types.each_pair do |key, type|
277
+ if type =~ /\AArray<(.*)>/i
278
+ # check to ensure the input is an array given that the attribute
279
+ # is documented as an array but the input is not
280
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
281
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
282
+ end
283
+ elsif !attributes[self.class.attribute_map[key]].nil?
284
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
285
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
286
+ end
287
+
288
+ self
289
+ end
290
+
291
+ # Deserializes the data based on type
292
+ # @param string type Data type
293
+ # @param string value Value to be deserialized
294
+ # @return [Object] Deserialized data
295
+ def _deserialize(type, value)
296
+ case type.to_sym
297
+ when :DateTime
298
+ DateTime.parse(value)
299
+ when :Date
300
+ Date.parse(value)
301
+ when :String
302
+ value.to_s
303
+ when :Integer
304
+ value.to_i
305
+ when :Float
306
+ value.to_f
307
+ when :Boolean
308
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
309
+ true
310
+ else
311
+ false
312
+ end
313
+ when :Object
314
+ # generic object (usually a Hash), return directly
315
+ value
316
+ when /\AArray<(?<inner_type>.+)>\z/
317
+ inner_type = Regexp.last_match[:inner_type]
318
+ value.map { |v| _deserialize(inner_type, v) }
319
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
320
+ k_type = Regexp.last_match[:k_type]
321
+ v_type = Regexp.last_match[:v_type]
322
+ {}.tap do |hash|
323
+ value.each do |k, v|
324
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
325
+ end
326
+ end
327
+ else # model
328
+ Hubspot::Crm::Extensions::Accounting.const_get(type).build_from_hash(value)
329
+ end
330
+ end
331
+
332
+ # Returns the string representation of the object
333
+ # @return [String] String presentation of the object
334
+ def to_s
335
+ to_hash.to_s
336
+ end
337
+
338
+ # to_body is an alias to to_hash (backward compatibility)
339
+ # @return [Hash] Returns the object in the form of hash
340
+ def to_body
341
+ to_hash
342
+ end
343
+
344
+ # Returns the object in the form of hash
345
+ # @return [Hash] Returns the object in the form of hash
346
+ def to_hash
347
+ hash = {}
348
+ self.class.attribute_map.each_pair do |attr, param|
349
+ value = self.send(attr)
350
+ if value.nil?
351
+ is_nullable = self.class.openapi_nullable.include?(attr)
352
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
353
+ end
354
+
355
+ hash[param] = _to_hash(value)
356
+ end
357
+ hash
358
+ end
359
+
360
+ # Outputs non-array value in the form of hash
361
+ # For object, use to_hash. Otherwise, just return the value
362
+ # @param [Object] value Any valid value
363
+ # @return [Hash] Returns the value in the form of hash
364
+ def _to_hash(value)
365
+ if value.is_a?(Array)
366
+ value.compact.map { |v| _to_hash(v) }
367
+ elsif value.is_a?(Hash)
368
+ {}.tap do |hash|
369
+ value.each { |k, v| hash[k] = _to_hash(v) }
370
+ end
371
+ elsif value.respond_to? :to_hash
372
+ value.to_hash
373
+ else
374
+ value
375
+ end
376
+ end
377
+ end
378
+ end
379
+ end
380
+ end
381
+ end
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #Accounting Extension
3
+
4
+ #These APIs allow you to interact with HubSpot's Accounting Extension. It allows you to: * Specify the URLs that HubSpot will use when making webhook requests to your external accounting system. * Respond to webhook calls made to your external accounting system by HubSpot
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 Extensions
18
+ module Accounting
19
+ class AccountingExtensionCustomer
20
+ # The customer's email address
21
+ attr_accessor :email_address
22
+
23
+ # The customer's full name
24
+ attr_accessor :name
25
+
26
+ # The ID of the customer in the external accounting system.
27
+ attr_accessor :id
28
+
29
+ attr_accessor :billing_address
30
+
31
+ # The ISO 4217 currency code that represents the currency the customer should be billed in.
32
+ attr_accessor :currency_code
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'email_address' => :'emailAddress',
38
+ :'name' => :'name',
39
+ :'id' => :'id',
40
+ :'billing_address' => :'billingAddress',
41
+ :'currency_code' => :'currencyCode'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'email_address' => :'String',
49
+ :'name' => :'String',
50
+ :'id' => :'String',
51
+ :'billing_address' => :'Address',
52
+ :'currency_code' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Extensions::Accounting::AccountingExtensionCustomer` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Extensions::Accounting::AccountingExtensionCustomer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'email_address')
78
+ self.email_address = attributes[:'email_address']
79
+ end
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.key?(:'id')
86
+ self.id = attributes[:'id']
87
+ end
88
+
89
+ if attributes.key?(:'billing_address')
90
+ self.billing_address = attributes[:'billing_address']
91
+ end
92
+
93
+ if attributes.key?(:'currency_code')
94
+ self.currency_code = attributes[:'currency_code']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ if @name.nil?
103
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
104
+ end
105
+
106
+ if @id.nil?
107
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ return false if @name.nil?
117
+ return false if @id.nil?
118
+ true
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ email_address == o.email_address &&
127
+ name == o.name &&
128
+ id == o.id &&
129
+ billing_address == o.billing_address &&
130
+ currency_code == o.currency_code
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [email_address, name, id, billing_address, currency_code].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ Hubspot::Crm::Extensions::Accounting.const_get(type).build_from_hash(value)
210
+ end
211
+ end
212
+
213
+ # Returns the string representation of the object
214
+ # @return [String] String presentation of the object
215
+ def to_s
216
+ to_hash.to_s
217
+ end
218
+
219
+ # to_body is an alias to to_hash (backward compatibility)
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_body
222
+ to_hash
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ # Outputs non-array value in the form of hash
242
+ # For object, use to_hash. Otherwise, just return the value
243
+ # @param [Object] value Any valid value
244
+ # @return [Hash] Returns the value in the form of hash
245
+ def _to_hash(value)
246
+ if value.is_a?(Array)
247
+ value.compact.map { |v| _to_hash(v) }
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.each { |k, v| hash[k] = _to_hash(v) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash
254
+ else
255
+ value
256
+ end
257
+ end
258
+ end
259
+ end
260
+ end
261
+ end
262
+ end