Class ReturnsControllerIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class ReturnsControllerIntegrationTest extends BaseOrderManagementWebservicesIntegrationTest
  • Constructor Details

    • ReturnsControllerIntegrationTest

      public ReturnsControllerIntegrationTest()
  • Method Details

    • setup

      public void setup()
    • getAllReturnCancellationReasons

      public void getAllReturnCancellationReasons()
    • getAllRefundReasons

      public void getAllRefundReasons()
    • getAllReturnActions

      public void getAllReturnActions()
    • getAllReturnStatuses

      public void getAllReturnStatuses()
    • getAllReturns

      public void getAllReturns()
    • getAllReturnsByStatus_Success

      public void getAllReturnsByStatus_Success()
    • getAllReturnsByStatus_FailureWrongStatus

      public void getAllReturnsByStatus_FailureWrongStatus()
    • getReturnForCode

      public void getReturnForCode()
    • getAllReturnEntriesForOrderCode

      public void getAllReturnEntriesForOrderCode()
    • testPostRequestManualPaymentReversalForReturnRequest

      public void testPostRequestManualPaymentReversalForReturnRequest()
    • testPostRequestManualTaxReversalForReturnRequest

      public void testPostRequestManualTaxReversalForReturnRequest()
    • testPostReturnRequest_ValidQtyReturn_Success

      public void testPostReturnRequest_ValidQtyReturn_Success()
    • testPostReturnRequest_InvalidRefundReason_Failure

      public void testPostReturnRequest_InvalidRefundReason_Failure()
    • testPostReturnRequest_InvalidHoldAction_Failure

      public void testPostReturnRequest_InvalidHoldAction_Failure()
    • testPostReturnRequest_NegativeRefundAmount_Failure

      public void testPostReturnRequest_NegativeRefundAmount_Failure()
    • testPostReturnRequest_ZeroRefundAmount_Failure

      public void testPostReturnRequest_ZeroRefundAmount_Failure()
    • testPostReturnRequest_NullRefundAmount_Failure

      public void testPostReturnRequest_NullRefundAmount_Failure()
    • testApproveReturnRequest_Success

      public void testApproveReturnRequest_Success()
    • testCancelReturnRequest_Success

      public void testCancelReturnRequest_Success()
    • testUpdateReturnRequest_Success

      public void testUpdateReturnRequest_Success()
    • testCancelReturnRequest_InvalidReason_Failure

      public void testCancelReturnRequest_InvalidReason_Failure()
    • testReturnRequestDuplicateEntries_Failure

      public void testReturnRequestDuplicateEntries_Failure()
    • testReturnRequestInvalidReturnQuantity_Failure

      public void testReturnRequestInvalidReturnQuantity_Failure()
    • createReturnRequestWsDTO

      protected ReturnRequestWsDTO createReturnRequestWsDTO(List<ReturnEntryWsDTO> returnEntriesWsDTO, String orderCode, Boolean refundDeliveryCost)
      Prepares requestbody from the given params for the POST call to create return
      Parameters:
      returnEntriesWsDTO -
      orderCode -
      refundDeliveryCost -
      Returns:
      returnRequestWsDTO populated from the given params
    • createReturnRequestModificationWsDTO

      protected ReturnRequestModificationWsDTO createReturnRequestModificationWsDTO(List<ReturnEntryModificationWsDTO> returnEntryModificationWsDTOs, Boolean refundDeliveryCost)
      Prepares requestbody from the given params for the ReturnEntryModificationWsDTO
      Parameters:
      returnEntryModificationWsDTOs - list of ReturnEntryModificationWsDTO
      refundDeliveryCost - true if add deliver cost
      Returns:
      ReturnRequestModificationWsDTO
    • createReturnEntryModificationWsDTO

      protected ReturnEntryModificationWsDTO createReturnEntryModificationWsDTO(String productCode, BigDecimal amount)
      Prepares requestbody from the given params for the ReturnEntryModificationWsDTO
      Parameters:
      productCode - product code
      amount - total amount for the return entry
      Returns:
      ReturnEntryModificationWsDTO
    • createDefaultReturn

      protected ReturnRequestWsDTO createDefaultReturn()
      create default return using rest call
      Returns:
      ReturnRequestWsDTO
    • createCancelReturnRequestWsDTO

      protected CancelReturnRequestWsDTO createCancelReturnRequestWsDTO(String code, String reason, String notes)
      Prepares a request body dto from the given params for the POST call to cancel a return request.
      Parameters:
      code - the RMA code
      reason - the reason for cancellation
      notes - the notes for the cancellaiton
      Returns:
      CancelReturnRequestWsDTO populated from the params
    • createReturnEntryWsDTO

      protected ReturnEntryWsDTO createReturnEntryWsDTO(Long expectedQuantity, String action, String notes, String refundReason, Integer entryNumber, Double refundAmount)
      Prepares ReturnEntryWsDTO from the given params
      Parameters:
      expectedQuantity -
      action -
      notes -
      refundReason -
      entryNumber -
      refundAmount -
      Returns:
      returnEntryWsDTO