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
Instance Method Summary collapse
-
#clone_(id:, clone_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
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::PageData
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::PageData
Retrieve a landing page, specified by its ID.
-
#get_draft(object_id_, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Retrieve the full draft version of a landing page, specified by page 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::PageData>
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageListParams for more details.
-
#push_draft_live(object_id_, request_options: {}) ⇒ nil
Take any changes from the draft version of the Landing Page and apply them to the live version.
-
#reset_draft(object_id_, request_options: {}) ⇒ nil
Discards any edits and resets the draft to match the live version.
-
#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::PageData
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageUpdateParams for more details.
-
#update_draft(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:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageUpdateDraftParams 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.
653 654 655 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 653 def initialize(client:) @client = client end |
Instance Method Details
#clone_(id:, clone_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Create a copy of an existing landing page.
387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 387 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::PageData, 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::PageData
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageCreateParams for more details.
Create a new landing page.
134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 134 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::PageData, options: ) end |
#delete(object_id_, archived: nil, request_options: {}) ⇒ nil
Delete a landing page, specified by its ID.
362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 362 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::PageData
Retrieve a landing page, specified by its ID.
414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 414 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::PageData, options: ) end |
#get_draft(object_id_, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Retrieve the full draft version of a landing page, specified by page ID.
436 437 438 439 440 441 442 443 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 436 def get_draft(object_id_, params = {}) @client.request( method: :get, path: ["cms/pages/2026-03/landing-pages/%1$s/draft", object_id_], model: HubSpotSDK::Cms::PageData, options: params[:request_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::PageData>
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageListParams for more details.
Get the list of landing pages. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 329 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::PageData, options: ) end |
#push_draft_live(object_id_, request_options: {}) ⇒ nil
Take any changes from the draft version of the Landing Page and apply them to the live version.
456 457 458 459 460 461 462 463 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 456 def push_draft_live(object_id_, params = {}) @client.request( method: :post, path: ["cms/pages/2026-03/landing-pages/%1$s/draft/push-live", object_id_], model: NilClass, options: params[:request_options] ) end |
#reset_draft(object_id_, request_options: {}) ⇒ nil
Discards any edits and resets the draft to match the live version.
475 476 477 478 479 480 481 482 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 475 def reset_draft(object_id_, params = {}) @client.request( method: :post, path: ["cms/pages/2026-03/landing-pages/%1$s/draft/reset", object_id_], model: NilClass, options: params[:request_options] ) end |
#schedule(id:, publish_date:, request_options: {}) ⇒ nil
Schedule a landing page to be published.
497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 497 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::PageData
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_
278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 278 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::PageData, options: ) end |
#update_draft(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:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPageUpdateDraftParams for more details.
Partially updates the draft version of a single landing page, specified by its ID. You only need to specify the column values that you are modifying.
638 639 640 641 642 643 644 645 646 647 648 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages.rb', line 638 def update_draft(object_id_, params) parsed, = HubSpotSDK::Cms::Pages::LandingPageUpdateDraftParams.dump_request(params) @client.request( method: :patch, path: ["cms/pages/2026-03/landing-pages/%1$s/draft", object_id_], headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::PageData, options: ) end |