def query_transaction_by_filter(filter)
      index_of_value = filter.calculate_index_of_value
      if index_of_value.nil?
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end

      case index_of_value
      when Enums::TransactionFilter::TRANSACTION_ID_INDEX
        query_transaction_by_id(filter.transaction_id.to_s)
      when Enums::TransactionFilter::ACCESS_CODE_INDEX
        query_transaction_by_access_code(filter.access_code)
      when Enums::TransactionFilter::INVOICE_NUMBER_INDEX
        query_transaction_with_path(filter.invoice_number, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_NUM_METHOD)
      when Enums::TransactionFilter::INVOICE_REFERENCE_INDEX
        query_transaction_with_path(filter.invoice_reference, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_REF_METHOD)
      else
        make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end
    end
def query_transaction_by_filter(filter)
      index_of_value = filter.calculate_index_of_value
      if index_of_value.nil?
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end

      case index_of_value
      when Enums::TransactionFilter::TRANSACTION_ID_INDEX
        query_transaction_by_id(filter.transaction_id.to_s)
      when Enums::TransactionFilter::ACCESS_CODE_INDEX
        query_transaction_by_access_code(filter.access_code)
      when Enums::TransactionFilter::INVOICE_NUMBER_INDEX
        query_transaction_with_path(filter.invoice_number, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_NUM_METHOD)
      when Enums::TransactionFilter::INVOICE_REFERENCE_INDEX
        query_transaction_with_path(filter.invoice_reference, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_REF_METHOD)
      else
        make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end
    end
Query a transaction by one of four properties transaction id, access
 code, invoice number, invoice reference

 @param [Enums::TransactionFilter] filter Filter definition for searching
 @return [QueryTransactionResponse]