Class: HubSpotSDK::Resources::Cms::Pages::LandingPages
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Pages::LandingPages
- Defined in:
- lib/hubspot_sdk/resources/cms/pages/landing_pages.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/batch.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/folders.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/revisions.rb,
lib/hubspot_sdk/resources/cms/pages/landing_pages/multi_language.rb
Defined Under Namespace
Classes: AbTest, Batch, Draft, Folders, MultiLanguage, Revisions
Instance Attribute Summary collapse
- #ab_test ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::AbTest readonly
- #batch ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Batch readonly
- #draft ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Draft readonly
- #folders ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Folders readonly
- #multi_language ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::MultiLanguage readonly
- #revisions ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Revisions readonly
Instance Method Summary collapse
-
#clone_(id:, clone_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Create a copy of an existing landing page.
-
#create(id:, ab_status:, ab_test_id:, archived_at:, archived_in_dashboard:, attached_stylesheets:, author_name:, campaign:, category_id:, content_group_id:, content_type_category:, created:, created_by_id:, currently_published:, current_state:, domain:, dynamic_page_data_source_id:, dynamic_page_data_source_type:, dynamic_page_hub_db_table_id:, enable_domain_stylesheets:, enable_layout_stylesheets:, featured_image:, featured_image_alt_text:, folder_id:, footer_html:, head_html:, html_title:, include_default_custom_css:, language:, layout_sections:, link_rel_canonical_url:, mab_experiment_id:, meta_description:, name:, page_expiry_date:, page_expiry_enabled:, page_expiry_redirect_id:, page_expiry_redirect_url:, page_redirected:, password:, public_access_rules:, public_access_rules_enabled:, publish_date:, publish_immediately:, slug:, state:, subcategory:, template_path:, theme_settings_values:, translated_from_id:, translations:, updated:, updated_by_id:, url:, use_featured_image:, widget_containers:, widgets:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageCreateParams for more details.
-
#delete(object_id_, archived: nil, request_options: {}) ⇒ nil
Delete a landing page, specified by its ID.
-
#get(object_id_, archived: nil, property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Retrieve a landing page, specified by its ID.
-
#initialize(client:) ⇒ LandingPages
constructor
private
A new instance of LandingPages.
-
#list(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Cms::PagesPage>
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageListParams for more details.
-
#schedule(id:, publish_date:, request_options: {}) ⇒ nil
Schedule a landing page to be published.
-
#update(object_id_, id:, ab_status:, ab_test_id:, archived_at:, archived_in_dashboard:, attached_stylesheets:, author_name:, campaign:, category_id:, content_group_id:, content_type_category:, created:, created_by_id:, currently_published:, current_state:, domain:, dynamic_page_data_source_id:, dynamic_page_data_source_type:, dynamic_page_hub_db_table_id:, enable_domain_stylesheets:, enable_layout_stylesheets:, featured_image:, featured_image_alt_text:, folder_id:, footer_html:, head_html:, html_title:, include_default_custom_css:, language:, layout_sections:, link_rel_canonical_url:, mab_experiment_id:, meta_description:, name:, page_expiry_date:, page_expiry_enabled:, page_expiry_redirect_id:, page_expiry_redirect_url:, page_redirected:, password:, public_access_rules:, public_access_rules_enabled:, publish_date:, publish_immediately:, slug:, state:, subcategory:, template_path:, theme_settings_values:, translated_from_id:, translations:, updated:, updated_by_id:, url:, use_featured_image:, widget_containers:, widgets:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ LandingPages
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of LandingPages.
473 474 475 476 477 478 479 480 481 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 473 def initialize(client:) @client = client @ab_test = HubSpotSDK::Resources::Cms::Pages::LandingPages::AbTest.new(client: client) @batch = HubSpotSDK::Resources::Cms::Pages::LandingPages::Batch.new(client: client) @draft = HubSpotSDK::Resources::Cms::Pages::LandingPages::Draft.new(client: client) @folders = HubSpotSDK::Resources::Cms::Pages::LandingPages::Folders.new(client: client) @multi_language = HubSpotSDK::Resources::Cms::Pages::LandingPages::MultiLanguage.new(client: client) @revisions = HubSpotSDK::Resources::Cms::Pages::LandingPages::Revisions.new(client: client) end |
Instance Attribute Details
#ab_test ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::AbTest (readonly)
9 10 11 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 9 def ab_test @ab_test end |
#batch ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Batch (readonly)
12 13 14 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 12 def batch @batch end |
#draft ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Draft (readonly)
15 16 17 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 15 def draft @draft end |
#folders ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Folders (readonly)
18 19 20 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 18 def folders @folders end |
#multi_language ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::MultiLanguage (readonly)
21 22 23 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 21 def multi_language @multi_language end |
#revisions ⇒ HubSpotSDK::Resources::Cms::Pages::LandingPages::Revisions (readonly)
24 25 26 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 24 def revisions @revisions end |
Instance Method Details
#clone_(id:, clone_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Create a copy of an existing landing page.
406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 406 def clone_(params) parsed, = HubSpotSDK::Cms::Pages::LandingPageCloneParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/clone", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::PagesPage, options: ) end |
#create(id:, ab_status:, ab_test_id:, archived_at:, archived_in_dashboard:, attached_stylesheets:, author_name:, campaign:, category_id:, content_group_id:, content_type_category:, created:, created_by_id:, currently_published:, current_state:, domain:, dynamic_page_data_source_id:, dynamic_page_data_source_type:, dynamic_page_hub_db_table_id:, enable_domain_stylesheets:, enable_layout_stylesheets:, featured_image:, featured_image_alt_text:, folder_id:, footer_html:, head_html:, html_title:, include_default_custom_css:, language:, layout_sections:, link_rel_canonical_url:, mab_experiment_id:, meta_description:, name:, page_expiry_date:, page_expiry_enabled:, page_expiry_redirect_id:, page_expiry_redirect_url:, page_redirected:, password:, public_access_rules:, public_access_rules_enabled:, publish_date:, publish_immediately:, slug:, state:, subcategory:, template_path:, theme_settings_values:, translated_from_id:, translations:, updated:, updated_by_id:, url:, use_featured_image:, widget_containers:, widgets:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageCreateParams for more details.
Create a new landing page.
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 152 def create(params) parsed, = HubSpotSDK::Cms::Pages::LandingPageCreateParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::PagesPage, options: ) end |
#delete(object_id_, archived: nil, request_options: {}) ⇒ nil
Delete a landing page, specified by its ID.
381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 381 def delete(object_id_, params = {}) parsed, = HubSpotSDK::Cms::Pages::LandingPageDeleteParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :delete, path: ["cms/pages/2026-03/landing-pages/%1$s", object_id_], query: query, model: NilClass, options: ) end |
#get(object_id_, archived: nil, property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Retrieve a landing page, specified by its ID.
433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 433 def get(object_id_, params = {}) parsed, = HubSpotSDK::Cms::Pages::LandingPageGetParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["cms/pages/2026-03/landing-pages/%1$s", object_id_], query: query, model: HubSpotSDK::Cms::PagesPage, options: ) end |
#list(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ HubSpotSDK::Internal::Page<HubSpotSDK::Models::Cms::PagesPage>
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageListParams for more details.
Retrieve a list of landing pages in your HubSpot account. This endpoint allows you to filter landing pages based on creation and update timestamps, sort them, and paginate through results. You can also choose to include archived pages or specify certain properties to be included in the response.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 348 def list(params = {}) parsed, = HubSpotSDK::Cms::Pages::LandingPageListParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "cms/pages/2026-03/landing-pages", query: query.transform_keys( created_after: "createdAfter", created_at: "createdAt", created_before: "createdBefore", updated_after: "updatedAfter", updated_at: "updatedAt", updated_before: "updatedBefore" ), page: HubSpotSDK::Internal::Page, model: HubSpotSDK::Cms::PagesPage, options: ) end |
#schedule(id:, publish_date:, request_options: {}) ⇒ nil
Schedule a landing page to be published.
458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 458 def schedule(params) parsed, = HubSpotSDK::Cms::Pages::LandingPageScheduleParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/schedule", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |
#update(object_id_, id:, ab_status:, ab_test_id:, archived_at:, archived_in_dashboard:, attached_stylesheets:, author_name:, campaign:, category_id:, content_group_id:, content_type_category:, created:, created_by_id:, currently_published:, current_state:, domain:, dynamic_page_data_source_id:, dynamic_page_data_source_type:, dynamic_page_hub_db_table_id:, enable_domain_stylesheets:, enable_layout_stylesheets:, featured_image:, featured_image_alt_text:, folder_id:, footer_html:, head_html:, html_title:, include_default_custom_css:, language:, layout_sections:, link_rel_canonical_url:, mab_experiment_id:, meta_description:, name:, page_expiry_date:, page_expiry_enabled:, page_expiry_redirect_id:, page_expiry_redirect_url:, page_redirected:, password:, public_access_rules:, public_access_rules_enabled:, publish_date:, publish_immediately:, slug:, state:, subcategory:, template_path:, theme_settings_values:, translated_from_id:, translations:, updated:, updated_by_id:, url:, use_featured_image:, widget_containers:, widgets:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageUpdateParams for more details.
Sparse updates a single Landing Page object identified by the id in the path. You only need to specify the column values that you are modifying.
LANDING_
296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 296 def update(object_id_, params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::LandingPageUpdateParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :patch, path: ["cms/pages/2026-03/landing-pages/%1$s", object_id_], query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::PagesPage, options: ) end |