2024-04-19 16:06:46 -07:00

27 lines
897 B
C#

using System.Collections.Generic;
using System.Text.Json;
namespace Adaptation.Shared.Metrology;
public partial class WS
{
// this class represents the response from the Inbound API endpoint
public class Results
{
// true or false if data was written to the database
public bool Success { get; set; }
// if true, contains ID of the Header record in the database
public long HeaderID { get; set; }
// if false, this collection will contain a list of errors
public List<string> Errors { get; set; }
// this collection will contain a list of warnings, they will not prevent data from being saved
public List<string> Warnings { get; set; }
// this is just a helper function to make displaying the results easier
public override string ToString() => JsonSerializer.Serialize(this, GetType());
}
}