Class: HubSpotSDK::Resources::Cms::Pages::ABTests
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Pages::ABTests
- Defined in:
- lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb
Instance Method Summary collapse
-
#create_landing_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Create a new A/B test variation based on the information provided in the request body.
-
#create_site_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
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.
-
#end_site_page_test(ab_test_id:, winner_id:, request_options: {}) ⇒ nil
End an active A/B test and designate a winner.
-
#initialize(client:) ⇒ ABTests
constructor
private
A new instance of ABTests.
-
#rerun_landing_page_test(ab_test_id:, variation_id:, request_options: {}) ⇒ nil
Rerun a previous A/B test.
-
#rerun_site_page_test(ab_test_id:, variation_id:, request_options: {}) ⇒ nil
Rerun a previous A/B test.
Constructor Details
#initialize(client:) ⇒ ABTests
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 ABTests.
163 164 165 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 163 def initialize(client:) @client = client end |
Instance Method Details
#create_landing_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Create a new A/B test variation based on the information provided in the request body.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 22 def create_landing_page_variation(params) parsed, = HubSpotSDK::Cms::Pages::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::PageData, options: ) end |
#create_site_page_variation(content_id:, variation_name:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::PageData
Create a new A/B test variation based on the information provided in the request body.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 48 def create_site_page_variation(params) parsed, = HubSpotSDK::Cms::Pages::ABTestCreateSitePageVariationParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/ab-test/create-variation", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::PageData, options: ) end |
#end_landing_page_test(ab_test_id:, winner_id:, request_options: {}) ⇒ nil
End an active A/B test and designate a winner.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 73 def end_landing_page_test(params) parsed, = HubSpotSDK::Cms::Pages::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 |
#end_site_page_test(ab_test_id:, winner_id:, request_options: {}) ⇒ nil
End an active A/B test and designate a winner.
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 98 def end_site_page_test(params) parsed, = HubSpotSDK::Cms::Pages::ABTestEndSitePageTestParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/site-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.
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 123 def rerun_landing_page_test(params) parsed, = HubSpotSDK::Cms::Pages::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 |
#rerun_site_page_test(ab_test_id:, variation_id:, request_options: {}) ⇒ nil
Rerun a previous A/B test.
148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/hubspot_sdk/resources/cms/pages/a_b_tests.rb', line 148 def rerun_site_page_test(params) parsed, = HubSpotSDK::Cms::Pages::ABTestRerunSitePageTestParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/ab-test/rerun", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |