Class: HubSpotSDK::Resources::Cms::Pages::LandingPages::Draft
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Pages::LandingPages::Draft
- Defined in:
- lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb
Instance Method Summary collapse
-
#get(object_id_, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPages::DraftGetParams for more details.
-
#initialize(client:) ⇒ Draft
constructor
private
A new instance of Draft.
-
#push_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(object_id_, request_options: {}) ⇒ nil
Discards any edits and resets the draft to match the live version.
-
#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:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPages::DraftUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Draft
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 Draft.
218 219 220 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb', line 218 def initialize(client:) @client = client end |
Instance Method Details
#get(object_id_, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPages::DraftGetParams for more details.
Retrieve the full draft version of a landing page, specified by page ID.
165 166 167 168 169 170 171 172 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb', line 165 def get(object_id_, params = {}) @client.request( method: :get, path: ["cms/pages/2026-03/landing-pages/%1$s/draft", object_id_], model: HubSpotSDK::Cms::PagesPage, options: params[:request_options] ) end |
#push_live(object_id_, request_options: {}) ⇒ nil
Take any changes from the draft version of the Landing Page and apply them to the live version.
186 187 188 189 190 191 192 193 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb', line 186 def push_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(object_id_, request_options: {}) ⇒ nil
Discards any edits and resets the draft to match the live version.
206 207 208 209 210 211 212 213 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb', line 206 def reset(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 |
#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:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Some parameter documentations has been truncated, see Models::Cms::Pages::LandingPages::DraftUpdateParams 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.
139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/draft.rb', line 139 def update(object_id_, params) parsed, = HubSpotSDK::Cms::Pages::LandingPages::DraftUpdateParams.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::PagesPage, options: ) end |