Class: HubSpotSDK::Resources::Cms::Pages::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Pages::Batch
- Defined in:
- lib/hubspot_sdk/resources/cms/pages/batch.rb
Instance Method Summary collapse
-
#create_folders(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseContentFolder
Create a batch of folders as detailed in the request body.
-
#create_landing_pages(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Create a batch of landing pages as detailed in the request body.
-
#create_site_pages(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Create a batch of website pages as specified in the request body.
-
#delete_folders(inputs:, request_options: {}) ⇒ nil
Delete a batch of folders as specified in the request body.
-
#delete_landing_pages(inputs:, request_options: {}) ⇒ nil
Delete landing pages specified by ID in the request body.
-
#delete_site_pages(inputs:, request_options: {}) ⇒ nil
Delete a batch of website pages as specified in the request body.
-
#get_landing_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Retrieve a batch of landing pages as specified in the request body.
-
#get_site_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Retrieve a batch of website pages as specified in the request body.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
-
#update_folders(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseContentFolder
Update a batch of landing page folders as specified in the request body.
-
#update_landing_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Update a batch of landing pages as specified in the request body.
-
#update_site_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Update a batch of website pages as specified in the request body.
Constructor Details
#initialize(client:) ⇒ Batch
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 Batch.
294 295 296 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 294 def initialize(client:) @client = client end |
Instance Method Details
#create_folders(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseContentFolder
Create a batch of folders as detailed in the request body.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 19 def create_folders(params) parsed, = HubSpotSDK::Cms::Pages::BatchCreateFoldersParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/folders/batch/create", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::BatchResponseContentFolder, options: ) end |
#create_landing_pages(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Create a batch of landing pages as detailed in the request body.
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 42 def create_landing_pages(params) parsed, = HubSpotSDK::Cms::Pages::BatchCreateLandingPagesParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/batch/create", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |
#create_site_pages(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Create a batch of website pages as specified in the request body.
65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 65 def create_site_pages(params) parsed, = HubSpotSDK::Cms::Pages::BatchCreateSitePagesParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/batch/create", headers: {"content-type" => "*/*"}, body: parsed, model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |
#delete_folders(inputs:, request_options: {}) ⇒ nil
Delete a batch of folders as specified in the request body.
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 88 def delete_folders(params) parsed, = HubSpotSDK::Cms::Pages::BatchDeleteFoldersParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/folders/batch/archive", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |
#delete_landing_pages(inputs:, request_options: {}) ⇒ nil
Delete landing pages specified by ID in the request body. Note: this is not the same as the dashboard ‘archive` function. To perform a dashboard `archive` send an normal update with the `archivedInDashboard` field set to `true`.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 113 def delete_landing_pages(params) parsed, = HubSpotSDK::Cms::Pages::BatchDeleteLandingPagesParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/batch/archive", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |
#delete_site_pages(inputs:, request_options: {}) ⇒ nil
Delete a batch of website pages as specified in the request body. Note: this is not the same as the dashboard ‘archive` function. To perform a dashboard `archive` send an normal update with the `archivedInDashboard` field set to `true`.
139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 139 def delete_site_pages(params) parsed, = HubSpotSDK::Cms::Pages::BatchDeleteSitePagesParams.dump_request(params) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/batch/archive", headers: {"content-type" => "*/*"}, body: parsed, model: NilClass, options: ) end |
#get_landing_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Retrieve a batch of landing pages as specified in the request body.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 164 def get_landing_pages(params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::BatchGetLandingPagesParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/batch/read", query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |
#get_site_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Retrieve a batch of website pages as specified in the request body.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 192 def get_site_pages(params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::BatchGetSitePagesParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/batch/read", query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |
#update_folders(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseContentFolder
Update a batch of landing page folders as specified in the request body.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 220 def update_folders(params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::BatchUpdateFoldersParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/folders/batch/update", query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::BatchResponseContentFolder, options: ) end |
#update_landing_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Update a batch of landing pages as specified in the request body.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 248 def update_landing_pages(params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::BatchUpdateLandingPagesParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "cms/pages/2026-03/landing-pages/batch/update", query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |
#update_site_pages(inputs:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponsePage
Update a batch of website pages as specified in the request body.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/hubspot_sdk/resources/cms/pages/batch.rb', line 276 def update_site_pages(params) query_params = [:archived] parsed, = HubSpotSDK::Cms::Pages::BatchUpdateSitePagesParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "cms/pages/2026-03/site-pages/batch/update", query: query, headers: {"content-type" => "*/*"}, body: parsed.except(*query_params), model: HubSpotSDK::Cms::BatchResponsePage, options: ) end |