Class: HubSpotSDK::Resources::Cms::Pages::LandingPages::AbTest
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Pages::LandingPages::AbTest
- Defined in:
- lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb
Instance Method Summary collapse
-
#create_landing_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Create a new A/B test variation based on the information provided in the request body.
-
#end_landing_page_test(ab_test_id:, winner_id:, request_options: {}) ⇒ nil
End an active A/B test and designate a winner.
-
#initialize(client:) ⇒ AbTest
constructor
private
A new instance of AbTest.
-
#rerun_landing_page_test(ab_test_id:, variation_id:, request_options: {}) ⇒ nil
Rerun a previous A/B test.
Constructor Details
#initialize(client:) ⇒ AbTest
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 AbTest.
91 92 93 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#create_landing_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PagesPage
Create a new A/B test variation based on the information provided in the request body.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb', line 23 def create_landing_page_variation(params) parsed, = HubSpotSDK::Cms::Pages::LandingPages::AbTestCreateLandingPageVariationParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/ab-test/create-variation", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::PagesPage, options: ) end |
#end_landing_page_test(ab_test_id:, winner_id:, request_options: {}) ⇒ nil
End an active A/B test and designate a winner.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb', line 49 def end_landing_page_test(params) parsed, = HubSpotSDK::Cms::Pages::LandingPages::AbTestEndLandingPageTestParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/ab-test/end", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |
#rerun_landing_page_test(ab_test_id:, variation_id:, request_options: {}) ⇒ nil
Rerun a previous A/B test.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/hubspot_sdk/resources/cms/pages/landing_pages/ab_test.rb', line 75 def rerun_landing_page_test(params) parsed, = HubSpotSDK::Cms::Pages::LandingPages::AbTestRerunLandingPageTestParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/ab-test/rerun", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |