158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
# File 'lib/aspose_words_cloud/models/requests/insert_comment_request.rb', line 158
def create_http_request(api_client)
raise ArgumentError, 'Missing the required parameter name when calling WordsApi.insert_comment' if api_client.config.client_side_validation && self.name.nil?
raise ArgumentError, 'Missing the required parameter comment when calling WordsApi.insert_comment' if api_client.config.client_side_validation && self..nil?
self..validate
local_var_path = '/words/{name}/comments'[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_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('DestFileName')] = self.dest_file_name unless self.dest_file_name.nil?
query_params[downcase_first_letter('RevisionAuthor')] = self.revision_author unless self.revision_author.nil?
query_params[downcase_first_letter('RevisionDateTime')] = self.revision_date_time unless self.revision_date_time.nil?
= {}
['Content-Type'] = api_client.(['application/xml', 'application/json'])
form_params = []
files_content = []
if self..nil?
raise "Parameter Comment is required."
end
unless self..nil?
form_params.push({:'Name' => 'comment', :'Data' => self..to_body.to_json, :'MimeType' =>'application/json'})
end
body = api_client.build_request_body(, form_params, files_content)
{
'method': :POST,
'path': local_var_path,
'header_params': ,
'query_params': query_params,
'body': body,
'auth_names': ['JWT']
}
end
|