< Summary

Information
Class: Services.ApiServices.OzonApi.Filters.FinanceTransactionOperation
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/FinanceTransactionListResponse.cs
Line coverage
53%
Covered lines: 7
Uncovered lines: 6
Coverable lines: 13
Total lines: 100
Line coverage: 53.8%
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_OperationId()100%210%
get_OperationType()100%11100%
get_OperationDate()100%11100%
get_OperationTypeName()100%11100%
get_DeliveryCharge()100%210%
get_ReturnDeliveryCharge()100%210%
get_AccrualsForSale()100%210%
get_SaleCommission()100%210%
get_Amount()100%11100%
get_Type()100%210%
get_Posting()100%11100%
get_Items()100%11100%
get_Services()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/FinanceTransactionListResponse.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices.OzonApi.Filters
 4{
 5    /// <summary>
 6    /// Ответ API /v3/finance/transaction/list — список транзакций (начислений).
 7    /// </summary>
 8    public class FinanceTransactionListResponse
 9    {
 10        [JsonProperty("result")]
 11        public FinanceTransactionListResult? Result { get; set; }
 12    }
 13
 14    public class FinanceTransactionListResult
 15    {
 16        [JsonProperty("operations")]
 17        public List<FinanceTransactionOperation>? Operations { get; set; } = new();
 18
 19        [JsonProperty("page_count")]
 20        public long PageCount { get; set; }
 21
 22        [JsonProperty("row_count")]
 23        public long RowCount { get; set; }
 24    }
 25
 26    public class FinanceTransactionOperation
 27    {
 28        [JsonProperty("operation_id")]
 029        public long OperationId { get; set; }
 30
 31        [JsonProperty("operation_type")]
 232        public string? OperationType { get; set; }
 33
 34        [JsonProperty("operation_date")]
 235        public string? OperationDate { get; set; }
 36
 37        [JsonProperty("operation_type_name")]
 238        public string? OperationTypeName { get; set; }
 39
 40        [JsonProperty("delivery_charge")]
 041        public double DeliveryCharge { get; set; }
 42
 43        [JsonProperty("return_delivery_charge")]
 044        public double ReturnDeliveryCharge { get; set; }
 45
 46        [JsonProperty("accruals_for_sale")]
 047        public double AccrualsForSale { get; set; }
 48
 49        [JsonProperty("sale_commission")]
 050        public double SaleCommission { get; set; }
 51
 52        [JsonProperty("amount")]
 453        public double Amount { get; set; }
 54
 55        [JsonProperty("type")]
 056        public string? Type { get; set; }
 57
 58        [JsonProperty("posting")]
 359        public FinanceTransactionPosting? Posting { get; set; }
 60
 61        [JsonProperty("items")]
 562        public List<FinanceTransactionItem>? Items { get; set; } = new();
 63
 64        [JsonProperty("services")]
 265        public List<FinanceTransactionService>? Services { get; set; } = new();
 66    }
 67
 68    public class FinanceTransactionPosting
 69    {
 70        [JsonProperty("delivery_schema")]
 71        public string? DeliverySchema { get; set; }
 72
 73        [JsonProperty("order_date")]
 74        public string? OrderDate { get; set; }
 75
 76        [JsonProperty("posting_number")]
 77        public string? PostingNumber { get; set; }
 78
 79        [JsonProperty("warehouse_id")]
 80        public string? WarehouseId { get; set; }
 81    }
 82
 83    public class FinanceTransactionItem
 84    {
 85        [JsonProperty("name")]
 86        public string? Name { get; set; }
 87
 88        [JsonProperty("sku")]
 89        public long Sku { get; set; }
 90    }
 91
 92    public class FinanceTransactionService
 93    {
 94        [JsonProperty("name")]
 95        public string? Name { get; set; }
 96
 97        [JsonProperty("price")]
 98        public double Price { get; set; }
 99    }
 100}