< Summary

Information
Class: Services.ApiServices._1CApi.OData.Models.ODataErrorResponse
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/1CApi/OData/Models/ODataCatalogModels.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 108
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Error()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/1CApi/OData/Models/ODataCatalogModels.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices._1CApi.OData.Models;
 4
 5public class ODataOrganization
 6{
 7    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 8    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 9    [JsonProperty("ИНН")] public string? Inn { get; set; } = string.Empty;
 10    [JsonProperty("DeletionMark")] public bool DeletionMark { get; set; }
 11}
 12
 13public class ODataCounterparty
 14{
 15    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 16    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 17    [JsonProperty("ИНН")] public string? Inn { get; set; } = string.Empty;
 18    [JsonProperty("РегистрационныйНомер")] public string? RegistrationNumber { get; set; } = string.Empty;
 19
 20    public string? Identifier => !string.IsNullOrWhiteSpace(Inn) ? Inn : RegistrationNumber;
 21}
 22
 23public class ODataWarehouse
 24{
 25    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 26    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 27}
 28
 29public class ODataNomenclature
 30{
 31    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 32    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 33    [JsonProperty("Артикул")] public string? Article { get; set; } = string.Empty;
 34    [JsonProperty("IsFolder")] public bool IsFolder { get; set; }
 35
 36    /// <summary>Заполняется только в выборках сверки — признак того, что карточка пригодна для проведения.</summary>
 37    [JsonProperty("СчетУчетаЗапасов_Key")] public Guid? StockAccountKey { get; set; }
 38}
 39
 40/// <summary>
 41/// Строка табличной части «ДополнительныеРеквизиты» справочника номенклатуры.
 42/// Отдельный OData-эндпоинт позволяет выгрузить производителей всех карточек одним запросом,
 43/// вместо чтения каждой карточки по Ref_Key.
 44/// </summary>
 45public class ODataNomenclatureProperty
 46{
 47    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 48    [JsonProperty("Свойство_Key")] public Guid PropertyKey { get; set; }
 49    [JsonProperty("Значение")] public string? Value { get; set; } = string.Empty;
 50}
 51
 52public class ODataPropertyValue
 53{
 54    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 55    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 56    [JsonProperty("Owner_Key")] public Guid OwnerKey { get; set; }
 57    [JsonProperty("DeletionMark")] public bool DeletionMark { get; set; }
 58}
 59
 60public class ODataVatRate
 61{
 62    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 63    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 64}
 65
 66public class ODataContract
 67{
 68    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 69    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 70    [JsonProperty("Owner")] public Guid Owner { get; set; }
 71    /// <summary>Организация договора; null/пустой GUID — договор не привязан к организации (годится для любой).</summar
 72    [JsonProperty("Организация_Key")] public Guid? OrganizationKey { get; set; }
 73}
 74
 75public class ODataCountry
 76{
 77    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 78    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 79}
 80
 81public class ODataGtdCode
 82{
 83    [JsonProperty("Ref_Key")] public Guid RefKey { get; set; }
 84    [JsonProperty("Description")] public string? Description { get; set; } = string.Empty;
 85    [JsonProperty("РегистрационныйНомер")] public string? RegistrationNumber { get; set; } = string.Empty;
 86}
 87
 88public class ODataListResponse<T>
 89{
 90    [JsonProperty("value")] public List<T>? Value { get; set; } = new();
 91}
 92
 93public class ODataErrorResponse
 94{
 5795    [JsonProperty("odata.error")] public ODataErrorDetail? Error { get; set; }
 96}
 97
 98public class ODataErrorDetail
 99{
 100    [JsonProperty("code")] public string? Code { get; set; }
 101    [JsonProperty("message")] public ODataErrorMessage? Message { get; set; }
 102}
 103
 104public class ODataErrorMessage
 105{
 106    [JsonProperty("lang")] public string? Lang { get; set; }
 107    [JsonProperty("value")] public string? Value { get; set; }
 108}

Methods/Properties

get_Error()