Interface QuoteUpdateExpirationTimeStrategy

    • Method Detail

      • updateExpirationTime

        QuoteModel updateExpirationTime​(QuoteAction quoteAction,
                                        QuoteModel quoteModel,
                                        UserModel userModel)
        Updates the expiration time for a quote depending on the action that is being performed and type of the quote user. Edit & Submit actions are being handled. When a buyer performs such actions, the expiration time is set to null. When a seller Submits the quote to the seller approver and the expiration time for it is set to a date before the current date plus the minimum offer validity period in days or not set at all, the expiration time is set to the current date plus the default offer validity period in days and with the time being end of day. Edit action is not handled for seller. Please see commerceservices project.properties file for the quote offer validity period parameters.
        Parameters:
        quoteAction - the action that is being performed
        quoteModel - the quote for which to update the expiration time
        userModel - the user performing the action on the quote
        Returns:
        QuoteModel updated quote model
        Throws:
        java.lang.IllegalArgumentException - if the quote user type is unknown