| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.ArmtekApi.Models.Response; |
| | | 4 | | |
| | | 5 | | /// <summary>getUserInfo — RESP.STRUCTURE.</summary> |
| | | 6 | | public class ArmtekUserInfoResponse |
| | | 7 | | { |
| | | 8 | | [JsonProperty("STRUCTURE")] public ArmtekUserStructure Structure { get; set; } = new(); |
| | | 9 | | } |
| | | 10 | | |
| | | 11 | | public 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> |
| | | 28 | | public 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> |
| | | 54 | | public 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 | | |
| | | 64 | | public 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 | | |
| | | 70 | | public 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 | | |
| | | 97 | | public class ArmtekScaleItem |
| | | 98 | | { |
| | 0 | 99 | | [JsonProperty("SUMMA")] public string Summa { get; set; } = string.Empty; |
| | 0 | 100 | | [JsonProperty("DISCOUNT")] public string Discount { get; set; } = string.Empty; |
| | | 101 | | } |
| | | 102 | | |
| | | 103 | | public 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 | | } |