Method: AsposeCellsCloud::DeleteMetadataRequest#create_http_request

Defined in:
lib/aspose_cells_cloud/requests/delete_metadata_request.rb

#create_http_request(api_client, opts = {}) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/aspose_cells_cloud/requests/delete_metadata_request.rb', line 89

def create_http_request(api_client,opts = {})
  if api_client.config.debugging
    api_client.config.logger.debug "Calling API: CellsApi.delete_metadata ..."
  end
  api_client.request_token_if_needed
  # verify the required parameter 'file' is set
  if api_client.config.client_side_validation && file.nil?
      fail ArgumentError, "Missing the required parameter 'file' when calling CellsApi.delete_metadata "
  end 

  # resource path
  local_var_path = "v3.0/cells/metadata/delete"
  # query parameters
  query_params = {}
  query_params[:'type'] = self.type if !self.type.nil? 
  query_params[:'outFormat'] = self.out_format if !self.out_format.nil? 
  query_params[:'password'] = self.password if !self.password.nil? 
  query_params[:'checkExcelRestriction'] = self.check_excel_restriction if !self.check_excel_restriction.nil? 

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  post_body = nil 
  header_params['Content-Type'] = api_client.select_header_content_type(['multipart/form-data'])
  file.each do |filename , context|
  form_params[File.basename(filename)]  = context
  end

  #auth_names = []
  auth_names = ['JWT']
  data, status_code, headers = api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FilesResult')
  if api_client.config.debugging
    api_client.config.logger.debug "API called: Specification.Name>Api.delete_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end