Method: AsposeWordsCloud::GetDocumentStatisticsRequest#create_http_request

Defined in:
lib/aspose_words_cloud/models/requests/get_document_statistics_request.rb

#create_http_request(api_client) ⇒ Object

Raises:

  • (ArgumentError)


141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/aspose_words_cloud/models/requests/get_document_statistics_request.rb', line 141

def create_http_request(api_client)
  # verify the required parameter 'name' is set
  raise ArgumentError, 'Missing the required parameter name when calling WordsApi.get_document_statistics' if api_client.config.client_side_validation && self.name.nil?

  # resource path
  local_var_path = '/words/{name}/statistics'[1..-1]
  local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s)
  local_var_path = local_var_path.sub('//', '/')

  # query parameters
  query_params = {}
  query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil?
  query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil?
  query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil?
  query_params[downcase_first_letter('Password')] = self.password unless self.password.nil?
  query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil?
  query_params[downcase_first_letter('IncludeComments')] = self.include_comments unless self.include_comments.nil?
  query_params[downcase_first_letter('IncludeFootnotes')] = self.include_footnotes unless self.include_footnotes.nil?
  query_params[downcase_first_letter('IncludeTextInShapes')] = self.include_text_in_shapes unless self.include_text_in_shapes.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json'])

  # form parameters
  form_params = []
  files_content = []
  body = api_client.build_request_body(header_params, form_params, files_content)
  {
    'method': :GET,
    'path': local_var_path,
    'header_params': header_params,
    'query_params': query_params,
    'body': body,
    'auth_names': ['JWT']
  }
end