Class BaseOrderManagementWebservicesIntegrationTest

    • Field Detail

      • DEFAULT_CURRENT_PAGE

        protected static final java.lang.String DEFAULT_CURRENT_PAGE
        See Also:
        Constant Field Values
      • DEFAULT_PAGE_SIZE

        protected static final java.lang.String DEFAULT_PAGE_SIZE
        See Also:
        Constant Field Values
      • CUSTOMER_SUPPORT_AGENT_USERNAME

        protected static final java.lang.String CUSTOMER_SUPPORT_AGENT_USERNAME
        See Also:
        Constant Field Values
      • CUSTOMER_SUPPORT_AGENT_PASSWORD

        protected static final java.lang.String CUSTOMER_SUPPORT_AGENT_PASSWORD
        See Also:
        Constant Field Values
      • DEFAULT_CLIENT_ID

        protected static final java.lang.String DEFAULT_CLIENT_ID
        See Also:
        Constant Field Values
      • DEFAULT_CLIENT_SECRET

        protected static final java.lang.String DEFAULT_CLIENT_SECRET
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseOrderManagementWebservicesIntegrationTest

        public BaseOrderManagementWebservicesIntegrationTest()
    • Method Detail

      • getOrderByCode

        protected OrderWsDTO getOrderByCode​(java.lang.String code)
      • getOrdersByStatuses

        protected <T> T getOrdersByStatuses​(java.lang.String orderStatuses,
                                            java.lang.Class<T> responseType)
      • getOrderEntryForOrderCodeAndEntryNumber

        protected OrderEntryWsDTO getOrderEntryForOrderCodeAndEntryNumber​(java.lang.String code,
                                                                          java.lang.String entryNumber)
      • getOrderFraudReports

        protected FraudReportListWsDTO getOrderFraudReports​(java.lang.String code)
      • getReturnsByStatus

        protected <T> T getReturnsByStatus​(java.lang.String statuses,
                                           java.lang.Class<T> responseType)
      • getReturnForReturnCode

        protected ReturnRequestWsDTO getReturnForReturnCode​(java.lang.String returnCode)
      • getReturnEntriesForReturnCode

        protected ReturnEntrySearchPageWsDTO getReturnEntriesForReturnCode​(java.lang.String returnCode)
      • postRequestManualPaymentReversalForReturnRequest

        protected javax.ws.rs.core.Response postRequestManualPaymentReversalForReturnRequest​(java.lang.String returnCode)
      • postRequestManualTaxReversalForReturnRequest

        protected javax.ws.rs.core.Response postRequestManualTaxReversalForReturnRequest​(java.lang.String returnCode)
      • postCancelReturnRequestByDefault

        protected javax.ws.rs.core.Response postCancelReturnRequestByDefault​(CancelReturnRequestWsDTO cancelReturnRequestWsDTO)
      • postApproveFraudulentOrder

        protected javax.ws.rs.core.Response postApproveFraudulentOrder​(java.lang.String code)
      • postRejectFraudulentOrder

        protected javax.ws.rs.core.Response postRejectFraudulentOrder​(java.lang.String code)
      • postCancelOrder

        protected javax.ws.rs.core.Response postCancelOrder​(OrderCancelRequestWsDTO orderCancelRequestWsDTO,
                                                            java.lang.String code)
      • postCreateOrder

        protected javax.ws.rs.core.Response postCreateOrder​(OrderRequestWsDTO orderRequestWsDTO)
      • postManualPaymentVoid

        protected javax.ws.rs.core.Response postManualPaymentVoid​(java.lang.String code)
      • postManualTaxVoid

        protected javax.ws.rs.core.Response postManualTaxVoid​(java.lang.String code)
      • postManualTaxCommit

        protected javax.ws.rs.core.Response postManualTaxCommit​(java.lang.String code)
      • postManualTaxRequote

        protected javax.ws.rs.core.Response postManualTaxRequote​(java.lang.String code)
      • postManualPaymentReauth

        protected javax.ws.rs.core.Response postManualPaymentReauth​(java.lang.String code)
      • postManualDeliveryCostCommit

        protected javax.ws.rs.core.Response postManualDeliveryCostCommit​(java.lang.String code)
      • postDecideWorkflowAction

        protected javax.ws.rs.core.Response postDecideWorkflowAction​(java.lang.String workflowCode,
                                                                     java.lang.String workflowDecisionCode)
      • postDecideWorkflowActions

        protected javax.ws.rs.core.Response postDecideWorkflowActions​(WorkflowCodesListWsDto workflowCodesListWsDto,
                                                                      java.lang.String decisionCode)
      • getDefaultSecuredRestCall

        protected <T> T getDefaultSecuredRestCall​(java.lang.String path,
                                                  java.lang.String username,
                                                  java.lang.String password,
                                                  java.lang.String fields,
                                                  java.lang.String currentPage,
                                                  java.lang.String pageSize,
                                                  java.lang.Class<T> responseType)
        Builds a secured GET rest call
        Parameters:
        path - the url for the call
        username - the username used for authentication
        password - the password used for authentication
        fields - contains pagination information
        currentPage - the current page of the request
        pageSize - total page size
        responseType - the response entity type
        Returns:
      • postDefaultSecuredRestCall

        protected <T> T postDefaultSecuredRestCall​(java.lang.String path,
                                                   java.lang.String username,
                                                   java.lang.String password,
                                                   java.lang.String fields,
                                                   T requestBodyWsDTO,
                                                   java.lang.Class<T> responseType)
        Builds a POST rest call with the return type .
        Type Parameters:
        T - type of the body object
        Parameters:
        path - the url for the call
        username - the username used for authentication
        password - the password used for authentication
        fields - contains pagination information
        requestBodyWsDTO - the dto object sent with the request
        responseType - type of class to return
        Returns:
        the request class to return after the execution of the call
      • postDefaultSecuredRestCall

        protected <T> javax.ws.rs.core.Response postDefaultSecuredRestCall​(java.lang.String path,
                                                                           java.lang.String username,
                                                                           java.lang.String password,
                                                                           java.lang.String fields,
                                                                           T requestBodyWsDTO)
        Builds a secured POST rest call.
        Type Parameters:
        T - type of the body object
        Parameters:
        path - the url for the call
        username - the username used for authentication
        password - the password used for authentication
        fields - contains pagination information
        requestBodyWsDTO - the dto object sent with the request
        Returns:
        the result of the call
      • postEmptyBodySecuredRestCall

        protected javax.ws.rs.core.Response postEmptyBodySecuredRestCall​(java.lang.String path,
                                                                         java.lang.String username,
                                                                         java.lang.String password)
        Builds a secured POST rest call with an empty body
        Parameters:
        path - the url for the call
        username - the username for authentication
        password - the password for authentication
        Returns:
        the result of the call
      • putDefaultSecuredRestCall

        protected <S,​T> T putDefaultSecuredRestCall​(java.lang.String path,
                                                          java.lang.String username,
                                                          java.lang.String password,
                                                          java.lang.String fields,
                                                          S requestBodyWsDTO,
                                                          java.lang.Class<T> responseType)
        Builds a PUT rest call
        Type Parameters:
        T -
        Parameters:
        path - the url for the call
        username - the username used for authentication
        password - the password used for authentication
        fields - contains pagination information
        requestBodyWsDTO - the current dto which is to be updated
        responseType - type of class to return
        Returns:
        the request class to return after the execution of the call
      • assertBadRequestWithContent

        protected void assertBadRequestWithContent​(javax.ws.rs.core.Response response,
                                                   java.lang.String errorReason,
                                                   java.lang.String errorSubject,
                                                   java.lang.String ErrorSubjectType)
        Validates the first ErrorWsDTO content of the ErrorListWsDTO of the bad request
        Parameters:
        response - bad request response
        errorReason - error reason
        errorSubject - error subject
        ErrorSubjectType - error subject type
      • getExtensionNames

        protected java.util.List<java.lang.String> getExtensionNames()
        Gets a List of all extensions loaded in the current setup.
        Returns:
        populated List of all loaded extensions
      • setSetupImpexService

        public void setSetupImpexService​(SetupImpexService setupImpexService)
      • setEnumerationService

        public void setEnumerationService​(EnumerationService enumerationService)