hubspot-api-client 7.1.0 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +41 -0
- data/lib/hubspot/codegen/cms/hubdb/api/default_api.rb +2090 -0
- data/lib/hubspot/codegen/cms/hubdb/api_client.rb +422 -0
- data/lib/hubspot/codegen/cms/hubdb/api_error.rb +61 -0
- data/lib/hubspot/codegen/cms/hubdb/configuration.rb +251 -0
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3.rb +217 -0
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +215 -0
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +217 -0
- data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +333 -0
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3.rb +240 -0
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3.rb +240 -0
- data/lib/hubspot/codegen/cms/hubdb/models/column.rb +388 -0
- data/lib/hubspot/codegen/cms/hubdb/models/column_input.rb +288 -0
- data/lib/hubspot/codegen/cms/hubdb/models/error.rb +292 -0
- data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +243 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +241 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +291 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input.rb +243 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +383 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_input.rb +295 -0
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +241 -0
- data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +263 -0
- data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/cms/hubdb/models/option.rb +257 -0
- data/lib/hubspot/codegen/cms/hubdb/models/paging.rb +219 -0
- data/lib/hubspot/codegen/cms/hubdb/models/previous_page.rb +224 -0
- data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +257 -0
- data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +405 -0
- data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +309 -0
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +96 -0
- data/lib/hubspot/codegen/crm/objects/api_client.rb +424 -0
- data/lib/hubspot/codegen/crm/objects/api_error.rb +61 -0
- data/lib/hubspot/codegen/crm/objects/configuration.rb +258 -0
- data/lib/hubspot/codegen/crm/objects/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_batch_input.rb +217 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_id.rb +217 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_input.rb +217 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_read_input_simple_public_object_id.rb +242 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_response_simple_public_object.rb +313 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_response_simple_public_object_with_errors.rb +333 -0
- data/lib/hubspot/codegen/crm/objects/models/collection_response_associated_id.rb +226 -0
- data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object.rb +226 -0
- data/lib/hubspot/codegen/crm/objects/models/collection_response_with_total_simple_public_object.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/models/error.rb +292 -0
- data/lib/hubspot/codegen/crm/objects/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/crm/objects/models/filter.rb +272 -0
- data/lib/hubspot/codegen/crm/objects/models/filter_group.rb +217 -0
- data/lib/hubspot/codegen/crm/objects/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/crm/objects/models/paging.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/models/previous_page.rb +224 -0
- data/lib/hubspot/codegen/crm/objects/models/public_object_search_request.rb +286 -0
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object_batch_input.rb +231 -0
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object_id.rb +215 -0
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object_input.rb +217 -0
- data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +478 -0
- data/lib/hubspot/codegen/crm/schemas/api/default_api.rb +84 -0
- data/lib/hubspot/codegen/crm/schemas/api_client.rb +424 -0
- data/lib/hubspot/codegen/crm/schemas/api_error.rb +61 -0
- data/lib/hubspot/codegen/crm/schemas/configuration.rb +258 -0
- data/lib/hubspot/codegen/crm/schemas/models/association_definition.rb +350 -0
- data/lib/hubspot/codegen/crm/schemas/models/association_definition_egg.rb +315 -0
- data/lib/hubspot/codegen/crm/schemas/models/collection_response_object_schema.rb +226 -0
- data/lib/hubspot/codegen/crm/schemas/models/error.rb +292 -0
- data/lib/hubspot/codegen/crm/schemas/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/crm/schemas/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_schema.rb +389 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_schema_egg.rb +325 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_type_definition.rb +364 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_type_definition_labels.rb +221 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_type_definition_patch.rb +265 -0
- data/lib/hubspot/codegen/crm/schemas/models/object_type_property_create.rb +356 -0
- data/lib/hubspot/codegen/crm/schemas/models/option.rb +266 -0
- data/lib/hubspot/codegen/crm/schemas/models/option_input.rb +271 -0
- data/lib/hubspot/codegen/crm/schemas/models/paging.rb +219 -0
- data/lib/hubspot/codegen/crm/schemas/models/previous_page.rb +224 -0
- data/lib/hubspot/codegen/crm/schemas/models/property.rb +465 -0
- data/lib/hubspot/codegen/crm/schemas/models/property_modification_metadata.rb +252 -0
- data/lib/hubspot/version.rb +1 -1
- data/lib/hubspot-api-client.rb +86 -0
- data/sample-apps/companies-app/.env +4 -0
- data/sample-apps/companies-app/Gemfile.lock +2 -2
- data/sample-apps/companies-app/app/lib/services/hubspot/associations/create.rb +1 -1
- data/sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb +1 -1
- data/sample-apps/companies-app/app/lib/services/hubspot/associations/get_by_id.rb +2 -2
- data/sample-apps/companies-app/app/lib/services/hubspot/companies/create.rb +1 -1
- data/sample-apps/companies-app/app/lib/services/hubspot/companies/search.rb +1 -1
- data/sample-apps/companies-app/app/lib/services/hubspot/companies/update.rb +1 -2
- data/sample-apps/companies-app/app/lib/services/hubspot/contacts/search.rb +1 -1
- data/sample-apps/companies-app/db/development.sqlite3 +0 -0
- data/sample-apps/companies-app/log/development.log +9651 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/05/053IomYcNFTvqinXbDGqg6suuCpMwg3_qV12AK4ccx8.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/0B/0BGoINhViZ8xxoxODKNlHCXeopOIVGkZv9GAbzCCrZA.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/1J/1JnNlMoorvDaAcLChcV1QOiqJyanmoUydnfe5-TPuXM.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/1m/1mRwQeI_697SJNgSakVyU5vtV9tpeQ3aUvIyW2cHhMs.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/2N/2NtH32KGXJ77tP3Eqh6uLR51KNm1OVXMHhMmPwFdosI.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/2h/2hVm3bNa9JCxAsLCxbvspAtiL4VOtRTjXMSPw8eT9xk.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/3-/3-EQcCNxYxUGN8o8H9QP_4IuaSB9GPsR0C-PObnR7s8.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/41/41_29mpjEGapjHdofSi36OnnO3-eBNYbCe5nzHnIKwY.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/4r/4rc8SkywVdYO98mj9mHirVzuhN_EeOMM3Lt3rugoOJs.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/61/61XTQQp3JN2SQH4_rfFy4gSk4pMiTt8me_AumxnvBNw.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/9V/9VF8D3PaGXBXsH74TVS8KHuWDA_6IiSdXMilLhBQisM.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/A4/A4dS-Tck_QocRHBsc08nLD48snD4G6ewTLWwpkgdMOQ.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Du/DuRFhtIpu9n_mgamwyOra33hIUFOga8HYS-GSeWds9E.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/EC/EC2j6BCJ8TnspQFZeViwqN9QJH0fdqH7HvaNE6RzBxc.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Fp/FprMIwFBZYrEWraVY7BWLI8zyHb9bwBIcAGNdpYm1Qo.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/HP/HPdtqZdA1TM-sHs8oqrhAtNiPhPcRT9eX9Ol7MnE_Bw.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Hc/Hcu6WwbYbe7vdpSCb0xXIKhaJsPWI3ClhXNHSX7tDGI.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/JS/JSG-U0jab1xh5XD7sVL6JOKyu09pfMxV-xrBJe_JO74.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/LZ/LZDNDSBrMmCeKXHrWTWu3KifeJk8ttcNGuQa4fHLxeA.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Lh/LhI9Ge3PcQ_C89Ur42bKAIpIRT8TiDpipKToFBtEQeE.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/NF/NFP_eGmF5C6AoAtwpzQ--fUDgWzSatMkmaOg6MIZRsQ.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/NO/NOuX3u7ZLUewXKk_nPmLL5J6VkswjP1ZmCyZ1BzJXw4.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Oy/OyUbp1l8zWzyp-bagPDb2l_Q7vp5qVbtWwVFV0hBbbM.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/QM/QMyYX6f-edvoA70P385xdnqFw26fL-P9OtifvwXojp8.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/U4/U466McG48IRBn70OWh5BO3nYPsXgKrEXHkrftg0xCLQ.cache +3 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Up/Upbt8ro5KXzYO6uyhFdI4KEXO-PUKaMitXFMEKCsfWA.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Vr/Vr4UNxcDzlkx9ESuVbgI_Mb-fZcsczNERjGUj7FX7Io.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/Wh/WhFvj_7aBvrXx2AKx8-AVa6XnrEDLW1hRtQ7l08Ln58.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/ZU/ZUKJTVw3DLZSVGlveWzrhvo4GduUbQScJeICRDN8tdo.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/a3/a3AG-gARa2g-lIPGvcOkQvEfuvwICCxJd8zgE1bzLhE.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/c1/c17XEWohQCmDJUizcCXxGsOyG46k1SwuJghS8WDTpTw.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/dB/dB924pSiDrX_NqB-BmfdpToGXDZV6PINJB0ZDvM3tdg.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/dg/dg8xDUB026KlWVbRE1h_SZ6gEPR6g81HrTkUIimQzqc.cache +3 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/gv/gvq1z6PDRE8gMtaUq2in1i3UzX2ALHQQDyu4rktAnlM.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/kX/kXwRD1nb3DhVhF7hOQ5XyWT3MbPg9czHAQgVjCGZ4mc.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/nF/nFSeMjJCygNSOQ27hdJwySwUPyh3vBaiXljrHxeQCfc.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/pF/pFK-AXLRfIZQbNkoSeGwKVKqJtkz_-WxAlFUbspYW3o.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/sb/sbdra4MXru4fxHN_jrd3o4d3VFPFyG3lI247mddfTUk.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/tK/tKCKU24QLnDe4Wb5ytXkeZ42k7bpBNPmmTRcnTqC18o.cache +1 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/up/upaGCA7w36yB4Tws-rJDm6zL9b8MvnhZ0TUcpzwH_vg.cache +0 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/x2/x2sUH1UpS_RN1OlRKq_HmaXualaBizKVLTALZBT5VKo.cache +2 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/yL/yLiDuY3PPQgAmxWaulR4bejdG-_VXuSIqbmkWlntOys.cache +3 -0
- data/sample-apps/companies-app/tmp/cache/assets/sprockets/v3.0/zQ/zQQ-w-Xtu6gctPGaSXSDgmkcLte6siHhFoXxmJX9-0E.cache +1 -0
- data/sample-apps/companies-app/tmp/development_secret.txt +1 -0
- data/sample-apps/companies-app/tmp/restart.txt +0 -0
- data/sample-apps/contacts-app/.env +1 -3
- data/sample-apps/contacts-app/.env.test +3 -0
- data/sample-apps/contacts-app/Gemfile.lock +2 -2
- data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/create.rb +1 -1
- data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/search.rb +1 -1
- data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb +1 -2
- data/sample-apps/contacts-app/app/lib/services/hubspot/properties/create.rb +1 -2
- data/sample-apps/contacts-app/app/lib/services/hubspot/properties/update.rb +1 -2
- data/sample-apps/contacts-app/db/test.sqlite3 +0 -0
- data/sample-apps/contacts-app/log/development.log +366 -0
- data/sample-apps/contacts-app/log/test.log +81 -0
- data/sample-apps/contacts-app/tmp/cache/assets/sprockets/v3.0/1Y/1YZtqickyeZ_JcII96hylY6lF7sxNkbgA85xfEwrRiI.cache +0 -0
- data/sample-apps/contacts-app/tmp/cache/assets/sprockets/v3.0/2l/2lwE97im5rEyOKzkyeiXzzKA4wJvO1a-4bRF4jVlcfc.cache +1 -0
- data/sample-apps/contacts-app/tmp/cache/assets/sprockets/v3.0/HQ/HQOePM7-Xd6f4RPYUzU9DhU7j7x58rgm9Ji25xcZqfs.cache +0 -0
- data/sample-apps/contacts-app/tmp/cache/assets/sprockets/v3.0/Kq/KqqfCu7F4dbV5xwLoXZcLoIgZKbHa_QnB1AwY0F_sw4.cache +0 -0
- data/sample-apps/contacts-app/tmp/cache/assets/sprockets/v3.0/qP/qPZh8f6IbfC6CMuapwQb1TgwVDd0LGY42KwWM1dMHdk.cache +1 -1
- data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
- data/sample-apps/leaky-bucket-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
- data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/create.rb +1 -1
- data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/search.rb +1 -1
- data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb +1 -2
- data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/archive_batch.rb +1 -1
- data/sample-apps/rate-limits-redis-sample-app/app/lib/services/hubspot/contacts/create_batch.rb +1 -1
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/contacts/search.rb +1 -1
- data/sample-apps/search-result-paging-app/app/lib/services/hubspot/properties/create.rb +1 -2
- data/sample-apps/timeline-events-app/.env +6 -0
- data/sample-apps/timeline-events-app/.env.template +5 -0
- data/sample-apps/timeline-events-app/.gitignore +35 -0
- data/sample-apps/timeline-events-app/.rspec +1 -0
- data/sample-apps/timeline-events-app/.ruby-version +1 -0
- data/sample-apps/timeline-events-app/Dockerfile +22 -0
- data/sample-apps/timeline-events-app/Gemfile +33 -0
- data/sample-apps/timeline-events-app/Gemfile.lock +271 -0
- data/sample-apps/timeline-events-app/README.md +30 -0
- data/sample-apps/timeline-events-app/Rakefile +6 -0
- data/sample-apps/timeline-events-app/app/assets/config/manifest.js +3 -0
- data/sample-apps/timeline-events-app/app/assets/images/.keep +0 -0
- data/sample-apps/timeline-events-app/app/assets/javascripts/application.js +15 -0
- data/sample-apps/timeline-events-app/app/assets/javascripts/cable.js +13 -0
- data/sample-apps/timeline-events-app/app/assets/javascripts/channels/.keep +0 -0
- data/sample-apps/timeline-events-app/app/assets/stylesheets/application.css +171 -0
- data/sample-apps/timeline-events-app/app/controllers/application_controller.rb +12 -0
- data/sample-apps/timeline-events-app/app/controllers/concerns/.keep +0 -0
- data/sample-apps/timeline-events-app/app/controllers/concerns/exception_handler.rb +12 -0
- data/sample-apps/timeline-events-app/app/controllers/oauth/authorization_controller.rb +19 -0
- data/sample-apps/timeline-events-app/app/controllers/timeline_events_controller.rb +37 -0
- data/sample-apps/timeline-events-app/app/helpers/application_helper.rb +2 -0
- data/sample-apps/timeline-events-app/app/lib/services/authorization/authorize_hubspot.rb +15 -0
- data/sample-apps/timeline-events-app/app/lib/services/authorization/get_authorization_uri.rb +33 -0
- data/sample-apps/timeline-events-app/app/lib/services/authorization/tokens/base.rb +19 -0
- data/sample-apps/timeline-events-app/app/lib/services/authorization/tokens/generate.rb +26 -0
- data/sample-apps/timeline-events-app/app/lib/services/authorization/tokens/refresh.rb +33 -0
- data/sample-apps/timeline-events-app/app/lib/services/hubspot/contacts/search.rb +37 -0
- data/sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_event.rb +20 -0
- data/sample-apps/timeline-events-app/app/lib/services/hubspot/timeline/create_template.rb +39 -0
- data/sample-apps/timeline-events-app/app/models/application_record.rb +3 -0
- data/sample-apps/timeline-events-app/app/models/concerns/.keep +0 -0
- data/sample-apps/timeline-events-app/app/views/layouts/application.html.erb +23 -0
- data/sample-apps/timeline-events-app/app/views/oauth/authorization/login.html.erb +15 -0
- data/sample-apps/timeline-events-app/app/views/shared/_header.html.erb +12 -0
- data/sample-apps/timeline-events-app/app/views/timeline_events/index.html.erb +53 -0
- data/sample-apps/timeline-events-app/bin/bundle +3 -0
- data/sample-apps/timeline-events-app/bin/rails +9 -0
- data/sample-apps/timeline-events-app/bin/rake +9 -0
- data/sample-apps/timeline-events-app/bin/setup +36 -0
- data/sample-apps/timeline-events-app/bin/spring +17 -0
- data/sample-apps/timeline-events-app/bin/update +31 -0
- data/sample-apps/timeline-events-app/bin/yarn +11 -0
- data/sample-apps/timeline-events-app/config/application.rb +19 -0
- data/sample-apps/timeline-events-app/config/boot.rb +3 -0
- data/sample-apps/timeline-events-app/config/database.yml +25 -0
- data/sample-apps/timeline-events-app/config/environment.rb +5 -0
- data/sample-apps/timeline-events-app/config/environments/development.rb +61 -0
- data/sample-apps/timeline-events-app/config/environments/production.rb +94 -0
- data/sample-apps/timeline-events-app/config/environments/test.rb +46 -0
- data/sample-apps/timeline-events-app/config/initializers/assets.rb +14 -0
- data/sample-apps/timeline-events-app/config/initializers/filter_parameter_logging.rb +4 -0
- data/sample-apps/timeline-events-app/config/initializers/hubspot-api-client.rb +3 -0
- data/sample-apps/timeline-events-app/config/initializers/mime_types.rb +1 -0
- data/sample-apps/timeline-events-app/config/initializers/wrap_parameters.rb +14 -0
- data/sample-apps/timeline-events-app/config/locales/en.yml +33 -0
- data/sample-apps/timeline-events-app/config/puma.rb +34 -0
- data/sample-apps/timeline-events-app/config/routes.rb +7 -0
- data/sample-apps/timeline-events-app/config/spring.rb +6 -0
- data/sample-apps/timeline-events-app/config.ru +5 -0
- data/sample-apps/timeline-events-app/db/development.sqlite3 +0 -0
- data/sample-apps/timeline-events-app/db/seeds.rb +7 -0
- data/sample-apps/timeline-events-app/docker-compose.yml +11 -0
- data/sample-apps/timeline-events-app/docker-entrypoint.sh +8 -0
- data/sample-apps/timeline-events-app/lib/assets/.keep +0 -0
- data/sample-apps/timeline-events-app/lib/tasks/.keep +0 -0
- data/sample-apps/timeline-events-app/log/.keep +0 -0
- data/sample-apps/timeline-events-app/log/development.log +233 -0
- data/sample-apps/timeline-events-app/package.json +5 -0
- data/sample-apps/timeline-events-app/public/404.html +67 -0
- data/sample-apps/timeline-events-app/public/422.html +67 -0
- data/sample-apps/timeline-events-app/public/500.html +66 -0
- data/sample-apps/timeline-events-app/public/apple-touch-icon-precomposed.png +0 -0
- data/sample-apps/timeline-events-app/public/apple-touch-icon.png +0 -0
- data/sample-apps/timeline-events-app/public/favicon.ico +0 -0
- data/sample-apps/timeline-events-app/public/robots.txt +1 -0
- data/sample-apps/timeline-events-app/spec/rails_helper.rb +42 -0
- data/sample-apps/timeline-events-app/spec/spec_helper.rb +11 -0
- data/sample-apps/timeline-events-app/tmp/.keep +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/-4/-4csb8XcQONHVcyTGO-F2TBp5f38ghhZHcLg3cqyqGo.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/-s/-sz9D51o9Mpd_omN4pJY1EYoyEa63QWgr9CkNp-jtps.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/1J/1JnNlMoorvDaAcLChcV1QOiqJyanmoUydnfe5-TPuXM.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/1m/1mRwQeI_697SJNgSakVyU5vtV9tpeQ3aUvIyW2cHhMs.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/2N/2NtH32KGXJ77tP3Eqh6uLR51KNm1OVXMHhMmPwFdosI.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/2h/2hVm3bNa9JCxAsLCxbvspAtiL4VOtRTjXMSPw8eT9xk.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/41/41_29mpjEGapjHdofSi36OnnO3-eBNYbCe5nzHnIKwY.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/60/609vj6Xv1ogaZ1W1H_oBuo-3NqC3UqbKAXw2ekEcehU.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/61/61XTQQp3JN2SQH4_rfFy4gSk4pMiTt8me_AumxnvBNw.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/6p/6pPimSDuw-hEAZW4CkGVIt9wjYiTMaCD2XPuKQoiI4Q.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/7J/7JspjJWUyNJySsbLlEs8anll3WiAM20dZ2sYA0gAhMI.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/9N/9NrK08Zz2zuDH5uff0al0ZhRW0kOe3KP7KSyfZDcWfg.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/9V/9VF8D3PaGXBXsH74TVS8KHuWDA_6IiSdXMilLhBQisM.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/9c/9cJSDPxEgTHO5-B9Ln7Tmok9fbsxmk1HYf-W-gkEg_I.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/AE/AE-AZVyOjAgA1j71HRmlDGNdoT6aOAMNrvEsZxDVMzU.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/AF/AFacZJ15zJm8o8Bwesmpsw2GC-o4mNEAhT87cuTM_wE.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/B6/B6MZ8qg-mV5hZWBQ5HB80eAXCr4gyrJR5Yrm4BiSTdU.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/D0/D01xXzz6r1DGdB4yVwcPaLEp7-mpzCd2m3enZVNJtFU.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Du/DuRFhtIpu9n_mgamwyOra33hIUFOga8HYS-GSeWds9E.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/EC/EC2j6BCJ8TnspQFZeViwqN9QJH0fdqH7HvaNE6RzBxc.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Ey/EyQsquE_D1TCQQbh-3vmLjQzYO7w9ZRqo7tDg5VpC7Q.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Fp/FprMIwFBZYrEWraVY7BWLI8zyHb9bwBIcAGNdpYm1Qo.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/JS/JSG-U0jab1xh5XD7sVL6JOKyu09pfMxV-xrBJe_JO74.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Lh/LhI9Ge3PcQ_C89Ur42bKAIpIRT8TiDpipKToFBtEQeE.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Mv/MvRTlknGa6_mRdF7m9I2jPIPCQ9a-RyzBwkgecBbZQ8.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/OF/OFMeLotCkEst9CGQgQZtf5RZNaVhcrLOPJeSWszn-aw.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/RJ/RJ-ZWnzIrbCdeg0pVWbccBZiePyfi50zo0xb1Tbhh80.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/RU/RUOojm-aD-XrIy-K6cbUI9czQdjnW9_Bt45wId068iM.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Tx/TxdcnqzvySOuWPXZfaIYX0TOpCy44repbAScKtV2niE.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/U4/U466McG48IRBn70OWh5BO3nYPsXgKrEXHkrftg0xCLQ.cache +3 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/UW/UWFYTnxz4EWqiz0LkhxInMLo36CdlVg3x9SyzAnLiBU.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Up/Upbt8ro5KXzYO6uyhFdI4KEXO-PUKaMitXFMEKCsfWA.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/V8/V8wr1RK4MTLGwxThiZIb0G-SrIusNzCMhJeHGGHT72Q.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Wh/WhFvj_7aBvrXx2AKx8-AVa6XnrEDLW1hRtQ7l08Ln58.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Wt/WtCfdoaaBC0aPmNgc57xHk8dbNRqZcP5zOpcLpiGzoc.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Wz/WzRw7cbmE45MrdG0W25ZAT-Nz0glf7xBkB2nI0M7z7A.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/Xi/XiZmZbrcb0M-y7EJZkx1ft177jFiZCL7pbpp6cRZaTA.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/ZU/ZUKJTVw3DLZSVGlveWzrhvo4GduUbQScJeICRDN8tdo.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/_w/_w2qaD3e5UPMGQeZYpP481jnQLVeIXIVH2vQx2856QY.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/dg/dg8xDUB026KlWVbRE1h_SZ6gEPR6g81HrTkUIimQzqc.cache +3 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/eX/eXRXZi-sk9Oy17fc94B24coFT6Jn93gCZI0SahPx7U4.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/ey/eyQx5cIdM2CoBrdF3izBgEAY4OxjhcWr4O4xz132au8.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/fW/fWunpu-z9IEGhI1uwayT47VSyYTtQkphog4WkrSKAiw.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/gB/gBgBWy2c1z2A2HykdtIz7OYGnHIRDzbk092kh5b6jaE.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/gv/gvq1z6PDRE8gMtaUq2in1i3UzX2ALHQQDyu4rktAnlM.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/hA/hAQloq4iFKlI32gRuBj7Qw-S3_fk622RHC7B3bKQcGM.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/j3/j3r-jelmETDRd-G19KKXI0QM5g991nlcbUwXBnRnNQE.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/k1/k1S4UmDyDiVdoVjxFVnT7PjryGZlRLlg6Rbiv263PC8.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/kX/kXwRD1nb3DhVhF7hOQ5XyWT3MbPg9czHAQgVjCGZ4mc.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/kb/kbxkYCk1EgNiJrtaLBYcKjpLawXPyY26vtsvLwAGuRs.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/lG/lGngG8GuW7NOMaJJjbCUpaUmPukNz5qTAuDFKUeQGD8.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/mE/mE5ux5CqyC__7A31roQaIrItQDaC4e3O1ccQpHEzf3A.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/mf/mfGViGcXdNxYP-Fj1h1q2YL8V4R9hdRw-pbcz44ykGo.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/n_/n_AnmncFkjyQrNIMt47ODfSQL8Ah5cY4UKW1IThyYyg.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/ne/nehoEMwTN_YXNZspteBmbCj-55v4o0wq_nnFJCPVtUk.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/nf/nfLIHBgXq65X45t_2QaQM3smByR8wIxjzXL0A1bb9NU.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/pF/pFK-AXLRfIZQbNkoSeGwKVKqJtkz_-WxAlFUbspYW3o.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/q8/q8cA8tJbgodCWeH8qLt9pac6Ig-wK4v5aiJ6VV6-bHw.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/sD/sDQm06qCaywVxzpOwjngjtCXxSMXqwixf0n0xD0IHHw.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/sb/sbdra4MXru4fxHN_jrd3o4d3VFPFyG3lI247mddfTUk.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/w7/w7U6DzTbVwmZ8JqXhirzDvr-HGtiCEIpNHRQtLc7M68.cache +2 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/wd/wdx03MG0LBtOSdemZvED30U1i-V5s75E7207MC6TGTI.cache +0 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/yL/yLiDuY3PPQgAmxWaulR4bejdG-_VXuSIqbmkWlntOys.cache +3 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/yb/ybRqqIyo6H-rkIwoBZp14cENSoSgyZqa1XAUKLV1zpk.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/cache/assets/sprockets/v3.0/yj/yjlHOIhrAzNkiA_SiyRZKIkEwaC0rktB1TVequSKqjc.cache +1 -0
- data/sample-apps/timeline-events-app/tmp/development_secret.txt +1 -0
- data/sample-apps/timeline-events-app/tmp/restart.txt +0 -0
- data/sample-apps/webhooks-contacts-app/app/lib/services/hubspot/contacts/get_batch.rb +1 -4
- metadata +283 -2
@@ -0,0 +1,251 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module Hubspot
|
14
|
+
module Cms
|
15
|
+
module Hubdb
|
16
|
+
class Configuration
|
17
|
+
# Defines url scheme
|
18
|
+
attr_accessor :scheme
|
19
|
+
|
20
|
+
# Defines url host
|
21
|
+
attr_accessor :host
|
22
|
+
|
23
|
+
# Defines url base path
|
24
|
+
attr_accessor :base_path
|
25
|
+
|
26
|
+
# Defines API keys used with API Key authentications.
|
27
|
+
#
|
28
|
+
# @return [Hash] key: parameter name, value: parameter value (API key)
|
29
|
+
#
|
30
|
+
# @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
|
31
|
+
# config.api_key['api_key'] = 'xxx'
|
32
|
+
attr_accessor :api_key
|
33
|
+
|
34
|
+
# Defines API key prefixes used with API Key authentications.
|
35
|
+
#
|
36
|
+
# @return [Hash] key: parameter name, value: API key prefix
|
37
|
+
#
|
38
|
+
# @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
|
39
|
+
# config.api_key_prefix['api_key'] = 'Token'
|
40
|
+
attr_accessor :api_key_prefix
|
41
|
+
|
42
|
+
# Defines the username used with HTTP basic authentication.
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
attr_accessor :username
|
46
|
+
|
47
|
+
# Defines the password used with HTTP basic authentication.
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :password
|
51
|
+
|
52
|
+
# Defines the access token (Bearer) used with OAuth2.
|
53
|
+
attr_accessor :access_token
|
54
|
+
|
55
|
+
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
56
|
+
# details will be logged with `logger.debug` (see the `logger` attribute).
|
57
|
+
# Default to false.
|
58
|
+
#
|
59
|
+
# @return [true, false]
|
60
|
+
attr_accessor :debugging
|
61
|
+
|
62
|
+
# Defines the logger used for debugging.
|
63
|
+
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
64
|
+
#
|
65
|
+
# @return [#debug]
|
66
|
+
attr_accessor :logger
|
67
|
+
|
68
|
+
# Defines the temporary folder to store downloaded files
|
69
|
+
# (for API endpoints that have file response).
|
70
|
+
# Default to use `Tempfile`.
|
71
|
+
#
|
72
|
+
# @return [String]
|
73
|
+
attr_accessor :temp_folder_path
|
74
|
+
|
75
|
+
# The time limit for HTTP request in seconds.
|
76
|
+
# Default to 0 (never times out).
|
77
|
+
attr_accessor :timeout
|
78
|
+
|
79
|
+
# Set this to false to skip client side validation in the operation.
|
80
|
+
# Default to true.
|
81
|
+
# @return [true, false]
|
82
|
+
attr_accessor :client_side_validation
|
83
|
+
|
84
|
+
### TLS/SSL setting
|
85
|
+
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
86
|
+
# Default to true.
|
87
|
+
#
|
88
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
89
|
+
#
|
90
|
+
# @return [true, false]
|
91
|
+
attr_accessor :ssl_verify
|
92
|
+
|
93
|
+
### TLS/SSL setting
|
94
|
+
# Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html)
|
95
|
+
#
|
96
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
97
|
+
#
|
98
|
+
attr_accessor :ssl_verify_mode
|
99
|
+
|
100
|
+
### TLS/SSL setting
|
101
|
+
# Set this to customize the certificate file to verify the peer.
|
102
|
+
#
|
103
|
+
# @return [String] the path to the certificate file
|
104
|
+
attr_accessor :ssl_ca_file
|
105
|
+
|
106
|
+
### TLS/SSL setting
|
107
|
+
# Client certificate file (for client certificate)
|
108
|
+
attr_accessor :ssl_client_cert
|
109
|
+
|
110
|
+
### TLS/SSL setting
|
111
|
+
# Client private key file (for client certificate)
|
112
|
+
attr_accessor :ssl_client_key
|
113
|
+
|
114
|
+
# Set this to customize parameters encoding of array parameter with multi collectionFormat.
|
115
|
+
# Default to nil.
|
116
|
+
#
|
117
|
+
# @see The params_encoding option of Ethon. Related source code:
|
118
|
+
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
119
|
+
attr_accessor :params_encoding
|
120
|
+
|
121
|
+
attr_accessor :inject_format
|
122
|
+
|
123
|
+
attr_accessor :force_ending_format
|
124
|
+
|
125
|
+
attr_accessor :error_handler
|
126
|
+
|
127
|
+
def initialize
|
128
|
+
@scheme = 'https'
|
129
|
+
@host = 'api.hubapi.com'
|
130
|
+
@base_path = ''
|
131
|
+
@api_key = {}
|
132
|
+
@api_key_prefix = {}
|
133
|
+
@timeout = 0
|
134
|
+
@client_side_validation = true
|
135
|
+
@ssl_verify = true
|
136
|
+
@ssl_verify_mode = nil
|
137
|
+
@ssl_ca_file = nil
|
138
|
+
@ssl_client_cert = nil
|
139
|
+
@ssl_client_key = nil
|
140
|
+
@debugging = false
|
141
|
+
@inject_format = false
|
142
|
+
@force_ending_format = false
|
143
|
+
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
144
|
+
# error_handler params: { 'status_code': { max_retries: ..., seconds_delay: ... }, ... }
|
145
|
+
@error_handler = {}
|
146
|
+
|
147
|
+
yield(self) if block_given?
|
148
|
+
end
|
149
|
+
|
150
|
+
# The default Configuration object.
|
151
|
+
def self.default
|
152
|
+
@@default ||= Configuration.new
|
153
|
+
end
|
154
|
+
|
155
|
+
def configure
|
156
|
+
yield(self) if block_given?
|
157
|
+
end
|
158
|
+
|
159
|
+
def scheme=(scheme)
|
160
|
+
# remove :// from scheme
|
161
|
+
@scheme = scheme.sub(/:\/\//, '')
|
162
|
+
end
|
163
|
+
|
164
|
+
def host=(host)
|
165
|
+
# remove http(s):// and anything after a slash
|
166
|
+
@host = host.sub(/https?:\/\//, '').split('/').first
|
167
|
+
end
|
168
|
+
|
169
|
+
def base_path=(base_path)
|
170
|
+
# Add leading and trailing slashes to base_path
|
171
|
+
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
172
|
+
@base_path = '' if @base_path == '/'
|
173
|
+
end
|
174
|
+
|
175
|
+
def base_url
|
176
|
+
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
177
|
+
end
|
178
|
+
|
179
|
+
# Gets API key (with prefix if set).
|
180
|
+
# @param [String] param_name the parameter name of API key auth
|
181
|
+
def api_key_with_prefix(param_name)
|
182
|
+
if @api_key_prefix[param_name]
|
183
|
+
"#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
|
184
|
+
else
|
185
|
+
@api_key[param_name]
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Gets Basic Auth token string
|
190
|
+
def basic_auth_token
|
191
|
+
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns Auth Settings hash for api client.
|
195
|
+
def auth_settings
|
196
|
+
{
|
197
|
+
'oauth2' =>
|
198
|
+
{
|
199
|
+
type: 'oauth2',
|
200
|
+
in: 'header',
|
201
|
+
key: 'Authorization',
|
202
|
+
value: "Bearer #{access_token}"
|
203
|
+
},
|
204
|
+
}
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns an array of Server setting
|
208
|
+
def server_settings
|
209
|
+
[
|
210
|
+
{
|
211
|
+
url: "https://api.hubapi.com/",
|
212
|
+
description: "No description provided",
|
213
|
+
}
|
214
|
+
]
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns URL based on server settings
|
218
|
+
#
|
219
|
+
# @param index array index of the server settings
|
220
|
+
# @param variables hash of variable and the corresponding value
|
221
|
+
def server_url(index, variables = {})
|
222
|
+
servers = server_settings
|
223
|
+
|
224
|
+
# check array index out of bound
|
225
|
+
if (index < 0 || index >= servers.size)
|
226
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
227
|
+
end
|
228
|
+
|
229
|
+
server = servers[index]
|
230
|
+
url = server[:url]
|
231
|
+
|
232
|
+
# go through variable and assign a value
|
233
|
+
server[:variables].each do |name, variable|
|
234
|
+
if variables.key?(name)
|
235
|
+
if (server[:variables][name][:enum_values].include? variables[name])
|
236
|
+
url.gsub! "{" + name.to_s + "}", variables[name]
|
237
|
+
else
|
238
|
+
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
239
|
+
end
|
240
|
+
else
|
241
|
+
# use default value
|
242
|
+
url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
url
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
@@ -0,0 +1,217 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Hubdb
|
18
|
+
class BatchInputHubDbTableRowV3
|
19
|
+
attr_accessor :inputs
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'inputs' => :'inputs'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'inputs' => :'Array<HubDbTableRowV3>'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
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::Cms::Hubdb::BatchInputHubDbTableRowV3` initialize method"
|
46
|
+
end
|
47
|
+
|
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::Cms::Hubdb::BatchInputHubDbTableRowV3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'inputs')
|
57
|
+
if (value = attributes[:'inputs']).is_a?(Array)
|
58
|
+
self.inputs = value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
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
|
+
if @inputs.nil?
|
68
|
+
invalid_properties.push('invalid value for "inputs", inputs cannot be nil.')
|
69
|
+
end
|
70
|
+
|
71
|
+
invalid_properties
|
72
|
+
end
|
73
|
+
|
74
|
+
# Check to see if the all the properties in the model are valid
|
75
|
+
# @return true if the model is valid
|
76
|
+
def valid?
|
77
|
+
return false if @inputs.nil?
|
78
|
+
true
|
79
|
+
end
|
80
|
+
|
81
|
+
# Checks equality by comparing each attribute.
|
82
|
+
# @param [Object] Object to be compared
|
83
|
+
def ==(o)
|
84
|
+
return true if self.equal?(o)
|
85
|
+
self.class == o.class &&
|
86
|
+
inputs == o.inputs
|
87
|
+
end
|
88
|
+
|
89
|
+
# @see the `==` method
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def eql?(o)
|
92
|
+
self == o
|
93
|
+
end
|
94
|
+
|
95
|
+
# Calculates hash code according to all attributes.
|
96
|
+
# @return [Integer] Hash code
|
97
|
+
def hash
|
98
|
+
[inputs].hash
|
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 self.build_from_hash(attributes)
|
105
|
+
new.build_from_hash(attributes)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
self.class.openapi_types.each_pair do |key, type|
|
114
|
+
if type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :DateTime
|
135
|
+
DateTime.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the string representation of the object
|
170
|
+
# @return [String] String presentation of the object
|
171
|
+
def to_s
|
172
|
+
to_hash.to_s
|
173
|
+
end
|
174
|
+
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
177
|
+
def to_body
|
178
|
+
to_hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the object in the form of hash
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_hash
|
184
|
+
hash = {}
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
186
|
+
value = self.send(attr)
|
187
|
+
if value.nil?
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
|
+
end
|
191
|
+
|
192
|
+
hash[param] = _to_hash(value)
|
193
|
+
end
|
194
|
+
hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Outputs non-array value in the form of hash
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
199
|
+
# @param [Object] value Any valid value
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
201
|
+
def _to_hash(value)
|
202
|
+
if value.is_a?(Array)
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
204
|
+
elsif value.is_a?(Hash)
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
207
|
+
end
|
208
|
+
elsif value.respond_to? :to_hash
|
209
|
+
value.to_hash
|
210
|
+
else
|
211
|
+
value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
@@ -0,0 +1,215 @@
|
|
1
|
+
=begin
|
2
|
+
#HubDB endpoints
|
3
|
+
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables now support `DRAFT` and `PUBLISHED` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Cms
|
17
|
+
module Hubdb
|
18
|
+
class BatchInputJsonNode
|
19
|
+
attr_accessor :inputs
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'inputs' => :'inputs'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'inputs' => :'Array'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
])
|
39
|
+
end
|
40
|
+
|
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::Cms::Hubdb::BatchInputJsonNode` initialize method"
|
46
|
+
end
|
47
|
+
|
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::Cms::Hubdb::BatchInputJsonNode`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
|
+
end
|
53
|
+
h[k.to_sym] = v
|
54
|
+
}
|
55
|
+
|
56
|
+
if attributes.key?(:'inputs')
|
57
|
+
self.inputs = attributes[:'inputs']
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
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
|
+
if @inputs.nil?
|
66
|
+
invalid_properties.push('invalid value for "inputs", inputs cannot be nil.')
|
67
|
+
end
|
68
|
+
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
return false if @inputs.nil?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
inputs == o.inputs
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[inputs].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if type =~ /\AArray<(.*)>/i
|
113
|
+
# check to ensure the input is an array given that the attribute
|
114
|
+
# is documented as an array but the input is not
|
115
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
116
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
117
|
+
end
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
119
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
120
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
121
|
+
end
|
122
|
+
|
123
|
+
self
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deserializes the data based on type
|
127
|
+
# @param string type Data type
|
128
|
+
# @param string value Value to be deserialized
|
129
|
+
# @return [Object] Deserialized data
|
130
|
+
def _deserialize(type, value)
|
131
|
+
case type.to_sym
|
132
|
+
when :DateTime
|
133
|
+
DateTime.parse(value)
|
134
|
+
when :Date
|
135
|
+
Date.parse(value)
|
136
|
+
when :String
|
137
|
+
value.to_s
|
138
|
+
when :Integer
|
139
|
+
value.to_i
|
140
|
+
when :Float
|
141
|
+
value.to_f
|
142
|
+
when :Boolean
|
143
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
when :Object
|
149
|
+
# generic object (usually a Hash), return directly
|
150
|
+
value
|
151
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
152
|
+
inner_type = Regexp.last_match[:inner_type]
|
153
|
+
value.map { |v| _deserialize(inner_type, v) }
|
154
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
155
|
+
k_type = Regexp.last_match[:k_type]
|
156
|
+
v_type = Regexp.last_match[:v_type]
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each do |k, v|
|
159
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
else # model
|
163
|
+
Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the string representation of the object
|
168
|
+
# @return [String] String presentation of the object
|
169
|
+
def to_s
|
170
|
+
to_hash.to_s
|
171
|
+
end
|
172
|
+
|
173
|
+
# to_body is an alias to to_hash (backward compatibility)
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_body
|
176
|
+
to_hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the object in the form of hash
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_hash
|
182
|
+
hash = {}
|
183
|
+
self.class.attribute_map.each_pair do |attr, param|
|
184
|
+
value = self.send(attr)
|
185
|
+
if value.nil?
|
186
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
|
+
end
|
189
|
+
|
190
|
+
hash[param] = _to_hash(value)
|
191
|
+
end
|
192
|
+
hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Outputs non-array value in the form of hash
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
197
|
+
# @param [Object] value Any valid value
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
199
|
+
def _to_hash(value)
|
200
|
+
if value.is_a?(Array)
|
201
|
+
value.compact.map { |v| _to_hash(v) }
|
202
|
+
elsif value.is_a?(Hash)
|
203
|
+
{}.tap do |hash|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
205
|
+
end
|
206
|
+
elsif value.respond_to? :to_hash
|
207
|
+
value.to_hash
|
208
|
+
else
|
209
|
+
value
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|