Method: UltracartClient::StorefrontApi#insert_update_page_content_attribute_with_http_info
- Defined in:
- lib/ultracart_api/api/storefront_api.rb
#insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Upsert a page content attribute Update a page content attribute, creating it new if it does not yet exist.
8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 |
# File 'lib/ultracart_api/api/storefront_api.rb', line 8937 def insert_update_page_content_attribute_with_http_info(storefront_oid, page_oid, page_attribute, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StorefrontApi.insert_update_page_content_attribute ...' end # verify the required parameter 'storefront_oid' is set if @api_client.config.client_side_validation && storefront_oid.nil? fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.insert_update_page_content_attribute" end # verify the required parameter 'page_oid' is set if @api_client.config.client_side_validation && page_oid.nil? fail ArgumentError, "Missing the required parameter 'page_oid' when calling StorefrontApi.insert_update_page_content_attribute" end # verify the required parameter 'page_attribute' is set if @api_client.config.client_side_validation && page_attribute.nil? fail ArgumentError, "Missing the required parameter 'page_attribute' when calling StorefrontApi.insert_update_page_content_attribute" end # resource path local_var_path = '/storefront/{storefront_oid}/pages/{page_oid}/content/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'page_oid' + '}', CGI.escape(page_oid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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; charset=UTF-8']) 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_attribute) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"StorefrontApi.insert_update_page_content_attribute", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: StorefrontApi#insert_update_page_content_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |