hubspot-api-client 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (632) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -23
  3. data/lib/hubspot-api-client.rb +1 -1
  4. data/lib/hubspot/codegen/crm/associations/api/batch_api.rb +222 -226
  5. data/lib/hubspot/codegen/crm/associations/api_client.rb +349 -351
  6. data/lib/hubspot/codegen/crm/associations/api_error.rb +35 -37
  7. data/lib/hubspot/codegen/crm/associations/configuration.rb +221 -223
  8. data/lib/hubspot/codegen/crm/associations/models/batch_input_public_association.rb +174 -178
  9. data/lib/hubspot/codegen/crm/associations/models/batch_input_public_object_id.rb +174 -178
  10. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association.rb +262 -266
  11. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi.rb +262 -266
  12. data/lib/hubspot/codegen/crm/associations/models/error.rb +229 -233
  13. data/lib/hubspot/codegen/crm/associations/models/error_detail.rb +210 -214
  14. data/lib/hubspot/codegen/crm/associations/models/public_association.rb +184 -188
  15. data/lib/hubspot/codegen/crm/associations/models/public_association_multi.rb +186 -190
  16. data/lib/hubspot/codegen/crm/associations/models/public_object_id.rb +173 -177
  17. data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +216 -220
  18. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +338 -340
  19. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +249 -253
  20. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +66 -70
  21. data/lib/hubspot/codegen/crm/companies/api_client.rb +349 -351
  22. data/lib/hubspot/codegen/crm/companies/api_error.rb +35 -37
  23. data/lib/hubspot/codegen/crm/companies/configuration.rb +221 -223
  24. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_batch_input.rb +174 -178
  25. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_id.rb +174 -178
  26. data/lib/hubspot/codegen/crm/companies/models/batch_input_simple_public_object_input.rb +174 -178
  27. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +188 -192
  28. data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object.rb +261 -265
  29. data/lib/hubspot/codegen/crm/companies/models/collection_response_simple_public_object.rb +182 -186
  30. data/lib/hubspot/codegen/crm/companies/models/collection_response_simple_public_object_id.rb +182 -186
  31. data/lib/hubspot/codegen/crm/companies/models/collection_response_with_total_simple_public_object.rb +195 -199
  32. data/lib/hubspot/codegen/crm/companies/models/error.rb +229 -233
  33. data/lib/hubspot/codegen/crm/companies/models/error_detail.rb +210 -214
  34. data/lib/hubspot/codegen/crm/companies/models/filter.rb +219 -223
  35. data/lib/hubspot/codegen/crm/companies/models/filter_group.rb +174 -178
  36. data/lib/hubspot/codegen/crm/companies/models/next_page.rb +180 -184
  37. data/lib/hubspot/codegen/crm/companies/models/paging.rb +168 -172
  38. data/lib/hubspot/codegen/crm/companies/models/public_object_search_request.rb +227 -231
  39. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +235 -239
  40. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +185 -189
  41. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_id.rb +172 -176
  42. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +174 -178
  43. data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +216 -220
  44. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +338 -340
  45. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +249 -253
  46. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +66 -70
  47. data/lib/hubspot/codegen/crm/contacts/api_client.rb +349 -351
  48. data/lib/hubspot/codegen/crm/contacts/api_error.rb +35 -37
  49. data/lib/hubspot/codegen/crm/contacts/configuration.rb +221 -223
  50. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_batch_input.rb +174 -178
  51. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_id.rb +174 -178
  52. data/lib/hubspot/codegen/crm/contacts/models/batch_input_simple_public_object_input.rb +174 -178
  53. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +188 -192
  54. data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object.rb +261 -265
  55. data/lib/hubspot/codegen/crm/contacts/models/collection_response_simple_public_object.rb +182 -186
  56. data/lib/hubspot/codegen/crm/contacts/models/collection_response_simple_public_object_id.rb +182 -186
  57. data/lib/hubspot/codegen/crm/contacts/models/collection_response_with_total_simple_public_object.rb +195 -199
  58. data/lib/hubspot/codegen/crm/contacts/models/error.rb +229 -233
  59. data/lib/hubspot/codegen/crm/contacts/models/error_detail.rb +210 -214
  60. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +219 -223
  61. data/lib/hubspot/codegen/crm/contacts/models/filter_group.rb +174 -178
  62. data/lib/hubspot/codegen/crm/contacts/models/next_page.rb +180 -184
  63. data/lib/hubspot/codegen/crm/contacts/models/paging.rb +168 -172
  64. data/lib/hubspot/codegen/crm/contacts/models/public_object_search_request.rb +227 -231
  65. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +235 -239
  66. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +185 -189
  67. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_id.rb +172 -176
  68. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +174 -178
  69. data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +216 -220
  70. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +338 -340
  71. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +249 -253
  72. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +66 -70
  73. data/lib/hubspot/codegen/crm/deals/api_client.rb +349 -351
  74. data/lib/hubspot/codegen/crm/deals/api_error.rb +35 -37
  75. data/lib/hubspot/codegen/crm/deals/configuration.rb +221 -223
  76. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_batch_input.rb +174 -178
  77. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_id.rb +174 -178
  78. data/lib/hubspot/codegen/crm/deals/models/batch_input_simple_public_object_input.rb +174 -178
  79. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +188 -192
  80. data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object.rb +261 -265
  81. data/lib/hubspot/codegen/crm/deals/models/collection_response_simple_public_object.rb +182 -186
  82. data/lib/hubspot/codegen/crm/deals/models/collection_response_simple_public_object_id.rb +182 -186
  83. data/lib/hubspot/codegen/crm/deals/models/collection_response_with_total_simple_public_object.rb +195 -199
  84. data/lib/hubspot/codegen/crm/deals/models/error.rb +229 -233
  85. data/lib/hubspot/codegen/crm/deals/models/error_detail.rb +210 -214
  86. data/lib/hubspot/codegen/crm/deals/models/filter.rb +219 -223
  87. data/lib/hubspot/codegen/crm/deals/models/filter_group.rb +174 -178
  88. data/lib/hubspot/codegen/crm/deals/models/next_page.rb +180 -184
  89. data/lib/hubspot/codegen/crm/deals/models/paging.rb +168 -172
  90. data/lib/hubspot/codegen/crm/deals/models/public_object_search_request.rb +227 -231
  91. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +235 -239
  92. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +185 -189
  93. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_id.rb +172 -176
  94. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +174 -178
  95. data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +342 -316
  96. data/lib/hubspot/codegen/crm/extensions/cards/api/sample_response_api.rb +84 -0
  97. data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +350 -352
  98. data/lib/hubspot/codegen/crm/extensions/cards/api_error.rb +36 -38
  99. data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +222 -224
  100. data/lib/hubspot/codegen/crm/extensions/cards/models/action_confirmation_body.rb +245 -0
  101. data/lib/hubspot/codegen/crm/extensions/cards/models/action_hook_action_body.rb +327 -0
  102. data/lib/hubspot/codegen/crm/extensions/cards/models/card_actions.rb +175 -179
  103. data/lib/hubspot/codegen/crm/extensions/cards/models/card_create_request.rb +208 -212
  104. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_body.rb +175 -179
  105. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_property.rb +237 -241
  106. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body.rb +186 -190
  107. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body_patch.rb +182 -186
  108. data/lib/hubspot/codegen/crm/extensions/cards/models/card_list_response.rb +175 -179
  109. data/lib/hubspot/codegen/crm/extensions/cards/models/card_object_type_body.rb +214 -218
  110. data/lib/hubspot/codegen/crm/extensions/cards/models/card_patch_request.rb +193 -197
  111. data/lib/hubspot/codegen/crm/extensions/cards/models/card_response.rb +228 -232
  112. data/lib/hubspot/codegen/crm/extensions/cards/models/display_option.rb +224 -228
  113. data/lib/hubspot/codegen/crm/extensions/cards/models/error.rb +230 -234
  114. data/lib/hubspot/codegen/crm/extensions/cards/models/error_detail.rb +193 -197
  115. data/lib/hubspot/codegen/crm/extensions/cards/models/i_frame_action_body.rb +320 -0
  116. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_card_payload_response.rb +303 -0
  117. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_object_result.rb +272 -0
  118. data/lib/hubspot/codegen/crm/extensions/cards/models/object_token.rb +278 -0
  119. data/lib/hubspot/codegen/crm/extensions/cards/models/top_level_actions.rb +237 -0
  120. data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +216 -220
  121. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +338 -340
  122. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +249 -253
  123. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +66 -70
  124. data/lib/hubspot/codegen/crm/line_items/api_client.rb +349 -351
  125. data/lib/hubspot/codegen/crm/line_items/api_error.rb +35 -37
  126. data/lib/hubspot/codegen/crm/line_items/configuration.rb +221 -223
  127. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_batch_input.rb +174 -178
  128. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_id.rb +174 -178
  129. data/lib/hubspot/codegen/crm/line_items/models/batch_input_simple_public_object_input.rb +174 -178
  130. data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +188 -192
  131. data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object.rb +261 -265
  132. data/lib/hubspot/codegen/crm/line_items/models/collection_response_simple_public_object.rb +182 -186
  133. data/lib/hubspot/codegen/crm/line_items/models/collection_response_simple_public_object_id.rb +182 -186
  134. data/lib/hubspot/codegen/crm/line_items/models/collection_response_with_total_simple_public_object.rb +195 -199
  135. data/lib/hubspot/codegen/crm/line_items/models/error.rb +229 -233
  136. data/lib/hubspot/codegen/crm/line_items/models/error_detail.rb +210 -214
  137. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +219 -223
  138. data/lib/hubspot/codegen/crm/line_items/models/filter_group.rb +174 -178
  139. data/lib/hubspot/codegen/crm/line_items/models/next_page.rb +180 -184
  140. data/lib/hubspot/codegen/crm/line_items/models/paging.rb +168 -172
  141. data/lib/hubspot/codegen/crm/line_items/models/public_object_search_request.rb +227 -231
  142. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +235 -239
  143. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_batch_input.rb +185 -189
  144. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_id.rb +172 -176
  145. data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_input.rb +174 -178
  146. data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +233 -237
  147. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +368 -369
  148. data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +273 -277
  149. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +72 -76
  150. data/lib/hubspot/codegen/crm/objects/api_client.rb +349 -351
  151. data/lib/hubspot/codegen/crm/objects/api_error.rb +35 -37
  152. data/lib/hubspot/codegen/crm/objects/configuration.rb +220 -222
  153. data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_batch_input.rb +174 -178
  154. data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_id.rb +174 -178
  155. data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_input.rb +174 -178
  156. data/lib/hubspot/codegen/crm/objects/models/batch_read_input_simple_public_object_id.rb +196 -191
  157. data/lib/hubspot/codegen/crm/objects/models/batch_response_simple_public_object.rb +261 -265
  158. data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object.rb +182 -186
  159. data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object_id.rb +182 -186
  160. data/lib/hubspot/codegen/crm/objects/models/collection_response_with_total_simple_public_object.rb +195 -199
  161. data/lib/hubspot/codegen/crm/objects/models/error.rb +229 -233
  162. data/lib/hubspot/codegen/crm/objects/models/error_detail.rb +210 -214
  163. data/lib/hubspot/codegen/crm/objects/models/filter.rb +219 -223
  164. data/lib/hubspot/codegen/crm/objects/models/filter_group.rb +174 -178
  165. data/lib/hubspot/codegen/crm/objects/models/next_page.rb +180 -184
  166. data/lib/hubspot/codegen/crm/objects/models/paging.rb +168 -172
  167. data/lib/hubspot/codegen/crm/objects/models/public_object_search_request.rb +227 -231
  168. data/lib/hubspot/codegen/crm/objects/models/simple_public_object.rb +235 -239
  169. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_batch_input.rb +185 -189
  170. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_id.rb +172 -176
  171. data/lib/hubspot/codegen/crm/objects/models/simple_public_object_input.rb +174 -178
  172. data/lib/hubspot/codegen/crm/owners/api/default_api.rb +138 -140
  173. data/lib/hubspot/codegen/crm/owners/api_client.rb +349 -351
  174. data/lib/hubspot/codegen/crm/owners/api_error.rb +35 -37
  175. data/lib/hubspot/codegen/crm/owners/configuration.rb +220 -222
  176. data/lib/hubspot/codegen/crm/owners/models/collection_response_public_owner.rb +182 -186
  177. data/lib/hubspot/codegen/crm/owners/models/error.rb +229 -233
  178. data/lib/hubspot/codegen/crm/owners/models/error_detail.rb +192 -196
  179. data/lib/hubspot/codegen/crm/owners/models/next_page.rb +180 -184
  180. data/lib/hubspot/codegen/crm/owners/models/paging.rb +168 -172
  181. data/lib/hubspot/codegen/crm/owners/models/public_owner.rb +242 -246
  182. data/lib/hubspot/codegen/crm/owners/models/public_team.rb +219 -223
  183. data/lib/hubspot/codegen/crm/pipelines/api/pipeline_stages_api.rb +458 -462
  184. data/lib/hubspot/codegen/crm/pipelines/api/pipelines_api.rb +422 -426
  185. data/lib/hubspot/codegen/crm/pipelines/api_client.rb +349 -351
  186. data/lib/hubspot/codegen/crm/pipelines/api_error.rb +35 -37
  187. data/lib/hubspot/codegen/crm/pipelines/configuration.rb +220 -222
  188. data/lib/hubspot/codegen/crm/pipelines/models/collection_response_pipeline.rb +182 -186
  189. data/lib/hubspot/codegen/crm/pipelines/models/collection_response_pipeline_stage.rb +182 -186
  190. data/lib/hubspot/codegen/crm/pipelines/models/error.rb +229 -254
  191. data/lib/hubspot/codegen/crm/pipelines/models/error_detail.rb +192 -196
  192. data/lib/hubspot/codegen/crm/pipelines/models/next_page.rb +180 -184
  193. data/lib/hubspot/codegen/crm/pipelines/models/paging.rb +168 -172
  194. data/lib/hubspot/codegen/crm/pipelines/models/pipeline.rb +262 -266
  195. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_input.rb +203 -207
  196. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_patch_input.rb +188 -192
  197. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage.rb +261 -265
  198. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage_input.rb +201 -205
  199. data/lib/hubspot/codegen/crm/pipelines/models/pipeline_stage_patch_input.rb +202 -206
  200. data/lib/hubspot/codegen/crm/products/api/associations_api.rb +215 -219
  201. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +337 -339
  202. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +248 -252
  203. data/lib/hubspot/codegen/crm/products/api/search_api.rb +65 -69
  204. data/lib/hubspot/codegen/crm/products/api_client.rb +349 -351
  205. data/lib/hubspot/codegen/crm/products/api_error.rb +35 -37
  206. data/lib/hubspot/codegen/crm/products/configuration.rb +220 -222
  207. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_batch_input.rb +174 -178
  208. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_id.rb +174 -178
  209. data/lib/hubspot/codegen/crm/products/models/batch_input_simple_public_object_input.rb +174 -178
  210. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +188 -192
  211. data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object.rb +261 -265
  212. data/lib/hubspot/codegen/crm/products/models/collection_response_simple_public_object.rb +182 -186
  213. data/lib/hubspot/codegen/crm/products/models/collection_response_simple_public_object_id.rb +182 -186
  214. data/lib/hubspot/codegen/crm/products/models/collection_response_with_total_simple_public_object.rb +195 -199
  215. data/lib/hubspot/codegen/crm/products/models/error.rb +229 -233
  216. data/lib/hubspot/codegen/crm/products/models/error_detail.rb +210 -214
  217. data/lib/hubspot/codegen/crm/products/models/filter.rb +219 -223
  218. data/lib/hubspot/codegen/crm/products/models/filter_group.rb +174 -178
  219. data/lib/hubspot/codegen/crm/products/models/next_page.rb +180 -184
  220. data/lib/hubspot/codegen/crm/products/models/paging.rb +168 -172
  221. data/lib/hubspot/codegen/crm/products/models/public_object_search_request.rb +227 -231
  222. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +235 -239
  223. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input.rb +185 -189
  224. data/lib/hubspot/codegen/crm/products/models/simple_public_object_id.rb +172 -176
  225. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +174 -178
  226. data/lib/hubspot/codegen/crm/properties/api/batch_api.rb +203 -207
  227. data/lib/hubspot/codegen/crm/properties/api/core_api.rb +347 -351
  228. data/lib/hubspot/codegen/crm/properties/api/groups_api.rb +341 -345
  229. data/lib/hubspot/codegen/crm/properties/api_client.rb +349 -351
  230. data/lib/hubspot/codegen/crm/properties/api_error.rb +35 -37
  231. data/lib/hubspot/codegen/crm/properties/configuration.rb +220 -222
  232. data/lib/hubspot/codegen/crm/properties/models/batch_input_property_create.rb +174 -178
  233. data/lib/hubspot/codegen/crm/properties/models/batch_input_property_name.rb +174 -178
  234. data/lib/hubspot/codegen/crm/properties/models/batch_read_input_property_name.rb +185 -189
  235. data/lib/hubspot/codegen/crm/properties/models/batch_response_property.rb +261 -265
  236. data/lib/hubspot/codegen/crm/properties/models/collection_response_property.rb +182 -186
  237. data/lib/hubspot/codegen/crm/properties/models/collection_response_property_group.rb +182 -186
  238. data/lib/hubspot/codegen/crm/properties/models/error.rb +229 -233
  239. data/lib/hubspot/codegen/crm/properties/models/error_detail.rb +210 -214
  240. data/lib/hubspot/codegen/crm/properties/models/next_page.rb +180 -184
  241. data/lib/hubspot/codegen/crm/properties/models/option.rb +215 -219
  242. data/lib/hubspot/codegen/crm/properties/models/option_input.rb +215 -219
  243. data/lib/hubspot/codegen/crm/properties/models/paging.rb +168 -172
  244. data/lib/hubspot/codegen/crm/properties/models/property.rb +393 -397
  245. data/lib/hubspot/codegen/crm/properties/models/property_create.rb +309 -313
  246. data/lib/hubspot/codegen/crm/properties/models/property_group.rb +210 -214
  247. data/lib/hubspot/codegen/crm/properties/models/property_group_create.rb +195 -199
  248. data/lib/hubspot/codegen/crm/properties/models/property_group_update.rb +178 -182
  249. data/lib/hubspot/codegen/crm/properties/models/property_modification_metadata.rb +203 -207
  250. data/lib/hubspot/codegen/crm/properties/models/property_name.rb +173 -177
  251. data/lib/hubspot/codegen/crm/properties/models/property_update.rb +271 -275
  252. data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +215 -219
  253. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +337 -339
  254. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +248 -252
  255. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +65 -69
  256. data/lib/hubspot/codegen/crm/quotes/api_client.rb +349 -351
  257. data/lib/hubspot/codegen/crm/quotes/api_error.rb +35 -37
  258. data/lib/hubspot/codegen/crm/quotes/configuration.rb +220 -222
  259. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_batch_input.rb +174 -178
  260. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_id.rb +174 -178
  261. data/lib/hubspot/codegen/crm/quotes/models/batch_input_simple_public_object_input.rb +174 -178
  262. data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +188 -192
  263. data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object.rb +261 -265
  264. data/lib/hubspot/codegen/crm/quotes/models/collection_response_simple_public_object.rb +182 -186
  265. data/lib/hubspot/codegen/crm/quotes/models/collection_response_simple_public_object_id.rb +182 -186
  266. data/lib/hubspot/codegen/crm/quotes/models/collection_response_with_total_simple_public_object.rb +195 -199
  267. data/lib/hubspot/codegen/crm/quotes/models/error.rb +229 -233
  268. data/lib/hubspot/codegen/crm/quotes/models/error_detail.rb +210 -214
  269. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +220 -224
  270. data/lib/hubspot/codegen/crm/quotes/models/filter_group.rb +174 -178
  271. data/lib/hubspot/codegen/crm/quotes/models/next_page.rb +181 -185
  272. data/lib/hubspot/codegen/crm/quotes/models/paging.rb +169 -173
  273. data/lib/hubspot/codegen/crm/quotes/models/public_object_search_request.rb +228 -232
  274. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +236 -240
  275. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_batch_input.rb +186 -190
  276. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_id.rb +173 -177
  277. data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_input.rb +175 -179
  278. data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +216 -220
  279. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +338 -340
  280. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +249 -253
  281. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +66 -70
  282. data/lib/hubspot/codegen/crm/tickets/api_client.rb +350 -352
  283. data/lib/hubspot/codegen/crm/tickets/api_error.rb +36 -38
  284. data/lib/hubspot/codegen/crm/tickets/configuration.rb +220 -222
  285. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_batch_input.rb +175 -179
  286. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_id.rb +175 -179
  287. data/lib/hubspot/codegen/crm/tickets/models/batch_input_simple_public_object_input.rb +175 -179
  288. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +189 -193
  289. data/lib/hubspot/codegen/crm/tickets/models/batch_response_simple_public_object.rb +262 -266
  290. data/lib/hubspot/codegen/crm/tickets/models/collection_response_simple_public_object.rb +183 -187
  291. data/lib/hubspot/codegen/crm/tickets/models/collection_response_simple_public_object_id.rb +183 -187
  292. data/lib/hubspot/codegen/crm/tickets/models/collection_response_with_total_simple_public_object.rb +196 -200
  293. data/lib/hubspot/codegen/crm/tickets/models/error.rb +230 -234
  294. data/lib/hubspot/codegen/crm/tickets/models/error_detail.rb +211 -215
  295. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +220 -224
  296. data/lib/hubspot/codegen/crm/tickets/models/filter_group.rb +175 -179
  297. data/lib/hubspot/codegen/crm/tickets/models/next_page.rb +181 -185
  298. data/lib/hubspot/codegen/crm/tickets/models/paging.rb +169 -173
  299. data/lib/hubspot/codegen/crm/tickets/models/public_object_search_request.rb +228 -232
  300. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +236 -240
  301. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +186 -190
  302. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_id.rb +172 -176
  303. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +174 -178
  304. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +64 -68
  305. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +316 -320
  306. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +78 -82
  307. data/lib/hubspot/codegen/oauth/api_client.rb +350 -352
  308. data/lib/hubspot/codegen/oauth/api_error.rb +34 -36
  309. data/lib/hubspot/codegen/oauth/configuration.rb +219 -221
  310. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +250 -254
  311. data/lib/hubspot/codegen/oauth/models/error.rb +245 -249
  312. data/lib/hubspot/codegen/oauth/models/error_detail.rb +191 -195
  313. data/lib/hubspot/codegen/oauth/models/json_node.rb +333 -337
  314. data/lib/hubspot/codegen/oauth/models/refresh_token.rb +206 -210
  315. data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +239 -243
  316. data/lib/hubspot/configuration.rb +1 -1
  317. data/lib/hubspot/helpers/get_all_helper.rb +27 -0
  318. data/lib/hubspot/{oauth.rb → oauth_helper.rb} +1 -1
  319. data/lib/hubspot/version.rb +1 -1
  320. data/sample-apps/companies-app/Gemfile +1 -1
  321. data/sample-apps/companies-app/Gemfile.lock +4 -3
  322. data/sample-apps/companies-app/app/controllers/companies_controller.rb +2 -2
  323. data/sample-apps/companies-app/app/controllers/contacts_controller.rb +1 -1
  324. data/sample-apps/companies-app/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  325. data/sample-apps/companies-app/app/lib/services/authorization/tokens/generate.rb +1 -1
  326. data/sample-apps/companies-app/app/lib/services/authorization/tokens/refresh.rb +1 -1
  327. data/sample-apps/companies-app/app/lib/services/hubspot/associations/create.rb +5 -5
  328. data/sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb +5 -5
  329. data/sample-apps/companies-app/app/lib/services/hubspot/associations/get_by_id.rb +4 -4
  330. data/sample-apps/companies-app/app/lib/services/hubspot/companies/create.rb +2 -2
  331. data/sample-apps/companies-app/app/lib/services/hubspot/companies/destroy.rb +1 -1
  332. data/sample-apps/companies-app/app/lib/services/hubspot/companies/export.rb +1 -1
  333. data/sample-apps/companies-app/app/lib/services/hubspot/companies/get_all.rb +1 -1
  334. data/sample-apps/companies-app/app/lib/services/hubspot/companies/get_by_id.rb +1 -1
  335. data/sample-apps/companies-app/app/lib/services/hubspot/companies/search.rb +4 -4
  336. data/sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb +2 -2
  337. data/sample-apps/{oauth-app/app/lib/services/hubspot/contacts/get_all.rb → companies-app/app/lib/services/hubspot/contacts/get_page.rb} +3 -3
  338. data/sample-apps/companies-app/app/lib/services/hubspot/contacts/search.rb +4 -4
  339. data/sample-apps/companies-app/app/views/oauth/authorization/login.html.erb +1 -1
  340. data/sample-apps/contacts-app/Gemfile +1 -1
  341. data/sample-apps/contacts-app/Gemfile.lock +4 -3
  342. data/sample-apps/contacts-app/app/controllers/contacts_controller.rb +3 -3
  343. data/sample-apps/contacts-app/app/controllers/properties_controller.rb +3 -3
  344. data/sample-apps/contacts-app/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  345. data/sample-apps/contacts-app/app/lib/services/authorization/tokens/generate.rb +1 -1
  346. data/sample-apps/contacts-app/app/lib/services/authorization/tokens/refresh.rb +1 -1
  347. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/create.rb +2 -2
  348. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/destroy.rb +2 -2
  349. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/export.rb +2 -15
  350. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/get_by_id.rb +2 -2
  351. data/sample-apps/{companies-app/app/lib/services/hubspot/contacts/get_all.rb → contacts-app/app/lib/services/hubspot/contacts/get_page.rb} +3 -3
  352. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/search.rb +4 -4
  353. data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb +2 -2
  354. data/sample-apps/contacts-app/app/lib/services/hubspot/owners/get_all.rb +1 -1
  355. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/create.rb +2 -2
  356. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/destroy.rb +1 -1
  357. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/get_all.rb +1 -1
  358. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/get_by_name.rb +1 -1
  359. data/sample-apps/contacts-app/app/lib/services/hubspot/properties/update.rb +3 -3
  360. data/sample-apps/contacts-app/app/views/oauth/authorization/login.html.erb +1 -1
  361. data/sample-apps/leaky-bucket-app/.env.template +3 -0
  362. data/sample-apps/leaky-bucket-app/.gitignore +34 -0
  363. data/sample-apps/leaky-bucket-app/.ruby-version +1 -0
  364. data/sample-apps/leaky-bucket-app/Dockerfile +22 -0
  365. data/sample-apps/leaky-bucket-app/Gemfile +39 -0
  366. data/sample-apps/leaky-bucket-app/Gemfile.lock +307 -0
  367. data/sample-apps/leaky-bucket-app/README.md +34 -0
  368. data/sample-apps/leaky-bucket-app/Rakefile +6 -0
  369. data/sample-apps/leaky-bucket-app/app/assets/config/manifest.js +3 -0
  370. data/sample-apps/leaky-bucket-app/app/assets/images/.keep +0 -0
  371. data/sample-apps/leaky-bucket-app/app/assets/javascripts/application.js +25 -0
  372. data/sample-apps/leaky-bucket-app/app/assets/javascripts/cable.js +13 -0
  373. data/sample-apps/leaky-bucket-app/app/assets/javascripts/channels/.keep +0 -0
  374. data/sample-apps/leaky-bucket-app/app/assets/stylesheets/application.css +90 -0
  375. data/sample-apps/leaky-bucket-app/app/controllers/application_controller.rb +12 -0
  376. data/sample-apps/leaky-bucket-app/app/controllers/concerns/.keep +0 -0
  377. data/sample-apps/leaky-bucket-app/app/controllers/concerns/exception_handler.rb +12 -0
  378. data/sample-apps/leaky-bucket-app/app/controllers/home_controller.rb +15 -0
  379. data/sample-apps/leaky-bucket-app/app/controllers/oauth/authorization_controller.rb +19 -0
  380. data/sample-apps/leaky-bucket-app/app/helpers/application_helper.rb +2 -0
  381. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/authorize_hubspot.rb +15 -0
  382. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/get_authorization_uri.rb +33 -0
  383. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/base.rb +19 -0
  384. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/generate.rb +26 -0
  385. data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/refresh.rb +33 -0
  386. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/archive_batch.rb +29 -0
  387. data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/create_batch.rb +37 -0
  388. data/sample-apps/leaky-bucket-app/app/models/application_record.rb +3 -0
  389. data/sample-apps/leaky-bucket-app/app/models/concerns/.keep +0 -0
  390. data/sample-apps/leaky-bucket-app/app/views/home/index.html.erb +13 -0
  391. data/sample-apps/leaky-bucket-app/app/views/layouts/application.html.erb +23 -0
  392. data/sample-apps/leaky-bucket-app/app/views/oauth/authorization/login.html.erb +15 -0
  393. data/sample-apps/leaky-bucket-app/app/views/shared/_header.html.erb +12 -0
  394. data/sample-apps/leaky-bucket-app/app/workers/leaky_bucket_worker.rb +25 -0
  395. data/sample-apps/leaky-bucket-app/bin/bundle +3 -0
  396. data/sample-apps/leaky-bucket-app/bin/rails +9 -0
  397. data/sample-apps/leaky-bucket-app/bin/rake +9 -0
  398. data/sample-apps/leaky-bucket-app/bin/setup +36 -0
  399. data/sample-apps/leaky-bucket-app/bin/spring +17 -0
  400. data/sample-apps/leaky-bucket-app/bin/update +31 -0
  401. data/sample-apps/leaky-bucket-app/bin/yarn +11 -0
  402. data/sample-apps/leaky-bucket-app/config.ru +5 -0
  403. data/sample-apps/leaky-bucket-app/config/application.rb +20 -0
  404. data/sample-apps/leaky-bucket-app/config/boot.rb +3 -0
  405. data/sample-apps/leaky-bucket-app/config/cable.yml +10 -0
  406. data/sample-apps/leaky-bucket-app/config/database.yml +25 -0
  407. data/sample-apps/leaky-bucket-app/config/environment.rb +5 -0
  408. data/sample-apps/leaky-bucket-app/config/environments/development.rb +65 -0
  409. data/sample-apps/leaky-bucket-app/config/environments/production.rb +94 -0
  410. data/sample-apps/leaky-bucket-app/config/environments/test.rb +46 -0
  411. data/sample-apps/leaky-bucket-app/config/initializers/assets.rb +14 -0
  412. data/sample-apps/leaky-bucket-app/config/initializers/filter_parameter_logging.rb +4 -0
  413. data/sample-apps/leaky-bucket-app/config/initializers/hubspot-api-ruby.rb +3 -0
  414. data/sample-apps/leaky-bucket-app/config/initializers/mime_types.rb +1 -0
  415. data/sample-apps/leaky-bucket-app/config/initializers/resque.rb +7 -0
  416. data/sample-apps/leaky-bucket-app/config/initializers/wrap_parameters.rb +14 -0
  417. data/sample-apps/leaky-bucket-app/config/locales/en.yml +33 -0
  418. data/sample-apps/leaky-bucket-app/config/puma.rb +34 -0
  419. data/sample-apps/leaky-bucket-app/config/routes.rb +10 -0
  420. data/sample-apps/leaky-bucket-app/config/spring.rb +6 -0
  421. data/sample-apps/leaky-bucket-app/db/seeds.rb +7 -0
  422. data/sample-apps/leaky-bucket-app/docker-compose.yml +25 -0
  423. data/sample-apps/leaky-bucket-app/docker-entrypoint.sh +8 -0
  424. data/sample-apps/leaky-bucket-app/lib/assets/.keep +0 -0
  425. data/sample-apps/leaky-bucket-app/lib/tasks/.keep +0 -0
  426. data/sample-apps/leaky-bucket-app/lib/tasks/leaky_bucket.rake +11 -0
  427. data/sample-apps/leaky-bucket-app/lib/tasks/resque.rake +11 -0
  428. data/sample-apps/leaky-bucket-app/log/.keep +0 -0
  429. data/sample-apps/leaky-bucket-app/package.json +5 -0
  430. data/sample-apps/leaky-bucket-app/public/404.html +67 -0
  431. data/sample-apps/leaky-bucket-app/public/422.html +67 -0
  432. data/sample-apps/leaky-bucket-app/public/500.html +66 -0
  433. data/sample-apps/leaky-bucket-app/public/apple-touch-icon-precomposed.png +0 -0
  434. data/sample-apps/leaky-bucket-app/public/apple-touch-icon.png +0 -0
  435. data/sample-apps/leaky-bucket-app/public/favicon.ico +0 -0
  436. data/sample-apps/leaky-bucket-app/public/robots.txt +1 -0
  437. data/sample-apps/leaky-bucket-app/resque-entrypoint.sh +9 -0
  438. data/sample-apps/leaky-bucket-app/tmp/.keep +0 -0
  439. data/sample-apps/oauth-app/app/controllers/contacts_controller.rb +3 -3
  440. data/sample-apps/oauth-app/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  441. data/sample-apps/oauth-app/app/lib/services/authorization/tokens/generate.rb +1 -1
  442. data/sample-apps/oauth-app/app/lib/services/authorization/tokens/refresh.rb +1 -1
  443. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/create.rb +2 -2
  444. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/destroy.rb +2 -2
  445. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/export.rb +2 -15
  446. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/get_by_id.rb +2 -2
  447. data/sample-apps/{contacts-app/app/lib/services/hubspot/contacts/get_all.rb → oauth-app/app/lib/services/hubspot/contacts/get_page.rb} +3 -3
  448. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/search.rb +4 -4
  449. data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb +2 -2
  450. data/sample-apps/oauth-app/app/lib/services/hubspot/owners/get_all.rb +1 -1
  451. data/sample-apps/oauth-app/app/views/oauth/authorization/login.html.erb +1 -1
  452. data/sample-apps/rate-limits-redis-sample-app/.env.template +3 -0
  453. data/sample-apps/rate-limits-redis-sample-app/.gitignore +34 -0
  454. data/sample-apps/rate-limits-redis-sample-app/.ruby-version +1 -0
  455. data/sample-apps/rate-limits-redis-sample-app/Dockerfile +22 -0
  456. data/sample-apps/rate-limits-redis-sample-app/Gemfile +39 -0
  457. data/sample-apps/rate-limits-redis-sample-app/Gemfile.lock +307 -0
  458. data/sample-apps/rate-limits-redis-sample-app/README.md +35 -0
  459. data/sample-apps/rate-limits-redis-sample-app/Rakefile +6 -0
  460. data/sample-apps/rate-limits-redis-sample-app/app/assets/config/manifest.js +3 -0
  461. data/sample-apps/rate-limits-redis-sample-app/app/assets/images/.keep +0 -0
  462. data/sample-apps/rate-limits-redis-sample-app/app/assets/javascripts/application.js +25 -0
  463. data/sample-apps/rate-limits-redis-sample-app/app/assets/javascripts/cable.js +13 -0
  464. data/sample-apps/rate-limits-redis-sample-app/app/assets/javascripts/channels/.keep +0 -0
  465. data/sample-apps/rate-limits-redis-sample-app/app/assets/stylesheets/application.css +90 -0
  466. data/sample-apps/rate-limits-redis-sample-app/app/controllers/application_controller.rb +12 -0
  467. data/sample-apps/rate-limits-redis-sample-app/app/controllers/concerns/.keep +0 -0
  468. data/sample-apps/rate-limits-redis-sample-app/app/controllers/concerns/exception_handler.rb +12 -0
  469. data/sample-apps/rate-limits-redis-sample-app/app/controllers/home_controller.rb +15 -0
  470. data/sample-apps/rate-limits-redis-sample-app/app/controllers/oauth/authorization_controller.rb +19 -0
  471. data/sample-apps/rate-limits-redis-sample-app/app/helpers/application_helper.rb +2 -0
  472. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/authorize_hubspot.rb +15 -0
  473. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/get_authorization_uri.rb +33 -0
  474. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/base.rb +19 -0
  475. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/generate.rb +26 -0
  476. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/refresh.rb +33 -0
  477. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/archive_batch.rb +29 -0
  478. data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/create_batch.rb +37 -0
  479. data/sample-apps/rate-limits-redis-sample-app/app/models/application_record.rb +3 -0
  480. data/sample-apps/rate-limits-redis-sample-app/app/models/concerns/.keep +0 -0
  481. data/sample-apps/rate-limits-redis-sample-app/app/views/home/index.html.erb +13 -0
  482. data/sample-apps/rate-limits-redis-sample-app/app/views/layouts/application.html.erb +23 -0
  483. data/sample-apps/rate-limits-redis-sample-app/app/views/oauth/authorization/login.html.erb +15 -0
  484. data/sample-apps/rate-limits-redis-sample-app/app/views/shared/_header.html.erb +12 -0
  485. data/sample-apps/rate-limits-redis-sample-app/app/workers/redis_rate_limits_worker.rb +51 -0
  486. data/sample-apps/rate-limits-redis-sample-app/bin/bundle +3 -0
  487. data/sample-apps/rate-limits-redis-sample-app/bin/rails +9 -0
  488. data/sample-apps/rate-limits-redis-sample-app/bin/rake +9 -0
  489. data/sample-apps/rate-limits-redis-sample-app/bin/setup +36 -0
  490. data/sample-apps/rate-limits-redis-sample-app/bin/spring +17 -0
  491. data/sample-apps/rate-limits-redis-sample-app/bin/update +31 -0
  492. data/sample-apps/rate-limits-redis-sample-app/bin/yarn +11 -0
  493. data/sample-apps/rate-limits-redis-sample-app/config.ru +5 -0
  494. data/sample-apps/rate-limits-redis-sample-app/config/application.rb +20 -0
  495. data/sample-apps/rate-limits-redis-sample-app/config/boot.rb +3 -0
  496. data/sample-apps/rate-limits-redis-sample-app/config/cable.yml +10 -0
  497. data/sample-apps/rate-limits-redis-sample-app/config/database.yml +25 -0
  498. data/sample-apps/rate-limits-redis-sample-app/config/environment.rb +5 -0
  499. data/sample-apps/rate-limits-redis-sample-app/config/environments/development.rb +63 -0
  500. data/sample-apps/rate-limits-redis-sample-app/config/environments/production.rb +94 -0
  501. data/sample-apps/rate-limits-redis-sample-app/config/environments/test.rb +46 -0
  502. data/sample-apps/rate-limits-redis-sample-app/config/initializers/assets.rb +14 -0
  503. data/sample-apps/rate-limits-redis-sample-app/config/initializers/filter_parameter_logging.rb +4 -0
  504. data/sample-apps/rate-limits-redis-sample-app/config/initializers/hubspot-api-ruby.rb +3 -0
  505. data/sample-apps/rate-limits-redis-sample-app/config/initializers/mime_types.rb +1 -0
  506. data/sample-apps/rate-limits-redis-sample-app/config/initializers/resque.rb +7 -0
  507. data/sample-apps/rate-limits-redis-sample-app/config/initializers/wrap_parameters.rb +14 -0
  508. data/sample-apps/rate-limits-redis-sample-app/config/locales/en.yml +33 -0
  509. data/sample-apps/rate-limits-redis-sample-app/config/puma.rb +34 -0
  510. data/sample-apps/rate-limits-redis-sample-app/config/routes.rb +10 -0
  511. data/sample-apps/rate-limits-redis-sample-app/config/spring.rb +6 -0
  512. data/sample-apps/rate-limits-redis-sample-app/db/seeds.rb +7 -0
  513. data/sample-apps/rate-limits-redis-sample-app/docker-compose.yml +25 -0
  514. data/sample-apps/rate-limits-redis-sample-app/docker-entrypoint.sh +8 -0
  515. data/sample-apps/rate-limits-redis-sample-app/lib/assets/.keep +0 -0
  516. data/sample-apps/rate-limits-redis-sample-app/lib/tasks/.keep +0 -0
  517. data/sample-apps/rate-limits-redis-sample-app/lib/tasks/redis_rate_limits.rake +11 -0
  518. data/sample-apps/rate-limits-redis-sample-app/lib/tasks/resque.rake +11 -0
  519. data/sample-apps/rate-limits-redis-sample-app/log/.keep +0 -0
  520. data/sample-apps/rate-limits-redis-sample-app/package.json +5 -0
  521. data/sample-apps/rate-limits-redis-sample-app/public/404.html +67 -0
  522. data/sample-apps/rate-limits-redis-sample-app/public/422.html +67 -0
  523. data/sample-apps/rate-limits-redis-sample-app/public/500.html +66 -0
  524. data/sample-apps/rate-limits-redis-sample-app/public/apple-touch-icon-precomposed.png +0 -0
  525. data/sample-apps/rate-limits-redis-sample-app/public/apple-touch-icon.png +0 -0
  526. data/sample-apps/rate-limits-redis-sample-app/public/favicon.ico +0 -0
  527. data/sample-apps/rate-limits-redis-sample-app/public/robots.txt +1 -0
  528. data/sample-apps/rate-limits-redis-sample-app/resque-entrypoint.sh +9 -0
  529. data/sample-apps/rate-limits-redis-sample-app/tmp/.keep +0 -0
  530. data/sample-apps/retry-middleware-sample-app/Gemfile +1 -1
  531. data/sample-apps/retry-middleware-sample-app/Gemfile.lock +4 -3
  532. data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  533. data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/generate.rb +1 -1
  534. data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/refresh.rb +1 -1
  535. data/sample-apps/retry-middleware-sample-app/app/views/oauth/authorization/login.html.erb +1 -1
  536. data/sample-apps/retry-middleware-sample-app/lib/tasks/retry_middleware.rake +7 -7
  537. data/sample-apps/webhooks-contacts-app/Gemfile +1 -1
  538. data/sample-apps/webhooks-contacts-app/Gemfile.lock +4 -3
  539. data/sample-apps/webhooks-contacts-app/app/lib/services/authorization/get_authorization_uri.rb +1 -1
  540. data/sample-apps/webhooks-contacts-app/app/lib/services/authorization/tokens/generate.rb +1 -1
  541. data/sample-apps/webhooks-contacts-app/app/lib/services/authorization/tokens/refresh.rb +1 -1
  542. data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/contacts/get_batch.rb +3 -3
  543. data/sample-apps/webhooks-contacts-app/app/views/oauth/authorization/login.html.erb +1 -1
  544. data/spec/oauth/api/access_tokens_api_spec.rb +3 -3
  545. data/spec/oauth/api/refresh_tokens_api_spec.rb +3 -3
  546. data/spec/oauth/api/tokens_api_spec.rb +3 -3
  547. data/spec/oauth/api_client_spec.rb +23 -23
  548. data/spec/oauth/configuration_spec.rb +2 -2
  549. data/spec/oauth/models/access_token_info_response_spec.rb +3 -3
  550. data/spec/oauth/models/error_detail_spec.rb +3 -3
  551. data/spec/oauth/models/error_spec.rb +3 -3
  552. data/spec/oauth/models/json_node_spec.rb +3 -3
  553. data/spec/oauth/models/refresh_token_info_response_spec.rb +3 -3
  554. data/spec/oauth/models/refresh_token_spec.rb +3 -3
  555. data/spec/objects/api/associations_api_spec.rb +3 -3
  556. data/spec/objects/api/basic_api_spec.rb +3 -3
  557. data/spec/objects/api/batch_api_spec.rb +3 -3
  558. data/spec/objects/api/search_api_spec.rb +3 -3
  559. data/spec/objects/api_client_spec.rb +23 -23
  560. data/spec/objects/configuration_spec.rb +2 -2
  561. data/spec/objects/models/batch_input_simple_public_object_batch_input_spec.rb +3 -3
  562. data/spec/objects/models/batch_input_simple_public_object_id_spec.rb +3 -3
  563. data/spec/objects/models/batch_input_simple_public_object_input_spec.rb +3 -3
  564. data/spec/objects/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
  565. data/spec/objects/models/batch_response_simple_public_object_spec.rb +3 -3
  566. data/spec/objects/models/collection_response_simple_public_object_id_spec.rb +3 -3
  567. data/spec/objects/models/collection_response_simple_public_object_spec.rb +3 -3
  568. data/spec/objects/models/collection_response_with_total_simple_public_object_spec.rb +3 -3
  569. data/spec/objects/models/error_detail_spec.rb +3 -3
  570. data/spec/objects/models/error_spec.rb +3 -3
  571. data/spec/objects/models/filter_group_spec.rb +3 -3
  572. data/spec/objects/models/filter_spec.rb +3 -3
  573. data/spec/objects/models/next_page_spec.rb +3 -3
  574. data/spec/objects/models/paging_spec.rb +3 -3
  575. data/spec/objects/models/public_object_search_request_spec.rb +3 -3
  576. data/spec/objects/models/simple_public_object_batch_input_spec.rb +3 -3
  577. data/spec/objects/models/simple_public_object_id_spec.rb +3 -3
  578. data/spec/objects/models/simple_public_object_input_spec.rb +3 -3
  579. data/spec/objects/models/simple_public_object_spec.rb +3 -3
  580. data/spec/owners/api/default_api_spec.rb +3 -3
  581. data/spec/owners/api_client_spec.rb +23 -23
  582. data/spec/owners/configuration_spec.rb +2 -2
  583. data/spec/owners/models/collection_response_public_owner_spec.rb +3 -3
  584. data/spec/owners/models/error_detail_spec.rb +3 -3
  585. data/spec/owners/models/error_spec.rb +3 -3
  586. data/spec/owners/models/next_page_spec.rb +3 -3
  587. data/spec/owners/models/paging_spec.rb +3 -3
  588. data/spec/owners/models/public_owner_spec.rb +3 -3
  589. data/spec/owners/models/public_team_spec.rb +3 -3
  590. data/spec/pipelines/api/pipeline_stages_api_spec.rb +3 -3
  591. data/spec/pipelines/api/pipelines_api_spec.rb +3 -3
  592. data/spec/pipelines/api_client_spec.rb +23 -23
  593. data/spec/pipelines/configuration_spec.rb +2 -2
  594. data/spec/pipelines/models/collection_response_pipeline_spec.rb +3 -3
  595. data/spec/pipelines/models/collection_response_pipeline_stage_spec.rb +3 -3
  596. data/spec/pipelines/models/error_detail_spec.rb +3 -3
  597. data/spec/pipelines/models/error_spec.rb +3 -3
  598. data/spec/pipelines/models/next_page_spec.rb +3 -3
  599. data/spec/pipelines/models/paging_spec.rb +3 -3
  600. data/spec/pipelines/models/pipeline_input_spec.rb +3 -3
  601. data/spec/pipelines/models/pipeline_patch_input_spec.rb +3 -3
  602. data/spec/pipelines/models/pipeline_spec.rb +3 -3
  603. data/spec/pipelines/models/pipeline_stage_input_spec.rb +3 -3
  604. data/spec/pipelines/models/pipeline_stage_patch_input_spec.rb +3 -3
  605. data/spec/pipelines/models/pipeline_stage_spec.rb +3 -3
  606. data/spec/properties/api/batch_api_spec.rb +3 -3
  607. data/spec/properties/api/core_api_spec.rb +3 -3
  608. data/spec/properties/api/groups_api_spec.rb +3 -3
  609. data/spec/properties/api_client_spec.rb +23 -23
  610. data/spec/properties/configuration_spec.rb +2 -2
  611. data/spec/properties/models/batch_input_property_create_spec.rb +3 -3
  612. data/spec/properties/models/batch_input_property_name_spec.rb +3 -3
  613. data/spec/properties/models/batch_read_input_property_name_spec.rb +3 -3
  614. data/spec/properties/models/batch_response_property_spec.rb +3 -3
  615. data/spec/properties/models/collection_response_property_group_spec.rb +3 -3
  616. data/spec/properties/models/collection_response_property_spec.rb +3 -3
  617. data/spec/properties/models/error_detail_spec.rb +3 -3
  618. data/spec/properties/models/error_spec.rb +3 -3
  619. data/spec/properties/models/next_page_spec.rb +3 -3
  620. data/spec/properties/models/option_input_spec.rb +3 -3
  621. data/spec/properties/models/option_spec.rb +3 -3
  622. data/spec/properties/models/paging_spec.rb +3 -3
  623. data/spec/properties/models/property_create_spec.rb +3 -3
  624. data/spec/properties/models/property_group_create_spec.rb +3 -3
  625. data/spec/properties/models/property_group_spec.rb +3 -3
  626. data/spec/properties/models/property_group_update_spec.rb +3 -3
  627. data/spec/properties/models/property_modification_metadata_spec.rb +3 -3
  628. data/spec/properties/models/property_name_spec.rb +3 -3
  629. data/spec/properties/models/property_spec.rb +3 -3
  630. data/spec/properties/models/property_update_spec.rb +3 -3
  631. metadata +544 -7
  632. data/lib/hubspot/codegen/crm/extensions/cards/api/default_api.rb +0 -318
@@ -13,199 +13,195 @@ OpenAPI Generator version: 4.2.2
13
13
  require 'date'
14
14
 
15
15
  module Hubspot
16
- module Client
17
- module Crm
18
- module Properties
19
- module Models
20
- class Paging
21
- attr_accessor :_next
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'_next' => :'next'
27
- }
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.openapi_types
32
- {
33
- :'_next' => :'NextPage'
34
- }
35
- end
16
+ module Crm
17
+ module Properties
18
+ class Paging
19
+ attr_accessor :_next
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'_next' => :'next'
25
+ }
26
+ end
36
27
 
37
- # List of attributes with nullable: true
38
- def self.openapi_nullable
39
- Set.new([
40
- ])
41
- end
28
+ # Attribute type mapping.
29
+ def self.openapi_types
30
+ {
31
+ :'_next' => :'NextPage'
32
+ }
33
+ end
42
34
 
43
- # Initializes the object
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- def initialize(attributes = {})
46
- if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Client::Crm::Properties::Models::Paging` initialize method"
48
- end
35
+ # List of attributes with nullable: true
36
+ def self.openapi_nullable
37
+ Set.new([
38
+ ])
39
+ end
49
40
 
50
- # check to see if the attribute exists and convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h|
52
- if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Client::Crm::Properties::Models::Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
- end
55
- h[k.to_sym] = v
56
- }
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Properties::Paging` initialize method"
46
+ end
57
47
 
58
- if attributes.key?(:'_next')
59
- self._next = attributes[:'_next']
60
- end
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Properties::Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
52
  end
53
+ h[k.to_sym] = v
54
+ }
62
55
 
63
- # Show invalid properties with the reasons. Usually used together with valid?
64
- # @return Array for valid properties with the reasons
65
- def list_invalid_properties
66
- invalid_properties = Array.new
67
- invalid_properties
68
- end
56
+ if attributes.key?(:'_next')
57
+ self._next = attributes[:'_next']
58
+ end
59
+ end
69
60
 
70
- # Check to see if the all the properties in the model are valid
71
- # @return true if the model is valid
72
- def valid?
73
- true
74
- end
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
75
67
 
76
- # Checks equality by comparing each attribute.
77
- # @param [Object] Object to be compared
78
- def ==(o)
79
- return true if self.equal?(o)
80
- self.class == o.class &&
81
- _next == o._next
82
- end
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
83
73
 
84
- # @see the `==` method
85
- # @param [Object] Object to be compared
86
- def eql?(o)
87
- self == o
88
- end
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ _next == o._next
80
+ end
89
81
 
90
- # Calculates hash code according to all attributes.
91
- # @return [Integer] Hash code
92
- def hash
93
- [_next].hash
94
- end
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
95
87
 
96
- # Builds the object from hash
97
- # @param [Hash] attributes Model attributes in the form of hash
98
- # @return [Object] Returns the model itself
99
- def self.build_from_hash(attributes)
100
- new.build_from_hash(attributes)
101
- end
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Integer] Hash code
90
+ def hash
91
+ [_next].hash
92
+ end
102
93
 
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def build_from_hash(attributes)
107
- return nil unless attributes.is_a?(Hash)
108
- self.class.openapi_types.each_pair do |key, type|
109
- if type =~ /\AArray<(.*)>/i
110
- # check to ensure the input is an array given that the attribute
111
- # is documented as an array but the input is not
112
- if attributes[self.class.attribute_map[key]].is_a?(Array)
113
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
114
- end
115
- elsif !attributes[self.class.attribute_map[key]].nil?
116
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
- end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def self.build_from_hash(attributes)
98
+ new.build_from_hash(attributes)
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.openapi_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
112
  end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
119
117
 
120
- self
121
- end
118
+ self
119
+ end
122
120
 
123
- # Deserializes the data based on type
124
- # @param string type Data type
125
- # @param string value Value to be deserialized
126
- # @return [Object] Deserialized data
127
- def _deserialize(type, value)
128
- case type.to_sym
129
- when :DateTime
130
- DateTime.parse(value)
131
- when :Date
132
- Date.parse(value)
133
- when :String
134
- value.to_s
135
- when :Integer
136
- value.to_i
137
- when :Float
138
- value.to_f
139
- when :Boolean
140
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
- true
142
- else
143
- false
144
- end
145
- when :Object
146
- # generic object (usually a Hash), return directly
147
- value
148
- when /\AArray<(?<inner_type>.+)>\z/
149
- inner_type = Regexp.last_match[:inner_type]
150
- value.map { |v| _deserialize(inner_type, v) }
151
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
- k_type = Regexp.last_match[:k_type]
153
- v_type = Regexp.last_match[:v_type]
154
- {}.tap do |hash|
155
- value.each do |k, v|
156
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
- end
158
- end
159
- else # model
160
- Hubspot::Client::Crm::Properties::Models.const_get(type).build_from_hash(value)
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :Boolean
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
155
  end
162
156
  end
157
+ else # model
158
+ Hubspot::Crm::Properties.const_get(type).build_from_hash(value)
159
+ end
160
+ end
163
161
 
164
- # Returns the string representation of the object
165
- # @return [String] String presentation of the object
166
- def to_s
167
- to_hash.to_s
168
- end
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
169
167
 
170
- # to_body is an alias to to_hash (backward compatibility)
171
- # @return [Hash] Returns the object in the form of hash
172
- def to_body
173
- to_hash
174
- end
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
175
173
 
176
- # Returns the object in the form of hash
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_hash
179
- hash = {}
180
- self.class.attribute_map.each_pair do |attr, param|
181
- value = self.send(attr)
182
- if value.nil?
183
- is_nullable = self.class.openapi_nullable.include?(attr)
184
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185
- end
186
-
187
- hash[param] = _to_hash(value)
188
- end
189
- hash
190
- end
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
191
189
 
192
- # Outputs non-array value in the form of hash
193
- # For object, use to_hash. Otherwise, just return the value
194
- # @param [Object] value Any valid value
195
- # @return [Hash] Returns the value in the form of hash
196
- def _to_hash(value)
197
- if value.is_a?(Array)
198
- value.compact.map { |v| _to_hash(v) }
199
- elsif value.is_a?(Hash)
200
- {}.tap do |hash|
201
- value.each { |k, v| hash[k] = _to_hash(v) }
202
- end
203
- elsif value.respond_to? :to_hash
204
- value.to_hash
205
- else
206
- value
207
- end
208
- end
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
209
205
  end
210
206
  end
211
207
  end
@@ -13,454 +13,450 @@ OpenAPI Generator version: 4.2.2
13
13
  require 'date'
14
14
 
15
15
  module Hubspot
16
- module Client
17
- module Crm
18
- module Properties
19
- module Models
20
- class Property
21
- attr_accessor :updated_at
22
-
23
- attr_accessor :created_at
24
-
25
- # When the property was archived.
26
- attr_accessor :archived_at
27
-
28
- # The internal property name, which must be used when referencing the property via the API.
29
- attr_accessor :name
30
-
31
- # A human-readable property label that will be shown in HubSpot.
32
- attr_accessor :label
33
-
34
- # The property data type.
35
- attr_accessor :type
36
-
37
- # Controls how the property appears in HubSpot.
38
- attr_accessor :field_type
39
-
40
- # A description of the property that will be shown as help text in HubSpot.
41
- attr_accessor :description
42
-
43
- # The name of the property group the property belongs to.
44
- attr_accessor :group_name
45
-
46
- # A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types.
47
- attr_accessor :options
48
-
49
- # The internal user ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot.
50
- attr_accessor :created_user_id
51
-
52
- # The internal user ID of the user who updated the property in HubSpot. This field may not exist if the property was updated outside of HubSpot.
53
- attr_accessor :updated_user_id
54
-
55
- # If this property is related to other object(s), they'll be listed here.
56
- attr_accessor :referenced_object_type
57
-
58
- # Properties are shown in order, starting with the lowest positive integer value.
59
- attr_accessor :display_order
60
-
61
- # For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties.
62
- attr_accessor :calculated
63
-
64
- # For default properties, true indicates that the options are stored externally to the property settings.
65
- attr_accessor :external_options
66
-
67
- # Whether or not the property is archived.
68
- attr_accessor :archived
69
-
70
- # Whether or not the property's value must be unique. Once set, this can't be changed.
71
- attr_accessor :has_unique_value
72
-
73
- # Whether or not the property will be hidden from the HubSpot UI. It's recommended this be set to false for custom properties.
74
- attr_accessor :hidden
75
-
76
- # This will be true for default object properties built into HubSpot.
77
- attr_accessor :hubspot_defined
78
-
79
- # Whether or not the property will display the currency symbol set in the account settings.
80
- attr_accessor :show_currency_symbol
81
-
82
- attr_accessor :modification_metadata
83
-
84
- # Whether or not the property can be used in a HubSpot form.
85
- attr_accessor :form_field
86
-
87
- # Attribute mapping from ruby-style variable name to JSON key.
88
- def self.attribute_map
89
- {
90
- :'updated_at' => :'updatedAt',
91
- :'created_at' => :'createdAt',
92
- :'archived_at' => :'archivedAt',
93
- :'name' => :'name',
94
- :'label' => :'label',
95
- :'type' => :'type',
96
- :'field_type' => :'fieldType',
97
- :'description' => :'description',
98
- :'group_name' => :'groupName',
99
- :'options' => :'options',
100
- :'created_user_id' => :'createdUserId',
101
- :'updated_user_id' => :'updatedUserId',
102
- :'referenced_object_type' => :'referencedObjectType',
103
- :'display_order' => :'displayOrder',
104
- :'calculated' => :'calculated',
105
- :'external_options' => :'externalOptions',
106
- :'archived' => :'archived',
107
- :'has_unique_value' => :'hasUniqueValue',
108
- :'hidden' => :'hidden',
109
- :'hubspot_defined' => :'hubspotDefined',
110
- :'show_currency_symbol' => :'showCurrencySymbol',
111
- :'modification_metadata' => :'modificationMetadata',
112
- :'form_field' => :'formField'
113
- }
114
- end
16
+ module Crm
17
+ module Properties
18
+ class Property
19
+ attr_accessor :updated_at
20
+
21
+ attr_accessor :created_at
22
+
23
+ # When the property was archived.
24
+ attr_accessor :archived_at
25
+
26
+ # The internal property name, which must be used when referencing the property via the API.
27
+ attr_accessor :name
28
+
29
+ # A human-readable property label that will be shown in HubSpot.
30
+ attr_accessor :label
31
+
32
+ # The property data type.
33
+ attr_accessor :type
34
+
35
+ # Controls how the property appears in HubSpot.
36
+ attr_accessor :field_type
37
+
38
+ # A description of the property that will be shown as help text in HubSpot.
39
+ attr_accessor :description
40
+
41
+ # The name of the property group the property belongs to.
42
+ attr_accessor :group_name
43
+
44
+ # A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types.
45
+ attr_accessor :options
46
+
47
+ # The internal user ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot.
48
+ attr_accessor :created_user_id
49
+
50
+ # The internal user ID of the user who updated the property in HubSpot. This field may not exist if the property was updated outside of HubSpot.
51
+ attr_accessor :updated_user_id
52
+
53
+ # If this property is related to other object(s), they'll be listed here.
54
+ attr_accessor :referenced_object_type
55
+
56
+ # Properties are shown in order, starting with the lowest positive integer value.
57
+ attr_accessor :display_order
58
+
59
+ # For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties.
60
+ attr_accessor :calculated
61
+
62
+ # For default properties, true indicates that the options are stored externally to the property settings.
63
+ attr_accessor :external_options
64
+
65
+ # Whether or not the property is archived.
66
+ attr_accessor :archived
67
+
68
+ # Whether or not the property's value must be unique. Once set, this can't be changed.
69
+ attr_accessor :has_unique_value
70
+
71
+ # Whether or not the property will be hidden from the HubSpot UI. It's recommended this be set to false for custom properties.
72
+ attr_accessor :hidden
73
+
74
+ # This will be true for default object properties built into HubSpot.
75
+ attr_accessor :hubspot_defined
76
+
77
+ # Whether or not the property will display the currency symbol set in the account settings.
78
+ attr_accessor :show_currency_symbol
79
+
80
+ attr_accessor :modification_metadata
81
+
82
+ # Whether or not the property can be used in a HubSpot form.
83
+ attr_accessor :form_field
84
+
85
+ # Attribute mapping from ruby-style variable name to JSON key.
86
+ def self.attribute_map
87
+ {
88
+ :'updated_at' => :'updatedAt',
89
+ :'created_at' => :'createdAt',
90
+ :'archived_at' => :'archivedAt',
91
+ :'name' => :'name',
92
+ :'label' => :'label',
93
+ :'type' => :'type',
94
+ :'field_type' => :'fieldType',
95
+ :'description' => :'description',
96
+ :'group_name' => :'groupName',
97
+ :'options' => :'options',
98
+ :'created_user_id' => :'createdUserId',
99
+ :'updated_user_id' => :'updatedUserId',
100
+ :'referenced_object_type' => :'referencedObjectType',
101
+ :'display_order' => :'displayOrder',
102
+ :'calculated' => :'calculated',
103
+ :'external_options' => :'externalOptions',
104
+ :'archived' => :'archived',
105
+ :'has_unique_value' => :'hasUniqueValue',
106
+ :'hidden' => :'hidden',
107
+ :'hubspot_defined' => :'hubspotDefined',
108
+ :'show_currency_symbol' => :'showCurrencySymbol',
109
+ :'modification_metadata' => :'modificationMetadata',
110
+ :'form_field' => :'formField'
111
+ }
112
+ end
115
113
 
116
- # Attribute type mapping.
117
- def self.openapi_types
118
- {
119
- :'updated_at' => :'DateTime',
120
- :'created_at' => :'DateTime',
121
- :'archived_at' => :'DateTime',
122
- :'name' => :'String',
123
- :'label' => :'String',
124
- :'type' => :'String',
125
- :'field_type' => :'String',
126
- :'description' => :'String',
127
- :'group_name' => :'String',
128
- :'options' => :'Array<Option>',
129
- :'created_user_id' => :'String',
130
- :'updated_user_id' => :'String',
131
- :'referenced_object_type' => :'String',
132
- :'display_order' => :'Integer',
133
- :'calculated' => :'Boolean',
134
- :'external_options' => :'Boolean',
135
- :'archived' => :'Boolean',
136
- :'has_unique_value' => :'Boolean',
137
- :'hidden' => :'Boolean',
138
- :'hubspot_defined' => :'Boolean',
139
- :'show_currency_symbol' => :'Boolean',
140
- :'modification_metadata' => :'PropertyModificationMetadata',
141
- :'form_field' => :'Boolean'
142
- }
143
- end
114
+ # Attribute type mapping.
115
+ def self.openapi_types
116
+ {
117
+ :'updated_at' => :'DateTime',
118
+ :'created_at' => :'DateTime',
119
+ :'archived_at' => :'DateTime',
120
+ :'name' => :'String',
121
+ :'label' => :'String',
122
+ :'type' => :'String',
123
+ :'field_type' => :'String',
124
+ :'description' => :'String',
125
+ :'group_name' => :'String',
126
+ :'options' => :'Array<Option>',
127
+ :'created_user_id' => :'String',
128
+ :'updated_user_id' => :'String',
129
+ :'referenced_object_type' => :'String',
130
+ :'display_order' => :'Integer',
131
+ :'calculated' => :'Boolean',
132
+ :'external_options' => :'Boolean',
133
+ :'archived' => :'Boolean',
134
+ :'has_unique_value' => :'Boolean',
135
+ :'hidden' => :'Boolean',
136
+ :'hubspot_defined' => :'Boolean',
137
+ :'show_currency_symbol' => :'Boolean',
138
+ :'modification_metadata' => :'PropertyModificationMetadata',
139
+ :'form_field' => :'Boolean'
140
+ }
141
+ end
144
142
 
145
- # List of attributes with nullable: true
146
- def self.openapi_nullable
147
- Set.new([
148
- ])
149
- end
143
+ # List of attributes with nullable: true
144
+ def self.openapi_nullable
145
+ Set.new([
146
+ ])
147
+ end
150
148
 
151
- # Initializes the object
152
- # @param [Hash] attributes Model attributes in the form of hash
153
- def initialize(attributes = {})
154
- if (!attributes.is_a?(Hash))
155
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Client::Crm::Properties::Models::Property` initialize method"
156
- end
149
+ # Initializes the object
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ def initialize(attributes = {})
152
+ if (!attributes.is_a?(Hash))
153
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Properties::Property` initialize method"
154
+ end
157
155
 
158
- # check to see if the attribute exists and convert string to symbol for hash key
159
- attributes = attributes.each_with_object({}) { |(k, v), h|
160
- if (!self.class.attribute_map.key?(k.to_sym))
161
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Client::Crm::Properties::Models::Property`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
162
- end
163
- h[k.to_sym] = v
164
- }
156
+ # check to see if the attribute exists and convert string to symbol for hash key
157
+ attributes = attributes.each_with_object({}) { |(k, v), h|
158
+ if (!self.class.attribute_map.key?(k.to_sym))
159
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Properties::Property`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
160
+ end
161
+ h[k.to_sym] = v
162
+ }
165
163
 
166
- if attributes.key?(:'updated_at')
167
- self.updated_at = attributes[:'updated_at']
168
- end
164
+ if attributes.key?(:'updated_at')
165
+ self.updated_at = attributes[:'updated_at']
166
+ end
169
167
 
170
- if attributes.key?(:'created_at')
171
- self.created_at = attributes[:'created_at']
172
- end
168
+ if attributes.key?(:'created_at')
169
+ self.created_at = attributes[:'created_at']
170
+ end
173
171
 
174
- if attributes.key?(:'archived_at')
175
- self.archived_at = attributes[:'archived_at']
176
- end
172
+ if attributes.key?(:'archived_at')
173
+ self.archived_at = attributes[:'archived_at']
174
+ end
177
175
 
178
- if attributes.key?(:'name')
179
- self.name = attributes[:'name']
180
- end
176
+ if attributes.key?(:'name')
177
+ self.name = attributes[:'name']
178
+ end
181
179
 
182
- if attributes.key?(:'label')
183
- self.label = attributes[:'label']
184
- end
180
+ if attributes.key?(:'label')
181
+ self.label = attributes[:'label']
182
+ end
185
183
 
186
- if attributes.key?(:'type')
187
- self.type = attributes[:'type']
188
- end
184
+ if attributes.key?(:'type')
185
+ self.type = attributes[:'type']
186
+ end
189
187
 
190
- if attributes.key?(:'field_type')
191
- self.field_type = attributes[:'field_type']
192
- end
188
+ if attributes.key?(:'field_type')
189
+ self.field_type = attributes[:'field_type']
190
+ end
193
191
 
194
- if attributes.key?(:'description')
195
- self.description = attributes[:'description']
196
- end
192
+ if attributes.key?(:'description')
193
+ self.description = attributes[:'description']
194
+ end
197
195
 
198
- if attributes.key?(:'group_name')
199
- self.group_name = attributes[:'group_name']
200
- end
196
+ if attributes.key?(:'group_name')
197
+ self.group_name = attributes[:'group_name']
198
+ end
201
199
 
202
- if attributes.key?(:'options')
203
- if (value = attributes[:'options']).is_a?(Array)
204
- self.options = value
205
- end
206
- end
200
+ if attributes.key?(:'options')
201
+ if (value = attributes[:'options']).is_a?(Array)
202
+ self.options = value
203
+ end
204
+ end
207
205
 
208
- if attributes.key?(:'created_user_id')
209
- self.created_user_id = attributes[:'created_user_id']
210
- end
206
+ if attributes.key?(:'created_user_id')
207
+ self.created_user_id = attributes[:'created_user_id']
208
+ end
211
209
 
212
- if attributes.key?(:'updated_user_id')
213
- self.updated_user_id = attributes[:'updated_user_id']
214
- end
210
+ if attributes.key?(:'updated_user_id')
211
+ self.updated_user_id = attributes[:'updated_user_id']
212
+ end
215
213
 
216
- if attributes.key?(:'referenced_object_type')
217
- self.referenced_object_type = attributes[:'referenced_object_type']
218
- end
214
+ if attributes.key?(:'referenced_object_type')
215
+ self.referenced_object_type = attributes[:'referenced_object_type']
216
+ end
219
217
 
220
- if attributes.key?(:'display_order')
221
- self.display_order = attributes[:'display_order']
222
- end
218
+ if attributes.key?(:'display_order')
219
+ self.display_order = attributes[:'display_order']
220
+ end
223
221
 
224
- if attributes.key?(:'calculated')
225
- self.calculated = attributes[:'calculated']
226
- end
222
+ if attributes.key?(:'calculated')
223
+ self.calculated = attributes[:'calculated']
224
+ end
227
225
 
228
- if attributes.key?(:'external_options')
229
- self.external_options = attributes[:'external_options']
230
- end
226
+ if attributes.key?(:'external_options')
227
+ self.external_options = attributes[:'external_options']
228
+ end
231
229
 
232
- if attributes.key?(:'archived')
233
- self.archived = attributes[:'archived']
234
- end
230
+ if attributes.key?(:'archived')
231
+ self.archived = attributes[:'archived']
232
+ end
235
233
 
236
- if attributes.key?(:'has_unique_value')
237
- self.has_unique_value = attributes[:'has_unique_value']
238
- end
234
+ if attributes.key?(:'has_unique_value')
235
+ self.has_unique_value = attributes[:'has_unique_value']
236
+ end
239
237
 
240
- if attributes.key?(:'hidden')
241
- self.hidden = attributes[:'hidden']
242
- end
238
+ if attributes.key?(:'hidden')
239
+ self.hidden = attributes[:'hidden']
240
+ end
243
241
 
244
- if attributes.key?(:'hubspot_defined')
245
- self.hubspot_defined = attributes[:'hubspot_defined']
246
- end
242
+ if attributes.key?(:'hubspot_defined')
243
+ self.hubspot_defined = attributes[:'hubspot_defined']
244
+ end
247
245
 
248
- if attributes.key?(:'show_currency_symbol')
249
- self.show_currency_symbol = attributes[:'show_currency_symbol']
250
- end
246
+ if attributes.key?(:'show_currency_symbol')
247
+ self.show_currency_symbol = attributes[:'show_currency_symbol']
248
+ end
251
249
 
252
- if attributes.key?(:'modification_metadata')
253
- self.modification_metadata = attributes[:'modification_metadata']
254
- end
250
+ if attributes.key?(:'modification_metadata')
251
+ self.modification_metadata = attributes[:'modification_metadata']
252
+ end
255
253
 
256
- if attributes.key?(:'form_field')
257
- self.form_field = attributes[:'form_field']
258
- end
259
- end
254
+ if attributes.key?(:'form_field')
255
+ self.form_field = attributes[:'form_field']
256
+ end
257
+ end
260
258
 
261
- # Show invalid properties with the reasons. Usually used together with valid?
262
- # @return Array for valid properties with the reasons
263
- def list_invalid_properties
264
- invalid_properties = Array.new
265
- if @name.nil?
266
- invalid_properties.push('invalid value for "name", name cannot be nil.')
267
- end
259
+ # Show invalid properties with the reasons. Usually used together with valid?
260
+ # @return Array for valid properties with the reasons
261
+ def list_invalid_properties
262
+ invalid_properties = Array.new
263
+ if @name.nil?
264
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
265
+ end
268
266
 
269
- if @label.nil?
270
- invalid_properties.push('invalid value for "label", label cannot be nil.')
271
- end
267
+ if @label.nil?
268
+ invalid_properties.push('invalid value for "label", label cannot be nil.')
269
+ end
272
270
 
273
- if @type.nil?
274
- invalid_properties.push('invalid value for "type", type cannot be nil.')
275
- end
271
+ if @type.nil?
272
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
273
+ end
276
274
 
277
- if @field_type.nil?
278
- invalid_properties.push('invalid value for "field_type", field_type cannot be nil.')
279
- end
275
+ if @field_type.nil?
276
+ invalid_properties.push('invalid value for "field_type", field_type cannot be nil.')
277
+ end
280
278
 
281
- if @description.nil?
282
- invalid_properties.push('invalid value for "description", description cannot be nil.')
283
- end
279
+ if @description.nil?
280
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
281
+ end
284
282
 
285
- if @group_name.nil?
286
- invalid_properties.push('invalid value for "group_name", group_name cannot be nil.')
287
- end
283
+ if @group_name.nil?
284
+ invalid_properties.push('invalid value for "group_name", group_name cannot be nil.')
285
+ end
288
286
 
289
- if @options.nil?
290
- invalid_properties.push('invalid value for "options", options cannot be nil.')
291
- end
287
+ if @options.nil?
288
+ invalid_properties.push('invalid value for "options", options cannot be nil.')
289
+ end
292
290
 
293
- invalid_properties
294
- end
291
+ invalid_properties
292
+ end
295
293
 
296
- # Check to see if the all the properties in the model are valid
297
- # @return true if the model is valid
298
- def valid?
299
- return false if @name.nil?
300
- return false if @label.nil?
301
- return false if @type.nil?
302
- return false if @field_type.nil?
303
- return false if @description.nil?
304
- return false if @group_name.nil?
305
- return false if @options.nil?
306
- true
307
- end
294
+ # Check to see if the all the properties in the model are valid
295
+ # @return true if the model is valid
296
+ def valid?
297
+ return false if @name.nil?
298
+ return false if @label.nil?
299
+ return false if @type.nil?
300
+ return false if @field_type.nil?
301
+ return false if @description.nil?
302
+ return false if @group_name.nil?
303
+ return false if @options.nil?
304
+ true
305
+ end
308
306
 
309
- # Checks equality by comparing each attribute.
310
- # @param [Object] Object to be compared
311
- def ==(o)
312
- return true if self.equal?(o)
313
- self.class == o.class &&
314
- updated_at == o.updated_at &&
315
- created_at == o.created_at &&
316
- archived_at == o.archived_at &&
317
- name == o.name &&
318
- label == o.label &&
319
- type == o.type &&
320
- field_type == o.field_type &&
321
- description == o.description &&
322
- group_name == o.group_name &&
323
- options == o.options &&
324
- created_user_id == o.created_user_id &&
325
- updated_user_id == o.updated_user_id &&
326
- referenced_object_type == o.referenced_object_type &&
327
- display_order == o.display_order &&
328
- calculated == o.calculated &&
329
- external_options == o.external_options &&
330
- archived == o.archived &&
331
- has_unique_value == o.has_unique_value &&
332
- hidden == o.hidden &&
333
- hubspot_defined == o.hubspot_defined &&
334
- show_currency_symbol == o.show_currency_symbol &&
335
- modification_metadata == o.modification_metadata &&
336
- form_field == o.form_field
337
- end
307
+ # Checks equality by comparing each attribute.
308
+ # @param [Object] Object to be compared
309
+ def ==(o)
310
+ return true if self.equal?(o)
311
+ self.class == o.class &&
312
+ updated_at == o.updated_at &&
313
+ created_at == o.created_at &&
314
+ archived_at == o.archived_at &&
315
+ name == o.name &&
316
+ label == o.label &&
317
+ type == o.type &&
318
+ field_type == o.field_type &&
319
+ description == o.description &&
320
+ group_name == o.group_name &&
321
+ options == o.options &&
322
+ created_user_id == o.created_user_id &&
323
+ updated_user_id == o.updated_user_id &&
324
+ referenced_object_type == o.referenced_object_type &&
325
+ display_order == o.display_order &&
326
+ calculated == o.calculated &&
327
+ external_options == o.external_options &&
328
+ archived == o.archived &&
329
+ has_unique_value == o.has_unique_value &&
330
+ hidden == o.hidden &&
331
+ hubspot_defined == o.hubspot_defined &&
332
+ show_currency_symbol == o.show_currency_symbol &&
333
+ modification_metadata == o.modification_metadata &&
334
+ form_field == o.form_field
335
+ end
338
336
 
339
- # @see the `==` method
340
- # @param [Object] Object to be compared
341
- def eql?(o)
342
- self == o
343
- end
337
+ # @see the `==` method
338
+ # @param [Object] Object to be compared
339
+ def eql?(o)
340
+ self == o
341
+ end
344
342
 
345
- # Calculates hash code according to all attributes.
346
- # @return [Integer] Hash code
347
- def hash
348
- [updated_at, created_at, archived_at, name, label, type, field_type, description, group_name, options, created_user_id, updated_user_id, referenced_object_type, display_order, calculated, external_options, archived, has_unique_value, hidden, hubspot_defined, show_currency_symbol, modification_metadata, form_field].hash
349
- end
343
+ # Calculates hash code according to all attributes.
344
+ # @return [Integer] Hash code
345
+ def hash
346
+ [updated_at, created_at, archived_at, name, label, type, field_type, description, group_name, options, created_user_id, updated_user_id, referenced_object_type, display_order, calculated, external_options, archived, has_unique_value, hidden, hubspot_defined, show_currency_symbol, modification_metadata, form_field].hash
347
+ end
350
348
 
351
- # Builds the object from hash
352
- # @param [Hash] attributes Model attributes in the form of hash
353
- # @return [Object] Returns the model itself
354
- def self.build_from_hash(attributes)
355
- new.build_from_hash(attributes)
356
- end
349
+ # Builds the object from hash
350
+ # @param [Hash] attributes Model attributes in the form of hash
351
+ # @return [Object] Returns the model itself
352
+ def self.build_from_hash(attributes)
353
+ new.build_from_hash(attributes)
354
+ end
357
355
 
358
- # Builds the object from hash
359
- # @param [Hash] attributes Model attributes in the form of hash
360
- # @return [Object] Returns the model itself
361
- def build_from_hash(attributes)
362
- return nil unless attributes.is_a?(Hash)
363
- self.class.openapi_types.each_pair do |key, type|
364
- if type =~ /\AArray<(.*)>/i
365
- # check to ensure the input is an array given that the attribute
366
- # is documented as an array but the input is not
367
- if attributes[self.class.attribute_map[key]].is_a?(Array)
368
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
369
- end
370
- elsif !attributes[self.class.attribute_map[key]].nil?
371
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
372
- end # or else data not found in attributes(hash), not an issue as the data can be optional
373
- end
356
+ # Builds the object from hash
357
+ # @param [Hash] attributes Model attributes in the form of hash
358
+ # @return [Object] Returns the model itself
359
+ def build_from_hash(attributes)
360
+ return nil unless attributes.is_a?(Hash)
361
+ self.class.openapi_types.each_pair do |key, type|
362
+ if type =~ /\AArray<(.*)>/i
363
+ # check to ensure the input is an array given that the attribute
364
+ # is documented as an array but the input is not
365
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
366
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
367
+ end
368
+ elsif !attributes[self.class.attribute_map[key]].nil?
369
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
370
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
371
+ end
374
372
 
375
- self
376
- end
373
+ self
374
+ end
377
375
 
378
- # Deserializes the data based on type
379
- # @param string type Data type
380
- # @param string value Value to be deserialized
381
- # @return [Object] Deserialized data
382
- def _deserialize(type, value)
383
- case type.to_sym
384
- when :DateTime
385
- DateTime.parse(value)
386
- when :Date
387
- Date.parse(value)
388
- when :String
389
- value.to_s
390
- when :Integer
391
- value.to_i
392
- when :Float
393
- value.to_f
394
- when :Boolean
395
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
396
- true
397
- else
398
- false
399
- end
400
- when :Object
401
- # generic object (usually a Hash), return directly
402
- value
403
- when /\AArray<(?<inner_type>.+)>\z/
404
- inner_type = Regexp.last_match[:inner_type]
405
- value.map { |v| _deserialize(inner_type, v) }
406
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
407
- k_type = Regexp.last_match[:k_type]
408
- v_type = Regexp.last_match[:v_type]
409
- {}.tap do |hash|
410
- value.each do |k, v|
411
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
412
- end
413
- end
414
- else # model
415
- Hubspot::Client::Crm::Properties::Models.const_get(type).build_from_hash(value)
376
+ # Deserializes the data based on type
377
+ # @param string type Data type
378
+ # @param string value Value to be deserialized
379
+ # @return [Object] Deserialized data
380
+ def _deserialize(type, value)
381
+ case type.to_sym
382
+ when :DateTime
383
+ DateTime.parse(value)
384
+ when :Date
385
+ Date.parse(value)
386
+ when :String
387
+ value.to_s
388
+ when :Integer
389
+ value.to_i
390
+ when :Float
391
+ value.to_f
392
+ when :Boolean
393
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
394
+ true
395
+ else
396
+ false
397
+ end
398
+ when :Object
399
+ # generic object (usually a Hash), return directly
400
+ value
401
+ when /\AArray<(?<inner_type>.+)>\z/
402
+ inner_type = Regexp.last_match[:inner_type]
403
+ value.map { |v| _deserialize(inner_type, v) }
404
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
405
+ k_type = Regexp.last_match[:k_type]
406
+ v_type = Regexp.last_match[:v_type]
407
+ {}.tap do |hash|
408
+ value.each do |k, v|
409
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
416
410
  end
417
411
  end
412
+ else # model
413
+ Hubspot::Crm::Properties.const_get(type).build_from_hash(value)
414
+ end
415
+ end
418
416
 
419
- # Returns the string representation of the object
420
- # @return [String] String presentation of the object
421
- def to_s
422
- to_hash.to_s
423
- end
417
+ # Returns the string representation of the object
418
+ # @return [String] String presentation of the object
419
+ def to_s
420
+ to_hash.to_s
421
+ end
424
422
 
425
- # to_body is an alias to to_hash (backward compatibility)
426
- # @return [Hash] Returns the object in the form of hash
427
- def to_body
428
- to_hash
429
- end
423
+ # to_body is an alias to to_hash (backward compatibility)
424
+ # @return [Hash] Returns the object in the form of hash
425
+ def to_body
426
+ to_hash
427
+ end
430
428
 
431
- # Returns the object in the form of hash
432
- # @return [Hash] Returns the object in the form of hash
433
- def to_hash
434
- hash = {}
435
- self.class.attribute_map.each_pair do |attr, param|
436
- value = self.send(attr)
437
- if value.nil?
438
- is_nullable = self.class.openapi_nullable.include?(attr)
439
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
440
- end
441
-
442
- hash[param] = _to_hash(value)
443
- end
444
- hash
429
+ # Returns the object in the form of hash
430
+ # @return [Hash] Returns the object in the form of hash
431
+ def to_hash
432
+ hash = {}
433
+ self.class.attribute_map.each_pair do |attr, param|
434
+ value = self.send(attr)
435
+ if value.nil?
436
+ is_nullable = self.class.openapi_nullable.include?(attr)
437
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
445
438
  end
439
+
440
+ hash[param] = _to_hash(value)
441
+ end
442
+ hash
443
+ end
446
444
 
447
- # Outputs non-array value in the form of hash
448
- # For object, use to_hash. Otherwise, just return the value
449
- # @param [Object] value Any valid value
450
- # @return [Hash] Returns the value in the form of hash
451
- def _to_hash(value)
452
- if value.is_a?(Array)
453
- value.compact.map { |v| _to_hash(v) }
454
- elsif value.is_a?(Hash)
455
- {}.tap do |hash|
456
- value.each { |k, v| hash[k] = _to_hash(v) }
457
- end
458
- elsif value.respond_to? :to_hash
459
- value.to_hash
460
- else
461
- value
462
- end
445
+ # Outputs non-array value in the form of hash
446
+ # For object, use to_hash. Otherwise, just return the value
447
+ # @param [Object] value Any valid value
448
+ # @return [Hash] Returns the value in the form of hash
449
+ def _to_hash(value)
450
+ if value.is_a?(Array)
451
+ value.compact.map { |v| _to_hash(v) }
452
+ elsif value.is_a?(Hash)
453
+ {}.tap do |hash|
454
+ value.each { |k, v| hash[k] = _to_hash(v) }
463
455
  end
456
+ elsif value.respond_to? :to_hash
457
+ value.to_hash
458
+ else
459
+ value
464
460
  end
465
461
  end
466
462
  end