< Summary

Information
Class: Services.ApiServices.ArmtekApi.Models.Response.ArmtekScaleItem
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/Models/Response/ArmtekUserInfoResponse.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 112
Line coverage: 0%
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_Summa()100%210%
get_Discount()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/ArmtekApi/Models/Response/ArmtekUserInfoResponse.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices.ArmtekApi.Models.Response;
 4
 5/// <summary>getUserInfo — RESP.STRUCTURE.</summary>
 6public class ArmtekUserInfoResponse
 7{
 8    [JsonProperty("STRUCTURE")] public ArmtekUserStructure Structure { get; set; } = new();
 9}
 10
 11public class ArmtekUserStructure
 12{
 13    [JsonProperty("KUNAG")] public string Kunag { get; set; } = string.Empty;
 14    [JsonProperty("VKORG")] public string Vkorg { get; set; } = string.Empty;
 15    [JsonProperty("SNAME")] public string ShortName { get; set; } = string.Empty;
 16    [JsonProperty("FNAME")] public string FullName { get; set; } = string.Empty;
 17    [JsonProperty("ADRESS")] public string Address { get; set; } = string.Empty;
 18    [JsonProperty("PHONE")] public string Phone { get; set; } = string.Empty;
 19
 20    /// <summary>Доступные покупатели. KUNNR = KUNNR_RG для остальных методов API.</summary>
 21    [JsonProperty("RG_TAB")] public List<ArmtekBuyerItem> RgTab { get; set; } = new();
 22}
 23
 24/// <summary>
 25/// Элемент RG_TAB (покупатель). WE_TAB/ZA_TAB/EXW_TAB/DOGOVOR_TAB/CONTACT_TAB вложены СЮДА,
 26/// а не являются соседними полями STRUCTURE — подтверждено живым тестированием getUserInfo.
 27/// </summary>
 28public class ArmtekBuyerItem
 29{
 30    [JsonProperty("KUNNR")] public string Kunnr { get; set; } = string.Empty;
 31    [JsonProperty("DEFAULT")] public int Default { get; set; }
 32    [JsonProperty("SNAME")] public string ShortName { get; set; } = string.Empty;
 33    [JsonProperty("FNAME")] public string FullName { get; set; } = string.Empty;
 34    [JsonProperty("ADRESS")] public string Address { get; set; } = string.Empty;
 35    [JsonProperty("PHONE")] public string Phone { get; set; } = string.Empty;
 36
 37    /// <summary>Доступные грузополучатели.</summary>
 38    [JsonProperty("WE_TAB")] public List<ArmtekPartyItem> WeTab { get; set; } = new();
 39
 40    /// <summary>Доступные адреса доставки/пункты выдачи.</summary>
 41    [JsonProperty("ZA_TAB")] public List<ArmtekPartyItem> ZaTab { get; set; } = new();
 42
 43    /// <summary>Адреса самовывоза.</summary>
 44    [JsonProperty("EXW_TAB")] public List<ArmtekExwItem> ExwTab { get; set; } = new();
 45
 46    /// <summary>Доступные договоры.</summary>
 47    [JsonProperty("DOGOVOR_TAB")] public List<ArmtekDogovorItem> DogovorTab { get; set; } = new();
 48
 49    /// <summary>Доступные контактные лица.</summary>
 50    [JsonProperty("CONTACT_TAB")] public List<ArmtekContactItem> ContactTab { get; set; } = new();
 51}
 52
 53/// <summary>Общая форма записи WE_TAB/ZA_TAB.</summary>
 54public class ArmtekPartyItem
 55{
 56    [JsonProperty("KUNNR")] public string Kunnr { get; set; } = string.Empty;
 57    [JsonProperty("DEFAULT")] public int Default { get; set; }
 58    [JsonProperty("SNAME")] public string ShortName { get; set; } = string.Empty;
 59    [JsonProperty("FNAME")] public string FullName { get; set; } = string.Empty;
 60    [JsonProperty("ADRESS")] public string Address { get; set; } = string.Empty;
 61    [JsonProperty("PHONE")] public string Phone { get; set; } = string.Empty;
 62}
 63
 64public class ArmtekExwItem
 65{
 66    [JsonProperty("ID")] public string Id { get; set; } = string.Empty;
 67    [JsonProperty("NAME")] public string Name { get; set; } = string.Empty;
 68}
 69
 70public class ArmtekDogovorItem
 71{
 72    [JsonProperty("VBELN")] public string Vbeln { get; set; } = string.Empty;
 73    [JsonProperty("BSTKD")] public string Bstkd { get; set; } = string.Empty;
 74    [JsonProperty("BSTKDT")] public string Bstkdt { get; set; } = string.Empty;
 75    [JsonProperty("BSTDK")] public string Bstdk { get; set; } = string.Empty;
 76    [JsonProperty("DATBI")] public string Datbi { get; set; } = string.Empty;
 77    [JsonProperty("DEFAULT")] public string Default { get; set; } = string.Empty;
 78    [JsonProperty("AUART")] public string Auart { get; set; } = string.Empty;
 79
 80    /// <summary>Кредитный лимит.</summary>
 81    [JsonProperty("KLIMK")] public string CreditLimit { get; set; } = string.Empty;
 82
 83    /// <summary>Кредитный остаток.</summary>
 84    [JsonProperty("KLIMKU")] public string CreditBalance { get; set; } = string.Empty;
 85
 86    /// <summary>Зарезервировано товара (заказы+поставки).</summary>
 87    [JsonProperty("OEIKW")] public string Reserved { get; set; } = string.Empty;
 88
 89    [JsonProperty("WAERS")] public string Currency { get; set; } = string.Empty;
 90
 91    /// <summary>Условия платежа (отсрочка).</summary>
 92    [JsonProperty("ZTERM")] public string PaymentTerms { get; set; } = string.Empty;
 93
 94    [JsonProperty("SCALE_TAB")] public List<ArmtekScaleItem> ScaleTab { get; set; } = new();
 95}
 96
 97public class ArmtekScaleItem
 98{
 099    [JsonProperty("SUMMA")] public string Summa { get; set; } = string.Empty;
 0100    [JsonProperty("DISCOUNT")] public string Discount { get; set; } = string.Empty;
 101}
 102
 103public class ArmtekContactItem
 104{
 105    [JsonProperty("PARNR")] public string Parnr { get; set; } = string.Empty;
 106    [JsonProperty("DEFAULT")] public string Default { get; set; } = string.Empty;
 107    [JsonProperty("FNAME")] public string FirstName { get; set; } = string.Empty;
 108    [JsonProperty("LNAME")] public string LastName { get; set; } = string.Empty;
 109    [JsonProperty("MNAME")] public string MiddleName { get; set; } = string.Empty;
 110    [JsonProperty("PHONE")] public string Phone { get; set; } = string.Empty;
 111    [JsonProperty("EMAIL")] public string Email { get; set; } = string.Empty;
 112}

Methods/Properties

get_Summa()
get_Discount()