< Summary

Information
Class: OzonOrdersWeb.WebServices.Partners.PartnerExemplarRequirement
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/WebServices/Partners/PartnerOrderActionDtos.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
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_ShipmentNumber()100%210%
get_ProductId()100%210%
get_ProductName()100%210%
get_OfferId()100%210%
get_ExemplarId()100%210%
get_Index()100%210%
get_Quantity()100%210%
get_NeedsMandatoryMark()100%210%
get_NeedsGtd()100%210%
get_NeedsRnpt()100%210%
get_Unsupported()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>
 041public sealed record PartnerExemplarRequirement(
 042    string ShipmentNumber,
 043    long ProductId,
 044    string ProductName,
 045    string OfferId,
 046    long ExemplarId,
 047    int Index,
 048    int Quantity,
 049    bool NeedsMandatoryMark,
 050    bool NeedsGtd,
 051    bool NeedsRnpt,
 052    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);