Notes
Notes - notes.io |
{
public class UpdateLossRunRequest
{
public string submission_id { get; set; }
public int submission_version { get; set; }
public string doc_ingestion_id { get; set; }
public string acquisition_expense { get; set; }
public List<string> document_ids { get; set; }
public List<LossRunPeriodUpdate> period_updates { get; set; }
}
public class LossRunPeriodUpdate
{
public string document_id { get; set; }
public string benefits_included { get; set; }
public string incurred_from { get; set; }
public string incurred_to { get; set; }
public string paid_from { get; set; }
public string paid_to { get; set; }
public string reporting_from { get; set; }
public string reporting_to { get; set; }
public string comments { get; set; }
public string contract_basis { get; set; }
public string administrator { get; set; }
}
}
public const string SQL_UPDATE_LOSSRUN = "SELECT * FROM c WHERE c.submission_id = @submissionId AND c.submission_version = @version AND c.doc_ingestion_id = @docIngestionId";
[HttpPut("update-loss-run")]
public async Task<IActionResult> UpdateLossRun([FromBody] UpdateLossRunRequest request)
{
if (request == null || string.IsNullOrEmpty(request.submission_id) || string.IsNullOrEmpty(request.doc_ingestion_id))
{
_logger.LogWarning("Invalid UpdateLossRun request");
return BadRequest("submission_id and doc_ingestion_id are required.");
}
try
{
_logger.LogInformation("Updating Loss Run for submission id {SubmissionId}, version {Version}, doc_ingestion_id {DocIngestionId}",
request.submission_id, request.submission_version, request.doc_ingestion_id);
var result = await _cosmosDbService.UpdateLossRunAsync(request);
if (result)
{
_logger.LogInformation("Loss Run updated successfully for submission id {SubmissionId}", request.submission_id);
return Ok(new { success = true, message = "Loss Run updated successfully" });
}
else
{
_logger.LogWarning("Loss Run not found for submission id {SubmissionId}", request.submission_id);
return NotFound(new { success = false, message = "Loss Run not found" });
}
}
catch (Exception ex)
{
_logger.LogError(ex, "An error occurred while updating Loss Run for submission id {SubmissionId}", request.submission_id);
return StatusCode(500, "An internal server error occurred.");
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
