< Summary

Information
Class: OzonOrdersWeb.WebServices.Partners.PartnerActionResult
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/WebServices/Partners/PartnerOrderActionDtos.cs
Line coverage
62%
Covered lines: 5
Uncovered lines: 3
Coverable lines: 8
Total lines: 59
Line coverage: 62.5%
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%11100%
get_Success()100%11100%
get_Message()100%210%
get_Error()100%11100%
get_Reasons()100%210%
get_OzonStatus()100%210%
get_OzonStatusName()100%11100%
Fail(...)100%11100%

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
 1316public sealed record PartnerActionResult(
 217    bool Success,
 018    string Message,
 1319    PartnerActionError Error = PartnerActionError.None,
 020    IReadOnlyList<string>? Reasons = null,
 021    string? OzonStatus = null,
 1322    string? OzonStatusName = null)
 23{
 24    public static PartnerActionResult Fail(PartnerActionError error, string message, IReadOnlyList<string>? reasons = nu
 1325        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>
 55public sealed record PartnerShipRequirements(
 56    IReadOnlyList<PartnerCountryRequirement> Countries,
 57    IReadOnlyList<PartnerExemplarRequirement> Exemplars);
 58
 59public sealed record PartnerPrintedLabel(byte[] Content, string FileName, bool Generated, bool AutoShipped);