guibranco/VTEX-SDK-dotnet

View on GitHub

Showing 31 of 51 total issues

File VTEXContext.cs has 1136 lines of code (exceeds 250 allowed). Consider refactoring.
Open

namespace VTEX
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
Severity: Major
Found in Src/VTEX/VTEXContext.cs - About 2 days to fix

    Class VTEXContext has 46 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public sealed class VTEXContext : IDisposable
        {
            #region Private fields
    
            /// <summary>
    Severity: Minor
    Found in Src/VTEX/VTEXContext.cs - About 6 hrs to fix

      File VTEXWrapper.cs has 348 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      namespace VTEX
      {
          using System;
          using System.Collections.Generic;
          using System.ComponentModel;
      Severity: Minor
      Found in Src/VTEX/VTEXWrapper.cs - About 4 hrs to fix

        Method GetOrderInternal has 88 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private Order GetOrderInternal(string orderId)
                {
                    LogConsumer.Trace("Getting order {0}", orderId);
                    var json = _wrapper
                        .ServiceInvokerAsync(
        Severity: Major
        Found in Src/VTEX/VTEXContext.cs - About 3 hrs to fix

          Method ServiceInvokerInternal has 57 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private async Task<string> ServiceInvokerInternal(
                      HttpRequestMethod method,
                      string endpoint,
                      CancellationToken token,
                      string data,
          Severity: Major
          Found in Src/VTEX/VTEXWrapper.cs - About 2 hrs to fix

            Method GetBridgeItems has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Pure]
                    public IEnumerable<BridgeItem> GetBridgeItems(
                        [Localizable(false)] string query,
                        [Localizable(false)] string sort,
                        [Localizable(false)] string keywords,
            Severity: Major
            Found in Src/VTEX/VTEXContext.cs - About 2 hrs to fix

              Method GetHostData has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      private string GetHostData(
                          ref string endpoint,
                          ref Dictionary<string, string> queryString,
                          RequestEndpoint restEndpoint,
                          ref Cookie cookie,
              Severity: Minor
              Found in Src/VTEX/VTEXWrapper.cs - About 1 hr to fix

                Method GetOrdersListInternal has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private OrdersList GetOrdersListInternal(
                            string status = null,
                            DateTime? startDate = null,
                            DateTime? endDate = null,
                            string salesChannel = null,
                Severity: Minor
                Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                  Method SearchAsync has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Pure]
                          public async Task<TDataEntity> SearchAsync<TDataEntity>(
                              string searchedField,
                              string searchedValue,
                              CancellationToken token
                  Severity: Minor
                  Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                    Method CancelOrderAsync has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public async Task<string> CancelOrderAsync(string orderId)
                            {
                                try
                                {
                                    LogConsumer.Warning("Cancelling order {0}", orderId);
                    Severity: Minor
                    Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                      Method RequestInternalAsync has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private static async Task<HttpResponseMessage> RequestInternalAsync(
                                  HttpRequestMethod method,
                                  CancellationToken token,
                                  string data,
                                  HttpClient client,
                      Severity: Minor
                      Found in Src/VTEX/VTEXWrapper.cs - About 1 hr to fix

                        Method UpdateSkuStockAsync has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public async Task UpdateSkuStockAsync(StockInfo stockInfo)
                                {
                                    try
                                    {
                                        if (stockInfo.Quantity < 0)
                        Severity: Minor
                        Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                          Method GetOrderListsValueInternal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private bool GetOrderListsValueInternal(
                                      Dictionary<string, string> queryString,
                                      int currentPage,
                                      ref OrdersList result
                                  )
                          Severity: Minor
                          Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                            Method HandleException has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private Exception HandleException(
                                        Exception exception,
                                        HttpResponseMessage response,
                                        Uri uri,
                                        HttpRequestMethod method,
                            Severity: Minor
                            Found in Src/VTEX/VTEXWrapper.cs - About 1 hr to fix

                              Method GetSkuReservationsAsync has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public async Task<int> GetSkuReservationsAsync(int skuId, string warehouseId)
                                      {
                                          try
                                          {
                                              LogConsumer.Info(
                              Severity: Minor
                              Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                                Method ServiceInvokerAsync has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        public async Task<string> ServiceInvokerAsync(
                                            HttpRequestMethod method,
                                            [Localizable(false)] string endpoint,
                                            CancellationToken token,
                                            Dictionary<string, string> queryString = null,
                                Severity: Minor
                                Found in Src/VTEX/VTEXWrapper.cs - About 1 hr to fix

                                  Method GetBridgeFacets has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          [Pure]
                                          public IEnumerable<BridgeFacet> GetBridgeFacets(
                                              [Localizable(false)] string query,
                                              [Localizable(false)] string keywords = null
                                          )
                                  Severity: Minor
                                  Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                                    Method NotifyOrderPaidAsync has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public async Task NotifyOrderPaidAsync(string orderId)
                                            {
                                                try
                                                {
                                                    LogConsumer.Info("Sending payment notification of order {0}", orderId);
                                    Severity: Minor
                                    Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                                      Method ChangeOrderStatusAsync has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              public async Task ChangeOrderStatusAsync(string orderId, OrderStatus newStatus)
                                              {
                                                  try
                                                  {
                                                      LogConsumer.Info(
                                      Severity: Minor
                                      Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

                                        Method NotifyOrderDelivered has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                public async ValueTask<string> NotifyOrderDelivered(Tracking tracking)
                                                {
                                                    try
                                                    {
                                                        LogConsumer.Info("Sending tracking info of order {0}", tracking.OrderId);
                                        Severity: Minor
                                        Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language