=begin #Pages #Use these endpoints for interacting with Landing Pages and Site Pages The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'cgi' module Hubspot module Cms module Pages class LandingPagesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete a Landing Page # Delete the Landing Page object identified by the id in the path. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [nil] def archive(object_id, opts = {}) archive_with_http_info(object_id, opts) nil end # Delete a Landing Page # Delete the Landing Page object identified by the id in the path. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def archive_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.archive ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.archive" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.archive", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a batch of Landing Pages # Delete the Landing Page objects identified 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. # @param batch_input_string [BatchInputString] The JSON array of Landing Page ids. # @param [Hash] opts the optional parameters # @return [nil] def archive_batch(batch_input_string, opts = {}) archive_batch_with_http_info(batch_input_string, opts) nil end # Delete a batch of Landing Pages # Delete the Landing Page objects identified 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. # @param batch_input_string [BatchInputString] The JSON array of Landing Page ids. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def archive_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.archive_batch ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling LandingPagesApi.archive_batch" end # resource path local_var_path = '/cms/v3/pages/landing-pages/batch/archive' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.archive_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#archive_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Folder # Delete the Folder object identified by the id in the path. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [nil] def archive_folder(object_id, opts = {}) archive_folder_with_http_info(object_id, opts) nil end # Delete a Folder # Delete the Folder object identified by the id in the path. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def archive_folder_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.archive_folder ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.archive_folder" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.archive_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#archive_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a batch of Folders # Delete the Folder objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Folder ids. # @param [Hash] opts the optional parameters # @return [nil] def archive_folders(batch_input_string, opts = {}) archive_folders_with_http_info(batch_input_string, opts) nil end # Delete a batch of Folders # Delete the Folder objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Folder ids. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def archive_folders_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.archive_folders ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling LandingPagesApi.archive_folders" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/batch/archive' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.archive_folders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#archive_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Attach a landing page to a multi-language group # Attach a landing page to a multi-language group. # @param attach_to_lang_primary_request_v_next [AttachToLangPrimaryRequestVNext] The JSON representation of the AttachToLangPrimaryRequest object. # @param [Hash] opts the optional parameters # @return [nil] def attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts) nil end # Attach a landing page to a multi-language group # Attach a landing page to a multi-language group. # @param attach_to_lang_primary_request_v_next [AttachToLangPrimaryRequestVNext] The JSON representation of the AttachToLangPrimaryRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.attach_to_lang_group ...' end # verify the required parameter 'attach_to_lang_primary_request_v_next' is set if @api_client.config.client_side_validation && attach_to_lang_primary_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'attach_to_lang_primary_request_v_next' when calling LandingPagesApi.attach_to_lang_group" end # resource path local_var_path = '/cms/v3/pages/landing-pages/multi-language/attach-to-lang-group' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_to_lang_primary_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.attach_to_lang_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#attach_to_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Clone a Landing Page # Clone a Landing Page # @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object. # @param [Hash] opts the optional parameters # @return [Page] def clone(content_clone_request_v_next, opts = {}) data, _status_code, _headers = clone_with_http_info(content_clone_request_v_next, opts) data end # Clone a Landing Page # Clone a Landing Page # @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def clone_with_http_info(content_clone_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.clone ...' end # verify the required parameter 'content_clone_request_v_next' is set if @api_client.config.client_side_validation && content_clone_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'content_clone_request_v_next' when calling LandingPagesApi.clone" end # resource path local_var_path = '/cms/v3/pages/landing-pages/clone' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(content_clone_request_v_next) # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.clone", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Landing Page # Create a new Landing Page # @param page [Page] The JSON representation of a new Landing Page. # @param [Hash] opts the optional parameters # @return [nil] def create(page, opts = {}) create_with_http_info(page, opts) nil end # Create a new Landing Page # Create a new Landing Page # @param page [Page] The JSON representation of a new Landing Page. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def create_with_http_info(page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create ...' end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling LandingPagesApi.create" end # resource path local_var_path = '/cms/v3/pages/landing-pages' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(page) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new A/B test variation # Create a new A/B test variation based on the information provided in the request body. # @param ab_test_create_request_v_next [AbTestCreateRequestVNext] The JSON representation of the AbTestCreateRequest object. # @param [Hash] opts the optional parameters # @return [Page] def create_ab_test_variation(ab_test_create_request_v_next, opts = {}) data, _status_code, _headers = create_ab_test_variation_with_http_info(ab_test_create_request_v_next, opts) data end # Create a new A/B test variation # Create a new A/B test variation based on the information provided in the request body. # @param ab_test_create_request_v_next [AbTestCreateRequestVNext] The JSON representation of the AbTestCreateRequest object. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def create_ab_test_variation_with_http_info(ab_test_create_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create_ab_test_variation ...' end # verify the required parameter 'ab_test_create_request_v_next' is set if @api_client.config.client_side_validation && ab_test_create_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'ab_test_create_request_v_next' when calling LandingPagesApi.create_ab_test_variation" end # resource path local_var_path = '/cms/v3/pages/landing-pages/ab-test/create-variation' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_create_request_v_next) # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create_ab_test_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create_ab_test_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a batch of Landing Pages # Create the Landing Page objects detailed in the request body. # @param batch_input_page [BatchInputPage] The JSON array of new Landing Pages to create. # @param [Hash] opts the optional parameters # @return [BatchResponsePage] def create_batch(batch_input_page, opts = {}) data, _status_code, _headers = create_batch_with_http_info(batch_input_page, opts) data end # Create a batch of Landing Pages # Create the Landing Page objects detailed in the request body. # @param batch_input_page [BatchInputPage] The JSON array of new Landing Pages to create. # @param [Hash] opts the optional parameters # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers def create_batch_with_http_info(batch_input_page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create_batch ...' end # verify the required parameter 'batch_input_page' is set if @api_client.config.client_side_validation && batch_input_page.nil? fail ArgumentError, "Missing the required parameter 'batch_input_page' when calling LandingPagesApi.create_batch" end # resource path local_var_path = '/cms/v3/pages/landing-pages/batch/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_page) # return_type return_type = opts[:debug_return_type] || 'BatchResponsePage' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new Folder # Create a new Folder # @param content_folder [ContentFolder] The JSON representation of a new Folder. # @param [Hash] opts the optional parameters # @return [ContentFolder] def create_folder(content_folder, opts = {}) data, _status_code, _headers = create_folder_with_http_info(content_folder, opts) data end # Create a new Folder # Create a new Folder # @param content_folder [ContentFolder] The JSON representation of a new Folder. # @param [Hash] opts the optional parameters # @return [Array<(ContentFolder, Integer, Hash)>] ContentFolder data, response status code and response headers def create_folder_with_http_info(content_folder, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create_folder ...' end # verify the required parameter 'content_folder' is set if @api_client.config.client_side_validation && content_folder.nil? fail ArgumentError, "Missing the required parameter 'content_folder' when calling LandingPagesApi.create_folder" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(content_folder) # return_type return_type = opts[:debug_return_type] || 'ContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a batch of Folders # Create the Folder objects detailed in the request body. # @param batch_input_content_folder [BatchInputContentFolder] The JSON array of new Folders to create. # @param [Hash] opts the optional parameters # @return [BatchResponseContentFolder] def create_folders(batch_input_content_folder, opts = {}) data, _status_code, _headers = create_folders_with_http_info(batch_input_content_folder, opts) data end # Create a batch of Folders # Create the Folder objects detailed in the request body. # @param batch_input_content_folder [BatchInputContentFolder] The JSON array of new Folders to create. # @param [Hash] opts the optional parameters # @return [Array<(BatchResponseContentFolder, Integer, Hash)>] BatchResponseContentFolder data, response status code and response headers def create_folders_with_http_info(batch_input_content_folder, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create_folders ...' end # verify the required parameter 'batch_input_content_folder' is set if @api_client.config.client_side_validation && batch_input_content_folder.nil? fail ArgumentError, "Missing the required parameter 'batch_input_content_folder' when calling LandingPagesApi.create_folders" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/batch/create' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_content_folder) # return_type return_type = opts[:debug_return_type] || 'BatchResponseContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create_folders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new language variation # Create a new language variation from an existing landing page # @param content_language_clone_request_v_next [ContentLanguageCloneRequestVNext] The JSON representation of the ContentLanguageCloneRequest object. # @param [Hash] opts the optional parameters # @return [Page] def create_lang_variation(content_language_clone_request_v_next, opts = {}) data, _status_code, _headers = create_lang_variation_with_http_info(content_language_clone_request_v_next, opts) data end # Create a new language variation # Create a new language variation from an existing landing page # @param content_language_clone_request_v_next [ContentLanguageCloneRequestVNext] The JSON representation of the ContentLanguageCloneRequest object. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def create_lang_variation_with_http_info(content_language_clone_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.create_lang_variation ...' end # verify the required parameter 'content_language_clone_request_v_next' is set if @api_client.config.client_side_validation && content_language_clone_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'content_language_clone_request_v_next' when calling LandingPagesApi.create_lang_variation" end # resource path local_var_path = '/cms/v3/pages/landing-pages/multi-language/create-language-variation' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(content_language_clone_request_v_next) # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.create_lang_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#create_lang_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Detach a landing page from a multi-language group # Detach a landing page from a multi-language group. # @param detach_from_lang_group_request_v_next [DetachFromLangGroupRequestVNext] The JSON representation of the DetachFromLangGroupRequest object. # @param [Hash] opts the optional parameters # @return [nil] def detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts) nil end # Detach a landing page from a multi-language group # Detach a landing page from a multi-language group. # @param detach_from_lang_group_request_v_next [DetachFromLangGroupRequestVNext] The JSON representation of the DetachFromLangGroupRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.detach_from_lang_group ...' end # verify the required parameter 'detach_from_lang_group_request_v_next' is set if @api_client.config.client_side_validation && detach_from_lang_group_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'detach_from_lang_group_request_v_next' when calling LandingPagesApi.detach_from_lang_group" end # resource path local_var_path = '/cms/v3/pages/landing-pages/multi-language/detach-from-lang-group' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(detach_from_lang_group_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.detach_from_lang_group", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#detach_from_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # End an active A/B test # End an active A/B test and designate a winner. # @param ab_test_end_request_v_next [AbTestEndRequestVNext] The JSON representation of the AbTestEndRequest object. # @param [Hash] opts the optional parameters # @return [nil] def end_active_ab_test(ab_test_end_request_v_next, opts = {}) end_active_ab_test_with_http_info(ab_test_end_request_v_next, opts) nil end # End an active A/B test # End an active A/B test and designate a winner. # @param ab_test_end_request_v_next [AbTestEndRequestVNext] The JSON representation of the AbTestEndRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def end_active_ab_test_with_http_info(ab_test_end_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.end_active_ab_test ...' end # verify the required parameter 'ab_test_end_request_v_next' is set if @api_client.config.client_side_validation && ab_test_end_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'ab_test_end_request_v_next' when calling LandingPagesApi.end_active_ab_test" end # resource path local_var_path = '/cms/v3/pages/landing-pages/ab-test/end' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_end_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.end_active_ab_test", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#end_active_ab_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a Landing Page # Retrieve the Landing Page object identified by the id in the path. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @option opts [String] :property # @return [Page] def get_by_id(object_id, opts = {}) data, _status_code, _headers = get_by_id_with_http_info(object_id, opts) data end # Retrieve a Landing Page # Retrieve the Landing Page object identified by the id in the path. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @option opts [String] :property # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def get_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_by_id ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_by_id" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve the full draft version of the Landing Page # Retrieve the full draft version of the Landing Page. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @return [Page] def get_draft_by_id(object_id, opts = {}) data, _status_code, _headers = get_draft_by_id_with_http_info(object_id, opts) data end # Retrieve the full draft version of the Landing Page # Retrieve the full draft version of the Landing Page. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def get_draft_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_draft_by_id ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_draft_by_id" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_draft_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_draft_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a Folder # Retrieve the Folder object identified by the id in the path. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @option opts [String] :property # @return [ContentFolder] def get_folder_by_id(object_id, opts = {}) data, _status_code, _headers = get_folder_by_id_with_http_info(object_id, opts) data end # Retrieve a Folder # Retrieve the Folder object identified by the id in the path. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @option opts [String] :property # @return [Array<(ContentFolder, Integer, Hash)>] ContentFolder data, response status code and response headers def get_folder_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_folder_by_id ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_folder_by_id" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_folder_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_folder_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves a previous version of a Folder # Retrieves a previous version of a Folder # @param object_id [String] The Folder id. # @param revision_id [String] The Folder version id. # @param [Hash] opts the optional parameters # @return [VersionContentFolder] def get_folder_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = get_folder_previous_version_with_http_info(object_id, revision_id, opts) data end # Retrieves a previous version of a Folder # Retrieves a previous version of a Folder # @param object_id [String] The Folder id. # @param revision_id [String] The Folder version id. # @param [Hash] opts the optional parameters # @return [Array<(VersionContentFolder, Integer, Hash)>] VersionContentFolder data, response status code and response headers def get_folder_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_folder_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_folder_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling LandingPagesApi.get_folder_previous_version" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}/revisions/{revisionId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_folder_previous_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_folder_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves all the previous versions of a Folder # Retrieves all the previous versions of a Folder. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [String] :before # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @return [CollectionResponseWithTotalVersionContentFolder] def get_folder_previous_versions(object_id, opts = {}) data, _status_code, _headers = get_folder_previous_versions_with_http_info(object_id, opts) data end # Retrieves all the previous versions of a Folder # Retrieves all the previous versions of a Folder. # @param object_id [String] The Folder id. # @param [Hash] opts the optional parameters # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [String] :before # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @return [Array<(CollectionResponseWithTotalVersionContentFolder, Integer, Hash)>] CollectionResponseWithTotalVersionContentFolder data, response status code and response headers def get_folder_previous_versions_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_folder_previous_versions ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_folder_previous_versions" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}/revisions'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalVersionContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_folder_previous_versions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_folder_previous_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all Landing Page Folders # Get the list of Landing Page Folders. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits. # @param [Hash] opts the optional parameters # @option opts [Time] :created_at Only return Folders created at exactly the specified time. # @option opts [Time] :created_after Only return Folders created after the specified time. # @option opts [Time] :created_before Only return Folders created before the specified time. # @option opts [Time] :updated_at Only return Folders last updated at exactly the specified time. # @option opts [Time] :updated_after Only return Folders last updated after the specified time. # @option opts [Time] :updated_before Only return Folders last updated before the specified time. # @option opts [Array] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @option opts [String] :property # @return [CollectionResponseWithTotalContentFolderForwardPaging] def get_folders_page(opts = {}) data, _status_code, _headers = get_folders_page_with_http_info(opts) data end # Get all Landing Page Folders # Get the list of Landing Page Folders. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits. # @param [Hash] opts the optional parameters # @option opts [Time] :created_at Only return Folders created at exactly the specified time. # @option opts [Time] :created_after Only return Folders created after the specified time. # @option opts [Time] :created_before Only return Folders created before the specified time. # @option opts [Time] :updated_at Only return Folders last updated at exactly the specified time. # @option opts [Time] :updated_after Only return Folders last updated after the specified time. # @option opts [Time] :updated_before Only return Folders last updated before the specified time. # @option opts [Array] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @option opts [String] :property # @return [Array<(CollectionResponseWithTotalContentFolderForwardPaging, Integer, Hash)>] CollectionResponseWithTotalContentFolderForwardPaging data, response status code and response headers def get_folders_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_folders_page ...' end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders' # query parameters query_params = opts[:query_params] || {} query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil? query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil? query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil? query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil? query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil? query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalContentFolderForwardPaging' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_folders_page", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_folders_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all Landing Pages # 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. # @param [Hash] opts the optional parameters # @option opts [Time] :created_at Only return Landing Pages created at exactly the specified time. # @option opts [Time] :created_after Only return Landing Pages created after the specified time. # @option opts [Time] :created_before Only return Landing Pages created before the specified time. # @option opts [Time] :updated_at Only return Landing Pages last updated at exactly the specified time. # @option opts [Time] :updated_after Only return Landing Pages last updated after the specified time. # @option opts [Time] :updated_before Only return Landing Pages last updated before the specified time. # @option opts [Array] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @option opts [String] :property # @return [CollectionResponseWithTotalPageForwardPaging] def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end # Get all Landing Pages # 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. # @param [Hash] opts the optional parameters # @option opts [Time] :created_at Only return Landing Pages created at exactly the specified time. # @option opts [Time] :created_after Only return Landing Pages created after the specified time. # @option opts [Time] :created_before Only return Landing Pages created before the specified time. # @option opts [Time] :updated_at Only return Landing Pages last updated at exactly the specified time. # @option opts [Time] :updated_after Only return Landing Pages last updated after the specified time. # @option opts [Time] :updated_before Only return Landing Pages last updated before the specified time. # @option opts [Array] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @option opts [String] :property # @return [Array<(CollectionResponseWithTotalPageForwardPaging, Integer, Hash)>] CollectionResponseWithTotalPageForwardPaging data, response status code and response headers def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_page ...' end # resource path local_var_path = '/cms/v3/pages/landing-pages' # query parameters query_params = opts[:query_params] || {} query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil? query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil? query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil? query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil? query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil? query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPageForwardPaging' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_page", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves a previous version of a Landing Page # Retrieves a previous version of a Landing Page # @param object_id [String] The Landing Page id. # @param revision_id [String] The Landing Page version id. # @param [Hash] opts the optional parameters # @return [VersionPage] def get_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = get_previous_version_with_http_info(object_id, revision_id, opts) data end # Retrieves a previous version of a Landing Page # Retrieves a previous version of a Landing Page # @param object_id [String] The Landing Page id. # @param revision_id [String] The Landing Page version id. # @param [Hash] opts the optional parameters # @return [Array<(VersionPage, Integer, Hash)>] VersionPage data, response status code and response headers def get_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling LandingPagesApi.get_previous_version" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/revisions/{revisionId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionPage' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_previous_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieves all the previous versions of a Landing Page # Retrieves all the previous versions of a Landing Page. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [String] :before # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @return [CollectionResponseWithTotalVersionPage] def get_previous_versions(object_id, opts = {}) data, _status_code, _headers = get_previous_versions_with_http_info(object_id, opts) data end # Retrieves all the previous versions of a Landing Page # Retrieves all the previous versions of a Landing Page. # @param object_id [String] The Landing Page id. # @param [Hash] opts the optional parameters # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. # @option opts [String] :before # @option opts [Integer] :limit The maximum number of results to return. Default is 100. # @return [Array<(CollectionResponseWithTotalVersionPage, Integer, Hash)>] CollectionResponseWithTotalVersionPage data, response status code and response headers def get_previous_versions_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.get_previous_versions ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.get_previous_versions" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/revisions'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalVersionPage' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.get_previous_versions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#get_previous_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Push Landing Page draft edits live # Take any changes from the draft version of the Landing Page and apply them to the live version. # @param object_id [String] The id of the Landing Page for which it's draft will be pushed live. # @param [Hash] opts the optional parameters # @return [nil] def push_live(object_id, opts = {}) push_live_with_http_info(object_id, opts) nil end # Push Landing Page draft edits live # Take any changes from the draft version of the Landing Page and apply them to the live version. # @param object_id [String] The id of the Landing Page for which it's draft will be pushed live. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def push_live_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.push_live ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.push_live" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/draft/push-live'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.push_live", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#push_live\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a batch of Landing Pages # Retrieve the Landing Page objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Landing Page ids. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @return [BatchResponsePage] def read_batch(batch_input_string, opts = {}) data, _status_code, _headers = read_batch_with_http_info(batch_input_string, opts) data end # Retrieve a batch of Landing Pages # Retrieve the Landing Page objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Landing Page ids. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Landing Pages. Defaults to `false`. # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers def read_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.read_batch ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling LandingPagesApi.read_batch" end # resource path local_var_path = '/cms/v3/pages/landing-pages/batch/read' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:debug_return_type] || 'BatchResponsePage' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.read_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#read_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a batch of Folders # Update the Folder objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Folder ids. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @return [BatchResponseContentFolder] def read_folders(batch_input_string, opts = {}) data, _status_code, _headers = read_folders_with_http_info(batch_input_string, opts) data end # Retrieve a batch of Folders # Update the Folder objects identified in the request body. # @param batch_input_string [BatchInputString] The JSON array of Folder ids. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to return deleted Folders. Defaults to `false`. # @return [Array<(BatchResponseContentFolder, Integer, Hash)>] BatchResponseContentFolder data, response status code and response headers def read_folders_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.read_folders ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling LandingPagesApi.read_folders" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/batch/read' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:debug_return_type] || 'BatchResponseContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.read_folders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#read_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Rerun a previous A/B test # Rerun a previous A/B test. # @param ab_test_rerun_request_v_next [AbTestRerunRequestVNext] The JSON representation of the AbTestRerunRequest object. # @param [Hash] opts the optional parameters # @return [nil] def rerun_previous_ab_test(ab_test_rerun_request_v_next, opts = {}) rerun_previous_ab_test_with_http_info(ab_test_rerun_request_v_next, opts) nil end # Rerun a previous A/B test # Rerun a previous A/B test. # @param ab_test_rerun_request_v_next [AbTestRerunRequestVNext] The JSON representation of the AbTestRerunRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def rerun_previous_ab_test_with_http_info(ab_test_rerun_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.rerun_previous_ab_test ...' end # verify the required parameter 'ab_test_rerun_request_v_next' is set if @api_client.config.client_side_validation && ab_test_rerun_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'ab_test_rerun_request_v_next' when calling LandingPagesApi.rerun_previous_ab_test" end # resource path local_var_path = '/cms/v3/pages/landing-pages/ab-test/rerun' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_rerun_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.rerun_previous_ab_test", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#rerun_previous_ab_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Reset the Landing Page draft to the live version # Discards any edits and resets the draft to the live version. # @param object_id [String] The id of the Landing Page for which it's draft will be reset. # @param [Hash] opts the optional parameters # @return [nil] def reset_draft(object_id, opts = {}) reset_draft_with_http_info(object_id, opts) nil end # Reset the Landing Page draft to the live version # Discards any edits and resets the draft to the live version. # @param object_id [String] The id of the Landing Page for which it's draft will be reset. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def reset_draft_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.reset_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.reset_draft" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/draft/reset'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.reset_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#reset_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Restore a previous version of a Folder # Takes a specified version of a Folder and restores it. # @param object_id [String] The Folder id. # @param revision_id [String] The Folder version id to restore. # @param [Hash] opts the optional parameters # @return [ContentFolder] def restore_folder_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = restore_folder_previous_version_with_http_info(object_id, revision_id, opts) data end # Restore a previous version of a Folder # Takes a specified version of a Folder and restores it. # @param object_id [String] The Folder id. # @param revision_id [String] The Folder version id to restore. # @param [Hash] opts the optional parameters # @return [Array<(ContentFolder, Integer, Hash)>] ContentFolder data, response status code and response headers def restore_folder_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.restore_folder_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.restore_folder_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling LandingPagesApi.restore_folder_previous_version" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}/revisions/{revisionId}/restore'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.restore_folder_previous_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#restore_folder_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Restore a previous version of a Landing Page # Takes a specified version of a Landing Page and restores it. # @param object_id [String] The Landing Page id. # @param revision_id [String] The Landing Page version id to restore. # @param [Hash] opts the optional parameters # @return [Page] def restore_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = restore_previous_version_with_http_info(object_id, revision_id, opts) data end # Restore a previous version of a Landing Page # Takes a specified version of a Landing Page and restores it. # @param object_id [String] The Landing Page id. # @param revision_id [String] The Landing Page version id to restore. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def restore_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.restore_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.restore_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling LandingPagesApi.restore_previous_version" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/revisions/{revisionId}/restore'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.restore_previous_version", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#restore_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Restore a previous version of a Landing Page, to the draft version of the Landing Page # Takes a specified version of a Landing Page, sets it as the new draft version of the Landing Page. # @param object_id [String] The Landing Page id. # @param revision_id [Integer] The Landing Page version id to restore. # @param [Hash] opts the optional parameters # @return [Page] def restore_previous_version_to_draft(object_id, revision_id, opts = {}) data, _status_code, _headers = restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts) data end # Restore a previous version of a Landing Page, to the draft version of the Landing Page # Takes a specified version of a Landing Page, sets it as the new draft version of the Landing Page. # @param object_id [String] The Landing Page id. # @param revision_id [Integer] The Landing Page version id to restore. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.restore_previous_version_to_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.restore_previous_version_to_draft" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling LandingPagesApi.restore_previous_version_to_draft" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/revisions/{revisionId}/restore-to-draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.restore_previous_version_to_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#restore_previous_version_to_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Schedule a Landing Page to be Published # Schedule a Landing Page to be Published # @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentScheduleRequestVNext object. # @param [Hash] opts the optional parameters # @return [nil] def schedule(content_schedule_request_v_next, opts = {}) schedule_with_http_info(content_schedule_request_v_next, opts) nil end # Schedule a Landing Page to be Published # Schedule a Landing Page to be Published # @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentScheduleRequestVNext object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def schedule_with_http_info(content_schedule_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.schedule ...' end # verify the required parameter 'content_schedule_request_v_next' is set if @api_client.config.client_side_validation && content_schedule_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'content_schedule_request_v_next' when calling LandingPagesApi.schedule" end # resource path local_var_path = '/cms/v3/pages/landing-pages/schedule' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(content_schedule_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.schedule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Set a new primary language # Set a landing page as the primary language of a multi-language group. # @param set_new_language_primary_request_v_next [SetNewLanguagePrimaryRequestVNext] The JSON representation of the SetNewLanguagePrimaryRequest object. # @param [Hash] opts the optional parameters # @return [nil] def set_lang_primary(set_new_language_primary_request_v_next, opts = {}) set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts) nil end # Set a new primary language # Set a landing page as the primary language of a multi-language group. # @param set_new_language_primary_request_v_next [SetNewLanguagePrimaryRequestVNext] The JSON representation of the SetNewLanguagePrimaryRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.set_lang_primary ...' end # verify the required parameter 'set_new_language_primary_request_v_next' is set if @api_client.config.client_side_validation && set_new_language_primary_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'set_new_language_primary_request_v_next' when calling LandingPagesApi.set_lang_primary" end # resource path local_var_path = '/cms/v3/pages/landing-pages/multi-language/set-new-lang-primary' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(set_new_language_primary_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.set_lang_primary", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#set_lang_primary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Landing Page # 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. # @param object_id [String] The Landing Page id. # @param page [Page] The JSON representation of the updated Landing Page. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Landing Pages. Defaults to `false`. # @return [Page] def update(object_id, page, opts = {}) data, _status_code, _headers = update_with_http_info(object_id, page, opts) data end # Update a Landing Page # 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. # @param object_id [String] The Landing Page id. # @param page [Page] The JSON representation of the updated Landing Page. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Landing Pages. Defaults to `false`. # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def update_with_http_info(object_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.update" end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling LandingPagesApi.update" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(page) # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a batch of Landing Pages # Update the Landing Page objects identified in the request body. # @param batch_input_json_node [BatchInputJsonNode] The JSON representation of the updated Landing Pages. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Landing Pages. Defaults to `false`. # @return [BatchResponsePage] def update_batch(batch_input_json_node, opts = {}) data, _status_code, _headers = update_batch_with_http_info(batch_input_json_node, opts) data end # Update a batch of Landing Pages # Update the Landing Page objects identified in the request body. # @param batch_input_json_node [BatchInputJsonNode] The JSON representation of the updated Landing Pages. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Landing Pages. Defaults to `false`. # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers def update_batch_with_http_info(batch_input_json_node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update_batch ...' end # verify the required parameter 'batch_input_json_node' is set if @api_client.config.client_side_validation && batch_input_json_node.nil? fail ArgumentError, "Missing the required parameter 'batch_input_json_node' when calling LandingPagesApi.update_batch" end # resource path local_var_path = '/cms/v3/pages/landing-pages/batch/update' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_json_node) # return_type return_type = opts[:debug_return_type] || 'BatchResponsePage' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Landing Page draft # Sparse updates the draft version of a single Landing Page object identified by the id in the path. You only need to specify the column values that you are modifying. # @param object_id [String] The Landing Page id. # @param page [Page] The JSON representation of the updated Landing Page to be applied to the draft. # @param [Hash] opts the optional parameters # @return [Page] def update_draft(object_id, page, opts = {}) data, _status_code, _headers = update_draft_with_http_info(object_id, page, opts) data end # Update a Landing Page draft # Sparse updates the draft version of a single Landing Page object identified by the id in the path. You only need to specify the column values that you are modifying. # @param object_id [String] The Landing Page id. # @param page [Page] The JSON representation of the updated Landing Page to be applied to the draft. # @param [Hash] opts the optional parameters # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers def update_draft_with_http_info(object_id, page, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.update_draft" end # verify the required parameter 'page' is set if @api_client.config.client_side_validation && page.nil? fail ArgumentError, "Missing the required parameter 'page' when calling LandingPagesApi.update_draft" end # resource path local_var_path = '/cms/v3/pages/landing-pages/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(page) # return_type return_type = opts[:debug_return_type] || 'Page' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a Folder # Sparse updates a single Folder object identified by the id in the path. You only need to specify the column values that you are modifying. # @param object_id [String] The Folder id. # @param content_folder [ContentFolder] The JSON representation of the updated Folder. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Folders. Defaults to `false`. # @return [ContentFolder] def update_folder(object_id, content_folder, opts = {}) data, _status_code, _headers = update_folder_with_http_info(object_id, content_folder, opts) data end # Update a Folder # Sparse updates a single Folder object identified by the id in the path. You only need to specify the column values that you are modifying. # @param object_id [String] The Folder id. # @param content_folder [ContentFolder] The JSON representation of the updated Folder. # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Specifies whether to update deleted Folders. Defaults to `false`. # @return [Array<(ContentFolder, Integer, Hash)>] ContentFolder data, response status code and response headers def update_folder_with_http_info(object_id, content_folder, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update_folder ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling LandingPagesApi.update_folder" end # verify the required parameter 'content_folder' is set if @api_client.config.client_side_validation && content_folder.nil? fail ArgumentError, "Missing the required parameter 'content_folder' when calling LandingPagesApi.update_folder" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(content_folder) # return_type return_type = opts[:debug_return_type] || 'ContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a batch of Folders # Update the Folder objects identified in the request body. # @param batch_input_json_node [BatchInputJsonNode] # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [BatchResponseContentFolder] def update_folders(batch_input_json_node, opts = {}) data, _status_code, _headers = update_folders_with_http_info(batch_input_json_node, opts) data end # Update a batch of Folders # Update the Folder objects identified in the request body. # @param batch_input_json_node [BatchInputJsonNode] # @param [Hash] opts the optional parameters # @option opts [Boolean] :archived Whether to return only results that have been archived. # @return [Array<(BatchResponseContentFolder, Integer, Hash)>] BatchResponseContentFolder data, response status code and response headers def update_folders_with_http_info(batch_input_json_node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update_folders ...' end # verify the required parameter 'batch_input_json_node' is set if @api_client.config.client_side_validation && batch_input_json_node.nil? fail ArgumentError, "Missing the required parameter 'batch_input_json_node' when calling LandingPagesApi.update_folders" end # resource path local_var_path = '/cms/v3/pages/landing-pages/folders/batch/update' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_json_node) # return_type return_type = opts[:debug_return_type] || 'BatchResponseContentFolder' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update_folders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update languages of multi-language group # Explicitly set new languages for each landing page in a multi-language group. # @param update_languages_request_v_next [UpdateLanguagesRequestVNext] The JSON representation of the UpdateLanguagesRequest object. # @param [Hash] opts the optional parameters # @return [nil] def update_langs(update_languages_request_v_next, opts = {}) update_langs_with_http_info(update_languages_request_v_next, opts) nil end # Update languages of multi-language group # Explicitly set new languages for each landing page in a multi-language group. # @param update_languages_request_v_next [UpdateLanguagesRequestVNext] The JSON representation of the UpdateLanguagesRequest object. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def update_langs_with_http_info(update_languages_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LandingPagesApi.update_langs ...' end # verify the required parameter 'update_languages_request_v_next' is set if @api_client.config.client_side_validation && update_languages_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'update_languages_request_v_next' when calling LandingPagesApi.update_langs" end # resource path local_var_path = '/cms/v3/pages/landing-pages/multi-language/update-languages' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_languages_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( :operation => :"LandingPagesApi.update_langs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LandingPagesApi#update_langs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end end end