< Summary

Information
Class: OzonOrdersWeb.WebServices.Partners.PartnerShipRequirements
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/WebServices/Partners/PartnerOrderActionDtos.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 59
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
.ctor(...)100%210%
get_Countries()100%210%
get_Exemplars()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/WebServices/Partners/PartnerOrderActionDtos.cs

#LineLine coverage
 1using Services.LabelServices;
 2
 3namespace OzonOrdersWeb.WebServices.Partners;
 4
 5public enum PartnerActionError
 6{
 7    None,
 8    NotFound,
 9    Forbidden,
 10    NotOzonOrder,
 11    NoOzonClient,
 12    Failed
 13}
 14
 15/// <summary>Итог действия партнёра над заказом. Сообщения написаны для человека, их можно показывать как есть.</summary
 16public sealed record PartnerActionResult(
 17    bool Success,
 18    string Message,
 19    PartnerActionError Error = PartnerActionError.None,
 20    IReadOnlyList<string>? Reasons = null,
 21    string? OzonStatus = null,
 22    string? OzonStatusName = null)
 23{
 24    public static PartnerActionResult Fail(PartnerActionError error, string message, IReadOnlyList<string>? reasons = nu
 25        new(false, message, error, reasons);
 26}
 27
 28public sealed record PartnerActionResult<T>(PartnerActionResult Result, T? Value)
 29{
 30    public bool Ok => Result.Success;
 31}
 32
 33/// <summary>Товар, для которого Ozon просит страну-изготовителя перед отгрузкой.</summary>
 34public sealed record PartnerCountryRequirement(long ProductId, string ProductName, string OfferId);
 35
 36public sealed record PartnerCountryOption(string Name, string CountryIsoCode);
 37
 38public sealed record PartnerCountrySelection(long ProductId, string CountryIsoCode);
 39
 40/// <summary>Экземпляр товара, для которого Ozon просит данные (Честный ЗНАК, ГТД, РНПТ).</summary>
 41public sealed record PartnerExemplarRequirement(
 42    string ShipmentNumber,
 43    long ProductId,
 44    string ProductName,
 45    string OfferId,
 46    long ExemplarId,
 47    int Index,
 48    int Quantity,
 49    bool NeedsMandatoryMark,
 50    bool NeedsGtd,
 51    bool NeedsRnpt,
 52    IReadOnlyList<string> Unsupported);
 53
 54/// <summary>Что нужно заполнить перед отгрузкой и печатью: без этого Ozon не соберёт отправление.</summary>
 055public sealed record PartnerShipRequirements(
 056    IReadOnlyList<PartnerCountryRequirement> Countries,
 057    IReadOnlyList<PartnerExemplarRequirement> Exemplars);
 58
 59public sealed record PartnerPrintedLabel(byte[] Content, string FileName, bool Generated, bool AutoShipped);