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,226 +13,222 @@ OpenAPI Generator version: 4.2.2
13
13
  require 'date'
14
14
 
15
15
  module Hubspot
16
- module Client
17
- module OAuth
18
- module Models
19
- class ErrorDetail
20
- # A human readable message describing the error along with remediation steps where appropriate
21
- attr_accessor :message
22
-
23
- # The name of the field or parameter in which the error was found.
24
- attr_accessor :_in
25
-
26
- # Context about the error condition
27
- attr_accessor :context
28
-
29
- # Attribute mapping from ruby-style variable name to JSON key.
30
- def self.attribute_map
31
- {
32
- :'message' => :'message',
33
- :'_in' => :'in',
34
- :'context' => :'context'
35
- }
36
- end
16
+ module OAuth
17
+ class ErrorDetail
18
+ # A human readable message describing the error along with remediation steps where appropriate
19
+ attr_accessor :message
20
+
21
+ # The name of the field or parameter in which the error was found.
22
+ attr_accessor :_in
23
+
24
+ # Context about the error condition
25
+ attr_accessor :context
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'message' => :'message',
31
+ :'_in' => :'in',
32
+ :'context' => :'context'
33
+ }
34
+ end
37
35
 
38
- # Attribute type mapping.
39
- def self.openapi_types
40
- {
41
- :'message' => :'String',
42
- :'_in' => :'String',
43
- :'context' => :'Hash<String, Array<String>>'
44
- }
45
- end
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'message' => :'String',
40
+ :'_in' => :'String',
41
+ :'context' => :'Hash<String, Array<String>>'
42
+ }
43
+ end
46
44
 
47
- # List of attributes with nullable: true
48
- def self.openapi_nullable
49
- Set.new([
50
- ])
51
- end
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
52
50
 
53
- # Initializes the object
54
- # @param [Hash] attributes Model attributes in the form of hash
55
- def initialize(attributes = {})
56
- if (!attributes.is_a?(Hash))
57
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Client::OAuth::Models::ErrorDetail` initialize method"
58
- end
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Client::OAuth::ErrorDetail` initialize method"
56
+ end
59
57
 
60
- # check to see if the attribute exists and convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Client::OAuth::Models::ErrorDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
- end
65
- h[k.to_sym] = v
66
- }
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Client::OAuth::ErrorDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
67
65
 
68
- if attributes.key?(:'message')
69
- self.message = attributes[:'message']
70
- end
66
+ if attributes.key?(:'message')
67
+ self.message = attributes[:'message']
68
+ end
71
69
 
72
- if attributes.key?(:'_in')
73
- self._in = attributes[:'_in']
74
- end
70
+ if attributes.key?(:'_in')
71
+ self._in = attributes[:'_in']
72
+ end
75
73
 
76
- if attributes.key?(:'context')
77
- if (value = attributes[:'context']).is_a?(Hash)
78
- self.context = value
79
- end
80
- end
74
+ if attributes.key?(:'context')
75
+ if (value = attributes[:'context']).is_a?(Hash)
76
+ self.context = value
81
77
  end
78
+ end
79
+ end
82
80
 
83
- # Show invalid properties with the reasons. Usually used together with valid?
84
- # @return Array for valid properties with the reasons
85
- def list_invalid_properties
86
- invalid_properties = Array.new
87
- if @message.nil?
88
- invalid_properties.push('invalid value for "message", message cannot be nil.')
89
- end
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @message.nil?
86
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
87
+ end
90
88
 
91
- invalid_properties
92
- end
89
+ invalid_properties
90
+ end
93
91
 
94
- # Check to see if the all the properties in the model are valid
95
- # @return true if the model is valid
96
- def valid?
97
- return false if @message.nil?
98
- true
99
- end
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ return false if @message.nil?
96
+ true
97
+ end
100
98
 
101
- # Checks equality by comparing each attribute.
102
- # @param [Object] Object to be compared
103
- def ==(o)
104
- return true if self.equal?(o)
105
- self.class == o.class &&
106
- message == o.message &&
107
- _in == o._in &&
108
- context == o.context
109
- end
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ message == o.message &&
105
+ _in == o._in &&
106
+ context == o.context
107
+ end
110
108
 
111
- # @see the `==` method
112
- # @param [Object] Object to be compared
113
- def eql?(o)
114
- self == o
115
- end
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
116
114
 
117
- # Calculates hash code according to all attributes.
118
- # @return [Integer] Hash code
119
- def hash
120
- [message, _in, context].hash
121
- end
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [message, _in, context].hash
119
+ end
122
120
 
123
- # Builds the object from hash
124
- # @param [Hash] attributes Model attributes in the form of hash
125
- # @return [Object] Returns the model itself
126
- def self.build_from_hash(attributes)
127
- new.build_from_hash(attributes)
128
- end
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ new.build_from_hash(attributes)
126
+ end
129
127
 
130
- # Builds the object from hash
131
- # @param [Hash] attributes Model attributes in the form of hash
132
- # @return [Object] Returns the model itself
133
- def build_from_hash(attributes)
134
- return nil unless attributes.is_a?(Hash)
135
- self.class.openapi_types.each_pair do |key, type|
136
- if type =~ /\AArray<(.*)>/i
137
- # check to ensure the input is an array given that the attribute
138
- # is documented as an array but the input is not
139
- if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
- end
142
- elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
- end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ self.class.openapi_types.each_pair do |key, type|
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
138
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
139
  end
140
+ elsif !attributes[self.class.attribute_map[key]].nil?
141
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
143
+ end
146
144
 
147
- self
148
- end
145
+ self
146
+ end
149
147
 
150
- # Deserializes the data based on type
151
- # @param string type Data type
152
- # @param string value Value to be deserialized
153
- # @return [Object] Deserialized data
154
- def _deserialize(type, value)
155
- case type.to_sym
156
- when :DateTime
157
- DateTime.parse(value)
158
- when :Date
159
- Date.parse(value)
160
- when :String
161
- value.to_s
162
- when :Integer
163
- value.to_i
164
- when :Float
165
- value.to_f
166
- when :Boolean
167
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
- true
169
- else
170
- false
171
- end
172
- when :Object
173
- # generic object (usually a Hash), return directly
174
- value
175
- when /\AArray<(?<inner_type>.+)>\z/
176
- inner_type = Regexp.last_match[:inner_type]
177
- value.map { |v| _deserialize(inner_type, v) }
178
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
- k_type = Regexp.last_match[:k_type]
180
- v_type = Regexp.last_match[:v_type]
181
- {}.tap do |hash|
182
- value.each do |k, v|
183
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
- end
185
- end
186
- else # model
187
- Hubspot::Client::OAuth::Models.const_get(type).build_from_hash(value)
148
+ # Deserializes the data based on type
149
+ # @param string type Data type
150
+ # @param string value Value to be deserialized
151
+ # @return [Object] Deserialized data
152
+ def _deserialize(type, value)
153
+ case type.to_sym
154
+ when :DateTime
155
+ DateTime.parse(value)
156
+ when :Date
157
+ Date.parse(value)
158
+ when :String
159
+ value.to_s
160
+ when :Integer
161
+ value.to_i
162
+ when :Float
163
+ value.to_f
164
+ when :Boolean
165
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
166
+ true
167
+ else
168
+ false
169
+ end
170
+ when :Object
171
+ # generic object (usually a Hash), return directly
172
+ value
173
+ when /\AArray<(?<inner_type>.+)>\z/
174
+ inner_type = Regexp.last_match[:inner_type]
175
+ value.map { |v| _deserialize(inner_type, v) }
176
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
177
+ k_type = Regexp.last_match[:k_type]
178
+ v_type = Regexp.last_match[:v_type]
179
+ {}.tap do |hash|
180
+ value.each do |k, v|
181
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
182
  end
189
183
  end
184
+ else # model
185
+ Hubspot::Client::OAuth.const_get(type).build_from_hash(value)
186
+ end
187
+ end
190
188
 
191
- # Returns the string representation of the object
192
- # @return [String] String presentation of the object
193
- def to_s
194
- to_hash.to_s
195
- end
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
196
194
 
197
- # to_body is an alias to to_hash (backward compatibility)
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_body
200
- to_hash
201
- end
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
202
200
 
203
- # Returns the object in the form of hash
204
- # @return [Hash] Returns the object in the form of hash
205
- def to_hash
206
- hash = {}
207
- self.class.attribute_map.each_pair do |attr, param|
208
- value = self.send(attr)
209
- if value.nil?
210
- is_nullable = self.class.openapi_nullable.include?(attr)
211
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
212
- end
213
-
214
- hash[param] = _to_hash(value)
215
- end
216
- hash
217
- end
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
218
216
 
219
- # Outputs non-array value in the form of hash
220
- # For object, use to_hash. Otherwise, just return the value
221
- # @param [Object] value Any valid value
222
- # @return [Hash] Returns the value in the form of hash
223
- def _to_hash(value)
224
- if value.is_a?(Array)
225
- value.compact.map { |v| _to_hash(v) }
226
- elsif value.is_a?(Hash)
227
- {}.tap do |hash|
228
- value.each { |k, v| hash[k] = _to_hash(v) }
229
- end
230
- elsif value.respond_to? :to_hash
231
- value.to_hash
232
- else
233
- value
234
- end
235
- end
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
236
232
  end
237
233
  end
238
234
  end
@@ -13,412 +13,408 @@ OpenAPI Generator version: 4.2.2
13
13
  require 'date'
14
14
 
15
15
  module Hubspot
16
- module Client
17
- module OAuth
18
- module Models
19
- class JsonNode
20
- attr_accessor :array
16
+ module OAuth
17
+ class JsonNode
18
+ attr_accessor :array
21
19
 
22
- attr_accessor :null
20
+ attr_accessor :null
23
21
 
24
- attr_accessor :float
22
+ attr_accessor :float
25
23
 
26
- attr_accessor :node_type
24
+ attr_accessor :node_type
27
25
 
28
- attr_accessor :number
26
+ attr_accessor :number
29
27
 
30
- attr_accessor :missing_node
28
+ attr_accessor :missing_node
31
29
 
32
- attr_accessor :object
30
+ attr_accessor :object
33
31
 
34
- attr_accessor :value_node
32
+ attr_accessor :value_node
35
33
 
36
- attr_accessor :container_node
34
+ attr_accessor :container_node
37
35
 
38
- attr_accessor :pojo
36
+ attr_accessor :pojo
39
37
 
40
- attr_accessor :integral_number
38
+ attr_accessor :integral_number
41
39
 
42
- attr_accessor :floating_point_number
40
+ attr_accessor :floating_point_number
43
41
 
44
- attr_accessor :short
42
+ attr_accessor :short
45
43
 
46
- attr_accessor :int
44
+ attr_accessor :int
47
45
 
48
- attr_accessor :long
46
+ attr_accessor :long
49
47
 
50
- attr_accessor :double
48
+ attr_accessor :double
51
49
 
52
- attr_accessor :big_decimal
50
+ attr_accessor :big_decimal
53
51
 
54
- attr_accessor :big_integer
52
+ attr_accessor :big_integer
55
53
 
56
- attr_accessor :textual
54
+ attr_accessor :textual
57
55
 
58
- attr_accessor :boolean
56
+ attr_accessor :boolean
59
57
 
60
- attr_accessor :binary
58
+ attr_accessor :binary
61
59
 
62
- class EnumAttributeValidator
63
- attr_reader :datatype
64
- attr_reader :allowable_values
60
+ class EnumAttributeValidator
61
+ attr_reader :datatype
62
+ attr_reader :allowable_values
65
63
 
66
- def initialize(datatype, allowable_values)
67
- @allowable_values = allowable_values.map do |value|
68
- case datatype.to_s
69
- when /Integer/i
70
- value.to_i
71
- when /Float/i
72
- value.to_f
73
- else
74
- value
75
- end
76
- end
77
- end
78
-
79
- def valid?(value)
80
- !value || allowable_values.include?(value)
64
+ def initialize(datatype, allowable_values)
65
+ @allowable_values = allowable_values.map do |value|
66
+ case datatype.to_s
67
+ when /Integer/i
68
+ value.to_i
69
+ when /Float/i
70
+ value.to_f
71
+ else
72
+ value
81
73
  end
82
74
  end
75
+ end
83
76
 
84
- # Attribute mapping from ruby-style variable name to JSON key.
85
- def self.attribute_map
86
- {
87
- :'array' => :'array',
88
- :'null' => :'null',
89
- :'float' => :'float',
90
- :'node_type' => :'nodeType',
91
- :'number' => :'number',
92
- :'missing_node' => :'missingNode',
93
- :'object' => :'object',
94
- :'value_node' => :'valueNode',
95
- :'container_node' => :'containerNode',
96
- :'pojo' => :'pojo',
97
- :'integral_number' => :'integralNumber',
98
- :'floating_point_number' => :'floatingPointNumber',
99
- :'short' => :'short',
100
- :'int' => :'int',
101
- :'long' => :'long',
102
- :'double' => :'double',
103
- :'big_decimal' => :'bigDecimal',
104
- :'big_integer' => :'bigInteger',
105
- :'textual' => :'textual',
106
- :'boolean' => :'boolean',
107
- :'binary' => :'binary'
108
- }
109
- end
77
+ def valid?(value)
78
+ !value || allowable_values.include?(value)
79
+ end
80
+ end
110
81
 
111
- # Attribute type mapping.
112
- def self.openapi_types
113
- {
114
- :'array' => :'Boolean',
115
- :'null' => :'Boolean',
116
- :'float' => :'Boolean',
117
- :'node_type' => :'String',
118
- :'number' => :'Boolean',
119
- :'missing_node' => :'Boolean',
120
- :'object' => :'Boolean',
121
- :'value_node' => :'Boolean',
122
- :'container_node' => :'Boolean',
123
- :'pojo' => :'Boolean',
124
- :'integral_number' => :'Boolean',
125
- :'floating_point_number' => :'Boolean',
126
- :'short' => :'Boolean',
127
- :'int' => :'Boolean',
128
- :'long' => :'Boolean',
129
- :'double' => :'Boolean',
130
- :'big_decimal' => :'Boolean',
131
- :'big_integer' => :'Boolean',
132
- :'textual' => :'Boolean',
133
- :'boolean' => :'Boolean',
134
- :'binary' => :'Boolean'
135
- }
136
- end
82
+ # Attribute mapping from ruby-style variable name to JSON key.
83
+ def self.attribute_map
84
+ {
85
+ :'array' => :'array',
86
+ :'null' => :'null',
87
+ :'float' => :'float',
88
+ :'node_type' => :'nodeType',
89
+ :'number' => :'number',
90
+ :'missing_node' => :'missingNode',
91
+ :'object' => :'object',
92
+ :'value_node' => :'valueNode',
93
+ :'container_node' => :'containerNode',
94
+ :'pojo' => :'pojo',
95
+ :'integral_number' => :'integralNumber',
96
+ :'floating_point_number' => :'floatingPointNumber',
97
+ :'short' => :'short',
98
+ :'int' => :'int',
99
+ :'long' => :'long',
100
+ :'double' => :'double',
101
+ :'big_decimal' => :'bigDecimal',
102
+ :'big_integer' => :'bigInteger',
103
+ :'textual' => :'textual',
104
+ :'boolean' => :'boolean',
105
+ :'binary' => :'binary'
106
+ }
107
+ end
137
108
 
138
- # List of attributes with nullable: true
139
- def self.openapi_nullable
140
- Set.new([
141
- ])
142
- end
109
+ # Attribute type mapping.
110
+ def self.openapi_types
111
+ {
112
+ :'array' => :'Boolean',
113
+ :'null' => :'Boolean',
114
+ :'float' => :'Boolean',
115
+ :'node_type' => :'String',
116
+ :'number' => :'Boolean',
117
+ :'missing_node' => :'Boolean',
118
+ :'object' => :'Boolean',
119
+ :'value_node' => :'Boolean',
120
+ :'container_node' => :'Boolean',
121
+ :'pojo' => :'Boolean',
122
+ :'integral_number' => :'Boolean',
123
+ :'floating_point_number' => :'Boolean',
124
+ :'short' => :'Boolean',
125
+ :'int' => :'Boolean',
126
+ :'long' => :'Boolean',
127
+ :'double' => :'Boolean',
128
+ :'big_decimal' => :'Boolean',
129
+ :'big_integer' => :'Boolean',
130
+ :'textual' => :'Boolean',
131
+ :'boolean' => :'Boolean',
132
+ :'binary' => :'Boolean'
133
+ }
134
+ end
143
135
 
144
- # Initializes the object
145
- # @param [Hash] attributes Model attributes in the form of hash
146
- def initialize(attributes = {})
147
- if (!attributes.is_a?(Hash))
148
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Client::OAuth::Models::JsonNode` initialize method"
149
- end
136
+ # List of attributes with nullable: true
137
+ def self.openapi_nullable
138
+ Set.new([
139
+ ])
140
+ end
150
141
 
151
- # check to see if the attribute exists and convert string to symbol for hash key
152
- attributes = attributes.each_with_object({}) { |(k, v), h|
153
- if (!self.class.attribute_map.key?(k.to_sym))
154
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Client::OAuth::Models::JsonNode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
155
- end
156
- h[k.to_sym] = v
157
- }
142
+ # Initializes the object
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ def initialize(attributes = {})
145
+ if (!attributes.is_a?(Hash))
146
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::OAuth::JsonNode` initialize method"
147
+ end
158
148
 
159
- if attributes.key?(:'array')
160
- self.array = attributes[:'array']
161
- end
149
+ # check to see if the attribute exists and convert string to symbol for hash key
150
+ attributes = attributes.each_with_object({}) { |(k, v), h|
151
+ if (!self.class.attribute_map.key?(k.to_sym))
152
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::OAuth::JsonNode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
153
+ end
154
+ h[k.to_sym] = v
155
+ }
162
156
 
163
- if attributes.key?(:'null')
164
- self.null = attributes[:'null']
165
- end
157
+ if attributes.key?(:'array')
158
+ self.array = attributes[:'array']
159
+ end
166
160
 
167
- if attributes.key?(:'float')
168
- self.float = attributes[:'float']
169
- end
161
+ if attributes.key?(:'null')
162
+ self.null = attributes[:'null']
163
+ end
170
164
 
171
- if attributes.key?(:'node_type')
172
- self.node_type = attributes[:'node_type']
173
- end
165
+ if attributes.key?(:'float')
166
+ self.float = attributes[:'float']
167
+ end
174
168
 
175
- if attributes.key?(:'number')
176
- self.number = attributes[:'number']
177
- end
169
+ if attributes.key?(:'node_type')
170
+ self.node_type = attributes[:'node_type']
171
+ end
178
172
 
179
- if attributes.key?(:'missing_node')
180
- self.missing_node = attributes[:'missing_node']
181
- end
173
+ if attributes.key?(:'number')
174
+ self.number = attributes[:'number']
175
+ end
182
176
 
183
- if attributes.key?(:'object')
184
- self.object = attributes[:'object']
185
- end
177
+ if attributes.key?(:'missing_node')
178
+ self.missing_node = attributes[:'missing_node']
179
+ end
186
180
 
187
- if attributes.key?(:'value_node')
188
- self.value_node = attributes[:'value_node']
189
- end
181
+ if attributes.key?(:'object')
182
+ self.object = attributes[:'object']
183
+ end
190
184
 
191
- if attributes.key?(:'container_node')
192
- self.container_node = attributes[:'container_node']
193
- end
185
+ if attributes.key?(:'value_node')
186
+ self.value_node = attributes[:'value_node']
187
+ end
194
188
 
195
- if attributes.key?(:'pojo')
196
- self.pojo = attributes[:'pojo']
197
- end
189
+ if attributes.key?(:'container_node')
190
+ self.container_node = attributes[:'container_node']
191
+ end
198
192
 
199
- if attributes.key?(:'integral_number')
200
- self.integral_number = attributes[:'integral_number']
201
- end
193
+ if attributes.key?(:'pojo')
194
+ self.pojo = attributes[:'pojo']
195
+ end
202
196
 
203
- if attributes.key?(:'floating_point_number')
204
- self.floating_point_number = attributes[:'floating_point_number']
205
- end
197
+ if attributes.key?(:'integral_number')
198
+ self.integral_number = attributes[:'integral_number']
199
+ end
206
200
 
207
- if attributes.key?(:'short')
208
- self.short = attributes[:'short']
209
- end
201
+ if attributes.key?(:'floating_point_number')
202
+ self.floating_point_number = attributes[:'floating_point_number']
203
+ end
210
204
 
211
- if attributes.key?(:'int')
212
- self.int = attributes[:'int']
213
- end
205
+ if attributes.key?(:'short')
206
+ self.short = attributes[:'short']
207
+ end
214
208
 
215
- if attributes.key?(:'long')
216
- self.long = attributes[:'long']
217
- end
209
+ if attributes.key?(:'int')
210
+ self.int = attributes[:'int']
211
+ end
218
212
 
219
- if attributes.key?(:'double')
220
- self.double = attributes[:'double']
221
- end
213
+ if attributes.key?(:'long')
214
+ self.long = attributes[:'long']
215
+ end
222
216
 
223
- if attributes.key?(:'big_decimal')
224
- self.big_decimal = attributes[:'big_decimal']
225
- end
217
+ if attributes.key?(:'double')
218
+ self.double = attributes[:'double']
219
+ end
226
220
 
227
- if attributes.key?(:'big_integer')
228
- self.big_integer = attributes[:'big_integer']
229
- end
221
+ if attributes.key?(:'big_decimal')
222
+ self.big_decimal = attributes[:'big_decimal']
223
+ end
230
224
 
231
- if attributes.key?(:'textual')
232
- self.textual = attributes[:'textual']
233
- end
225
+ if attributes.key?(:'big_integer')
226
+ self.big_integer = attributes[:'big_integer']
227
+ end
234
228
 
235
- if attributes.key?(:'boolean')
236
- self.boolean = attributes[:'boolean']
237
- end
229
+ if attributes.key?(:'textual')
230
+ self.textual = attributes[:'textual']
231
+ end
238
232
 
239
- if attributes.key?(:'binary')
240
- self.binary = attributes[:'binary']
241
- end
242
- end
233
+ if attributes.key?(:'boolean')
234
+ self.boolean = attributes[:'boolean']
235
+ end
243
236
 
244
- # Show invalid properties with the reasons. Usually used together with valid?
245
- # @return Array for valid properties with the reasons
246
- def list_invalid_properties
247
- invalid_properties = Array.new
248
- invalid_properties
249
- end
237
+ if attributes.key?(:'binary')
238
+ self.binary = attributes[:'binary']
239
+ end
240
+ end
250
241
 
251
- # Check to see if the all the properties in the model are valid
252
- # @return true if the model is valid
253
- def valid?
254
- node_type_validator = EnumAttributeValidator.new('String', ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"])
255
- return false unless node_type_validator.valid?(@node_type)
256
- true
257
- end
242
+ # Show invalid properties with the reasons. Usually used together with valid?
243
+ # @return Array for valid properties with the reasons
244
+ def list_invalid_properties
245
+ invalid_properties = Array.new
246
+ invalid_properties
247
+ end
258
248
 
259
- # Custom attribute writer method checking allowed values (enum).
260
- # @param [Object] node_type Object to be assigned
261
- def node_type=(node_type)
262
- validator = EnumAttributeValidator.new('String', ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"])
263
- unless validator.valid?(node_type)
264
- fail ArgumentError, "invalid value for \"node_type\", must be one of #{validator.allowable_values}."
265
- end
266
- @node_type = node_type
267
- end
249
+ # Check to see if the all the properties in the model are valid
250
+ # @return true if the model is valid
251
+ def valid?
252
+ node_type_validator = EnumAttributeValidator.new('String', ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"])
253
+ return false unless node_type_validator.valid?(@node_type)
254
+ true
255
+ end
268
256
 
269
- # Checks equality by comparing each attribute.
270
- # @param [Object] Object to be compared
271
- def ==(o)
272
- return true if self.equal?(o)
273
- self.class == o.class &&
274
- array == o.array &&
275
- null == o.null &&
276
- float == o.float &&
277
- node_type == o.node_type &&
278
- number == o.number &&
279
- missing_node == o.missing_node &&
280
- object == o.object &&
281
- value_node == o.value_node &&
282
- container_node == o.container_node &&
283
- pojo == o.pojo &&
284
- integral_number == o.integral_number &&
285
- floating_point_number == o.floating_point_number &&
286
- short == o.short &&
287
- int == o.int &&
288
- long == o.long &&
289
- double == o.double &&
290
- big_decimal == o.big_decimal &&
291
- big_integer == o.big_integer &&
292
- textual == o.textual &&
293
- boolean == o.boolean &&
294
- binary == o.binary
295
- end
257
+ # Custom attribute writer method checking allowed values (enum).
258
+ # @param [Object] node_type Object to be assigned
259
+ def node_type=(node_type)
260
+ validator = EnumAttributeValidator.new('String', ["ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING"])
261
+ unless validator.valid?(node_type)
262
+ fail ArgumentError, "invalid value for \"node_type\", must be one of #{validator.allowable_values}."
263
+ end
264
+ @node_type = node_type
265
+ end
296
266
 
297
- # @see the `==` method
298
- # @param [Object] Object to be compared
299
- def eql?(o)
300
- self == o
301
- end
267
+ # Checks equality by comparing each attribute.
268
+ # @param [Object] Object to be compared
269
+ def ==(o)
270
+ return true if self.equal?(o)
271
+ self.class == o.class &&
272
+ array == o.array &&
273
+ null == o.null &&
274
+ float == o.float &&
275
+ node_type == o.node_type &&
276
+ number == o.number &&
277
+ missing_node == o.missing_node &&
278
+ object == o.object &&
279
+ value_node == o.value_node &&
280
+ container_node == o.container_node &&
281
+ pojo == o.pojo &&
282
+ integral_number == o.integral_number &&
283
+ floating_point_number == o.floating_point_number &&
284
+ short == o.short &&
285
+ int == o.int &&
286
+ long == o.long &&
287
+ double == o.double &&
288
+ big_decimal == o.big_decimal &&
289
+ big_integer == o.big_integer &&
290
+ textual == o.textual &&
291
+ boolean == o.boolean &&
292
+ binary == o.binary
293
+ end
302
294
 
303
- # Calculates hash code according to all attributes.
304
- # @return [Integer] Hash code
305
- def hash
306
- [array, null, float, node_type, number, missing_node, object, value_node, container_node, pojo, integral_number, floating_point_number, short, int, long, double, big_decimal, big_integer, textual, boolean, binary].hash
307
- end
295
+ # @see the `==` method
296
+ # @param [Object] Object to be compared
297
+ def eql?(o)
298
+ self == o
299
+ end
308
300
 
309
- # Builds the object from hash
310
- # @param [Hash] attributes Model attributes in the form of hash
311
- # @return [Object] Returns the model itself
312
- def self.build_from_hash(attributes)
313
- new.build_from_hash(attributes)
314
- end
301
+ # Calculates hash code according to all attributes.
302
+ # @return [Integer] Hash code
303
+ def hash
304
+ [array, null, float, node_type, number, missing_node, object, value_node, container_node, pojo, integral_number, floating_point_number, short, int, long, double, big_decimal, big_integer, textual, boolean, binary].hash
305
+ end
315
306
 
316
- # Builds the object from hash
317
- # @param [Hash] attributes Model attributes in the form of hash
318
- # @return [Object] Returns the model itself
319
- def build_from_hash(attributes)
320
- return nil unless attributes.is_a?(Hash)
321
- self.class.openapi_types.each_pair do |key, type|
322
- if type =~ /\AArray<(.*)>/i
323
- # check to ensure the input is an array given that the attribute
324
- # is documented as an array but the input is not
325
- if attributes[self.class.attribute_map[key]].is_a?(Array)
326
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
327
- end
328
- elsif !attributes[self.class.attribute_map[key]].nil?
329
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
330
- end # or else data not found in attributes(hash), not an issue as the data can be optional
307
+ # Builds the object from hash
308
+ # @param [Hash] attributes Model attributes in the form of hash
309
+ # @return [Object] Returns the model itself
310
+ def self.build_from_hash(attributes)
311
+ new.build_from_hash(attributes)
312
+ end
313
+
314
+ # Builds the object from hash
315
+ # @param [Hash] attributes Model attributes in the form of hash
316
+ # @return [Object] Returns the model itself
317
+ def build_from_hash(attributes)
318
+ return nil unless attributes.is_a?(Hash)
319
+ self.class.openapi_types.each_pair do |key, type|
320
+ if type =~ /\AArray<(.*)>/i
321
+ # check to ensure the input is an array given that the attribute
322
+ # is documented as an array but the input is not
323
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
324
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
331
325
  end
326
+ elsif !attributes[self.class.attribute_map[key]].nil?
327
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
328
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
329
+ end
332
330
 
333
- self
334
- end
331
+ self
332
+ end
335
333
 
336
- # Deserializes the data based on type
337
- # @param string type Data type
338
- # @param string value Value to be deserialized
339
- # @return [Object] Deserialized data
340
- def _deserialize(type, value)
341
- case type.to_sym
342
- when :DateTime
343
- DateTime.parse(value)
344
- when :Date
345
- Date.parse(value)
346
- when :String
347
- value.to_s
348
- when :Integer
349
- value.to_i
350
- when :Float
351
- value.to_f
352
- when :Boolean
353
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
354
- true
355
- else
356
- false
357
- end
358
- when :Object
359
- # generic object (usually a Hash), return directly
360
- value
361
- when /\AArray<(?<inner_type>.+)>\z/
362
- inner_type = Regexp.last_match[:inner_type]
363
- value.map { |v| _deserialize(inner_type, v) }
364
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
365
- k_type = Regexp.last_match[:k_type]
366
- v_type = Regexp.last_match[:v_type]
367
- {}.tap do |hash|
368
- value.each do |k, v|
369
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
370
- end
371
- end
372
- else # model
373
- Hubspot::Client::OAuth::Models.const_get(type).build_from_hash(value)
334
+ # Deserializes the data based on type
335
+ # @param string type Data type
336
+ # @param string value Value to be deserialized
337
+ # @return [Object] Deserialized data
338
+ def _deserialize(type, value)
339
+ case type.to_sym
340
+ when :DateTime
341
+ DateTime.parse(value)
342
+ when :Date
343
+ Date.parse(value)
344
+ when :String
345
+ value.to_s
346
+ when :Integer
347
+ value.to_i
348
+ when :Float
349
+ value.to_f
350
+ when :Boolean
351
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
352
+ true
353
+ else
354
+ false
355
+ end
356
+ when :Object
357
+ # generic object (usually a Hash), return directly
358
+ value
359
+ when /\AArray<(?<inner_type>.+)>\z/
360
+ inner_type = Regexp.last_match[:inner_type]
361
+ value.map { |v| _deserialize(inner_type, v) }
362
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
363
+ k_type = Regexp.last_match[:k_type]
364
+ v_type = Regexp.last_match[:v_type]
365
+ {}.tap do |hash|
366
+ value.each do |k, v|
367
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
374
368
  end
375
369
  end
370
+ else # model
371
+ Hubspot::OAuth.const_get(type).build_from_hash(value)
372
+ end
373
+ end
376
374
 
377
- # Returns the string representation of the object
378
- # @return [String] String presentation of the object
379
- def to_s
380
- to_hash.to_s
381
- end
375
+ # Returns the string representation of the object
376
+ # @return [String] String presentation of the object
377
+ def to_s
378
+ to_hash.to_s
379
+ end
382
380
 
383
- # to_body is an alias to to_hash (backward compatibility)
384
- # @return [Hash] Returns the object in the form of hash
385
- def to_body
386
- to_hash
387
- end
381
+ # to_body is an alias to to_hash (backward compatibility)
382
+ # @return [Hash] Returns the object in the form of hash
383
+ def to_body
384
+ to_hash
385
+ end
388
386
 
389
- # Returns the object in the form of hash
390
- # @return [Hash] Returns the object in the form of hash
391
- def to_hash
392
- hash = {}
393
- self.class.attribute_map.each_pair do |attr, param|
394
- value = self.send(attr)
395
- if value.nil?
396
- is_nullable = self.class.openapi_nullable.include?(attr)
397
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
398
- end
399
-
400
- hash[param] = _to_hash(value)
401
- end
402
- hash
387
+ # Returns the object in the form of hash
388
+ # @return [Hash] Returns the object in the form of hash
389
+ def to_hash
390
+ hash = {}
391
+ self.class.attribute_map.each_pair do |attr, param|
392
+ value = self.send(attr)
393
+ if value.nil?
394
+ is_nullable = self.class.openapi_nullable.include?(attr)
395
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
403
396
  end
397
+
398
+ hash[param] = _to_hash(value)
399
+ end
400
+ hash
401
+ end
404
402
 
405
- # Outputs non-array value in the form of hash
406
- # For object, use to_hash. Otherwise, just return the value
407
- # @param [Object] value Any valid value
408
- # @return [Hash] Returns the value in the form of hash
409
- def _to_hash(value)
410
- if value.is_a?(Array)
411
- value.compact.map { |v| _to_hash(v) }
412
- elsif value.is_a?(Hash)
413
- {}.tap do |hash|
414
- value.each { |k, v| hash[k] = _to_hash(v) }
415
- end
416
- elsif value.respond_to? :to_hash
417
- value.to_hash
418
- else
419
- value
420
- end
403
+ # Outputs non-array value in the form of hash
404
+ # For object, use to_hash. Otherwise, just return the value
405
+ # @param [Object] value Any valid value
406
+ # @return [Hash] Returns the value in the form of hash
407
+ def _to_hash(value)
408
+ if value.is_a?(Array)
409
+ value.compact.map { |v| _to_hash(v) }
410
+ elsif value.is_a?(Hash)
411
+ {}.tap do |hash|
412
+ value.each { |k, v| hash[k] = _to_hash(v) }
421
413
  end
414
+ elsif value.respond_to? :to_hash
415
+ value.to_hash
416
+ else
417
+ value
422
418
  end
423
419
  end
424
420
  end