├── lib ├── hubspot │ ├── version.rb │ ├── discovery │ │ ├── files │ │ │ ├── api │ │ │ │ ├── files_api.rb │ │ │ │ └── folders_api.rb │ │ │ └── client.rb │ │ ├── events │ │ │ ├── api │ │ │ │ └── events_api.rb │ │ │ ├── send │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ └── batch_api.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ ├── oauth │ │ │ ├── api │ │ │ │ ├── tokens_api.rb │ │ │ │ ├── access_tokens_api.rb │ │ │ │ └── refresh_tokens_api.rb │ │ │ └── client.rb │ │ ├── webhooks │ │ │ ├── api │ │ │ │ ├── settings_api.rb │ │ │ │ └── subscriptions_api.rb │ │ │ └── client.rb │ │ ├── communication_preferences │ │ │ ├── api │ │ │ │ ├── status_api.rb │ │ │ │ └── definition_api.rb │ │ │ └── client.rb │ │ ├── cms │ │ │ ├── hubdb │ │ │ │ ├── api │ │ │ │ │ ├── rows_api.rb │ │ │ │ │ ├── tables_api.rb │ │ │ │ │ └── rows_batch_api.rb │ │ │ │ └── client.rb │ │ │ ├── domains │ │ │ │ ├── api │ │ │ │ │ └── domains_api.rb │ │ │ │ └── client.rb │ │ │ ├── pages │ │ │ │ ├── api │ │ │ │ │ ├── site_pages_api.rb │ │ │ │ │ └── landing_pages_api.rb │ │ │ │ └── client.rb │ │ │ ├── site_search │ │ │ │ ├── api │ │ │ │ │ └── public_api.rb │ │ │ │ └── client.rb │ │ │ ├── source_code │ │ │ │ ├── api │ │ │ │ │ ├── content_api.rb │ │ │ │ │ ├── extract_api.rb │ │ │ │ │ ├── metadata_api.rb │ │ │ │ │ └── validation_api.rb │ │ │ │ └── client.rb │ │ │ ├── audit_logs │ │ │ │ ├── api │ │ │ │ │ └── audit_logs_api.rb │ │ │ │ └── client.rb │ │ │ ├── url_redirects │ │ │ │ ├── api │ │ │ │ │ └── redirects_api.rb │ │ │ │ └── client.rb │ │ │ ├── blogs │ │ │ │ ├── tags │ │ │ │ │ ├── api │ │ │ │ │ │ └── blog_tags_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── blog_posts │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── multi_language_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── authors │ │ │ │ │ ├── api │ │ │ │ │ │ └── blog_authors_api.rb │ │ │ │ │ └── client.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ ├── crm │ │ │ ├── deals │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── lists │ │ │ │ ├── api │ │ │ │ │ ├── lists_api.rb │ │ │ │ │ ├── folders_api.rb │ │ │ │ │ ├── mapping_api.rb │ │ │ │ │ └── memberships_api.rb │ │ │ │ └── client.rb │ │ │ ├── contacts │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── imports │ │ │ │ ├── api │ │ │ │ │ ├── core_api.rb │ │ │ │ │ └── public_imports_api.rb │ │ │ │ └── client.rb │ │ │ ├── objects │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ ├── calls │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── emails │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── goals │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── leads │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── notes │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── tasks │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── taxes │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── meetings │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── deal_splits │ │ │ │ │ ├── api │ │ │ │ │ │ └── batch_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── postal_mail │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── communications │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── feedback_submissions │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ └── client.rb │ │ │ ├── owners │ │ │ │ ├── api │ │ │ │ │ └── owners_api.rb │ │ │ │ └── client.rb │ │ │ ├── products │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── quotes │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── schemas │ │ │ │ ├── api │ │ │ │ │ └── core_api.rb │ │ │ │ └── client.rb │ │ │ ├── tickets │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── companies │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── line_items │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ └── search_api.rb │ │ │ │ └── client.rb │ │ │ ├── properties │ │ │ │ ├── api │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ ├── core_api.rb │ │ │ │ │ └── groups_api.rb │ │ │ │ └── client.rb │ │ │ ├── timeline │ │ │ │ ├── api │ │ │ │ │ ├── events_api.rb │ │ │ │ │ ├── tokens_api.rb │ │ │ │ │ └── templates_api.rb │ │ │ │ └── client.rb │ │ │ ├── associations │ │ │ │ ├── api │ │ │ │ │ └── batch_api.rb │ │ │ │ ├── v4 │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── report_api.rb │ │ │ │ │ ├── schema │ │ │ │ │ │ ├── api │ │ │ │ │ │ │ ├── definitions_api.rb │ │ │ │ │ │ │ └── definition_configurations_api.rb │ │ │ │ │ │ └── client.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── schema │ │ │ │ │ ├── api │ │ │ │ │ │ └── types_api.rb │ │ │ │ │ └── client.rb │ │ │ │ └── client.rb │ │ │ ├── pipelines │ │ │ │ ├── api │ │ │ │ │ ├── pipelines_api.rb │ │ │ │ │ ├── pipeline_audits_api.rb │ │ │ │ │ ├── pipeline_stages_api.rb │ │ │ │ │ └── pipeline_stage_audits_api.rb │ │ │ │ └── client.rb │ │ │ ├── exports │ │ │ │ ├── api │ │ │ │ │ └── public_exports_api.rb │ │ │ │ └── client.rb │ │ │ ├── commerce │ │ │ │ ├── invoices │ │ │ │ │ ├── api │ │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ │ └── search_api.rb │ │ │ │ │ └── client.rb │ │ │ │ └── client.rb │ │ │ ├── extensions │ │ │ │ ├── cards │ │ │ │ │ ├── api │ │ │ │ │ │ ├── cards_api.rb │ │ │ │ │ │ └── sample_response_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── calling │ │ │ │ │ ├── api │ │ │ │ │ │ ├── settings_api.rb │ │ │ │ │ │ ├── recording_settings_api.rb │ │ │ │ │ │ └── channel_connection_settings_api.rb │ │ │ │ │ └── client.rb │ │ │ │ ├── videoconferencing │ │ │ │ │ ├── api │ │ │ │ │ │ └── settings_api.rb │ │ │ │ │ └── client.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ ├── settings │ │ │ ├── users │ │ │ │ ├── api │ │ │ │ │ ├── roles_api.rb │ │ │ │ │ ├── teams_api.rb │ │ │ │ │ └── users_api.rb │ │ │ │ └── client.rb │ │ │ ├── business_units │ │ │ │ ├── api │ │ │ │ │ └── business_unit_api.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ ├── marketing │ │ │ ├── events │ │ │ │ ├── api │ │ │ │ │ ├── basic_api.rb │ │ │ │ │ ├── batch_api.rb │ │ │ │ │ ├── settings_api.rb │ │ │ │ │ ├── identifiers_api.rb │ │ │ │ │ ├── change_property_api.rb │ │ │ │ │ ├── add_event_attendees_api.rb │ │ │ │ │ ├── list_associations_api.rb │ │ │ │ │ ├── subscriber_state_changes_api.rb │ │ │ │ │ └── retrieve_participant_state_api.rb │ │ │ │ └── client.rb │ │ │ ├── forms │ │ │ │ ├── api │ │ │ │ │ └── forms_api.rb │ │ │ │ └── client.rb │ │ │ ├── emails │ │ │ │ ├── api │ │ │ │ │ ├── statistics_api.rb │ │ │ │ │ └── marketing_emails_api.rb │ │ │ │ └── client.rb │ │ │ ├── transactional │ │ │ │ ├── api │ │ │ │ │ ├── single_send_api.rb │ │ │ │ │ └── public_smtp_tokens_api.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ ├── automation │ │ │ ├── actions │ │ │ │ ├── api │ │ │ │ │ ├── callbacks_api.rb │ │ │ │ │ ├── functions_api.rb │ │ │ │ │ ├── revisions_api.rb │ │ │ │ │ └── definitions_api.rb │ │ │ │ └── client.rb │ │ │ └── client.rb │ │ └── conversations │ │ │ ├── visitor_identification │ │ │ ├── api │ │ │ │ └── generate_api.rb │ │ │ └── client.rb │ │ │ └── client.rb │ ├── helpers │ │ ├── camel_case.rb │ │ ├── snake_case.rb │ │ ├── path.rb │ │ ├── requests │ │ │ └── http_auth.rb │ │ └── get_all_helper.rb │ ├── exceptions.rb │ ├── oauth_helper.rb │ ├── client.rb │ └── codegen │ │ ├── files │ │ └── api_error.rb │ │ ├── oauth │ │ └── api_error.rb │ │ └── events │ │ └── api_error.rb └── hubspot-api-client.rb ├── pkg └── hubspot-api-client-17.0.0.gem ├── Gemfile ├── .github └── CODEOWNERS ├── Rakefile ├── spec ├── discovery │ ├── crm │ │ ├── commerce │ │ │ ├── client_spec.rb │ │ │ └── invoices │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── batch_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ ├── associations │ │ │ ├── v4 │ │ │ │ ├── client_spec.rb │ │ │ │ ├── report_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ ├── schema │ │ │ │ │ ├── definitions_api_spec.rb │ │ │ │ │ └── definition_configurations_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── client_spec.rb │ │ │ ├── schema │ │ │ │ └── types_api_spec.rb │ │ │ └── batch_api_spec.rb │ │ ├── objects │ │ │ ├── search_api_spec.rb │ │ │ ├── calls │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── goals │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── batch_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ │ ├── leads │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── batch_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ │ ├── notes │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── tasks │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── taxes │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── batch_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ │ ├── emails │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── meetings │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── postal_mail │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── communications │ │ │ │ ├── search_api_spec.rb │ │ │ │ ├── basic_api_spec.rb │ │ │ │ └── batch_api_spec.rb │ │ │ ├── feedback_submissions │ │ │ │ ├── batch_api_spec.rb │ │ │ │ ├── search_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ │ ├── deal_splits │ │ │ │ └── batch_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ ├── basic_api_spec.rb │ │ │ └── client_spec.rb │ │ ├── quotes │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── tickets │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── deals │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── products │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── contacts │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── line_items │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── companies │ │ │ ├── search_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ └── basic_api_spec.rb │ │ ├── imports │ │ │ ├── public_imports_api_spec.rb │ │ │ └── core_api_spec.rb │ │ ├── pipelines │ │ │ ├── pipeline_audits_api_spec.rb │ │ │ ├── pipeline_stage_audits_api_spec.rb │ │ │ ├── pipelines_api_spec.rb │ │ │ └── pipeline_stages_api_spec.rb │ │ ├── owners │ │ │ └── owners_api_spec.rb │ │ ├── extensions │ │ │ ├── cards │ │ │ │ ├── sample_response_api_spec.rb │ │ │ │ └── cards_api_spec.rb │ │ │ ├── client_spec.rb │ │ │ ├── videoconferencing │ │ │ │ └── settings_api_spec.rb │ │ │ └── calling │ │ │ │ ├── settings_api_spec.rb │ │ │ │ ├── recording_settings_api_spec.rb │ │ │ │ └── channel_connection_settings_api_spec.rb │ │ ├── exports │ │ │ └── public_exports_api_spec.rb │ │ ├── lists │ │ │ ├── lists_api_spec.rb │ │ │ ├── folders_api_spec.rb │ │ │ ├── memberships_api_spec.rb │ │ │ └── mapping_api_spec.rb │ │ ├── properties │ │ │ ├── batch_api_spec.rb │ │ │ ├── core_api_spec.rb │ │ │ └── groups_api_spec.rb │ │ ├── timeline │ │ │ ├── tokens_api_spec.rb │ │ │ ├── templates_api_spec.rb │ │ │ └── events_api_spec.rb │ │ ├── schemas │ │ │ └── core_api_spec.rb │ │ └── client_spec.rb │ ├── oauth │ │ ├── tokens_api_spec.rb │ │ ├── access_tokens_api_spec.rb │ │ └── refresh_tokens_api_spec.rb │ ├── events │ │ ├── send │ │ │ ├── basic_api_spec.rb │ │ │ └── batch_api_spec.rb │ │ └── events_api_spec.rb │ ├── settings │ │ ├── users │ │ │ ├── roles_api_spec.rb │ │ │ ├── teams_api_spec.rb │ │ │ └── users_api_spec.rb │ │ └── businnes_units │ │ │ └── business_unit_api_spec.rb │ ├── cms │ │ ├── source-code │ │ │ ├── metadata_api_spec.rb │ │ │ ├── validation_api_spec.rb │ │ │ ├── extract_api_spec.rb │ │ │ └── content_api_spec.rb │ │ ├── audit-logs │ │ │ └── audit_logs_api_spec.rb │ │ ├── site-search │ │ │ └── public_api_spec.rb │ │ ├── blogs │ │ │ ├── client_spec.rb │ │ │ ├── blog-posts │ │ │ │ ├── batch_api_spec.rb │ │ │ │ ├── multi_language_api_spec.rb │ │ │ │ └── basic_api_spec.rb │ │ │ ├── tags │ │ │ │ └── blog_tags_api_spec.rb │ │ │ └── authors │ │ │ │ └── blog_authors_api_spec.rb │ │ ├── domains │ │ │ └── domains_api_spec.rb │ │ ├── url-redirects │ │ │ └── redirects_api_spec.rb │ │ ├── client_spec.rb │ │ └── hubdb │ │ │ ├── rows_batch_api_spec.rb │ │ │ ├── rows_api_spec.rb │ │ │ └── tables_api_spec.rb │ ├── communication_preferences │ │ ├── definition_api_spec.rb │ │ └── status_api_spec.rb │ ├── marketing │ │ ├── transactional │ │ │ ├── single_send_api_spec.rb │ │ │ └── public_smtp_tokens_api_spec.rb │ │ ├── client_spec.rb │ │ ├── events │ │ │ ├── settings_api_spec.rb │ │ │ ├── change_property_api_spec.rb │ │ │ ├── identifiers_api_spec.rb │ │ │ ├── subscriber_state_changes_api_spec.rb │ │ │ ├── batch_api_spec.rb │ │ │ ├── add_event_attendees_api_spec.rb │ │ │ ├── basic_api_spec.rb │ │ │ ├── list_associations_api_spec.rb │ │ │ └── retrieve_participant_state_api_spec.rb │ │ ├── emails │ │ │ ├── statistics_api_spec.rb │ │ │ └── marketing_emails_api_spec.rb │ │ └── forms │ │ │ └── forms_api_spec.rb │ ├── conversations │ │ └── visitor-identification │ │ │ └── generate_api_spec.rb │ ├── automation │ │ └── actions │ │ │ ├── revisions_api_spec.rb │ │ │ ├── callbacks_api_spec.rb │ │ │ ├── definitions_api_spec.rb │ │ │ └── functions_api_spec.rb │ ├── webhooks │ │ ├── settings_api_spec.rb │ │ └── subscriptions_api_spec.rb │ ├── files │ │ ├── folders_api_spec.rb │ │ └── files_api_spec.rb │ ├── client_spec.rb │ └── base_module_client_spec.rb └── helpers │ └── camel_case_spec.rb └── hubspot-api-client.gemspec /lib/hubspot/version.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | VERSION = '20.0.0' 3 | end 4 | -------------------------------------------------------------------------------- /lib/hubspot-api-client.rb: -------------------------------------------------------------------------------- 1 | require_relative 'hubspot/client' 2 | require 'logger' 3 | require 'hubspot/version' 4 | -------------------------------------------------------------------------------- /pkg/hubspot-api-client-17.0.0.gem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HubSpot/hubspot-api-ruby/HEAD/pkg/hubspot-api-client-17.0.0.gem -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | group :development, :test do 6 | gem 'rake', '~> 12.3.3' 7 | gem 'openssl' 8 | end 9 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This file is managed by GitHubManager 2 | # Changes will be overwritten, please go to https://private.hubteam.com/githubmanager to update this. 3 | 4 | * @HubSpot/devex-sample-apps-developers 5 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require 'rspec/core/rake_task' 3 | require 'rake/release' 4 | 5 | RSpec::Core::RakeTask.new(:spec) 6 | task default: :spec 7 | rescue LoadError 8 | # no rspec available 9 | end 10 | -------------------------------------------------------------------------------- /spec/discovery/crm/commerce/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm.commerce } 5 | 6 | it { is_expected.to respond_to(:invoices) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations.v4 } 5 | 6 | it { is_expected.to respond_to(:schema) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/oauth/tokens_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Oauth::TokensApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.tokens_api } 5 | 6 | it { is_expected.to respond_to(:create) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/oauth/access_tokens_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Oauth::AccessTokensApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.access_tokens_api } 5 | 6 | it { is_expected.to respond_to(:get) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/files/api/files_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Files 6 | class FilesApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/quotes/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Quotes::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.quotes.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/tickets/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Tickets::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.tickets.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/events/api/events_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Events 6 | class EventsApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/files/api/folders_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Files 6 | class FoldersApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/oauth/api/tokens_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Oauth 6 | class TokensApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/deals/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Deals::SearchApi' do 4 | subject(:search_api) { Hubspot::Client.new(access_token: 'test').crm.deals.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/products/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Products::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.products.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/events/send/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Events::Send::BasicApi' do 4 | subject(:BasicApi) { Hubspot::Client.new(access_token: 'test').events.send.basic_api} 5 | 6 | it { is_expected.to respond_to(:call_send) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/events/send/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Events::Send::BatchApi' do 4 | subject(:BatchApi) { Hubspot::Client.new(access_token: 'test').events.send.batch_api} 5 | 6 | it { is_expected.to respond_to(:call_send) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/settings/users/roles_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Settings::Users::RolesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').settings.users.roles_api } 5 | 6 | it { is_expected.to respond_to(:get_all) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/settings/users/teams_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Settings::Users::TeamsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').settings.users.teams_api } 5 | 6 | it { is_expected.to respond_to(:get_all) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/contacts/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Contacts::SearchApi' do 4 | subject(:search_api) { Hubspot::Client.new(access_token: 'test').crm.contacts.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/line_items/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::LineItems::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.line_items.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/oauth/api/access_tokens_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Oauth 6 | class AccessTokensApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/webhooks/api/settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Webhooks 6 | class SettingsApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/cms/source-code/metadata_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::SourceCode::MetadataApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.source_code.metadata_api } 5 | 6 | it { is_expected.to respond_to(:get) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm.associations } 5 | 6 | it { is_expected.to respond_to(:v4) } 7 | it { is_expected.to respond_to(:schema) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/crm/companies/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Companies::SearchApi' do 4 | subject(:search_api) { Hubspot::Client.new(access_token: 'test').crm.companies.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Oauth 6 | class RefreshTokensApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/cms/audit-logs/audit_logs_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::AuditLogs::AuditLogsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.audit_logs.audit_logs_api } 5 | 6 | it { is_expected.to respond_to(:get_page) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/calls/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Calls::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.calls.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/goals/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Goals::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.goals.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/leads/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Leads::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.leads.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/notes/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Notes::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.notes.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/tasks/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Tasks::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.tasks.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/taxes/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Taxes::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.taxes.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/webhooks/api/subscriptions_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Webhooks 6 | class SubscriptionsApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/cms/source-code/validation_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::SourceCode::ValidationApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.source_code.validation_api } 5 | 6 | it { is_expected.to respond_to(:do_validate) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/imports/public_imports_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Imports::PublicImportsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.imports.public_imports_api } 5 | 6 | it { is_expected.to respond_to(:get_errors) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/emails/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Emails::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.emails.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/report_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::V4::ReportApi' do 4 | subject(:report_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.report_api } 5 | 6 | it { is_expected.to respond_to(:request) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/meetings/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Meetings::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.meetings.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/pipelines/pipeline_audits_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Pipelines::PipelineAuditsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.pipelines.pipeline_audits_api } 5 | 6 | it { is_expected.to respond_to(:get_audit) } 7 | 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/events/events_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Events::EventsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').events.events_api } 5 | 6 | it { is_expected.to respond_to(:get_page) } 7 | it { is_expected.to respond_to(:get_types) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/communication_preferences/api/status_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module CommunicationPreferences 6 | class StatusApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/schema/types_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::Schema::TypesApi' do 4 | subject(:types_api) { Hubspot::Client.new(access_token: 'test').crm.associations.schema.types_api } 5 | 6 | it { is_expected.to respond_to(:get_all) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/commerce/invoices/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Commerce::Invoices::SearchApi' do 4 | subject(:SearchApi) { Hubspot::Client.new(access_token: 'test').crm.commerce.invoices.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/postal_mail/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::PostalMail::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/hubdb/api/rows_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Hubdb 7 | class RowsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/communication_preferences/api/definition_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module CommunicationPreferences 6 | class DefinitionApi 7 | include Hubspot::Discovery::BaseApiClient 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/deals/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Deals 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/deals/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Deals 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/lists/api/lists_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Lists 7 | class ListsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/communications/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Communications::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/owners/owners_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Owners::OwnersApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.owners.owners_api } 5 | 6 | it { is_expected.to respond_to(:get_by_id) } 7 | it { is_expected.to respond_to(:get_page) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/oauth/refresh_tokens_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Oauth::RefreshTokensApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').oauth.refresh_tokens_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:get) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/hubdb/api/tables_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Hubdb 7 | class TablesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/contacts/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Contacts 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/contacts/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Contacts 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/deals/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Deals 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/imports/api/core_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Imports 7 | class CoreApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/lists/api/folders_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Lists 7 | class FoldersApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/lists/api/mapping_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Lists 7 | class MappingApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/owners/api/owners_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Owners 7 | class OwnersApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/products/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Products 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/products/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Products 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/quotes/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Quotes 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/quotes/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Quotes 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/quotes/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Quotes 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/schemas/api/core_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Schemas 7 | class CoreApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/tickets/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Tickets 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/tickets/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Tickets 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/tickets/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Tickets 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/events/send/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Events 6 | module Send 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/events/send/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Events 6 | module Send 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/communication_preferences/definition_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::CommunicationPreferences::DefinitionApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').communication_preferences.definition_api } 5 | 6 | it { is_expected.to respond_to(:get_page) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/feedback_submissions/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::FeedbackSubmissions::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.feedback_submissions.batch_api } 5 | 6 | it { is_expected.to respond_to(:read) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/pipelines/pipeline_stage_audits_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Pipelines::PipelineStageAuditsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.pipelines.pipeline_stage_audits_api } 5 | 6 | it { is_expected.to respond_to(:get_audit) } 7 | 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/marketing/transactional/single_send_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Transactional::SingleSendApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.transactional.single_send_api } 5 | 6 | it { is_expected.to respond_to(:send_email) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/domains/api/domains_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Domains 7 | class DomainsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/hubdb/api/rows_batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Hubdb 7 | class RowsBatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/pages/api/site_pages_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Pages 7 | class SitePagesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/companies/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Companies 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/companies/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Companies 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/companies/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Companies 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/contacts/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Contacts 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/line_items/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module LineItems 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/line_items/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module LineItems 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/line_items/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module LineItems 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/products/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Products 7 | class SearchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/properties/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Properties 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/properties/api/core_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Properties 7 | class CoreApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/timeline/api/events_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Timeline 7 | class EventsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/timeline/api/tokens_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Timeline 7 | class TokensApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/users/api/roles_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module Users 7 | class RolesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/users/api/teams_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module Users 7 | class TeamsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/users/api/users_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module Users 7 | class UsersApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/cms/site-search/public_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::SiteSearch::PublicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.site_search.public_api } 5 | 6 | it { is_expected.to respond_to(:get_by_id) } 7 | it { is_expected.to respond_to(:search) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/settings/businnes_units/business_unit_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Settings::BusinessUnits::BusinessUnitApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').settings.business_units.business_unit_api } 5 | 6 | it { is_expected.to respond_to(:get_by_user_id) } 7 | end 8 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/pages/api/landing_pages_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Pages 7 | class LandingPagesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/site_search/api/public_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SiteSearch 7 | class PublicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/source_code/api/content_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SourceCode 7 | class ContentApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/source_code/api/extract_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SourceCode 7 | class ExtractApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/lists/api/memberships_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Lists 7 | class MembershipsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/pipelines/api/pipelines_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Pipelines 7 | class PipelinesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/properties/api/groups_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Properties 7 | class GroupsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/timeline/api/templates_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Timeline 7 | class TemplatesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class BasicApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class BatchApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/forms/api/forms_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Forms 7 | class FormsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').cms.blogs } 5 | 6 | it { is_expected.to respond_to(:authors) } 7 | it { is_expected.to respond_to(:blog_posts) } 8 | it { is_expected.to respond_to(:tags) } 9 | end 10 | -------------------------------------------------------------------------------- /spec/discovery/cms/domains/domains_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Domains::DomainsApi' do 4 | subject(:domains_api) { Hubspot::Client.new(access_token: 'test').cms.domains.domains_api } 5 | 6 | it { is_expected.to respond_to(:get_by_id) } 7 | it { is_expected.to respond_to(:get_page) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/feedback_submissions/search_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::FeedbackSubmissions::SearchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.feedback_submissions.search_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/marketing/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').marketing } 5 | 6 | it { is_expected.to respond_to(:events) } 7 | it { is_expected.to respond_to(:forms) } 8 | it { is_expected.to respond_to(:transactional) } 9 | end 10 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/audit_logs/api/audit_logs_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module AuditLogs 7 | class AuditLogsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/source_code/api/metadata_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SourceCode 7 | class MetadataApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/source_code/api/validation_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SourceCode 7 | class ValidationApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/exports/api/public_exports_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Exports 7 | class PublicExportsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/imports/api/public_imports_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Imports 7 | class PublicImportsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class SettingsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/cards/sample_response_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Cards::SampleResponseApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.extensions.cards.sample_response_api } 5 | 6 | it { is_expected.to respond_to(:get_cards_sample_response) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::SettingsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.events.settings_api } 5 | 6 | it { is_expected.to respond_to(:get_all) } 7 | it { is_expected.to respond_to(:update) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/actions/api/callbacks_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | module Actions 7 | class CallbacksApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/actions/api/functions_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | module Actions 7 | class FunctionsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/actions/api/revisions_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | module Actions 7 | class RevisionsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/url_redirects/api/redirects_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module UrlRedirects 7 | class RedirectsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/emails/api/statistics_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Emails 7 | class StatisticsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/identifiers_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class IdentifiersApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/cms/source-code/extract_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::SourceCode::ExtractApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.source_code.extract_api } 5 | 6 | it { is_expected.to respond_to(:do_async) } 7 | it { is_expected.to respond_to(:get_async_status) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/actions/api/definitions_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | module Actions 7 | class DefinitionsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/pipelines/api/pipeline_audits_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Pipelines 7 | class PipelineAuditsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/pipelines/api/pipeline_stages_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Pipelines 7 | class PipelineStagesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/emails/api/marketing_emails_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Emails 7 | class MarketingEmailsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/change_property_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class ChangePropertyApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/conversations/visitor-identification/generate_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Conversations::VisitorIdentification::GenerateApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').conversations.visitor_identification.generate_api } 5 | 6 | it { is_expected.to respond_to(:generate_token) } 7 | end 8 | -------------------------------------------------------------------------------- /spec/discovery/crm/exports/public_exports_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Exports::PublicExportsApi' do 4 | subject(:PublicExportsApi) { Hubspot::Client.new(access_token: 'test').crm.exports.public_exports_api } 5 | 6 | it { is_expected.to respond_to(:get_status) } 7 | it { is_expected.to respond_to(:start) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/deal_splits/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::DealSplits::BatchApi' do 4 | subject(:BatchApi) { Hubspot::Client.new(access_token: 'test').crm.objects.deal_splits.batch_api } 5 | 6 | it { is_expected.to respond_to(:read) } 7 | it { is_expected.to respond_to(:upsert) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/pipelines/api/pipeline_stage_audits_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Pipelines 7 | class PipelineStageAuditsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/add_event_attendees_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class AddEventAttendeesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/list_associations_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class ListAssociationsApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/transactional/api/single_send_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Transactional 7 | class SingleSendApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/helpers/camel_case.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | module Helpers 3 | class CamelCase 4 | def format(string) 5 | case string 6 | when 'public_smtp_tokens_api' 7 | 'PublicSMTPTokensApi' 8 | else 9 | string.split('_').collect(&:capitalize).join 10 | end 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /spec/discovery/automation/actions/revisions_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Automation::Actions::RevisionsApi' do 4 | subject(:revisions_api) { Hubspot::Client.new(access_token: 'test').automation.actions.revisions_api } 5 | 6 | it { is_expected.to respond_to(:get_by_id) } 7 | it { is_expected.to respond_to(:get_page) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm.extensions } 5 | 6 | it { is_expected.to respond_to(:calling) } 7 | it { is_expected.to respond_to(:cards) } 8 | it { is_expected.to respond_to(:videoconferencing) } 9 | 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/business_units/api/business_unit_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module BusinessUnits 7 | class BusinessUnitApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/automation/actions/callbacks_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Automation::Actions::CallbacksApi' do 4 | subject(:callbacks_api) { Hubspot::Client.new(access_token: 'test').automation.actions.callbacks_api } 5 | 6 | it { is_expected.to respond_to(:complete) } 7 | it { is_expected.to respond_to(:complete_batch) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/subscriber_state_changes_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class SubscriberStateChangesApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/marketing/emails/statistics_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Emails::StatisticsApi' do 4 | subject(:StatisticsApi) { Hubspot::Client.new(access_token: 'test').marketing.emails.statistics_api } 5 | 6 | it { is_expected.to respond_to(:get_emails_list) } 7 | it { is_expected.to respond_to(:get_histogram) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/api/retrieve_participant_state_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class RetrieveParticipantStateApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/transactional/api/public_smtp_tokens_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Transactional 7 | class PublicSMTPTokensApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/crm/lists/lists_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Lists::MappingApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.lists.mapping_api } 5 | 6 | it { is_expected.to respond_to(:translate_legacy_list_id_to_list_id) } 7 | it { is_expected.to respond_to(:translate_legacy_list_id_to_list_id_batch) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/change_property_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::ChangePropertyApi' do 4 | subject(:ChangePropertyApi) { Hubspot::Client.new(access_token: 'test').marketing.events.change_property_api } 5 | 6 | it { is_expected.to respond_to(:cancel) } 7 | it { is_expected.to respond_to(:complete) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/identifiers_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::IdentifiersApi' do 4 | subject(:IdentifiersApi) { Hubspot::Client.new(access_token: 'test').marketing.events.identifiers_api } 5 | 6 | it { is_expected.to respond_to(:do_search) } 7 | it { is_expected.to respond_to(:search_portal_events) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/webhooks/settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Webhooks::SettingsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').webhooks.settings_api } 5 | 6 | it { is_expected.to respond_to(:clear) } 7 | it { is_expected.to respond_to(:configure) } 8 | it { is_expected.to respond_to(:get_all) } 9 | end 10 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/conversations/visitor_identification/api/generate_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Conversations 6 | module VisitorIdentification 7 | class GenerateApi 8 | include Hubspot::Discovery::BaseApiClient 9 | end 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/helpers/snake_case.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | module Helpers 3 | class SnakeCase 4 | def format(string) 5 | string.gsub('OAuth', 'Oauth'). 6 | gsub(/::/, '/'). 7 | gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). 8 | gsub(/([a-z\d])([A-Z])/,'\1_\2'). 9 | tr("-", "_"). 10 | downcase 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/feedback_submissions/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::FeedbackSubmissions::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.feedback_submissions.basic_api } 5 | 6 | it { is_expected.to respond_to(:get_by_id) } 7 | it { is_expected.to respond_to(:get_page) } 8 | end 9 | -------------------------------------------------------------------------------- /spec/discovery/crm/properties/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Properties::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.properties.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | end 10 | -------------------------------------------------------------------------------- /spec/discovery/crm/timeline/tokens_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Timeline::TokensApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.timeline.tokens_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:update) } 9 | end 10 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/tags/api/blog_tags_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module Tags 8 | class BlogTagsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/calls/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Calls 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/calls/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Calls 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/calls/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Calls 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/emails/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Emails 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/emails/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Emails 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/emails/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Emails 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/goals/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Goals 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/goals/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Goals 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/goals/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Goals 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/leads/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Leads 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/leads/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Leads 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/leads/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Leads 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/notes/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Notes 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/notes/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Notes 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/notes/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Notes 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/tasks/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Tasks 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/tasks/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Tasks 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/tasks/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Tasks 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/taxes/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Taxes 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/taxes/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Taxes 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/taxes/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Taxes 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/blog_posts/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module BlogPosts 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/blog_posts/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module BlogPosts 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/api/report_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | class ReportApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/commerce/invoices/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Commerce 7 | module Invoices 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/commerce/invoices/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Commerce 7 | module Invoices 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/cards/api/cards_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Cards 8 | class CardsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/meetings/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Meetings 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/meetings/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Meetings 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/meetings/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Meetings 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::BatchApi' do 4 | subject(:batch_api) { Hubspot::Client.new(access_token: 'test').crm.associations.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | end 10 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | actions 12 | ].freeze 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/authors/api/blog_authors_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module Authors 8 | class BlogAuthorsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/schema/api/types_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module Schema 8 | class TypesApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/commerce/invoices/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Commerce 7 | module Invoices 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/deal_splits/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module DealSplits 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/postal_mail/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module PostalMail 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/postal_mail/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module PostalMail 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/postal_mail/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module PostalMail 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/calling/api/settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Calling 8 | class SettingsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Communications 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Communications 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/blog_posts/api/multi_language_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module BlogPosts 8 | class MultiLanguageApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/communications/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Communications 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/cards/api/sample_response_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Cards 8 | class SampleResponseApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/feedback_submissions/api/basic_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module FeedbackSubmissions 8 | class BasicApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/feedback_submissions/api/batch_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module FeedbackSubmissions 8 | class BatchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/files/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Files 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_classes 10 | %i[ 11 | files 12 | folders 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/helpers/camel_case_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe "Hubspot::Helpers::CamelCase" do 4 | subject( :camel_case) { Hubspot::Helpers::CamelCase.new } 5 | 6 | it "Method 'format' should convert all snake_case strings to CamelCase strings" do 7 | result = camel_case.format("some_test_text_in_snake_case") 8 | expect(result).to eql "SomeTestTextInSnakeCase" 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/conversations/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Conversations 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | visitor_identification 12 | ].freeze 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/feedback_submissions/api/search_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module FeedbackSubmissions 8 | class SearchApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/subscriber_state_changes_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::SubscriberStateChangesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.events.subscriber_state_changes_api } 5 | 6 | it { is_expected.to respond_to(:upsert_by_contact_email) } 7 | it { is_expected.to respond_to(:upsert_by_contact_id) } 8 | end 9 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/calling/api/recording_settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Calling 8 | class RecordingSettingsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/videoconferencing/api/settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Videoconferencing 8 | class SettingsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | business_units 12 | users 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/webhooks/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Webhooks 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_classes 10 | %i[ 11 | settings 12 | subscriptions 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/discovery/crm/imports/core_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Imports::CoreApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.imports.core_api } 5 | 6 | it { is_expected.to respond_to(:cancel) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/calling/api/channel_connection_settings_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Calling 8 | class ChannelConnectionSettingsApi 9 | include Hubspot::Discovery::BaseApiClient 10 | end 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/communication_preferences/status_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::CommunicationPreferences::StatusApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').communication_preferences.status_api } 5 | 6 | it { is_expected.to respond_to(:get_email_status) } 7 | it { is_expected.to respond_to(:subscribe) } 8 | it { is_expected.to respond_to(:unsubscribe) } 9 | end 10 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/owners/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Owners 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | owners 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/schemas/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Schemas 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | core 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/oauth/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Oauth 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_classes 10 | %i[ 11 | access_tokens 12 | refresh_tokens 13 | tokens 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/calls/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Calls::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.calls.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/notes/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Notes::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.notes.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/tasks/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Tasks::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.tasks.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/domains/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Domains 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | domains 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/communication_preferences/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module CommunicationPreferences 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_classes 10 | %i[ 11 | definition 12 | status 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/commerce/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Commerce 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_modules 11 | %i[ 12 | invoices 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/helpers/path.rb: -------------------------------------------------------------------------------- 1 | require_relative 'snake_case' 2 | 3 | module Hubspot 4 | module Helpers 5 | class Path 6 | def format(module_name) 7 | Hubspot::Helpers::SnakeCase.new.format(module_name.to_s) 8 | end 9 | 10 | def require_with_mapping(path) 11 | require path 12 | end 13 | 14 | def require_with_codegen_mapping(path) 15 | require path 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/discovery/cms/source-code/content_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::SourceCode::ContentApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.source_code.content_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:download) } 9 | it { is_expected.to respond_to(:create_or_update) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/videoconferencing/settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Videoconferencing::SettingsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.extensions.videoconferencing.settings_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:get_by_id) } 8 | it { is_expected.to respond_to(:replace) } 9 | end 10 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/emails/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Emails::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.emails.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/site_search/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SiteSearch 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | public 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/exports/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Exports 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | public_exports 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/forms/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Forms 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | forms 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/meetings/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Meetings::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.meetings.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/audit_logs/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module AuditLogs 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | audit_logs 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/blog-posts/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Blogs::BlogPosts::BatchApi' do 4 | subject(:BatchApi) { Hubspot::Client.new(access_token: 'test').cms.blogs.blog_posts.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::V4::BasicApi' do 4 | subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create_default) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/url_redirects/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module UrlRedirects 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | redirects 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | module Schema 9 | class DefinitionsApi 10 | include Hubspot::Discovery::BaseApiClient 11 | end 12 | end 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/postal_mail/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::PostalMail::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/quotes/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Quotes::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.quotes.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/events/send/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Events 6 | module Send 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | emails 12 | events 13 | forms 14 | transactional 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/discovery/crm/deals/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Deals::BatchApi' do 4 | subject(:batch_api) { Hubspot::Client.new(access_token: 'test').crm.deals.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/calling/settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Calling::SettingsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.extensions.calling.settings_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:update) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/products/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Products::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.products.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/tickets/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Tickets::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.tickets.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::BatchApi' do 4 | subject(:BatchApi) { Hubspot::Client.new(access_token: 'test').marketing.events.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_by_object_id) } 8 | it { is_expected.to respond_to(:update_by_object_id) } 9 | it { is_expected.to respond_to(:upsert) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/line_items/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::LineItems::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.line_items.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/communications/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Communications::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/crm/quotes/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Quotes::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.quotes.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/pages/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Pages 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | landing_pages 13 | site_pages 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/imports/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Imports 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | core 13 | public_imports 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/business_units/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module BusinessUnits 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | business_unit 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/discovery/crm/companies/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Companies::BatchApi' do 4 | subject(:batch_api) { Hubspot::Client.new(access_token: 'test').crm.companies.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/contacts/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Contacts::BatchApi' do 4 | subject(:batch_api) { Hubspot::Client.new(access_token: 'test').crm.contacts.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/products/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Products::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.products.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/line_items/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::LineItems::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.line_items.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/leads/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Leads::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.leads.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update)} 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/properties/core_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Properties::CoreApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.properties.core_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_name) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/settings/users/users_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Settings::Users::UsersApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').settings.users.users_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:replace) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/schema/api/definition_configurations_api.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | module Schema 9 | class DefinitionConfigurationsApi 10 | include Hubspot::Discovery::BaseApiClient 11 | end 12 | end 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/calls/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Calls::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.calls.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/emails/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Emails::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.emails.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/goals/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Goals::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.goals.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/notes/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Notes::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.notes.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/tasks/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Tasks::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.tasks.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/taxes/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Taxes::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.taxes.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/properties/groups_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Properties::GroupsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.properties.groups_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_name) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/timeline/templates_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Timeline::TemplatesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.timeline.templates_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/deals/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Deals 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/quotes/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Quotes 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/goals/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Goals::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.goals.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/leads/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Leads::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.leads.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/meetings/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Meetings::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.meetings.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/taxes/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Taxes::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.taxes.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_modules 11 | %i[ 12 | authors 13 | blog_posts 14 | tags 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/hubdb/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Hubdb 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | rows 13 | rows_batch 14 | tables 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/conversations/visitor_identification/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Conversations 6 | module VisitorIdentification 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | generate 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/contacts/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Contacts 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/products/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Products 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/tickets/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Tickets 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/emails/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Emails 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | marketing_emails 13 | statistics 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/schema/definitions_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::V4::Schema::DefinitionsApi' do 4 | subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.schema.definitions_api } 5 | 6 | it { is_expected.to respond_to(:create) } 7 | it { is_expected.to respond_to(:get_all) } 8 | it { is_expected.to respond_to(:remove) } 9 | it { is_expected.to respond_to(:update) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/companies/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Companies 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/line_items/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module LineItems 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | basic 13 | batch 14 | search 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/properties/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Properties 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | batch 13 | core 14 | groups 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/timeline/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Timeline 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | events 13 | templates 14 | tokens 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/settings/users/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Settings 6 | module Users 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | roles 13 | teams 14 | users 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/crm/commerce/invoices/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Commerce::Invoices::BatchApi' do 4 | subject(:BatchApi) { Hubspot::Client.new(access_token: 'test').crm.commerce.invoices.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/cards/cards_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Cards::CardsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.extensions.cards.cards_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/postal_mail/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::PostalMail::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/timeline/events_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Timeline::EventsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.timeline.events_api } 5 | 6 | it { is_expected.to respond_to(:create) } 7 | it { is_expected.to respond_to(:create_batch) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_detail_by_id) } 10 | it { is_expected.to respond_to(:get_render_by_id) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/events/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Events 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | send 12 | ].freeze 13 | end 14 | 15 | def api_classes 16 | %i[ 17 | events 18 | ].freeze 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/discovery/crm/commerce/invoices/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Commerce::Invoices::BasicApi' do 4 | subject(:BasicApi) { Hubspot::Client.new(access_token: 'test').crm.commerce.invoices.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/tags/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module Tags 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | blog_tags 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_modules 11 | %i[ 12 | calling 13 | cards 14 | videoconferencing 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/transactional/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Transactional 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | public_smtp_tokens 13 | single_send 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/discovery/cms/url-redirects/redirects_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::UrlRedirects::RedirectsApi' do 4 | subject(:redirects_api) { Hubspot::Client.new(access_token: 'test').cms.url_redirects.redirects_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/communications/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::Communications::BatchApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:read) } 9 | it { is_expected.to respond_to(:update) } 10 | it { is_expected.to respond_to(:upsert) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/authors/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module Authors 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | blog_authors 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::V4::BatchApi' do 4 | subject(:batch_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.batch_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_labels) } 8 | it { is_expected.to respond_to(:create_default) } 9 | it { is_expected.to respond_to(:create) } 10 | it { is_expected.to respond_to(:get_page) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/lists/folders_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Lists::FoldersApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.lists.folders_api } 5 | 6 | it { is_expected.to respond_to(:create) } 7 | it { is_expected.to respond_to(:get_all) } 8 | it { is_expected.to respond_to(:move) } 9 | it { is_expected.to respond_to(:move_list) } 10 | it { is_expected.to respond_to(:remove) } 11 | it { is_expected.to respond_to(:rename) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/deal_splits/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module DealSplits 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | batch 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/automation/actions/definitions_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Automation::Actions::DefinitionsApi' do 4 | subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').automation.actions.definitions_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/deals/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Deals::BasicApi' do 4 | subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.deals.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:merge) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Objects::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:update) } 11 | it { is_expected.to respond_to(:get_all) } 12 | end 13 | -------------------------------------------------------------------------------- /spec/discovery/crm/tickets/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Tickets::BasicApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.tickets.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:merge) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/lists/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Lists 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | folders 13 | lists 14 | mapping 15 | memberships 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/discovery/cms/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').cms } 5 | 6 | it { is_expected.to respond_to(:audit_logs) } 7 | it { is_expected.to respond_to(:blogs) } 8 | it { is_expected.to respond_to(:domains) } 9 | it { is_expected.to respond_to(:hubdb) } 10 | it { is_expected.to respond_to(:pages) } 11 | it { is_expected.to respond_to(:site_search) } 12 | it { is_expected.to respond_to(:url_redirects) } 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/calling/recording_settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Calling::RecordingSettingsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.extensions.calling.recording_settings_api } 5 | 6 | it { is_expected.to respond_to(:get_url_format) } 7 | it { is_expected.to respond_to(:mark_as_ready) } 8 | it { is_expected.to respond_to(:register_url_format) } 9 | it { is_expected.to respond_to(:update_url_format) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/schema/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module Schema 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | def api_classes 11 | %i[ 12 | types 13 | ].freeze 14 | end 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/discovery/crm/companies/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Companies::BasicApi' do 4 | subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.companies.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:merge) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /spec/discovery/crm/contacts/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Contacts::BasicApi' do 4 | subject(:basic_api) { Hubspot::Client.new(access_token: 'test').crm.contacts.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:merge) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/source_code/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module SourceCode 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | content 13 | extract 14 | metadata 15 | validation 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/discovery/marketing/forms/forms_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Forms::FormsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.forms.forms_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:replace) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /spec/discovery/crm/pipelines/pipelines_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Pipelines::PipelinesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.pipelines.pipelines_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:replace) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /spec/discovery/webhooks/subscriptions_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Webhooks::SubscriptionsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').webhooks.subscriptions_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:update) } 11 | it { is_expected.to respond_to(:update_batch) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/videoconferencing/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Videoconferencing 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | settings 14 | ].freeze 15 | end 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/crm/extensions/calling/channel_connection_settings_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Extensions::Calling::ChannelConnectionSettingsApi' do 4 | subject(:ChannelConnectionSettingsApi) { Hubspot::Client.new(access_token: 'test').crm.extensions.calling.channel_connection_settings_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_by_id) } 9 | it { is_expected.to respond_to(:update) } 10 | end 11 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/add_event_attendees_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::AddEventAttendeesApi' do 4 | subject(:add_event_attendees_api) { Hubspot::Client.new(access_token: 'test').marketing.events.add_event_attendees_api } 5 | 6 | it { is_expected.to respond_to(:record_by_contact_emails) } 7 | it { is_expected.to respond_to(:record_by_contact_id) } 8 | it { is_expected.to respond_to(:record_by_contact_ids) } 9 | it { is_expected.to respond_to(:record_by_email) } 10 | end 11 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/automation/actions/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Automation 6 | module Actions 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | callbacks 13 | definitions 14 | functions 15 | revisions 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/cards/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Cards 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | cards 14 | sample_response 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/discovery/crm/pipelines/pipeline_stages_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Pipelines::PipelineStagesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.pipelines.pipeline_stages_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:create) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:replace) } 11 | it { is_expected.to respond_to(:update) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | class Client 7 | include Hubspot::Discovery::BaseModuleClient 8 | 9 | def api_modules 10 | %i[ 11 | audit_logs 12 | blogs 13 | domains 14 | hubdb 15 | pages 16 | site_search 17 | source_code 18 | url_redirects 19 | ].freeze 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/pipelines/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Pipelines 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | pipeline_stages 13 | pipeline_stage_audits 14 | pipelines 15 | pipeline_audits 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/calls/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Calls 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/emails/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Emails 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/goals/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Goals 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/leads/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Leads 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/notes/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Notes 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/tasks/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Tasks 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/taxes/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Taxes 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/meetings/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Meetings 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/exceptions.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | class ConfigurationError < StandardError; end 3 | class InvalidSignatureVersionError < StandardError 4 | def initialize(signature_version) 5 | @signature_version = signature_version 6 | super("Invalid signature version passed to request: #{@signature_version}") 7 | end 8 | end 9 | 10 | class InvalidSignatureTimestampError < StandardError 11 | def initialize(timestamp) 12 | @timestamp = timestamp 13 | super("Signature timestamp is invalid: #{@timestamp}.") 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/commerce/invoices/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Commerce 7 | module Invoices 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/postal_mail/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module PostalMail 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/discovery/marketing/transactional/public_smtp_tokens_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Transactional::PublicSMTPTokensApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.transactional.public_smtp_tokens_api } 5 | 6 | it { is_expected.to respond_to(:archive_token) } 7 | it { is_expected.to respond_to(:get_token_by_id) } 8 | it { is_expected.to respond_to(:get_tokens_page) } 9 | it { is_expected.to respond_to(:create_token) } 10 | it { is_expected.to respond_to(:reset_password) } 11 | end 12 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/cms/blogs/blog_posts/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Cms 6 | module Blogs 7 | module BlogPosts 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | multi_language 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/communications/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module Communications 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | def api_modules 10 | %i[ 11 | v4 12 | schema 13 | ].freeze 14 | end 15 | def api_classes 16 | %i[ 17 | batch 18 | ].freeze 19 | end 20 | end 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/blog-posts/multi_language_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Blogs::BlogPosts::MultiLanguageApi' do 4 | subject(:MultiLanguageApi) { Hubspot::Client.new(access_token: 'test').cms.blogs.blog_posts.multi_language_api } 5 | 6 | it { is_expected.to respond_to(:attach_to_lang_group) } 7 | it { is_expected.to respond_to(:create_lang_variation) } 8 | it { is_expected.to respond_to(:detach_from_lang_group) } 9 | it { is_expected.to respond_to(:set_lang_primary) } 10 | it { is_expected.to respond_to(:update_langs) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/crm/schemas/core_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Schemas::CoreApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.schemas.core_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_association) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:create_association) } 10 | it { is_expected.to respond_to(:get_all) } 11 | it { is_expected.to respond_to(:get_by_id) } 12 | it { is_expected.to respond_to(:update) } 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/feedback_submissions/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | module FeedbackSubmissions 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | basic 14 | batch 15 | search 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/discovery/crm/lists/memberships_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Lists::MembershipsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.lists.memberships_api } 5 | 6 | it { is_expected.to respond_to(:add) } 7 | it { is_expected.to respond_to(:add_all_from_list) } 8 | it { is_expected.to respond_to(:add_and_remove) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:remove) } 11 | it { is_expected.to respond_to(:remove_all) } 12 | it { is_expected.to respond_to(:get_lists) } 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/extensions/calling/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Extensions 7 | module Calling 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | 11 | def api_classes 12 | %i[ 13 | channel_connection_settings 14 | recording_settings 15 | settings 16 | ].freeze 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/schema/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../../base_api_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | module Schema 9 | class Client 10 | include Hubspot::Discovery::BaseModuleClient 11 | def api_classes 12 | %i[ 13 | definition_configurations 14 | definitions 15 | ].freeze 16 | end 17 | end 18 | end 19 | end 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/discovery/crm/associations/v4/schema/definition_configurations_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Associations::V4::Schema::DefinitionConfigurationsApi' do 4 | subject(:definition_configurations_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.schema.definition_configurations_api } 5 | 6 | it { is_expected.to respond_to(:batch_create) } 7 | it { is_expected.to respond_to(:batch_remove) } 8 | it { is_expected.to respond_to(:batch_update) } 9 | it { is_expected.to respond_to(:get_all) } 10 | it { is_expected.to respond_to(:get_all_between_two_object_types) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/automation/actions/functions_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Automation::Actions::FunctionsApi' do 4 | subject(:functions_api) { Hubspot::Client.new(access_token: 'test').automation.actions.functions_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_by_function_type) } 8 | it { is_expected.to respond_to(:create_or_replace) } 9 | it { is_expected.to respond_to(:create_or_replace_by_function_type) } 10 | it { is_expected.to respond_to(:get_by_function_type) } 11 | it { is_expected.to respond_to(:get_by_id) } 12 | it { is_expected.to respond_to(:get_page) } 13 | end 14 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/associations/v4/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Associations 7 | module V4 8 | class Client 9 | include Hubspot::Discovery::BaseModuleClient 10 | def api_modules 11 | %i[ 12 | schema 13 | ].freeze 14 | end 15 | def api_classes 16 | %i[ 17 | basic 18 | batch 19 | report 20 | ].freeze 21 | end 22 | end 23 | end 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /spec/discovery/cms/hubdb/rows_batch_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Hubdb::RowsBatchApi' do 4 | subject(:rows_batch_api) { Hubspot::Client.new(access_token: 'test').cms.hubdb.rows_batch_api } 5 | 6 | it { is_expected.to respond_to(:clone_draft_table_rows) } 7 | it { is_expected.to respond_to(:create_draft_table_rows) } 8 | it { is_expected.to respond_to(:purge_draft_table_rows) } 9 | it { is_expected.to respond_to(:read_draft_table_rows) } 10 | it { is_expected.to respond_to(:read_table_rows) } 11 | it { is_expected.to respond_to(:replace_draft_table_rows) } 12 | it { is_expected.to respond_to(:update_draft_table_rows) } 13 | end 14 | -------------------------------------------------------------------------------- /spec/discovery/crm/lists/mapping_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Crm::Lists::ListsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').crm.lists.lists_api } 5 | 6 | it { is_expected.to respond_to(:create) } 7 | it { is_expected.to respond_to(:do_search) } 8 | it { is_expected.to respond_to(:get_all) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:get_by_name) } 11 | it { is_expected.to respond_to(:remove) } 12 | it { is_expected.to respond_to(:restore) } 13 | it { is_expected.to respond_to(:update_list_filters) } 14 | it { is_expected.to respond_to(:update_name) } 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/crm/objects/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm.objects } 5 | 6 | it { is_expected.to respond_to(:calls) } 7 | it { is_expected.to respond_to(:communications) } 8 | it { is_expected.to respond_to(:emails) } 9 | it { is_expected.to respond_to(:feedback_submissions) } 10 | it { is_expected.to respond_to(:goals) } 11 | it { is_expected.to respond_to(:leads) } 12 | it { is_expected.to respond_to(:meetings) } 13 | it { is_expected.to respond_to(:notes) } 14 | it { is_expected.to respond_to(:postal_mail) } 15 | it { is_expected.to respond_to(:tasks) } 16 | end 17 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/tags/blog_tags_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Blogs::Tags::BlogTagsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.blogs.tags.blog_tags_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_batch) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:create_batch) } 10 | it { is_expected.to respond_to(:get_by_id) } 11 | it { is_expected.to respond_to(:get_page) } 12 | it { is_expected.to respond_to(:read_batch) } 13 | it { is_expected.to respond_to(:update) } 14 | it { is_expected.to respond_to(:update_batch) } 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/files/folders_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Files::FoldersApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').files.folders_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_by_path) } 8 | it { is_expected.to respond_to(:check_update_status) } 9 | it { is_expected.to respond_to(:create) } 10 | it { is_expected.to respond_to(:do_search) } 11 | it { is_expected.to respond_to(:get_by_id) } 12 | it { is_expected.to respond_to(:get_by_path) } 13 | it { is_expected.to respond_to(:update_properties) } 14 | it { is_expected.to respond_to(:update_properties_recursively) } 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::BasicApi' do 4 | subject(:BasicApi) { Hubspot::Client.new(access_token: 'test').marketing.events.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_by_object_id) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:get_all) } 10 | it { is_expected.to respond_to(:get_by_object_id) } 11 | it { is_expected.to respond_to(:get_details) } 12 | it { is_expected.to respond_to(:update) } 13 | it { is_expected.to respond_to(:update_by_object_id) } 14 | it { is_expected.to respond_to(:upsert) } 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/authors/blog_authors_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Blogs::Authors::BlogAuthorsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').cms.blogs.authors.blog_authors_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:archive_batch) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:create_batch) } 10 | it { is_expected.to respond_to(:get_by_id) } 11 | it { is_expected.to respond_to(:get_page) } 12 | it { is_expected.to respond_to(:read_batch) } 13 | it { is_expected.to respond_to(:update) } 14 | it { is_expected.to respond_to(:update_batch) } 15 | end 16 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/marketing/events/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Marketing 6 | module Events 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_classes 11 | %i[ 12 | add_event_attendees 13 | basic 14 | batch 15 | change_property 16 | identifiers 17 | list_associations 18 | retrieve_participant_state 19 | settings 20 | subscriber_state_changes 21 | ].freeze 22 | end 23 | end 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/list_associations_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::ListAssociationsApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').marketing.events.list_associations_api } 5 | 6 | it { is_expected.to respond_to(:associate_by_external_account_and_event_ids) } 7 | it { is_expected.to respond_to(:associate_by_marketing_event_id) } 8 | it { is_expected.to respond_to(:disassociate_by_external_account_and_event_ids) } 9 | it { is_expected.to respond_to(:disassociate_by_marketing_event_id) } 10 | it { is_expected.to respond_to(:get_all_by_external_account_and_event_ids) } 11 | it { is_expected.to respond_to(:get_all_by_marketing_event_id) } 12 | end 13 | -------------------------------------------------------------------------------- /lib/hubspot/oauth_helper.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | class OAuthHelper 3 | AUTHORIZE_URL = 'https://app.hubspot.com/oauth/authorize'.freeze 4 | class << self 5 | def authorize_url(client_id, redirect_uri, scopes = nil, optional_scopes = nil, state = nil) 6 | query_params = { 7 | "client_id" => client_id, 8 | "redirect_uri" => redirect_uri 9 | } 10 | 11 | query_params["scope"] = scopes.join(' ') if scopes 12 | query_params["optional_scope"] = optional_scopes.join(' ') if optional_scopes 13 | query_params['state'] ||= state if state 14 | 15 | params = URI.encode_www_form(query_params) 16 | 17 | "#{AUTHORIZE_URL}?#{params}" 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/marketing/events/retrieve_participant_state_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Events::RetrieveParticipantStateApi' do 4 | subject(:RetrieveParticipantStateApi) { Hubspot::Client.new(access_token: 'test').marketing.events.retrieve_participant_state_api } 5 | 6 | it { is_expected.to respond_to(:get_participations_breakdown_by_contact_id) } 7 | it { is_expected.to respond_to(:get_participations_breakdown_by_external_event_id) } 8 | it { is_expected.to respond_to(:get_participations_breakdown_by_marketing_event_id) } 9 | it { is_expected.to respond_to(:get_participations_counters_by_event_external_id) } 10 | it { is_expected.to respond_to(:get_participations_counters_by_marketing_event_id) } 11 | end 12 | -------------------------------------------------------------------------------- /spec/discovery/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test') } 5 | 6 | it { is_expected.to respond_to(:automation) } 7 | it { is_expected.to respond_to(:cms) } 8 | it { is_expected.to respond_to(:communication_preferences) } 9 | it { is_expected.to respond_to(:conversations) } 10 | it { is_expected.to respond_to(:crm) } 11 | it { is_expected.to respond_to(:events) } 12 | it { is_expected.to respond_to(:files) } 13 | it { is_expected.to respond_to(:marketing) } 14 | it { is_expected.to respond_to(:oauth) } 15 | it { is_expected.to respond_to(:settings) } 16 | it { is_expected.to respond_to(:webhooks) } 17 | it { is_expected.to respond_to(:api_request) } 18 | end 19 | -------------------------------------------------------------------------------- /spec/discovery/cms/hubdb/rows_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Hubdb::RowsApi' do 4 | subject(:rows_api) { Hubspot::Client.new(access_token: 'test').cms.hubdb.rows_api } 5 | 6 | it { is_expected.to respond_to(:clone_draft_table_row) } 7 | it { is_expected.to respond_to(:create_table_row) } 8 | it { is_expected.to respond_to(:get_draft_table_row_by_id) } 9 | it { is_expected.to respond_to(:get_table_row) } 10 | it { is_expected.to respond_to(:get_table_rows) } 11 | it { is_expected.to respond_to(:purge_draft_table_row) } 12 | it { is_expected.to respond_to(:read_draft_table_rows) } 13 | it { is_expected.to respond_to(:replace_draft_table_row) } 14 | it { is_expected.to respond_to(:update_draft_table_row) } 15 | end 16 | -------------------------------------------------------------------------------- /spec/discovery/files/files_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Files::FilesApi' do 4 | subject(:api) { Hubspot::Client.new(access_token: 'test').files.files_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:check_import) } 8 | it { is_expected.to respond_to(:delete) } 9 | it { is_expected.to respond_to(:do_search) } 10 | it { is_expected.to respond_to(:get_by_id) } 11 | it { is_expected.to respond_to(:get_metadata) } 12 | it { is_expected.to respond_to(:get_signed_url) } 13 | it { is_expected.to respond_to(:import_from_url) } 14 | it { is_expected.to respond_to(:replace) } 15 | it { is_expected.to respond_to(:update_properties) } 16 | it { is_expected.to respond_to(:upload) } 17 | end 18 | -------------------------------------------------------------------------------- /spec/discovery/base_module_client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'hubspot/discovery/base_module_client' 3 | 4 | describe 'Hubspot::Discovery::BaseModuleClient' do 5 | class Hubspot::Discovery::TestModuleClass 6 | def api_classes 7 | %i[ 8 | settings 9 | subscriptions 10 | ].freeze 11 | end 12 | 13 | def api_modules 14 | %i[ 15 | automation 16 | cms 17 | ].freeze 18 | end 19 | 20 | include Hubspot::Discovery::BaseModuleClient 21 | end 22 | 23 | subject(:client) { Hubspot::Discovery::TestModuleClass.new(access_token: 'test') } 24 | 25 | it { is_expected.to respond_to(:automation) } 26 | it { is_expected.to respond_to(:cms) } 27 | it { is_expected.to respond_to(:settings_api) } 28 | it { is_expected.to respond_to(:subscriptions_api) } 29 | end 30 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../base_module_client' 2 | require_relative '../../helpers/get_all_helper' 3 | 4 | module Hubspot 5 | module Discovery 6 | module Crm 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_modules 11 | %i[ 12 | associations 13 | commerce 14 | companies 15 | contacts 16 | deals 17 | exports 18 | extensions 19 | imports 20 | line_items 21 | lists 22 | objects 23 | owners 24 | pipelines 25 | products 26 | properties 27 | quotes 28 | schemas 29 | tickets 30 | timeline 31 | ].freeze 32 | end 33 | end 34 | end 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /spec/discovery/crm/client_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Client' do 4 | subject(:client) { Hubspot::Client.new(access_token: 'test').crm } 5 | 6 | it { is_expected.to respond_to(:associations) } 7 | it { is_expected.to respond_to(:companies) } 8 | it { is_expected.to respond_to(:contacts) } 9 | it { is_expected.to respond_to(:deals) } 10 | it { is_expected.to respond_to(:extensions) } 11 | it { is_expected.to respond_to(:imports) } 12 | it { is_expected.to respond_to(:line_items) } 13 | it { is_expected.to respond_to(:objects) } 14 | it { is_expected.to respond_to(:owners) } 15 | it { is_expected.to respond_to(:pipelines) } 16 | it { is_expected.to respond_to(:products) } 17 | it { is_expected.to respond_to(:quotes) } 18 | it { is_expected.to respond_to(:schemas) } 19 | it { is_expected.to respond_to(:tickets) } 20 | it { is_expected.to respond_to(:timeline) } 21 | end 22 | -------------------------------------------------------------------------------- /lib/hubspot/discovery/crm/objects/client.rb: -------------------------------------------------------------------------------- 1 | require_relative '../../base_module_client' 2 | 3 | module Hubspot 4 | module Discovery 5 | module Crm 6 | module Objects 7 | class Client 8 | include Hubspot::Discovery::BaseModuleClient 9 | 10 | def api_modules 11 | %i[ 12 | calls 13 | communications 14 | deal_splits 15 | emails 16 | feedback_submissions 17 | goals 18 | leads 19 | meetings 20 | notes 21 | postal_mail 22 | tasks 23 | taxes 24 | ].freeze 25 | end 26 | 27 | def api_classes 28 | %i[ 29 | basic 30 | batch 31 | search 32 | ].freeze 33 | end 34 | end 35 | end 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/hubspot/helpers/requests/http_auth.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | module Helpers 3 | class Auth 4 | def self.get_auth_types 5 | [:access_token, :api_key] 6 | end 7 | 8 | def self.has_auth_value?(source, key) 9 | !source[key].nil? && !source[key].to_s.empty? 10 | end 11 | 12 | def self.choose_auth(config, options) 13 | auth_types = get_auth_types 14 | auth_type = options[:auth_type] || nil 15 | 16 | if auth_type.nil? 17 | auth_types.each do |key| 18 | if has_auth_value?(config, key) 19 | auth_type = key 20 | break 21 | end 22 | end 23 | end 24 | 25 | if auth_type && auth_types.include?(auth_type) 26 | return { auth_type: auth_type } 27 | else 28 | raise "Unsupported auth_type: #{auth_type}" 29 | end 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/hubspot/client.rb: -------------------------------------------------------------------------------- 1 | require_relative 'discovery/base_module_client' 2 | 3 | module Hubspot 4 | class Client 5 | include Hubspot::Discovery::BaseModuleClient 6 | 7 | def initialize(params) 8 | raise 'Please, pass :api_key or :access_token' if params[:api_key].nil? && params[:developer_api_key].nil? && params[:access_token].nil? 9 | super 10 | end 11 | 12 | def api_modules 13 | %i[ 14 | automation 15 | cms 16 | communication_preferences 17 | conversations 18 | crm 19 | events 20 | files 21 | marketing 22 | oauth 23 | settings 24 | webhooks 25 | ].freeze 26 | end 27 | 28 | def api_request(options) 29 | require_relative 'helpers/requests/http_request_builder' 30 | 31 | request = Hubspot::Helpers::Request.new(@params, options) 32 | request.send 33 | end 34 | 35 | def base_module 36 | 'Hubspot::Discovery' 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /spec/discovery/cms/hubdb/tables_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Hubdb::TablesApi' do 4 | subject(:tables_api) { Hubspot::Client.new(access_token: 'test').cms.hubdb.tables_api } 5 | 6 | it { is_expected.to respond_to(:archive_table) } 7 | it { is_expected.to respond_to(:clone_draft_table) } 8 | it { is_expected.to respond_to(:create_table) } 9 | it { is_expected.to respond_to(:export_draft_table) } 10 | it { is_expected.to respond_to(:export_table) } 11 | it { is_expected.to respond_to(:get_all_draft_tables) } 12 | it { is_expected.to respond_to(:get_all_tables) } 13 | it { is_expected.to respond_to(:get_draft_table_details_by_id) } 14 | it { is_expected.to respond_to(:get_table_details) } 15 | it { is_expected.to respond_to(:import_draft_table) } 16 | it { is_expected.to respond_to(:publish_draft_table) } 17 | it { is_expected.to respond_to(:unpublish_table) } 18 | it { is_expected.to respond_to(:reset_draft_table) } 19 | it { is_expected.to respond_to(:update_draft_table) } 20 | end 21 | -------------------------------------------------------------------------------- /spec/discovery/cms/blogs/blog-posts/basic_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Cms::Blogs::BlogPosts::BasicApi' do 4 | subject(:BasicApi) { Hubspot::Client.new(access_token: 'test').cms.blogs.blog_posts.basic_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:clone) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:get_by_id) } 10 | it { is_expected.to respond_to(:get_draft_by_id) } 11 | it { is_expected.to respond_to(:get_page) } 12 | it { is_expected.to respond_to(:get_previous_version) } 13 | it { is_expected.to respond_to(:get_previous_versions) } 14 | it { is_expected.to respond_to(:push_live) } 15 | it { is_expected.to respond_to(:reset_draft) } 16 | it { is_expected.to respond_to(:restore_previous_version) } 17 | it { is_expected.to respond_to(:restore_previous_version_to_draft) } 18 | it { is_expected.to respond_to(:schedule) } 19 | it { is_expected.to respond_to(:update) } 20 | it { is_expected.to respond_to(:update_draft) } 21 | end 22 | -------------------------------------------------------------------------------- /spec/discovery/marketing/emails/marketing_emails_api_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe 'Hubspot::Discovery::Marketing::Emails::MarketingEmailsApi' do 4 | subject(:MarketingEmailsApi) { Hubspot::Client.new(access_token: 'test').marketing.emails.marketing_emails_api } 5 | 6 | it { is_expected.to respond_to(:archive) } 7 | it { is_expected.to respond_to(:clone) } 8 | it { is_expected.to respond_to(:create) } 9 | it { is_expected.to respond_to(:get_page) } 10 | it { is_expected.to respond_to(:create_ab_test_variation) } 11 | it { is_expected.to respond_to(:get_ab_test_variation) } 12 | it { is_expected.to respond_to(:get_by_id) } 13 | it { is_expected.to respond_to(:get_draft) } 14 | it { is_expected.to respond_to(:get_page) } 15 | it { is_expected.to respond_to(:get_revision_by_id) } 16 | it { is_expected.to respond_to(:get_revisions) } 17 | it { is_expected.to respond_to(:publish_or_send) } 18 | it { is_expected.to respond_to(:reset_draft) } 19 | it { is_expected.to respond_to(:restore_draft_revision) } 20 | it { is_expected.to respond_to(:restore_revision) } 21 | it { is_expected.to respond_to(:unpublish_or_cancel) } 22 | it { is_expected.to respond_to(:update) } 23 | it { is_expected.to respond_to(:upsert_draft) } 24 | end 25 | -------------------------------------------------------------------------------- /lib/hubspot/helpers/get_all_helper.rb: -------------------------------------------------------------------------------- 1 | module Hubspot 2 | module Helpers 3 | module GetAllHelper 4 | MAX_PAGE_SIZE = 100 5 | # List 6 | # Read all contacts. Control what is returned via the `properties` query param. 7 | # @param [Hash] opts the optional parameters 8 | # @option opts [Array] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. 9 | # @option opts [Array] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. 10 | # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false) 11 | # @return Array 12 | def get_all(opts = {}) 13 | after = nil 14 | objects = [] 15 | opts[:limit] ||= MAX_PAGE_SIZE 16 | loop do 17 | page_opts = opts.merge(after: after) 18 | page = get_page(page_opts) 19 | objects.concat(page.results) 20 | break objects if page.paging.nil? 21 | 22 | after = page.paging._next.after 23 | end 24 | 25 | end 26 | end 27 | end 28 | end -------------------------------------------------------------------------------- /hubspot-api-client.gemspec: -------------------------------------------------------------------------------- 1 | $:.push File.expand_path("../lib", __FILE__) 2 | require "hubspot/version" 3 | 4 | Gem::Specification.new do |s| 5 | s.name = "hubspot-api-client" 6 | s.version = Hubspot::VERSION 7 | s.platform = Gem::Platform::RUBY 8 | s.authors = ["HubSpot"] 9 | s.email = [""] 10 | s.homepage = "https://github.com/HubSpot/hubspot-api-ruby" 11 | s.summary = "HubSpot Ruby API Gem" 12 | s.description = "HubSpot Ruby API client" 13 | s.license = "Apache-2.0" 14 | s.required_ruby_version = ">= 2.7" 15 | 16 | s.add_runtime_dependency 'typhoeus', '~> 1.4.0' 17 | s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' 18 | 19 | s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' 20 | s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1' 21 | s.add_development_dependency 'webmock', '~> 3.14' 22 | s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6' 23 | s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2' 24 | s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' 25 | s.add_development_dependency 'rake-release', '~> 1.3' 26 | s.add_development_dependency 'pry', '~> 0.14' 27 | 28 | s.files = `git ls-files -z`.split("\x0").reject do |f| 29 | f.match(%r{^(sample-apps)/}) 30 | end 31 | s.test_files = `find spec/*`.split("\n") 32 | s.executables = [] 33 | s.require_paths = ["lib"] 34 | end 35 | -------------------------------------------------------------------------------- /lib/hubspot/codegen/files/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Files 3 | 4 | #Upload and manage files. 5 | 6 | The version of the OpenAPI document: v3 7 | 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 6.2.1 10 | 11 | =end 12 | 13 | module Hubspot 14 | module Files 15 | class ApiError < ::StandardError 16 | attr_reader :code, :response_headers, :response_body 17 | 18 | # Usage examples: 19 | # ApiError.new 20 | # ApiError.new("message") 21 | # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") 22 | # ApiError.new(:code => 404, :message => "Not Found") 23 | def initialize(arg = nil) 24 | if arg.is_a? Hash 25 | if arg.key?(:message) || arg.key?('message') 26 | super(arg[:message] || arg['message']) 27 | else 28 | super arg 29 | end 30 | 31 | arg.each do |k, v| 32 | instance_variable_set "@#{k}", v 33 | end 34 | else 35 | super arg 36 | end 37 | end 38 | 39 | # Override to_s to display a friendly error message 40 | def to_s 41 | message 42 | end 43 | 44 | def message 45 | if @message.nil? 46 | msg = "Error message: the server returns an error" 47 | else 48 | msg = @message 49 | end 50 | 51 | msg += "\nHTTP status code: #{code}" if code 52 | msg += "\nResponse headers: #{response_headers}" if response_headers 53 | msg += "\nResponse body: #{response_body}" if response_body 54 | 55 | msg 56 | end 57 | end 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /lib/hubspot/codegen/oauth/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Auth Oauth 3 | 4 | #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | 6 | The version of the OpenAPI document: v1 7 | 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 6.2.1 10 | 11 | =end 12 | 13 | module Hubspot 14 | module Oauth 15 | class ApiError < ::StandardError 16 | attr_reader :code, :response_headers, :response_body 17 | 18 | # Usage examples: 19 | # ApiError.new 20 | # ApiError.new("message") 21 | # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") 22 | # ApiError.new(:code => 404, :message => "Not Found") 23 | def initialize(arg = nil) 24 | if arg.is_a? Hash 25 | if arg.key?(:message) || arg.key?('message') 26 | super(arg[:message] || arg['message']) 27 | else 28 | super arg 29 | end 30 | 31 | arg.each do |k, v| 32 | instance_variable_set "@#{k}", v 33 | end 34 | else 35 | super arg 36 | end 37 | end 38 | 39 | # Override to_s to display a friendly error message 40 | def to_s 41 | message 42 | end 43 | 44 | def message 45 | if @message.nil? 46 | msg = "Error message: the server returns an error" 47 | else 48 | msg = @message 49 | end 50 | 51 | msg += "\nHTTP status code: #{code}" if code 52 | msg += "\nResponse headers: #{response_headers}" if response_headers 53 | msg += "\nResponse body: #{response_body}" if response_body 54 | 55 | msg 56 | end 57 | end 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /lib/hubspot/codegen/events/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Events Events 3 | 4 | #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 | 6 | The version of the OpenAPI document: v3 7 | 8 | Generated by: https://openapi-generator.tech 9 | OpenAPI Generator version: 6.2.1 10 | 11 | =end 12 | 13 | module Hubspot 14 | module Events 15 | class ApiError < ::StandardError 16 | attr_reader :code, :response_headers, :response_body 17 | 18 | # Usage examples: 19 | # ApiError.new 20 | # ApiError.new("message") 21 | # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") 22 | # ApiError.new(:code => 404, :message => "Not Found") 23 | def initialize(arg = nil) 24 | if arg.is_a? Hash 25 | if arg.key?(:message) || arg.key?('message') 26 | super(arg[:message] || arg['message']) 27 | else 28 | super arg 29 | end 30 | 31 | arg.each do |k, v| 32 | instance_variable_set "@#{k}", v 33 | end 34 | else 35 | super arg 36 | end 37 | end 38 | 39 | # Override to_s to display a friendly error message 40 | def to_s 41 | message 42 | end 43 | 44 | def message 45 | if @message.nil? 46 | msg = "Error message: the server returns an error" 47 | else 48 | msg = @message 49 | end 50 | 51 | msg += "\nHTTP status code: #{code}" if code 52 | msg += "\nResponse headers: #{response_headers}" if response_headers 53 | msg += "\nResponse body: #{response_body}" if response_body 54 | 55 | msg 56 | end 57 | end 58 | end 59 | end 60 | --------------------------------------------------------------------------------