ilscipio/scipio-erp

View on GitHub
applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java

Summary

Maintainability
F
1 wk
Test Coverage

UpsServices has 25 methods (exceeds 20 allowed). Consider refactoring.
Open

public class UpsServices {

    private static final Debug.OfbizLogger module = Debug.getOfbizLogger(java.lang.invoke.MethodHandles.lookup().lookupClass());

    // SCIPIO: 2018-10-09: Fixed variable initialization to use final

    Method handleUpsShipmentAcceptResponse has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public static Map<String, Object> handleUpsShipmentAcceptResponse(Document shipmentAcceptResponseDocument, GenericValue shipmentRouteSegment, List<GenericValue> shipmentPackageRouteSegs,
                Delegator delegator, String shipmentGatewayConfigId, String resource, Map<String, ? extends Object> context, Locale locale) throws GenericEntityException {

      Method splitEstimatePackages has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          private static void splitEstimatePackages(DispatchContext dctx, Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo,
                  BigDecimal maxWeight, BigDecimal minWeight, String totalWeightStr) {

        Method getShipmentGatewayConfigValue has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            private static String getShipmentGatewayConfigValue(Delegator delegator, String shipmentGatewayConfigId, String shipmentGatewayConfigParameterName,
                    String resource, String parameterName, String defaultValue) {

          Method sendUpsRequest has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static String sendUpsRequest(String upsService, String xmlString, String shipmentGatewayConfigId,
                      String resource, Delegator delegator, Locale locale) throws UpsConnectException {

            Method addPackageElement has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private static void addPackageElement(DispatchContext dctx, Document requestDoc, Element shipmentElement, List<Map<String, Object>> shippableItemInfo, Map<String, BigDecimal> packageMap, BigDecimal minWeight) {

              Method getShipmentGatewayConfigValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  private static String getShipmentGatewayConfigValue(Delegator delegator, String shipmentGatewayConfigId, String shipmentGatewayConfigParameterName,
                          String resource, String parameterName) {

                Avoid too many return statements within this method.
                Open

                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsSurchargeCurrencyIsNotConfigurated", locale));

                  Avoid too many return statements within this method.
                  Open

                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorShipmentConfirmRequestXmlToString",
                                          UtilMisc.toMap("errorString", e.toString()), locale));

                    Avoid too many return statements within this method.
                    Open

                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentAcceptResponse",
                                            UtilMisc.toMap("errorString", e2.toString()), locale));

                      Avoid too many return statements within this method.
                      Open

                                  return handleUpsShipmentAcceptResponse(shipmentAcceptResponseDocument, shipmentRouteSegment, shipmentPackageRouteSegs, delegator,
                                          shipmentGatewayConfigId, resource, context, locale);

                        Avoid too many return statements within this method.
                        Open

                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentTrack",
                                            UtilMisc.toMap("errorString", e.toString()), locale));

                          Avoid too many return statements within this method.
                          Open

                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentPackageRouteSegsNotFound",
                                                  UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                            Avoid too many return statements within this method.
                            Open

                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsSurchargeAmountIsNotConfigurated", locale));

                              Avoid too many return statements within this method.
                              Open

                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingShipConfirm",
                                                      UtilMisc.toMap("errorString", e.toString()), locale));

                                Avoid too many return statements within this method.
                                Open

                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                        UtilMisc.toMap("errorString", e.toString()), locale));

                                  Avoid too many return statements within this method.
                                  Open

                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingTrackResponse",
                                                          UtilMisc.toMap("errorString", e2.toString()), locale));

                                    Avoid too many return statements within this method.
                                    Open

                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentThirdPartyPostalCodeNotFound",
                                                                UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                      Avoid too many return statements within this method.
                                      Open

                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentAcceptResponse",
                                                              UtilMisc.toMap("errorString", e2.toString()), locale));

                                        Avoid too many return statements within this method.
                                        Open

                                                    return dctx.getDispatcher().runSync("upsRateEstimateByPostalCode", cxt);

                                          Avoid too many return statements within this method.
                                          Open

                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginTelecomNumberNotFound",
                                                                  UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                            Avoid too many return statements within this method.
                                            Open

                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentConfirm",
                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                              Avoid too many return statements within this method.
                                              Open

                                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorVoidShipmentRequestXmlToString",
                                                                      UtilMisc.toMap("errorString", e.toString()), locale));

                                                Avoid too many return statements within this method.
                                                Open

                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginCountryGeoNotFound",
                                                                        UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingShipAccept",
                                                                          UtilMisc.toMap("errorString", e.toString()), locale));

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentCarrierShipmentMethodNotFound",
                                                                            UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "carrierPartyId", shipmentRouteSegment.get("carrierPartyId"), "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")), locale));

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentThirdPartyCountryNotFound",
                                                                                  UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentConfirm",
                                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                  UtilMisc.toMap("errorString", e.toString()), locale));

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                        return handleUpsVoidShipmentResponse(voidShipmentResponseDocument, shipmentRouteSegment, locale);

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsWeightValueNotFound",
                                                                                          UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentPackageSeqId", shipmentPackage.getString("shipmentPackageSeqId")), locale));

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                    if (ServiceUtil.isError(convertUomResult)) return convertUomResult;

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                          "FacilityShipmentUpsErrorShipmentAcceptRequestXmlToString",
                                                                                          UtilMisc.toMap("errorString", e.toString()), locale));

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingVoidShipmentResponse",
                                                                                            UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorTrackRequestXmlToString",
                                                                                              UtilMisc.toMap("errorString", e.toString()), locale));

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                      return handleUpsShipmentConfirmResponse(shipmentConfirmResponseDocument, shipmentRouteSegment, locale);

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                        return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError,
                                                                                                "FacilityShipmentUpsErrorRatingServiceSelectionRequestXmlToString",
                                                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return ServiceUtil.returnError(UtilMisc.toList(
                                                                                                      UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentConfirm",
                                                                                                              UtilMisc.toMap("errorString", e.toString()), locale),
                                                                                                      UtilProperties.getMessage(resourceError, "FacilityShipmentUpsShipmentConfirmResposeWasReceived",
                                                                                                              UtilMisc.toMap("shipmentConfirmResponseString", shipmentConfirmResponseString), locale)));

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingVoid",
                                                                                                        UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestPostalAddressNotFound",
                                                                                                          UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsCodFundsCodeIsNotConfigured", locale));

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                              UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingTrack",
                                                                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingTrackResponse",
                                                                                                                  UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRateEstimateError",
                                                                                                                UtilMisc.toMap("errorString", e.getMessage()), locale));

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
                                                                                                                      UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsApplyToPackagesIsNotConfigured", locale));

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingVoidShipmentResponse",
                                                                                                                          UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                            UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestCountryGeoNotFound",
                                                                                                                              UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                "FacilityShipmentUpsTrackingDigestWasNotSet", locale));

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                      return handleUpsTrackShipmentResponse(trackResponseDocument, shipmentRouteSegment, shipmentPackageRouteSegs, locale);

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentAcceptResponse",
                                                                                                                                    UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentVoid",
                                                                                                                                  UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsTrackingIdNumberWasNotSet", locale));

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingTrackResponse",
                                                                                                                                          UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentStatusNotStarted",
                                                                                                                                            UtilMisc.toMap("shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentId", shipmentId, "shipmentRouteSegmentStatus", shipmentRouteSegment.getString("carrierServiceStatusId")), locale));

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                          if (ServiceUtil.isError(getPackageValueResult)) return getPackageValueResult;

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                                                                  UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentAccept",
                                                                                                                                                UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingVoidShipmentResponse",
                                                                                                                                                      UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                            return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                                                    UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
                                                                                                                                                          UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                            "FacilityShipmentUpsErrorShipmentAcceptRequestXmlToString",
                                                                                                                                                            UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
                                                                                                                                                              UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                    return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                            UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                      return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                              UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                                "FacilityShipmentUpsErrorParsingAddressVerificationResponse",
                                                                                                                                                                UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                              Open

                                                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                                  "FacilityShipmentUpsErrorParsingAddressVerificationResponse",
                                                                                                                                                                  UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                Open

                                                                                                                                                        return ServiceUtil.returnSuccess(UtilProperties.getMessage("OrderUiLabels", "OrderReturnLabelEmailSuccessful", locale));

                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                  Open

                                                                                                                                                                  return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingRate",
                                                                                                                                                                          UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                    Open

                                                                                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentAlternateRate",
                                                                                                                                                                        UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                      Open

                                                                                                                                                                      return ServiceUtil.returnError(ServiceUtil.getErrorMessage(originEmail));

                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                        Open

                                                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound",
                                                                                                                                                                                UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                          Open

                                                                                                                                                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsWeightValueNotFound",
                                                                                                                                                                                      UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentPackageSeqId", shipmentPackage.getString("shipmentPackageSeqId")), locale));

                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                            Open

                                                                                                                                                                            return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError,
                                                                                                                                                                                    "FacilityShipmentUpsErrorRatingServiceSelectionRequestXmlToString",
                                                                                                                                                                                    UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                              Open

                                                                                                                                                                              return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingShipConfirm",
                                                                                                                                                                                      UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                Open

                                                                                                                                                                                return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError,
                                                                                                                                                                                        "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                                                                                        UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                  Open

                                                                                                                                                                                  return ServiceUtil.returnError(errorList);

                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                    Open

                                                                                                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                                                        "FacilityShipmentUpsErrorParsingAddressVerificationResponse",
                                                                                                                                                                                        UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                      Open

                                                                                                                                                                                  return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                                                          UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                        Open

                                                                                                                                                                                return handleUpsRateInquireResponse(rateResponseDocument, locale);

                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                          Open

                                                                                                                                                                                          return ServiceUtil.returnError(ServiceUtil.getErrorMessage(destEmail));

                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                            Open

                                                                                                                                                                                            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                                                                    "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                                                                                                    UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                              Open

                                                                                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentAccept",
                                                                                                                                                                                                  UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                Open

                                                                                                                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound",
                                                                                                                                                                                                        UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                  Open

                                                                                                                                                                                              return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingRate",
                                                                                                                                                                                                      UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                    Open

                                                                                                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginPostalAddressNotFound",
                                                                                                                                                                                                            UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                      Open

                                                                                                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
                                                                                                                                                                                                              "FacilityShipmentUpsTrackingDigestWasNotSet", locale));

                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                        Open

                                                                                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                                                                                                                                UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                          Open

                                                                                                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsNotRouteSegmentCarrier", UtilMisc.toMap("shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentId", shipmentId), locale));

                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                            Open

                                                                                                                                                                                                            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorSendingShipAccept",
                                                                                                                                                                                                                    UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                              Open

                                                                                                                                                                                                      return handleUpsAddressValidationResponse(avResponseDocument, locale);

                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                Open

                                                                                                                                                                                                                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
                                                                                                                                                                                                                        UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentCarrierShipmentMethodNotFound",
                                                                                                                                                                                                                          UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "carrierPartyId", shipmentRouteSegment.get("carrierPartyId"), "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")), locale));

                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorAccessRequestXmlToString",
                                                                                                                                                                                                                            UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                                                                                                                                              UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
                                                                                                                                                                                                                                UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                          return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
                                                                                                                                                                                                                                  UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
                                                                                                                                                                                                                                    UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                              return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                                                                                                      UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                                                                                                        UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                  return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorShipmentConfirmRequestXmlToString",
                                                                                                                                                                                                                                          UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                    return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingShipmentConfirm",
                                                                                                                                                                                                                                            UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
                                                                                                                                                                                                                                              UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                        return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
                                                                                                                                                                                                                                                UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                      return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorDataShipmentConfirm",
                                                                                                                                                                                                                                              UtilMisc.toMap("errorString", e.toString()), locale));

                                                                                                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
                                                                                                                                                                                                                                                    UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));

                                                                                                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                               return ServiceUtil.returnFailure(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsErrorParsingRatingServiceSelectionResponse",
                                                                                                                                                                                                                                                       UtilMisc.toMap("errorString", e2.toString()), locale));

                                                                                                                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                            return UtilMisc.toMap("shippingRates", shippingRates,
                                                                                                                                                                                                                                                    ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);

                                                                                                                                                                                                                                  There are no issues that match your filters.

                                                                                                                                                                                                                                  Category
                                                                                                                                                                                                                                  Status